Tiny Core Linux

General TC => General TC Talk => Topic started by: Rabie on December 23, 2020, 10:53:57 AM

Title: [Solved] SPLASH SCREEN TINY CORE
Post by: Rabie on December 23, 2020, 10:53:57 AM
Hi all, i am new here and little bit a noob, can some one explain to me how to do this step by step ? ( See URL )
http://forum.tinycorelinux.net/index.php/topic,18122.0.html

when i edit the tc-config it dose not get effectively ( for example i deleted the echo lines so it dose not appear while booting ) but it dose appear why ?

i need to know how to make a splash screen step by step working !

Please help !
Title: Re: SPLASH SCREEN TINY CORE
Post by: Rich on December 23, 2020, 11:14:12 AM
Hi Rabie
... when i edit the tc-config it dose not get effectively ( for example i deleted the echo lines so it dose not appear while booting ) but it dose appear why ? ...
tc-config  is inside of  core.gz. It gets rewritten every time you boot. To change it, you need to remaster  core.gz.

First you need to unpack  core.gz:
Code: [Select]
mkdir tempdir
cd tempdir
zcat /path/to/existing/core.gz | sudo cpio -i

Then edit the file:
Code: [Select]
editor etc/init.d/tc-config
Finally, repack  core.gz:
Code: [Select]
cd tempdir
sudo find . | sudo cpio -o -H newc | gzip > /path/to/new/core.gz

    [EDIT]: Fixed typo. Changed  etc/init.d/tc-functios  to  etc/init.d/tc-config.  Rich
Title: Re: SPLASH SCREEN TINY CORE
Post by: Rich on December 23, 2020, 11:19:35 AM
Hi Rabie
Please do not post the same question multiple times. Your other post has been removed.
Title: Re: SPLASH SCREEN TINY CORE
Post by: Rabie on December 24, 2020, 06:58:48 AM
Hi Rich,
Thank you for the Answer.

Quote
tc-config  is inside of  core.gz. It gets rewritten every time you boot. To change it, you need to remaster  core.gz.
now i understand this one.

Quote
editor etc/init.d/tc-functios
But what should i add to "etc/init.d/tc-functios" ?

and how can i add the framebuffer image viewer "fbv" to the core.gz after i unpack it, so it´s available while booting? and should i add something else to it ? ( the framebuffer is in "/usr/local/bin/fbv" )


Sorry for my too little knowledge! :-\


Title: Re: SPLASH SCREEN TINY CORE
Post by: Rabie on December 24, 2020, 07:02:10 AM
Hi Rabie
Please do not post the same question multiple times. Your other post has been removed.
sorry it was a mistake !  :-\
Title: Re: SPLASH SCREEN TINY CORE
Post by: Rabie on December 25, 2020, 09:35:02 AM
hi Rich,

i know now how to remaster the core.gz but i need to know how to make the framebuffer image viewer "fbv" available while booting.

all i know that i have to start it at the first of tc-config but how ?? how to make it find the directory  /usr/local/bin at first ?

thanks again !
Title: Re: SPLASH SCREEN TINY CORE
Post by: Rich on December 25, 2020, 12:04:09 PM
Hi Rabie
The following is untested. Lines preceeded with  #  are just comments.

