Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: andyj on December 18, 2012, 08:11:53 AM

Title: Enhancement request to tc-config to support boot splash
Post by: andyj on December 18, 2012, 08:11:53 AM
I have managed to get plymouth working to show a boot splash for both framebuffer and intel kms graphics. To do this I have two additional initrd's, one for the plymouth executables and kernel modules, and a second for the splash theme. To show the splash I have added a few lines to tc-config between the mounts and the big case statement at the beginning. The problem is that it is somewhat TC version specific; any changes to tc-config would require a rebuild of the plymouth initrd. What would be helpful is if the symlink that is rcS became a real file that just does the initial mounts then passes control to tc-config (which would no longer have the mounts at the beginning). Then, assuming that the need to do the mounts up front wouldn't change, I could (or anyone wanting to port a different splash application) just have a custom rcS with the splash startup commands added to it.  This way tc-config remains unchanged for the version installed and the splash application should then only depend on kernel versions.

Andy
Title: Re: Enhancement request to tc-config to support boot splash
Post by: roberts on December 18, 2012, 01:55:30 PM
Sounds good. Request granted. Will be implemented.
Title: Re: Enhancement request to tc-config to support boot splash
Post by: andyj on December 18, 2012, 03:18:37 PM
Awesome. And thanks. As you can tell, I'm relatively new to TC but not new to *nix (a slacker since the mid 90's plus AIX, HPUX, and Solaris). What's the best way to make some of my TC projects available to the community? I could do it from my home web server as a last resort, but I have limited upload bandwidth. I have plymouth for boot splash, a vmware client tools extension, and an Elo touchscreen extension. The last two are closed source, but I could document the "howto build it yourself from the stuff the vendors do make available" if I don't get permission to redistribute their "free as in beer" stuff. Plymouth is open source, so no problems there.

There is one more thing. I've only been successful with the DRI splash when udev is running before I modprobe the kms modules. So, if you can, when you make the split, add a check to see if udev is already running before starting it? If someone knows how to get around this or wants to help with the ati or nouveau versions (as I don't have that hardware), it would be much appreciated.

Again, thanks,

Andy
Title: Re: Enhancement request to tc-config to support boot splash
Post by: curaga on December 19, 2012, 02:07:03 AM
That (udev check) sounds like going too specific into supporting one solution. I think your issue is that of permissions (or device node not existing), udev running allowing you to access the node.
Since there are so many different bootsplash solutions, I wouldn't want to have such specific support for any one in the base.

Instead of double-starting udev, I would recommend a manual mknod and/or chmod, if that's the reason.


For the non-redistributable binaries, the usual approach is to make a script, and either post it to the Programming and Scripting section, or to make it a getter extension (see getflash).
Title: Re: Enhancement request to tc-config to support boot splash
Post by: andyj on December 19, 2012, 06:37:22 AM
I'll try the chmod approach in /dev/dri and see if I can get around udev, because I agree that it's ugly and shouldn't be required. It solved the problem I was having at the time and I didn't go back and research it further. The elo.tcz extension has only a dozen files, so a simple get -> unpack -> repack explanation should be easy. VMware is a little more complicated but still possible to document. Plymouth is painful. The author says it is, and he's right. Maybe if he knew how to comment code it would suck less. I was kinda hoping for a way to have people upload splash themes assuming anyone cares enough. If not here then I'll find something.

Andy
Title: Re: Enhancement request to tc-config to support boot splash
Post by: andyj on December 19, 2012, 06:45:28 PM
This is turning into a real tar pit. The entries for the video card in /sys don't exist until udevadm puts them there. I tried hard coding some of the info in the plymouth source code so as not to have to look into /sys to find the driver, but that didn't work like I wanted. Plymouth tried to load the i915 driver, but nothing happened for a while, and then it fell back to text. I'll have to ponder on this. Any DRI experts here?

Andy
Title: Re: Enhancement request to tc-config to support boot splash
Post by: curaga on December 20, 2012, 02:29:20 AM
That doesn't sound right, udev has nothing to do with /sys. The modules themselves do that.

