Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 26 Nov 2014, 12:38
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Pebble v 0.4 - Bootsplash ALPHA
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Wed 03 Oct 2007, 21:34    Post_subject:  Pebble v 0.4 - Bootsplash ALPHA
Sub_title: This version has (poor/basic) support for animation
 

Pebble v 0.4 - Bootsplash (basic and bloated animation)
packages for Puppy 2.14 and Pizzapup 3.0.1

Desclaimer:
User says: "This is madness!"
Pizzasgood says: "Madness? This. Is. ALPHA!!!"
All jokes aside, this really is alpha software, and therefor I won't feel too bad if you install it on a critical machine and FUBAR it, resulting in getting fired from work, evicted, divorced, and bald to boot. In all seriousness, I'd advise you against using it at all. I'm only posting it because a couple people have been waiting months and really want animation, even if it's currently bloated and extremely basic. Actually, I'm scared that if I don't post this now, they'll come kidnap me and force me to finish. And that wouldn't be good: I hardly have time to do my homework as it is!

That said, it works okay my system.

Notice 1: I have no idea how to use this with a full-hd installation of Puppy. Sorry Sad All others should work, though Multisession and LiveCD will require burning a new disk.

Notice 2: The default animation this includes requires that you have 64+ MB of ram, or maybe about 64 + the size of your pup_xxx.sfs file (I'm not sure). If you edit the initrd.gz provided, you could set it to use the paw theme instead, in which case it would only need about a megabyte or three more than normal.


Pebble v0.4
Pebble is a simple bootsplash program. This version can handle animation, but it converts every frame into a pure raster image and stores them all in ram at the same time (that means having a 40 frame 800*600 image will use more than 50 mb of ram!). Not very efficient. That's why this is an alpha version Wink I will definitely fix that by the next version. As for the format of the animation, it's just a bunch of .jpg files in a directory (NO animated .gif files yet, sorry). They will be played in alphabetical order (specifically, the order that they appear when you do for i in /<path>/*; do echo "$i";done) so it's best to just give them numbers (like, monkey001.jpg, monkey002.jpg, etc.). For this to see them, they need to be in a directory at /etc/pebble/ of the initrd.gz file (NOT your normal filesystem!!!). In that /etc/pebble/ directory will also be a file called "theme". Edit that to have the name of the directory. So if you put the images in /etc/pebble/monkey, the theme file would simply say monkey. No path info (that would break things).

There is no hotkey to disable the bootsplash while it's running, but you can use the pfix=nosplash boot option to disable it on a per-boot basis. The normal boot messages are logged at /tmp/norm_boot.log. This bootspash will revert to text-mode at points where the boot process wants input (like choosing a save-file, inputting a password, etc). It resumes afterwards.



Okay, now for installation! I've put togeather packages compatible with Puppy 2.14 and Pizzapup 3.0.1. If you have a version based on 2.14 you may be able to simply use that package. Otherwise, you'll have to manually edit the scripts. I'll provide what info I can. Oh, by the way, the 2.14 package uses the same /sbin/init script as the Pizzapup 3.0.1 version, just with the PPFIX variable set to "pup" rather than "pza". It's nearly identical to the 2.14 script, but has some variables allowing for changing the 'pup' to other things, along with support for encrypted savefiles. So that means installing this won't interfere with encryption if you used it. For those who didn't, it won't change anything and is only about four extra lines or so, so don't sweat it Wink

pebble-v0.4-puppy214.tar.gz
pebble-v0.4-pizzapup301.tar.gz

As you've hopefully noticed, those are not dotpups. This isn't something that can be easily made into a dotpup. Sorry Sad They are .tar.gz files, which we will manually extract. So, here are the step by step instructions.

1. Download the appropriate package. Place it somewhere convenient. I like to use /tmp/NewDir.

2. Extract it: tar -xf pebble-v0.4-puppy214.tar.gz

3. Copy bin and etc to / (so they merge with /bin and /etc)

4. Replace your initrd.gz with the included one. With a Frugal install, it's probably at /mnt/home/ or /mnt/home/boot/. Just drop in the new one. With Grub, that's it. If you have Lilo, re-run lilo.
With a USB install, just drop the new one onto the drive and overwrite the old one.
For a LiveCD or Multisession, you'll have to use IsoMaster to edit the ISO file and then burn a new disk. Except don't burn it yet, there's more editing to do in the next step!

5. Edit your boot options to include vgz=###, where ### is the framebuffer mode. With a Frugal install using Grub, the file to edit is menu.lst, probably at /mnt/home/boot/grub/menu.lst. You need to add the command to the kernel line, similar to this:
kernel /boot/pza-301/vmlinuz root=/dev/ram0 vga=795 loglevel=3 PMEDIA=satahd
With LiveCD or Multisession, use IsoMaster to edit the isolinux.cfg file in the ISO file. Add it to the append line, similar to this:
append root=/dev/ram0 initrd=initrd.gz loglevel=3 vga=795 PMEDIA=idecd
With a USB install, edit the syslinux.cfg file on the USB drive, like so:
default vmlinuz root=/dev/ram0 initrd=initrd.gz PMEDIA=usbflash vga=795
As for which mode to use, here's a simple list:
Code:
VESA framebuffer console @ 1024x768x64k
vga=791
VESA framebuffer console @ 1024x768x32k
vga=790
VESA framebuffer console @ 1024x768x256
vga=773
VESA framebuffer console @ 800x600x64k
vga=788
VESA framebuffer console @ 800x600x32k
vga=787
VESA framebuffer console @ 800x600x256
vga=771
VESA framebuffer console @ 640x480x64k
vga=785
VESA framebuffer console @ 640x480x32k
vga=784
VESA framebuffer console @ 640x480x256
vga=769

As you noticed in my examples, I use 795 which is 1280x1024, but I don't remember what color depth it is. Just google framebuffer modes if you need any that aren't shown here. Also, vga=normal is what would normally happen, but the bootsplash is incompatible with that.

6: Cross your fingers and toes, then hit reboot. With luck, you'll boot to an animated rotating monkey head logo. If not, post a reply describing what you did and what happened.



If you want to modify the animation, you'll need to edit the initrd.gz file and replace it. This is a pain, especially since the nifty utility I set up tends to have issues with larger files. The most reliable way to do it would be to download the unleashed_core PETget for your version (which should be 2.14 since I'm not providing other versions of this until it's up to BETA level). Extract it somewhere. Go inside it's boot directory. Delete everything inside the initrd-tree directory (but not the initrd-tree directory itself!)
Now, take the initrd.gz file I provided and put it on the harddrive (or anywhere that isn't inside your pup_save.2fs file). Use gunzip to decompress it. Then mount it to /mnt/data like so: mount initrd /mnt/data -o loop
Copy the contents of /mnt/data to the initrd-tree directory you cleaned out earlier. Unmount /mnt/data (umount /mnt/data).

Now you can change things around. Go back to the initrd-tree directory. Go into the etc/pebble directory it contains. You'll see a directory called 'monkey' and another called 'paw'. The monkey one is animated, the paw isn't. Those are themes. You can delete them if you want, it won't matter as long as you add a new theme. There is also a file named 'theme', which contains the name (not file name) of the directory of the theme you want to use. It will initially be set to monkey. When you add a theme, make sure you change this file to reflect the change!

The format of a theme is very simple right now. It's a directory containing a bunch of .jpg images (.png and .bmp might work too, haven't tried it. .gif will not however). They aren't special or anything, just normal everyday images. When booting, Pebble will cycle through those images in alphabetical order at 20 Hz, and will not resize them (it slows things down a lot right now, I'll fix that eventually). You can change the speed enable resizing by editing the bin/pebble script in initrd-tree. Up near the top is a line that looks like this: extra="-z 20";
The '-z 20' sets the frequency. Just change the 20 to change the speed. For resizing, add an 'e' immediately before the z, like this: -ez 20
You might also want to add an 'r' to it if you do that, it does something with aspect ratios (don't remember exactly what ATM).

But for now it's best to just make the images the correct size in the first place. It makes a huge speed difference.

Okay, so now that you're done configuring things, you can put it back togeather. Go into the boot directory again (one level up from initrd-tree). Open a terminal there. Run ./makeinitrdgz.sh
That will create a new initrd.gz file for you to use. Make sure it seems a reasonable size (as in, it isn't like 120kb or something. The one I provide with 40 .jpg images is over 2mb). Now just do whatever you need to do to install the initrd.gz file (explained in the normal install instructions for Pebble above).

Good luck, and may Tux and the floating monkey head be with you. Razz

edited 12-Oct.-2007: Fixed usb install. Thanks for the heads up poorani!

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib


Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
poorani

Joined: 23 May 2007
Posts: 51

PostPosted: Tue 09 Oct 2007, 09:29    Post_subject: Animated boot screen in 2.14  

Hi pizzasgood,


Thanks for your guidance. I have followed all what you told in the link:
http://www.murga-linux.com/puppy/viewtopic.php?p=144613#144613
But there is some error occur.

When i boot a puppy linux, after executing 'init' script in initial ramdisk that error occur.

Now executing 'init' script in initial ramdisk that error occur.

Error is:
ERROR:Can't find puppy on 'idehd' boot media
PUPMODE=9 PDEV1=
Exited to initial-ramdisk(/dev/ram0) commandline....
(the linux.guru can now debug, 'e3' editor is available)
/bin/sh : Can't access tty: job control turn off
#

Before this error the boot image displayed. Kindly reply me.

Moreover i didn't know how you referred the images in the /etc/pebble/monkey.

With regards,
Poorani.B
Back to top
View user's profile Send_private_message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Wed 10 Oct 2007, 01:38    Post_subject:  

Okay. I'll have to ask some questions first, and I apologize if they seem stupid, but I want to make sure I don't make any false assumptions.

Which version of Puppy did you use?
Does that version of Puppy boot correctly when you haven't added Pebble?
Which Pebble package did you download (the 2.14 one or the Pizzapup one)?

Also, which boot loader did you use? Please post its config file (preferably within [code ] tags or as an attachment).


From what I can tell, it didn't detect your pup_xxx.sfs (or pza_xxx.sfs) file. Why it didn't could be a number of reasons, thus why I'm asking so many questions.

As for the images in /etc/pebble/monkey, it doesn't use anything fancy yet. The /etc/pebble/theme file contains the name of the directory to use, in this case monkey. Then it just loads them all in alphabetical order. So if you deleted all the monkey heads and put in images named aardvark.jpg, jimbo.jpg, and bob.jpg, it will display aardvark.jpg, then bob.jpg, then jimbo.jpg, then start over with aardvark.jpg and keep cycling through like that.

It's easiest to just number them though, like I did with the monkey heads. Also, in the case that you have an image named 01.jpg and another named arline.jpg, it will load 01.jpg first. It follows the same ordering that the ls command uses.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send_private_message Visit_website 
poorani

Joined: 23 May 2007
Posts: 51

PostPosted: Wed 10 Oct 2007, 03:23    Post_subject: Pebble with animation  

hi Pizzasgood,


1.Which version of Puppy did you use?

I am using puppy-2.14 version
2. Does that version of Puppy boot correctly when you haven't added Pebble?
yes

3. Which Pebble package did you download ?

pebble-v0.4-puppy214.tar.gz

4. which boot loader did you use ?
Syslinux

hi am asked about how are you increment a file name (boot image) to display in order at boot time.i want to display progress bar with image at background while booting puppy linux
Back to top
View user's profile Send_private_message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Wed 10 Oct 2007, 18:56    Post_subject:  

Okay. I'll need you to post your syslinux.cfg file so I can try to find any errors with it.

So is it installed to a USB drive? I haven't tested that yet, but it should work. When you post your syslinux.cfg file I'll install 2.14 to my flash drive and see if I can track down this bug.

Quote:
hi am asked about how are you increment a file name (boot image) to display in order at boot time.i want to display progress bar with image at background while booting puppy linux

Oh. Pebble doesn't support that yet. I can incorporate it into the next version though. It'll take two weeks max, probably just one, depending on how much homework I get.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send_private_message Visit_website 
poorani

Joined: 23 May 2007
Posts: 51

PostPosted: Thu 11 Oct 2007, 05:46    Post_subject: boot screen(syslinux.cfg)  

Hi pizzasgood,

In that syslinux.cfg i have used what you gave for USB in the link:
http://www.murga-linux.com/puppy/viewtopic.php?p=144613#144613


With a USB install, edit the syslinux.cfg file on the USB drive, like so:

"default vmlinuz initrd=initrd.gz pmedia=usbflash vga=795 "
We are eagerly waiting for your next release.

With regards,
Poorani.B
Back to top
View user's profile Send_private_message 
amigo

Joined: 02 Apr 2007
Posts: 2278

PostPosted: Thu 11 Oct 2007, 08:44    Post_subject:  

Are the sources for pebble available? If so, where can I get a copy to try out?
Back to top
View user's profile Send_private_message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Thu 11 Oct 2007, 21:52    Post_subject:  

Note: Most of the source wasn't written my be. I started with the source from the FBV image viewer and went from there. That way I didn't have to write any code for loading images or accessing the frame buffer. The majority of (possibly all, don't remember) my changes are in main.c, where I've changed how it runs by setting it to fork into a daemon, get instructions from /tmp/pebble-pipe, read /etc/pebble/theme to get the theme, load the images, and animate them.

current source:
http://www.browserloadofcoolness.com/software/puppy/pebble/source_10-10-2007/pebble_v0.4.5_source.tgz
This source already includes the code to not store the images in ram. You can re-enable the old method by running it with the -g parameter, which will eat more ram but run faster (won't re-load the images over and over).

Just run make to build the binary. Don't bother with ./configure or make install, because I haven't set them up yet (they're still the original versions from FBV). Also, don't bother reading any documentation that might be in there (unless you're curious about FBV). Even if I actually wrote up a readme or something, it's going to be out of date by now. Your best bets for documentation would be what I posted above and anything you could glean from the comments in main.c.

Also, you'll still need to use one of the packages I uploaded above in conjunction with this. This just makes the binary, but it doesn't include the pebble script, nor the changes to initrd.gz (dependencies, adjustments to /sbin/init, etc).


The reason it's such a mess is that I had no intention of posting the source code yet. When I finish the first stable release, I'll clean up the source and upload that, but for now I'd rather focus my sparse time on the actual code.



@poorani: Okay, thanks. When I get done reading through the forum I'll dig out my USB drive and see if I can figure out what the problem is.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send_private_message Visit_website 
amigo

Joined: 02 Apr 2007
Posts: 2278

PostPosted: Fri 12 Oct 2007, 09:56    Post_subject:  

Thanks very much. I've been working with various splash utilities lately and would like to see what you have going as well.
Please be a good (GPL) guy and mark your changes well by supplying a copy of the original files, or even better by putting all your changes together in a patch unless you really fork the project you are adapting. This makes it easier to help you out if when and if possible. I have modified many programs and it took me while to learn to keep good notes and diffs -if only for my own reference later.
Thanks again. e-mail me if you need anything:
amigo@ibiblio.org
Back to top
View user's profile Send_private_message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Fri 12 Oct 2007, 22:18    Post_subject:  

Yes, I fully intend to get everything up to snuff eventually. And this is definitely a forked separate project. I intend it to be a long term hobby. I'm working harder for now to get a stable version up and out (Ecopup wants to include it in Puppy 3.03 CE), but once it can handle the progress bar style themes Poorani wants I'll be slowing down a lot, just working on it in between projects. I'll use it to learn more about image formats and writing to the frame buffer by rewriting it section by section.


@poorani: I think I found the problem. Try using this instead:
default vmlinuz root=/dev/ram0 initrd=initrd.gz PMEDIA=usbflash vga=795

Let me know if that solves it.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send_private_message Visit_website 
bobwrit


Joined: 12 Mar 2007
Posts: 286

PostPosted: Sat 13 Oct 2007, 15:15    Post_subject:  

Just an idea but wouldn't be slightly easier to do this by writing a program that mostly runs with system calls, like a script?
_________________
I need help with my forum. LINK:http://www.programers.co.nr/
http://www.freewebs.com/programm/iframe.html is my gateway page...
Back to top
View user's profile Send_private_message Visit_website YIM 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Sun 14 Oct 2007, 00:43    Post_subject:  

That's how this works. The c code is for pebble-daemon, which does the actual work of displaying the image. But it's started and managed from a bash script named pebble, which sends start and stop signals through a named pipe, along with managing the logged messages. That script is symlinked as bootsplash, for readability in a script. So to start the splash screen from within, say, /sbin/init, you just add the command bootsplash start, and bootsplash stop to stop it. You need to stop it whenever the boot process needs to show data to the user, such as for keyboard choosing or an error. Then you start it afterwards.

Eventually, you'll also call "bootsplash next" or "bootsplash 3" or something similar to update a progress bar or whatever. The version I'm working toward for now won't have true progress bars (like where you could just give it a percentage like in a GUI app), but you could simulate it with images that you update at key stages of the boot process.

The script also takes care of disabling it if you use the nosplash boot option, so that you don't have to clutter the code in the /sbin/init script.

You still need to do some general modification to /sbin/init though, to redirect the output correctly. Instead of sending it to /dev/console you send it to "$NORMLOG", which the script will adjust to point at either /dev/console or a log file, depending on whether the splash is running or not. That way even though you can't see the boot messages you can still go back and get them later.

I do need to go back and clean some of that stuff up, but I'm going to wait until I port it to 3.00, because I'll have to redo the init script then anyways.

Tomorrow I'm going to try to spend a long amount of time working on this.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send_private_message Visit_website 
amigo

Joined: 02 Apr 2007
Posts: 2278

PostPosted: Sun 14 Oct 2007, 01:24    Post_subject:  

I downloaded your sources and compiled them. I tested out the basic functionality of the app. Then I tried compiling the original sources (the main.org) file and found that it didn't work. So, I looked around on the web and found the authors homesite where the roiginal sources are available. I also found the app included in the ALT Linux distro -but with an extra patch which adds a 'nocenter' option and a few other minor changes. You may want to have a look at their sources if it helps you at all. I got them here:
http://rpm.pbone.net/index.php3/stat/26/dist/24/size/23622/name/fbv-1.0b-alt1.src.rpm

Probably not too interesting to you since you are rewriting most of the code in main.c. Still, I have an idea that you could use some of the original functionality for the progress bar by using the 'nohide' feature to show small images for the progress bar itself which wouldn't overwrite the previous display. This seems to be what bootsplash does.
I like the little program and wonder why they don't use it in debian/ubuntu instead of splashy or usplash. It has no extra unusual dependencies and already includes the basic funtionality for managing splash images in user space.
Back to top
View user's profile Send_private_message 
bobwrit


Joined: 12 Mar 2007
Posts: 286

PostPosted: Sun 14 Oct 2007, 16:56    Post_subject:  

I had ment the code having the system function.
Code:

#include<stdlib.h>
void main()
{
       system("*insert BASH comands here*");
}

It may help...

_________________
I need help with my forum. LINK:http://www.programers.co.nr/
http://www.freewebs.com/programm/iframe.html is my gateway page...
Back to top
View user's profile Send_private_message Visit_website YIM 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Sun 14 Oct 2007, 18:59    Post_subject:  

Nope, C is easier for this. C++ would be even better, but I'd have to convert things to make it compile correctly. I am considering converting it in the long run, but there's more important things to do for now.

I do have two lines that make system calls like that, mainly because calling ls was the easiest way I could think of to get an alphabetical list of all the files in a directory. I could do it within C, but it would be messier.

As of ten minutes ago, I had most of pebble-daemon sorted out for the stable release. I'll need to tweak some more still, but it's pretty much done. Staged animations, optional looping, and allowing the looped playback to start midway through the animation (for example, boy takes out yo yo and starts playing. It repeats in the middle, where the yo yo is already out, so he doesn't keep taking it out).

So next I need to adjust the pebble script to support staged animations, study and modify the /sbin/init from Puppy 3.01, and set up a basic demo theme to show how the features work (as opposed to the random images I'm been using on my machine for testing). Then I'll upload a new package. I don't know how much time I'll have this week to work on it though, and I'll be away from Friday afternoon until Monday morning. So I might not get it out until around the middle of next week.

But at that point it will mostly finished, other than testing and bug fixing.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1249s ][ Queries: 12 (0.0038s) ][ GZIP on ]