Developing FirstRUN for Puppy CD's initial boot

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#21 Post by tasmod »

Been away a couple of days so missed these.

I wasn't really looking for a different solution or method of booting.

No, I was simply trying to polish up the existing Puppy startup.

It always seems to me that whenever I show anyone who is used to Windows the Puppy system, they shy at seeing a text startup.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

#22 Post by recobayu »

the animation splash screen is good i think :)
can you give us the tutorial how to do that?

i'm sorry, but in my oppinion, text mode is better.
when i show my lupu528 to my friend, he is very like it because it's like a proffessional hacker mode on. he has been looking to the walking text like:
searching puppy file . . . and then Done
loading luci528.sfs . . . Done
bla bla bla . . . . Done
it's like the matrix's effect.
and i'll say..
:D
so, the text mode when starting puppy is better than splash screen animation, i think..
i'm sorry, it's just my oppinion.

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#23 Post by tasmod »

Hi recobayu,

No problem, everyone has their own opinion.

I too like the text startup BUT the average Windows user has never seen one, so it unsettles them when the text pauses.


As to making the animation, well it's the 'Pebble' server by pizzasgood with a series of single frame pictures played at 20 frames per second. It uses the framebuffer at startup with a grub menu.lst change to graphic mode.
For Puppy regular users there is a getout 'nosplash' which disables frames and displays text at startup.

It requires quite a bit of hacking to the initrd.gz and the Puppy startup scripts.

'Pebble' is in the Additional Software/Unsorted section of forum.

Please be aware that I do not have it running how I like. On my machine because of the grub parameter it will startup OK but at shutdown the text is masked, which leaves you blind as to what is happening.

I made an iso Live CD with 5.2.9 on it which starts and runs. It does pause for the usual start messages between animation but I've yet to get it to shutdown properly and during shutdown display the 'savefile' messages. It is doing it, but in the masked background processing.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#24 Post by technosaurus »

I posted my improved wait function that can indicate while process(es) run.
Mainly it is to improve boot speed by elimination of long sleeps or wait command

http://bashismal.blogspot.com/2011/10/s ... -wait.html
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#25 Post by tasmod »

techno*

You mentioned fbsplash in the Pebble thread. Have you any experience trying to run it ?

I've been trying for a few days but no joy.

I modded the init and added

Code: Select all

/bin/busybox fbsplash -s /boot/splash.ppm -c -i /boot/fb.config -f /proc/fbsplash
but I suspect the paths are wrong.

It appears to be doing something behind the black screen I get when I use vga=785 without a splash pic to load. I got the same result when I made the wrong path using Pebble.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#26 Post by technosaurus »

Sounds like you need a modprobe fbcon in the init script ...puppy's has some quirky requirement for kms or something like that for it to get loaded and I am unsure at what part it occurrs
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#27 Post by tasmod »

Yep modeprobe already in there earlier on, I only posted the fbsplash activate line.

I'm sure it's related to what is loaded paths. I placed it in same position as working Pebble script. i.e just before "Loading Drivers needed to access disk drives" this way the proc etc have loaded.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#28 Post by Karl Godt »

fbcon should be loaded after the framebuffer kernel modules are loaded .

It is [still] not set AFTER User Selected Modules but after Loading Kernel Modules .

fbcon.ko has to be loaded after framebuffer drivers at least for nvidiafb.ko &| nouveau.ko ; loading fbcon first did not work for me .

The Standard Puppy Kernel is configured without framebuffer drivers [both in kernel and as modules ] .
[ I wondered first why these framebuffer drivers are mentioned in the SKIPLIST of /etc/rc.d/MODULESCONFIG ???]

For busybox you have to watch out , that busybox might use /dev/fb/0 [ similar to its losetup applet using /dev/loop/[0-9] ] INSTEAD of /dev/fb0 .

tasmod , what does your fb.conf file looks like ?

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#29 Post by tasmod »

Hi Karl,

the config is just defaults. Should it have more?

Code: Select all

BAR_LEFT=312
BAR_TOP=550
BAR_WIDTH=400
BAR_HEIGHT=11
BAR_R=64
BAR_G=64
BAR_B=64
I've messed around so much i confused myself, so I've started again.

This is now what's in init in initrd.gz

Code: Select all

###################################################TASMOD FBSPLASH###

  modprobe  fbcon																			            

  mkfifo /tmp/fbsplash.fifo																			 

  /bin/busybox fbsplash -s /boot/puppy.jpg -c -d /dev/fb/0 -i /boot/fb.config  -f /tmp/fbsplash.fifo    
  
  