It could be firmware, but i915 does not need firmware.
Title: Re: Enhancement request to tc-config to support boot splash
Post by: andyj on December 21, 2012, 07:31:55 AM
After some more experimenting I've come up with what I believe to be the elegant solution. Since plymouth is an initrd, I added the DRI device nodes and version of ld.so.cache updated with the plymouth libraries to the archive. Now the only thing in tc-config is a modprobe i915 and the commands to start plymouthd and plymouth. An easy addition the the forthcoming rcS. Once the rcS / tc-config split is made and I update my initrd for it, what is the chance of being able to upload the framebuffer and i915 versions along with a TC theme to the contrib directory in the TC repository? All files are less than 1 meg.

Andy
Title: Re: Enhancement request to tc-config to support boot splash
Post by: curaga on December 21, 2012, 07:49:36 AM
They're already available as module extensions, no? In that case I'd prefer a script to create the initrd from the extension, to not have files in two places.
Title: Re: Enhancement request to tc-config to support boot splash
Post by: andyj on December 21, 2012, 09:42:52 AM
Because the boot splash has to start at the beginning of the boot process, it can only work as an initrd, and not as a TCZ extension. In this case it's an initrd extension if you will, loaded after core.gz.  Here's a snippet from the currently working tc-config:

...tc-config definitions above... the mounts below would go into a new rcS, and the rcS in the plymouth initrd would add the modprobe and the two plymouth commands before starting tc-config:

# Mount /proc.
[ -f /proc/cmdline ] || /bin/mount /proc

# Remount rootfs rw.
/bin/mount -o remount,rw /

# Mount system devices from /etc/fstab.
/bin/mount -a

modprobe i915

/sbin/plymouthd --mode=boot --attach-to-sesison --pid-file=/var/run/plymouth/plymouthd.pid >/dev/null 2>&1
/bin/plymouth --show-splash >/dev/null 2>&1

... and the rest of tc-config...

for i in `cat /proc/cmdline`; do
        case $i in
                *=*)
... and so on...

and change "initrd=core.gz" to "initrd=core.gz,plymouth-fb.gz splash" in extlinux.conf or pxelinux.cfg/default.

I can see a theme builder extension as a useful thing as the project progresses. It's an iterative process to build the plymouth initrd, so I could document it eventually once I remember all the steps. In this case then the wiki would be the appropriate place. My concern is that the build process is complicated and would require a development box for someone who might just want to try it out. I'd like to be able to offer the ready-to-go one or two file setup in the hope that it might generate some interest.

Andy
Title: Re: Enhancement request to tc-config to support boot splash
Post by: curaga on December 21, 2012, 01:04:54 PM
Yes, I think you misunderstood me. I mean that since the i915 module already exists in an extension, duplicating it in the hosted initrd wouldn't be good. Instead I meant that there should be a script that inserts the desired modules to the initrd with the theme.

This would allow, among other things, running one's own kernel more easily. Or, if we have to push an update to i915, etc.

Quote
I can see a theme builder extension as a useful thing as the project progresses. It's an iterative process to build the plymouth initrd, so I could document it eventually once I remember all the steps. In this case then the wiki would be the appropriate place. My concern is that the build process is complicated and would require a development box for someone who might just want to try it out. I'd like to be able to offer the ready-to-go one or two file setup in the hope that it might generate some interest.

Certainly we'll host the file, but having that document in the wiki will be much more useful in the long run. I'd just prefer it not include any modules, but instead grab them from the extension(s).
Title: Re: Enhancement request to tc-config to support boot splash
Post by: andyj on December 21, 2012, 07:57:01 PM
Well, yes, given my experience with the i915 graphics some fixes would be welcome. I had envisioned a "code" initrd and a "data" initrd, but a "standalone hardware independent core plymouth code that could last across kernel and library version changes" initrd and a "user hardware and theme" initrd does make more sense from a maintainability standpoint. In this case it would also make sense to build the core plymouth initrd with all the different possible parts, like frame buffer, X11, i915, and ati support. Nouveau is supposed to be supported but I don't have a dev extension for it. Without the kernel modules it should still be under a meg, even if I add in a small default TC theme (like the logo in the middle with some spinning ring). So the next question I have is, how do I put a page into the wiki? Do I need a secret knock, or do I already have the power in my ruby slippers?

Andy
Title: Re: Enhancement request to tc-config to support boot splash
Post by: curaga on December 22, 2012, 02:21:23 AM
You already have the power, use the forum login details.
Title: Re: Enhancement request to tc-config to support boot splash
Post by: andyj on December 22, 2012, 04:33:10 PM
Where would the best place for a page for this would be? Setup, Advanced, or ?

