Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 21019 - [bootsplash] suggestion for progress bar implementation
Summary: [bootsplash] suggestion for progress bar implementation
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
: 21705 31633 (view as bug list)
Depends on:
Blocks: 31543
  Show dependency tree
 
Reported: 2003-05-14 14:01 UTC by Michael Aichler
Modified: 2011-10-30 22:38 UTC (History)
18 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Here's the patch... (rc-scripts-1.4.3.11p2.patch,953 bytes, patch)
2003-10-16 13:41 UTC, Michael Aichler
Details | Diff
bootsplash.patch (bootsplash.patch,7.72 KB, patch)
2003-10-16 15:19 UTC, Martin Schlemmer (RETIRED)
Details | Diff
bootsplash2.patch (bootsplash2.patch,3.67 KB, patch)
2003-10-17 00:17 UTC, Martin Schlemmer (RETIRED)
Details | Diff
/etc/init.d/halt.sh (halt.sh,4.71 KB, text/plain)
2003-10-17 12:18 UTC, Martin Schlemmer (RETIRED)
Details
patch for bootsplash tarball (tarball.patch,5.62 KB, patch)
2003-11-27 09:41 UTC, Tyler Trafford
Details | Diff
patch to ebuild to make the patched tarball work (ebuild.patch,473 bytes, patch)
2003-11-27 09:43 UTC, Tyler Trafford
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Aichler 2003-05-14 14:01:19 UTC
Hi, 
 
I made a patch against the baselayout package adding support for a progressbar, 
text and animations (only basic support yet) to the silent bootsplash during 
startup/shutdown. I tried to modify the files as little as possible. Finally affected 
files are: 
 
baselayout: 
- /sbin/rc 
- /sbin/functions.sh 
- /etc/init.d/halt.sh 
bootsplash: 
/etc/conf.d/bootsplash.conf 
 