####################################################TASMOD FBSPLASH###
This code is placed in same spot as the pebble code that worked.

There is also fifo pipes in /boot

EDIT:

Ah, the bulb came on in the brain. Of course, Pebble has a separate pet that adds the framebuffer files !
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#30 Post by Karl Godt »

Please make sure /dev/fb/0 exists in the initrd.gz

ls -alF fb*
crwxr--r-- 1 root root 29, 0 2011-06-22 15:59 fb0

I would mkdir the folder fb/ there and copy the already present [initrd-tree] ./dev/fb0 named as '0' into ./dev/fb/ additionally .

I have only experimented with the busybox fbset once on full installation and created
# ls -alF /dev/fb*
crw-rw---- 1 root root 29, 0 2001-02-27 17:58 /dev/fb0
crw-rw---- 1 root 5 29, 1 2002-04-16 03:49 /dev/fb1
crw-rw---- 1 root 5 29, 2 2002-04-16 03:49 /dev/fb2
crw-rw---- 1 root 5 29, 3 2002-04-16 03:49 /dev/fb3

/dev/fb:
total 28
drwxr-xr-x 2 root root 4096 2011-07-03 20:52 ./
drwxrwxr-x 15 root root 20480 2011-11-03 11:40 ../
lrwxrwxrwx 1 root root 6 2011-07-03 20:48 0 -> ../fb0
lrwxrwxrwx 1 root root 6 2011-07-03 20:52 1 -> ../fb1
lrwxrwxrwx 1 root root 6 2011-07-03 20:52 2 -> ../fb2
lrwxrwxrwx 1 root root 6 2011-07-03 20:52 3 -> ../fb3
lrwxrwxrwx 1 root root 6 2011-07-03 20:52 4 -> ../fb4
# file /dev/fb/4
/dev/fb/4: broken symbolic link to `../fb4'

for that purpose . Still Much Luck !

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#31 Post by technosaurus »

here is a screeny of my ~2s booting kernel - It has almost everything but the essentials to get to X with jwm and rxvt so for most people it will be just a toy ... ironically that is why I made it - so my kids can't accidentally bork something up (can't mount drives or access any networks - just play games)

If anyone is interested I can post my .config and a tarball of the initramfs

The bzImage (from 2.6.32.50 source) is only 1437k including the builtin Xvesa, jwm and rxvt ... so it should even fit on a floppy. (really I could get it down to ~1mb with a busybox recompile with only needed applets -- and could cut resource usage to as low as ~4mb)
Attachments
microsaurus.png
(51.11 KiB) Downloaded 2087 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Bert
Posts: 1103
Joined: Fri 30 Jun 2006, 20:09

#32 Post by Bert »

That's very impressive technosaurus!

Shouldn't the "everything" on the first line of your post be "nothing"? Or do I need extra English lessons :wink:
... ironically that is why I made it - so my kids can't accidentally bork something up (can't mount drives or access any networks - just play games)
Would love to have something similar for my girlfriend's box, with just eth0 and a browser.... would liberate her from her technofear (and liberate me, the repair man) :lol:
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#33 Post by Karl Godt »

If anyone is interested I can post my .config and a tarball of the initramfs

The bzImage (from 2.6.32.50 source) is only 1437k including the builtin Xvesa, jwm and rxvt
YES , go ahead !

AFAIK it is possible to adjust the paths in the kernel config like path to uevent(helper) or /sbin/init .

I had been not aware of the possibility to compile Xvesa and others into the kernel, too .

I know there is the embedded feature in make menuconfig .

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#34 Post by technosaurus »

Ok here it is, Puppy in <1mb in a single bzImage

Resource usage in X with jwm running and an rxvt terminal open:
MEMUSAGEKB=5020 (with background) 2892kb without background image

Resource usage at the console:
MEMUSAGEKB=2288

I wanted to see how far I could go so I ended up disabling even proc and sys, (which breaks top and ps) so I needed a way to get memory usage. I also replaced busybox with dash and mount from embutils (sh is used by rxvt which also needs /dev/pts so needed to mount a devpts) and just for grins i wrote my own init in C . I could get the resource usage down under 2Mb if jwm were compiled with only X11 with maybe xpm support and used st instead of rxvt

here is the code I wrote for memused

Code: Select all

#include <sys/sysinfo.h>

int main(int argc, char **argv){
	struct sysinfo info;
	sysinfo(&info);
	printf("MEMUSEDKB=%d\n",(info.totalram - info.freeram)*info.mem_unit/1024);
}
here is my init code

Code: Select all

#include <unistd.h>
#include <sys/wait.h>
#include <stdlib.h>

//these could be functions but gcc complains less this way 
#define EGGSACKWEIGHT(a) ({int s,p;if((p=fork())==0){execvp(a[0],a);}else{while(wait(&s)!= p);}})
#define SHIFTN(i,a) ({ int j=0;while(a[j] != NULL){a[j]=a[j+i];j++;}})
#define EGGSACK(a)	({if((fork())==0) execvp(a[0],a);})
int main(int argc, char** argv) {
//export PATH="/bin" HOME="/root" TERM="xterm /bin/sh" SHELL="/bin/sh" PS1="# " USER=root LOGNAME=$USER HISTSIZE=1000 HISTFILE="$HOME/.history" INPUTRC=/etc/inputrc
//setenv("PATH","/bin",1);
putenv("PATH=/bin");
putenv("HOME=/root");
putenv("TERM=xterm");
putenv("SHELL=/bin/sh");
putenv("PS1=#");
putenv("USER=root");
putenv("LOGNAME=root");
putenv("HISTSIZE=1000");
putenv("HISTFILE=/root/.history");
putenv("INPUTRC=/etc/inputrc");

char* X[99];
//mount devpts /dev/pts -t devpts
	X[0]="mount";
	X[1]="devpts";
	X[2]="/dev/pts";
	X[3]="-t";
	X[4]="devpts";
	X[5]=NULL;
	EGGSACK(X);

//Xvesa -screen 640x480x16 -nolisten tcp -tst -I &
	X[0]="Xvesa";
	X[1]="-screen";
	X[2]="640x480x16";
	X[3]="-nolisten";
	X[4]="tcp";
	X[5]="-tst";	
	X[6]=NULL;
	EGGSACK(X);

//script? ... try getenv("XINITRC") and getenv("HOME") + /.xinitrc

putenv("SHELL=/bin/sh");
putenv("DISPLAY=:0");

X[0]="jwm";
X[1]="-display";
X[2]=":0";
X[3]=NULL;
EGGSACKWEIGHT(X);

X[0]="killall";
if (argc>1) {
	X[1]="Xvesa"; //see above... maybe change to X
}else{
	X[1]="Xorg";
}

X[2]=NULL;
EGGSACK(X);

X[0]="sh";
X[1]=NULL;
EGGSACKWEIGHT(X);
}
I also commented this line in the kernel source (init/do_mounts.c) - the wait isn't needed here

Code: Select all

	//wait_for_device_probe();
Attachments
microsaurus.jpg
(12.26 KiB) Downloaded 1937 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#35 Post by PANZERKOPF »

technosaurus wrote:Ok here it is, Puppy in <1mb in a single bzImage
Have tested it. Whole boot process takes 0.5 Sec (or thereabout).
Seems kernel is filled with gunpowder.... :)
SUUM CUIQUE.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#36 Post by nooby »

But what does it take then to make all the needed changes?
I feel so dense. If it is this easy then why don't the devs of
Lupu or slacko use part of it to speed up the boot of those OS?
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#37 Post by Aitch »

techno

Would I be right in saying microsaurus is only for playing games/videos?
Is it potentially useful as a puppy rescue tool on a floppy? i.e. can mount drives/partitions or edit/copy/paste things be added? Can any network/browser be added?
Do we just write/copy the image to floppy?
I like the sound of 1/2 second boot.... :D

Aitch :)

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#38 Post by nooby »

Yes would be cool if you can make something like a rescue thing
for USB and CD/DVD but I don't mind if it works as frugal install on HD
I use Google Search on Puppy Forum
not an ideal solution though

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#39 Post by PANZERKOPF »

nooby wrote:Yes would be cool if you can make something like a rescue thing
for USB and CD/DVD but I don't mind if it works as frugal install on HD
This is a kernel with embedded root filesystem so it always boots "as frugal".
You can boot it from any device supported by BIOS and bootloader.
SUUM CUIQUE.

gcmartin

#40 Post by gcmartin »

@Techno
that's impressive for getting something booted in a box.

Now, could this be extended to a need (practical one) where I need a router service which runs the following fron X-desktop
  • DNSMASQ
  • Web server
  • full SAMBA server
in a 32MB RAM platform? I don't care about the ISO size as that is unimportant to me, I am only concerned about it running in RAM. And, it must be able to use USB storage, LAN Motherboard peripherals along with wireless

This is the smallest useful application platform I could think of for using a small system. (The web server is optional.)

Hmmm...
edited: (even though I envision practical use, to do this is probably not possible)

Post Reply