WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Plymouth splash, displaying message  (Read 8748 times)

Offline kimmo

  • Newbie
  • *
  • Posts: 9
Plymouth splash, displaying message
« on: February 24, 2014, 01:52:32 PM »
I'm PXE booting TC 5.2 and I added plymouth-initrd.gz in to PXE boot.
I took plymouth-initrd from the tinycore wiki.

TC boots okay and Plymouth splash is working okay, I can see tinycore logo and rotating element just fine.
But I would like to show some text in the graphical splash (not in the text mode), mainly about the state of the PXE boot when loading TCZ't over http:
"loading package 4/37" or "25% of the TCZ's loaded" etc.

Plymouthd is started from /etc/init.d/rcS like in the example in the wiki.

To show text, I added some stuff to tc-config, such as:
/bin/plymouth display-message --text="testing 123"
or
/bin/plymouth plymouth update --status="testing 321"

but those had no affect at all.

Does anyone know how to display messages in plymouth or any examples regarding the messages?

I found one but don't know is that can be implemented in the initrd from wiki:
http://joekuan.wordpress.com/2010/08/05/plymouth-create-your-own-splash-screen-with-scrolling-boot-messages/

Do I have to create plymouth script which is then configured to template file?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Plymouth splash, displaying message
« Reply #1 on: February 24, 2014, 02:15:25 PM »
1.  The wiki states that this is a stripped down version, it does not say that scroling text is supported.  It may not be.
2.  Libpng12.so is not available for Core 5.2.

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
Re: Plymouth splash, displaying message
« Reply #2 on: February 28, 2014, 06:56:46 PM »
It's been a long time since I've worked on plymouth for TC. I only ever had it working in VMware and on Intel graphics (I had access to two of these: http://www.advantech.com/products/GF-BVL2/UNO-1172AH/mod_93C7C665-0892-48E8-A097-FB0B9AB3369F.aspx). I haven't maintained it because there's been almost no interest in it from the board. Since I mainly use Slackware this is the only exposure I had to plymouth. You would have to do some research to see how the text plugin works in other distributions, then try to bring back that knowledge. I have a build script I can pass along that worked for TC 5.0, but it's on my work computer so it will have to wait until I'm back on that machine.

What sort of hardware are you trying this on? Are you wanting to use the KMS/DRM hardware accelerated version, or the framebuffer version? Is this for a kiosk type application, or something else?

Andy

Offline kimmo

  • Newbie
  • *
  • Posts: 9
Re: Plymouth splash, displaying message
« Reply #3 on: March 21, 2014, 03:52:35 AM »
What sort of hardware are you trying this on? Are you wanting to use the KMS/DRM hardware accelerated version, or the framebuffer version? Is this for a kiosk type application, or something else?
Andy

I'm running this now on KVM but would like to run it in any hardware, so maybe framebuffer would be the best option.
In the meantime, I'm now using text console and dialog to show progress, I might not investigate plymouth anymore.

Thanks for your help.

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Plymouth splash, displaying message
« Reply #4 on: January 12, 2015, 03:14:03 AM »
Hi all!

I've managed to get plymouth to display messages (even scrolling messages) with TCv5.4. Andyj's instruction was only missing the '/lib/plymouth/label.so' file (inserted into the plymouth-initrd.gz) for plymouth to have displaying messages capability (I'm not 100% sure that that's the only other requirement since I've made so many changes already to this system). So now when I'm in the terminal (with the help of an additional plymouth script I cobbled up from the internet), I could type
Code: [Select]
# plymouth update --status="message 1"for "message 1" to appear in the splash screen. But this is all while not booting.

Now, I'm trying to tie this somehow to the tc-config for it to show boot messages similar to the regular one already implemented. For example, so far I have something like this in the tc-config
Code: [Select]
echo "${GREEN}Booting ${YELLOW}Core $VERSION ${NORMAL}" && /bin/plymouth update --status="Booting Core $VERSION"(I added the '&&' part and beyond and 've also included this file in the plymouth-initrd.gz) But this doesn't work. Plymouth shows splash during boot as usual but without the expected messages. And I'm not sure why.

Does anyone have any idea what else I'm missing or what other important information I'm lacking/forgetting about TC's booting mechanism? Because it'd be really awesome if this worked...

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Plymouth splash, displaying message
« Reply #5 on: January 13, 2015, 04:57:57 AM »
After inserting error messages in between every command in the tc-config file, it seems that plymouth would only start allowing messages to show up after
Code: [Select]
/usr/bin/tce-setup "booting" was carried out. After opening up that file and doing the same exact thing, it seems that plymouth starts allowing messages after
Code: [Select]
/sbin/ldconfig 2>/dev/null was carried out. Now, this command is really almost at the end of the script and that script is almost at the end of tc-config, making boot messages utterly useless. I'm not really sure what that 'ldconfig' command does, but it gave plymouth the ability to show text in its splash. Does anyone have any suggestion where I should start looking?

Offline kimmo

  • Newbie
  • *
  • Posts: 9
Re: Plymouth splash, displaying message
« Reply #6 on: January 13, 2015, 05:16:04 AM »
... I'm not really sure what that 'ldconfig' command does, but it gave plymouth the ability to show text in its splash. Does anyone have any suggestion where I should start looking?

ldconfig creates ld.so.cache file, which contains (from the manual) "necessary links and cache to the most recent shared libraries"

So, plymouth splash probably uses shared libraries but cannot find those until ldconfig is executed.
You can run ldconfig multiple times, so just execute it in some suitable place before plymouth splash.
Before running ldconfig, you just need to have all needed libs installed.

You can use ldd command to list all libraries needed by some program.
$ ldd /path/to/program

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Plymouth splash, displaying message
« Reply #7 on: January 13, 2015, 05:44:19 AM »
I see... Okay, I'll try that out and post something afterwards...

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Plymouth splash, displaying message
« Reply #8 on: June 24, 2015, 02:39:05 PM »
Hey all!! I finally have a lot of free time to work on plymouth's displaying texts again. I got the kernel's bootsplash to work pretty nicely with boot messages all this time. But it'd be awesome to get that to work in plymouth.

So I've put
Code: [Select]
/sbin/ldconfig 2>/dev/null  all over /etc/init.d/tc-config and /usr/bin/tce-setup just as you've suggested, kimmo, and it turns out that plymouth gain the ability to show text messages after openbox.tcz was loaded during the boot process. So I shuffled the order of extensions listed in my onboot.lst to make sure that it really was because of openbox.tcz and it turns out to be true and not only that but firefox.tcz also empowers plymouth with text displaying capabilities. So I'm thinking that plymouth needed some shared libraries (that you were talking about) found in these two, firefox.tcz and openbox.tcz. And when I looked at the dependencies of these two extensions, it was obvious that both loaded gtk2.tcz which in turn loaded pango.tcz (by the way, I forgot to mention earlier that I had to build plymouth with the '--disable-pango' flag removed for it to be able to show messages (as opposed to what's stated in the wiki)).

So I've been trying to put pango.tcz (and even all of gtk2.tcz) into my initram disk as explained in the dynamic_root_filesystem_remastering wiki, but still nothing is showing before either openbox.tcz or firefox.tcz is loaded. This is what I did (my first time doing this so I'm not sure if I'm doing it right..):
1. I created opt/tce/optional/
2. I included pango.tcz (and all of it's dependencies and the depedencies' dependencies and so on and so forth, the wiki doesn't really mention about how to handle dependencies)
3. And finally 'ls -l opt/tce/optional/ > opt/tce/onboot.lst'

And then later I did the same thing with gtk2.tcz and all of its dependencies. My question is, is there any way to know for sure that pango.tcz or any of the extensions are really loaded early in the boot process? Because I don't know if it failed because plymouth needs more than just gtk2.tcz and pango.tcz or these two were never really loaded at all before openbox and firefox loaded them.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14794
Re: Plymouth splash, displaying message
« Reply #9 on: June 24, 2015, 02:57:06 PM »
If it's a question of displaying text - wouldn't it be freetype or fontconfig and/or a font extension (openbox brings in ttf-bitstream-vera) that are required?

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Plymouth splash, displaying message
« Reply #10 on: June 24, 2015, 03:36:16 PM »
I thought I had discovered the problem. I typed
Code: [Select]
ls -l opt/tce/optional/ > opt/tce/onboot.lst instead of
Code: [Select]
ls -1 opt/tce/optional/ > opt/tce/onboot.lst. I was really hoping that this silly mistake was the problem, but nothing is still showing... :P

If it's a question of displaying text - wouldn't it be freetype or fontconfig and/or a font extension (openbox brings in ttf-bitstream-vera) that are required?

That may be true (I don't know, don't have much experience with these), but I've included pango.tcz and all its dependendencies (which apparently include those two, so it should have worked..). But the thing is, I don't really know if they are loaded at all. Confusing 'ls -l' for 'ls -1' might not be the only mistake. So I may try loading many different list of extensions, but before I know for sure that these extensions really get loaded, it's like shooting in the dark.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Plymouth splash, displaying message
« Reply #11 on: June 24, 2015, 04:34:38 PM »
What if you extract the tczs directly into your initrd?
Download a copy and keep it handy: Core book ;)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11581
Re: Plymouth splash, displaying message
« Reply #12 on: June 24, 2015, 08:11:05 PM »
Hi kalu
As was already suggested, run:
Code: [Select]
ldd `which plymouth`to find out which libraries it depends on. Those are backticks, not apostrophes.

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Plymouth splash, displaying message
« Reply #13 on: June 25, 2015, 01:22:11 AM »
What if you extract the tczs directly into your initrd?

Hi misalf! Would that work? Many of the files extracted files are just symbolic links to a tcloop file (which as far as I understand only come into being when extensions are loaded with 'tce-load'). That's why I had thought that the proper way of doing it (putting the tcz files in /opt/tce/optional/ and having them listed in /opt/tce/onboot.lst) to be the way to go.

Hi kalu
As was already suggested, run:
Code: [Select]
ldd `which plymouth`to find out which libraries it depends on. Those are backticks, not apostrophes.

Hi Rich! These are the results for /bin/plymouth and /sbin/plymouthd respectively:
Code: [Select]
        linux-gate.so.1 (0xb7785000)
        libply.so.2 => /lib/libply.so.2 (0xb776a000)
        libm.so.6 => /lib/libm.so.6 (0xb7733000)
        librt.so.1 => /lib/librt.so.1 (0xb772b000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7727000)
        libc.so.6 => /lib/libc.so.6 (0xb7609000)
        /lib/ld-linux.so.2 (0xb7786000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb75f3000)
Code: [Select]
        linux-gate.so.1 (0xb7731000)
        libply.so.2 => /lib/libply.so.2 (0xb7716000)
        libply-splash-core.so.2 => /lib/libply-splash-core.so.2 (0xb7705000)
        libm.so.6 => /lib/libm.so.6 (0xb76ce000)
        librt.so.1 => /lib/librt.so.1 (0xb76c6000)
        libdl.so.2 => /lib/libdl.so.2 (0xb76c1000)
        libc.so.6 => /lib/libc.so.6 (0xb75a4000)
        /lib/ld-linux.so.2 (0xb7732000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb758e000)

I'm not sure where to go with this information... Is there a way to know which extensions provide these libraries in Tinycore (like 'dpkg -S /path/to/file' in Debian)?
Anyway, I've put the whole openbox.tcz (including all of its dependencies, obviously an overkill) into /opt/tce/optional and /opt/tce/onboot.lst of the initial ramdisk and it's still not working. I'm thinking that maybe it's not a question of whether I got the right libraries in, but rather whether I did get any libraries in at all... Is there anyway to check this?

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Plymouth splash, displaying message
« Reply #14 on: June 25, 2015, 01:43:06 AM »
I have the following extensions listed in my onboot.lst:
Code: [Select]
tc@box:/mnt/sdb1/sbox2010/tce5$ cat onboot.lst
Xorg-7.7.tcz
Xlibs.tcz
Xprogs.tcz
openbox.tcz
dropbear.tcz
mirrors.tcz
firefox.tcz

As I've said, boot messages only start appearing after either openbox.tcz or firefox.tcz is loaded. The funny thing is that the boot messages appear in two different font styles depending on whether I have firefox.tcz listed first in onboot.lst or openbox.tcz listed first. It's strange how the order of the loading of these extension would affect bootsplash appearance...