How it works: 
/sbin/functions.sh got 3 new functions - splash_init(), splash_calc() and 
splash_update(). Additionally the function eend() was extended by a call to 
splash_update() for those not listed in /etc/runlevels/*/* (e.g. the inline scripts in 
/sbin/rc). 
During startup/shutdown splash_init() is called at the beginning of /sbin/rc (before 
the boot part) which initialises some variables and a counter (this is necessary to 
show the progress of the inline scripts in /sbin/rc, otherwise the delay between 
display of the bootsplash and the first step of the progressbar would be too big). 
 
After the boot part splash_calc() is called which calculates the number of scripts that 
have to be executed (without dependecies). 
Finally the last two extensions to /sbin/rc call splash_update(). The first resides in 
the for-loop stopping services, the second in the for-loop starting services. 
splash_update() expects to arguments ("script-name", "start|stop") and passes them 
to the wrapper script /sbin/splash (the arguments are used to start|stop animations 
according to the script-name and the appropriate entry in animations.cfg). 
/sbin/splash first execs the real splash executable (/sbin/splash.bin) paints  a 
message above the progressbar and finally updates the progressbar.  
 
The source, additional information and a few screenshots are available at 
http://www.aichler.net/gentoo/bootsplash/ 
 
So, what do you think about it ? 
 
micha
Comment 1 Michael Aichler 2003-05-19 15:00:45 UTC
While I was working on the animations support I discovered that /sbin/rc 
was not the best place for updating the progress bar, so I moved the two 
calls to splash_update() to /sbin/runscript.sh and adapted the functions in 
/sbin/functions.sh. 
Some other things have changed, too. 
 
Please drop version 0.2 and have a look at version 0.3. 
(It's still available at http://www.aichler.net/gentoo/bootsplash)  
 
Thanks, 
micha 
Comment 2 Michael Aichler 2003-05-24 08:35:56 UTC
Stupidly I developed the progressbar with baselayout version 1.8.5.9 and 
didn't notice that the implementation did not work with version 1.8.6.5 and 
above as expected because of major changes in the init scripts. 
I fixed that issue in version 0.4 
 
micha 
Comment 3 Troy Dack 2003-06-16 02:52:18 UTC
Bumping to azarah because he is the baselayout guru and I don't want to break 
anything in there. 
 
This may take some time before it makes it into Gentoo, please be patient. 
Comment 4 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2003-07-08 17:26:01 UTC
This looks very interresting :)
Comment 5 Tobias Sager 2003-07-15 23:29:40 UTC
This works very fine here (except the animated logos)!
Go for it!
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2003-08-10 13:32:44 UTC
Hi guys - been a bit busy last month or two (not Gentoo related).  I will
try to add this in one of the next baselayout releases, as I did promise
it to a few other people as well.

What is the chance of getting the animated logo's to work in the mean time?

Also, anybody know of an effort to get it ported to 2.6?  One of the main
reasons I have not gotten to this sooner, as this box err ... _cannot_ run
a 2.4 kernel currently.
Comment 7 SpanKY gentoo-dev 2003-08-10 13:50:15 UTC
*** Bug 21705 has been marked as a duplicate of this bug. ***
Comment 8 Michael Aichler 2003-08-11 05:45:23 UTC
Hi, 
 
> What is the chance of getting the animated logo's to work in the mean 
time? 
 
Animations running during default runlevel work well, but fbmngplay seems 
to be killed 
in sysinit/boot runlevel which leads to a frozen animation. 
I haven't had time to figure out what is responsible for it, because I'm 
currently 
working at an extension to fbtruetype, so that it's possible to show several 
lines of text 
one after another by erasing the framebuffer with a copy of the original 
background 
(was a feature request and would allow to show information about the 
currently executed 
script ). 
 
And - I wondered if it's the right path to play animations script dependend 
(or at least one by one), 
because of the parallel execution of start scripts. This might shorten the 
playtime of an animation 
to a minimum and IMHO parallel execution will become standard on the long 
run, won't it ? 
 
 
> Also, anybody know of an effort to get it ported to 2.6?  One of the main 
> reasons I have not gotten to this sooner, as this box err ... _cannot_ run 
> a 2.4 kernel currently. 
 
Don't know anything about it yet. 
 
Comment 9 Martin Schlemmer (RETIRED) gentoo-dev 2003-08-11 13:39:58 UTC
Right, shout if you need info.  On the parallel front - I did add initial
for people asking, but it seems to be an overkill for bash.  Thus either
change things mightely again, or drop it.
Comment 10 SpanKY gentoo-dev 2003-08-11 16:36:36 UTC
ive been workin on moving the patch to 2.6 if anyone cares ;) 
i'll post it here soonish 
Comment 11 SpanKY gentoo-dev 2003-08-11 20:29:36 UTC
well, i was making the patch then i started reading some docs at bootsplash.org which made me stop ;)

4) Will the bootsplash patch be included officially in future kernel versions?
We would like to see that happen. But before that can happen, some things have to be cleaned up. The framebuffer interface of kernel 2.5/2.6 is completely different from 2.4, which means that large parts of the bootsplash have to be rewritten. Implementing other bit depths than 16bit, and other picture loaders than the jpg one are things that come to the mind. Also the userspace utility needs nicer config files. There is currently no code that works with 2.5.

in other words i give up ;)
if they cant handle it quickly i doubt i can
Comment 12 Martin Schlemmer (RETIRED) gentoo-dev 2003-08-26 13:28:43 UTC
I have sorda 'ported' everything here except for the fbcon-splash16.c, which
is the 16bit fbcon driver.  That is much more work as it will need a fair large
rewrite.  Thus if anybody can get fbcon-splash16.c to work (check the sceleton
fbcon driver first, and compare), drop me a mail, I can send what I have ...
Comment 13 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-14 14:26:06 UTC
Michael, I added the rc-scripts bits to baselayout-1.8.6.11 with some changes
to suite form, as well as added compat with non bootsplash systems.  Can
you
have a look.

On another note - do you think you will have time to modify our bootsplash
ebuild to install your scripts, with the animations ?

Thanks.
Comment 14 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-15 12:34:51 UTC
Ok, I see I messed up things a bit - only have 2.4 at work though, so it
might
be a while to get fixed.
Comment 15 Michael Aichler 2003-10-16 13:37:24 UTC
I'm currently quite busy at work, so sorry for the delay !

> Michael, I added the rc-scripts bits to baselayout-1.8.6.11 [...]

Great ;)

> Can you have a look.

I had a look at it yesterday night.
At first the progressbar didn't come up and it took me a while to get it
working.
Here are some issues:

1) the test for existing /proc/splash in splash_init () fails, cause /proc
is mounted later on.

2) the boot message does not come up because of the same test in the rc_splash
() function.

3) in splash_update() were two escape errors in the dependancy check

I'll attach a patch that hopefully solves these parts ;)

> On another note - do you think you will have time to modify our bootsplash
> ebuild to install your scripts, with the animations ?
>
> Thanks.

I'd like to, of course, but I run at full capacity and don't know when I
have time for it.
If there's no deadline, I can modify it, though.

> Ok, I see I messed up things a bit - only have 2.4 at work though, so it
> might
> be a while to get fixed.

Does the patch help ?
Comment 16 Michael Aichler 2003-10-16 13:41:17 UTC
Created attachment 19330 [details, diff]
Here's the patch...
Comment 17 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-16 15:01:52 UTC
I have some other fixes as well - btw, cant we change:

--
-		if [ -z "$(ls -1 \"${1}/softscripts/\" 2> /dev/null | grep \"${2}\")"
]
+		if [ -z "$(ls -1 "${1}/softscripts/" 2>/dev/null | grep "${2}")" ]
--

to:

--
-		if [ -z "$(ls -1 \"${1}/softscripts/\" 2> /dev/null | grep \"${2}\")"
]
+		if [ ! -L "${1}/softscripts/${2}" ]
--

Seems the same thing except it do not need the ls/grep magic.
Comment 18 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-16 15:19:19 UTC
Created attachment 19335 [details, diff]
bootsplash.patch

Ok, here is a patch with your fixes, as well as some of mine - I once again
will only be able to test it tomorrow though.

Also, not using SOFTLEVEL and BOOTLEVEL will cause the profile stuff to
break, so fixed that, and just use svcdir, as it is defined at this stage.

Btw: the ebuild is not that crusial yet.
Comment 19 Michael Aichler 2003-10-16 15:32:43 UTC
> Seems the same thing except it do not need the ls/grep magic.

Definitely ! 

I wonder what made me do that ;)
 
Comment 20 Michael Aichler 2003-10-16 15:47:21 UTC
> Ok, here is a patch with your fixes, as well as some of mine - I once again
> will only be able to test it tomorrow though.

Just applied the patch and tested it. 
Works all but the boot message.
Comment 21 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-17 00:17:55 UTC
Created attachment 19344 [details, diff]
bootsplash2.patch

This should fix the remainging issues, except for the killall5 issue, which
I am wondering what to do about.  It should go on top of the bootsplash.patch.
Comment 22 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-17 12:18:33 UTC
Created attachment 19366 [details]
/etc/init.d/halt.sh

This halt.sh fixes it for me - would appreciate some testing/comments.
Comment 23 Michael Aichler 2003-10-18 03:35:12 UTC
> This halt.sh fixes it for me - would appreciate some testing/comments.

Just tested it, works fine except the killall issue on system shutdown/reboot.
You've introduced a new argument "continue" to /sbin/splash, do you have
modified /sbin/splash as well ?
Besides that -  this part in /sbin/function.sh makes no sense to me, cause
the first thing init does on shutdown/reboot is to send these killall signals.
I had disabled these lines in the patch and haven't had any problems, so,
what is it for ?
Comment 24 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-21 23:03:23 UTC
*** Bug 31633 has been marked as a duplicate of this bug. ***
Comment 25 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-21 23:05:06 UTC
Fixed the killall issue btw.
Comment 26 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-22 03:38:25 UTC
Great news for 2.6 users - a port is out:

  http://marc.theaimsgroup.com/?l=linux-kernel&m=106681497425277&w=2

Comment 27 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-22 03:42:25 UTC
Err, on crack there - its the progress patch .. ill have a look if i get
time.
Comment 28 Michael Prager 2003-11-01 03:57:26 UTC
Will a fix for this issue be in portage any time soon? It's bretty annoying...
Comment 29 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-09 17:15:57 UTC
Its actually Tad's domain - I'll ping him and see.
Comment 30 Lourdes Jones 2003-11-16 11:58:45 UTC
Since the Usage error message seems to be marked as a duplicate of this one.

edit /sbin/functions.sh
in splash)update (){
change  /sbin/splash "${myscript}" "${action}"
to read /sbin/splash "${myscript} ${action}"

mentioned by relyt in http://forums.gentoo.org/viewtopic.php?t=103591

Also Stephen Ressenar has updated the bootsplash.org patch for kernel 2.6.0-test9 (works with test9, test9-mm1, test9-mm2, test9-mm3 in all tests)
ftp://ftp.suse.com/pub/people/stepan/bootsplash/kernel/bootsplash-3.1.3-2.6.0-test9.diff
(This is the original for the version which has been updated on bootsplash sourceforge page, bootsplash.org will not be updated til Monday) 
Comment 31 Tyler Trafford 2003-11-27 09:41:06 UTC
Created attachment 21368 [details, diff]
patch for bootsplash tarball

patch bootsplash tarball to include splash script (gentoo specific), and fix
missing -n in initscript.
Comment 32 Tyler Trafford 2003-11-27 09:43:15 UTC
Created attachment 21369 [details, diff]
patch to ebuild to make the patched tarball work

This patch makes the previous splash get installed as splash.bin, and installs
the gentoo specific splash script.

These two patches together make the progressbar work, and get rid of the "usage
errors" that people have been complaining about.
Comment 33 Brad Laue (RETIRED) gentoo-dev 2003-12-01 06:46:40 UTC
Any chance of updating this for baselayout 1.8.6.12? Using it here and it's working, but not sure what it's replaced or how portable it is.

I really like this, and think it should become part of the system itself.
Comment 34 Seemant Kulleen (RETIRED) gentoo-dev 2003-12-11 10:42:50 UTC
Tad, can you give your seal of approval on this?
Comment 35 merwan kashouty 2003-12-11 20:23:08 UTC
whoa.... this looks really good... progressbar is awsome and no more usage spam... very nice work.
Comment 36 Martin Schlemmer (RETIRED) gentoo-dev 2003-12-13 05:05:56 UTC
Brad, I have not looked at this (splash ebuild stuff), and it seems Tad is
sorda missing in action.  If you want, update the bootsplash ebuild, mark
as unstable and depend on >=baselayout-1.8.6.12.
Comment 37 Ian Leitch (RETIRED) gentoo-dev 2004-01-05 13:43:19 UTC
Patch applied and works fine here. 
Comment 38 Troy Dack 2004-01-09 06:16:14 UTC
bootsplash-0.6-r3 comitted to CVS.

Tyler, thanks for the patches.

Sorry for the delay on this guys.