Code: [Select]
tce-load -wil fbv
mkdir tempdir
cd tempdir
zcat /path/to/existing/core.gz | sudo cpio -i
sudo cp -a /tmp/tcloop/fbv/usr/local/bin/fbv usr/bin
sudo cp -a /tmp/tcloop/libpng/usr/local/lib/* usr/lib
sudo cp -a /tmp/tcloop/libjpeg-turbo/usr/local/lib/* usr/lib
sudo ldconfig -r $PWD
# YourImage  is the image for your splash screen.
cp Path/To/YourImage etc/init.d
# Changes will be made to the  rcS  file.
editor etc/init.d/rcS

In the  etc/init.d/rcS  file,

replace this:
Code: [Select]
/etc/init.d/tc-config
with this:
Code: [Select]
/usr/bin/fbv -a -i /etc/init.d/YourImage &
/etc/init.d/tc-config >/dev/null 2>&1
/usr/bin/killall -q fbv &

Now repack it into a new file:
Code: [Select]
sudo find . | sudo cpio -o -H newc | gzip > /path/to/new/coreSplash.gz
Save  coreSplash.gz  in the same directory your  core.gz  is.
Add a new entry to your bootloaders config file and point it to  coreSplash.gz.
Add this boot code to suppress the kernel logo:
Code: [Select]
logo.nologo
Things you will need to figure out:
1. What size to use for  YourImage.
2. What format to use for  YourImage (png or jpg).
3. You may or may not need to use a  vga=  boot code.
4. You may or may not need to use a  console=/dev/null  boot code.
5. You may need to play with the  fbv  options,  fbv --help  will list them.

If you go here and enter  fbv  as the search term:
http://forum.tinycorelinux.net/index.php?action=search
you should find more information.
Title: Re: SPLASH SCREEN TINY CORE
Post by: Rabie on December 25, 2020, 01:15:08 PM
Hi Rich,

Quote
tce-load -wil fbv
mkdir tempdir
cd tempdir
zcat /path/to/existing/core.gz | sudo cpio -i
sudo cp -a /tmp/tcloop/fbv/usr/local/bin/fbv usr/bin
# YourImage  is the image for your splsh screen.
cp Path/To/YourImage etc/init.d
# Changes will be made to the  rcS  file.
editor etc/init.d/rcS
i did that exactly as you said, i think the extension fbv is available while booting because i am getting now this errore:
(/user/local/bin/fbv: error while loading shared libraries : libpng16.so.16 : connot open shared object file : No such file ore directory )
i have already installed the extension libpng and the command "/usr/bin/fbv -aui /etc/init.d/myImage.png work after the system has been booted


Quote
Save  coreSplash.gz  in the same directory your  core.gz  is.
Add a new entry to your bootloaders config file and point it to  coreSplash.gz.
Add this boot code to suppress the kernel logo:
i didn't make a new coreSplash.gz, i just replaced the existing core.gz


Quote
Things you will need to figure out:
1. What size to use for  YourImage.
2. What format to use for  YourImage (png or jpg).
3. You may or may not need to use a  vga=  boot code.
4. You may or may not need to use a  console=/dev/null  boot code.
5. You may need to play with the  fbv  options,  fbv --help  will list them.
all this Information dosen't make a Problem for me
i do not need vga at boot i thind it will work as soon as i fix this error with the libpng

do you have any idea ?

thanks forward

Title: Re: SPLASH SCREEN TINY CORE
Post by: Rich on December 25, 2020, 02:05:04 PM
Hi Rabie
Since you installed libpng, after you performed this step:
Code: [Select]
sudo cp -a /tmp/tcloop/fbv/usr/local/bin/fbv usr/binAdd this step:
Code: [Select]
sudo cp -a /tmp/tcloop/libpng/usr/local/lib/* usr/lib
sudo ldconfig -r $PWD

Please provide feedback on what does or does not work. This way I can update my instructions in reply #6 for the next person
looking to do this.
Title: Re: SPLASH SCREEN TINY CORE
Post by: Rabie on December 25, 2020, 04:13:48 PM
Hi Rich,

Sorry for my ignorance

Quote
sudo cp -a /tmp/tcloop/libpng/usr/local/lib/* usr/lib
sudo ldconfig -r $PWD
after i added the lib for libpng i got the same error but for libjpeg then i added that too.

now i am getting the error "open /dev/fb0 no such device"

i know that this error comes because of the graphics card, because i have got that error once when the driver (xf86-video-intel.tcz) didn't exist.

although /dev/fb0  dose exist

i tried to add the following to the core also but it didn't work  :(
Quote
/tmp/tcloop/xf86-video-intel
/tmp/tcloop/xf86-video-intel/usr/local/lib/xorg/xf86-video-intel-backlight-helper
/usr/lib/xorg/xf86-video-intel-backlight-helper
/usr/local/lib/xorg/xf86-video-intel-backlight-helper
/usr/local/tce.installed/xf86-video-intel

i also tried with the boot code vga it didn't work too.

any tips ?

thanks..
Title: Re: SPLASH SCREEN TINY CORE
Post by: Rich on December 25, 2020, 04:30:32 PM
Hi Rabie
Sorry for my ignorance ...
No need to apologize. This is new territory for me too.

What does this command return:
Code: [Select]
tc@E310:~/count$ ldd $(which fbv)
        linux-gate.so.1 (0xb7f62000)
        libm.so.6 => /lib/libm.so.6 (0xb7e91000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7e7d000)
        libc.so.6 => /lib/libc.so.6 (0xb7d50000)
        /lib/ld-linux.so.2 (0xb7f63000)
tc@E310:~/count$
Title: Re: SPLASH SCREEN TINY CORE
Post by: Rabie on December 25, 2020, 04:38:35 PM
Hi Rich,

Quote
What does this command return:
ldd $(which fbv)

this:
tc@box:/$ ldd $(which fbv)
        linux-vdso.so.1 (0x00007ffcb0585000)
        libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f04db5b3000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00007f04db356000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f04db216000)
        libm.so.6 => /lib/libm.so.6 (0x00007f04db0b3000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f04db09f000)
        libc.so.6 => /lib/libc.so.6 (0x00007f04daf21000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f04dad0c000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007f04dacee000)
        /lib/ld-linux-x86-64.so.2 (0x00007f04db7e5000)
Title: Re: SPLASH SCREEN TINY CORE
Post by: Rich on December 25, 2020, 05:09:29 PM
Hi Rabie
You're running 64 bit? The forum posts I've seen on the topic deal with the old 32 bit fbv  version 1.0b which has no dependencies.
It's possible the newer version you are running has some extra requirements.

There is a  video=  boot code that references frame buffer:
https://mjmwired.net/kernel/Documentation/kernel-parameters.txt#4358

This is the frame buffer documentation that boot code refers to:
https://mjmwired.net/kernel/Documentation/fb/
Title: Re: SPLASH SCREEN TINY CORE
Post by: tinycorelinux on December 25, 2020, 08:22:39 PM
Hi Rich
Quote
First you need to unpack  core.gz:
Is there a simpler way to unpack and package core.gz files, such as can I use other unzip tools to add, update, and replace files directly inside them?
Title: Re: SPLASH SCREEN TINY CORE
Post by: Rich on December 25, 2020, 08:50:27 PM
Hi ONE
That's the only way that I am aware of.
Title: Re: SPLASH SCREEN TINY CORE
Post by: Rabie on December 26, 2020, 06:34:07 AM
Hi Rich,

Quote
You're running 64 bit?
yes i am running a 64 bit core..

Quote
There is a  video=  boot code that references frame buffer:
https://mjmwired.net/kernel/Documentation/kernel-parameters.txt#4358

This is the frame buffer documentation that boot code refers to:
https://mjmwired.net/kernel/Documentation/fb/
i am trying to read this documentation, but i don't realy understand the Usage and how to use a Splash screen with the boot code video=.



Title: Re: SPLASH SCREEN TINY CORE
Post by: Rabie on December 26, 2020, 05:16:29 PM
Hi Rich,

i finaly got it work !  ;D ;D

you were right i had to use VGA and logo.nologo

thank you very much..
Title: Re: [Solved] SPLASH SCREEN TINY CORE
Post by: Rich on December 26, 2020, 09:53:06 PM
Hi Rabie
Glad to hear you got it working. If you wouldn't mind:
1. Review my reply #6 for accuracy.
2. Post the  vga  code you used.
3. Provide the specifications of the splash image you used:
    A. Format (png or jpeg).
    B. Size, width and height.
    C. Color depth if known, i.e. 8 bit  256 color.
Title: Re: [Solved] SPLASH SCREEN TINY CORE
Post by: Rabie on December 28, 2020, 05:57:39 AM
HI Rich,

yes of course, so here is what i did:

Quote
mkdir tempdir
cd tempdir
zcat /path/to/existing/core.gz | sudo cpio -i

sudo cp -a /tmp/tcloop/fbv/usr/local/bin/fbv usr/bin
sudo cp -a /tmp/tcloop/libpng/usr/local/lib/* usr/lib
sudo cp -a /tmp/tcloop/libjpeg/usr/local/lib/* usr/lib
cp Path/To/YourImage etc/init.d

# Changes will be made to the  rcS  file.
editor etc/init.d/rcS
#replaced this "/etc/init.d/tc-config" with:

/usr/bin/fbv -a -i /etc/init.d/YourImage &
/etc/init.d/tc-config >/dev/null 2>&1
/usr/bin/killall -q fbv &

#replaced the existing core.gz with the new one
cd tempdir
sudo find . | sudo cpio -o -H newc | gzip > /path/to/existing/core.gz

#so for the error "open /dev/fb0 no such device":

i used the folowing:
VGA = 795 for 1280x1024 resolution  *because i did not found a VGA code for the 1920x1080 resolution*
logo.nologo=1 so the Tinycore logo dosen't come while booting
console=/dev/null so the echo lines in tc-config dosn't come while booting

Quote
Provide the specifications of the splash image you used:
    A. Format (png or jpeg).
    B. Size, width and height.
    C. Color depth if known, i.e. 8 bit  256 color.

A. i used PNG ( all 1280x1024 )
B. i used several Sizes like ( 1,70 MB, 1 MB, 500 KB )
C. like i said i used the code VGA=795 i think it stand for 16.7M Color , 24 bit , 1280x1024

thank you very much !!  :) :)
Title: Re: [Solved] SPLASH SCREEN TINY CORE
Post by: Rich on December 28, 2020, 09:12:22 AM
Hi Rabie
Thank you, very concise. Just one more question. After:
Code: [Select]
sudo cp -a /tmp/tcloop/libpng/usr/local/lib/* usr/lib
sudo cp -a /tmp/tcloop/libjpeg/usr/local/lib/* usr/lib
Didn't you need to run:
Code: [Select]
sudo ldconfig -r $PWD
Title: Re: [Solved] SPLASH SCREEN TINY CORE
Post by: Rabie on December 28, 2020, 12:55:02 PM
Hi Rich,

Quote
sudo ldconfig -r $PWD
no i didn't need to use that.

do u know if there is a vga boot code for the resolution 1920x1080 ?

thanks
 
Rabie
Title: Re: [Solved] SPLASH SCREEN TINY CORE
Post by: Rich on December 28, 2020, 01:44:58 PM
Hi Rabie
Try changing this:
Code: [Select]
vga=795to this:
Code: [Select]
vga=askWhen you boot, you should see a prompt to see video modes available, press enter.
Pick a resolution. There is a 3 digit hex code to the left of the resolution. Enter the 3 digit code and hit enter.
If you are satisfied with the result, convert the hex number to decimal and use it with the  vga=  boot code.

Which boot loader are you using? grub, grub2, syslinux, ... ?
Title: Re: [Solved] SPLASH SCREEN TINY CORE
Post by: Rabie on December 28, 2020, 02:16:25 PM
Hi Rich,

Quote
vga=ask
i'll try that..

Quote
Which boot loader are you using? grub, grub2, syslinux, ... ?
i am using syslinux i guess. is the standard bootloader of Tiny Core the syslinux ?
Title: Re: [Solved] SPLASH SCREEN TINY CORE
Post by: Rich on December 28, 2020, 02:26:27 PM
Hi Rabie
The tc-install extension uses syslinux. I use grub. I have an oddball netbook and had to use grub2 for that.
Title: Re: [Solved] SPLASH SCREEN TINY CORE
Post by: Rabie on December 29, 2020, 08:13:33 AM
Hi Rich,

i haven't use grub or grub2 yet, but syslinux is working fine !  :)