Andy
Title: Re: Enhancement request to tc-config to support boot splash
Post by: Rich on December 22, 2012, 05:06:55 PM
Hi andyj
Either one sounds appropriate, or you could add a Splash Screen topic.
Title: Re: Enhancement request to tc-config to support boot splash
Post by: tinypoodle on December 22, 2012, 05:16:25 PM
Remastering?
Title: Re: Enhancement request to tc-config to support boot splash
Post by: andyj on January 03, 2013, 01:30:07 PM
I've added a wiki entry in the Advanced section for Boot Splash. Right now it only covers the frame buffer splash. The Intel i915 DRM/KMS version and separate theme howto will be forthcoming. Please try. All feedback welcome (see Ecclesiastes 7:5). I don't have Radeon hardware so help is welcome here too.

Andy
Title: Re: Enhancement request to tc-config to support boot splash
Post by: mbertrand on February 22, 2013, 07:30:01 AM
First, I'm a newbie to Linux. I followed the wiki and got errors during "make install".

gcc: error: /usr/local/lib/libdrm_intel.so: No such file or directory
gcc: error: /usr/local/lib/libpciaccess.so: No such file or directory
gcc: error: /usr/local/lib/libdrm_radeon.so: No such file or directory
gcc: error: /usr/local/lib/libdrm.so: No such file or directory
gcc: error: /usr/local/lib/libkms.so: No such file or directory

I did however tried with your already built intird "plymouth-initrd.gz" and all worked. I would like to learn and compile it my self  so can you please help with those errors? Also, what about showing splash while shutting? Do you have any links to some documentation? Thaks for your time.

Title: Re: Enhancement request to tc-config to support boot splash
Post by: gerald_clark on February 22, 2013, 07:39:30 AM
A "provides" search ( using Apps ) of the repo reveals that these are part of the Xorg extensions.
Title: Re: Enhancement request to tc-config to support boot splash
Post by: mbertrand on February 22, 2013, 07:59:06 AM
I have Xorg-7.6-lib & Xorg-7.6-dev installed. According to the wiki all decencies are listed and I would doubt that some are missing?
Title: Re: Enhancement request to tc-config to support boot splash
Post by: mbertrand on February 22, 2013, 08:13:17 AM
Well well ... I added Xorg-7.6.tcz and was able to compile with no errors , Thanks.
But the xorg extensions come split up like bin, dev,  lib,  font and the Xorg-7.6.tcz which I thought was all of them. I had the lib and dev installed so I was mission bin and font. Why would that change anything?
Title: Re: Enhancement request to tc-config to support boot splash
Post by: Rich on February 22, 2013, 08:29:54 AM
Hi mbertrand
Xorg-7.6-lib.tcz contains common library files used by many extensions.
Xorg-7.6-dev.tcz contains headers and static libraries for compiling and linking.
Xorg-7.6.tcz contains the libraries that gcc could not find.
Xorg-fonts.tcz, I doubt you needed that one.
Title: Re: Enhancement request to tc-config to support boot splash
Post by: mbertrand on February 26, 2013, 09:02:22 AM
I got plymouth working with the plymouth-inird.gz from wiki. This works well with transition to starting x. Of course I'm not clear as to what is going one.
I have two tests both require auto starting an app at boot. First test is an x app and the other is not.
Where is the best place to stop plymouth (close it /quit) where there would be less black screen prior to showing my app.
Also for none x apps where would be the best place to start it.
Title: Re: Enhancement request to tc-config to support boot splash
Post by: gerald_clark on February 26, 2013, 09:21:22 AM
Start your X apps from a script in .X.d
Refer to .xsession to see how they are started.
Title: Re: Enhancement request to tc-config to support boot splash
Post by: mbertrand on February 26, 2013, 09:58:07 AM
Yes I know but what about i I'm not using x were to start my none x application.
Title: Re: Enhancement request to tc-config to support boot splash
Post by: gerald_clark on February 26, 2013, 10:33:42 AM
Please do not post the same questions in two threads.
http://forum.tinycorelinux.net/index.php/topic,14950.msg85258/topicseen.html
It confuses people and wastes resources.