Gp2x Bootchart


theoddbot posted on Feb 18 2006 at 08:35 AM said:
OK, thanks to art103 for trying this out, we have a total boot time of 12.2 seconds from power on !!!

Holy cow!

Any chance of a patch that can set up the cramfs automatically through a script or whatever for us folk not experienced in creating compressed Linux file systems?

Actually, I wouldn't have any problems just doing it with a guide, if you'll tell me what I need to know (except the kernel source would take a frickin' long time to download on my dial-up connection), but a patch would be nice.
 
Last edited by a moderator:
This is so awesome! Great work (and fast)!
I am looking forward to being able to try it out.
 
yep... 12.2 seconds... Linux is slow an bloated alright... :p I can't wait to see community written firmware, should make the GPH/Dig stuff look like poo in no time.
 
I propose someone make a 'drop-install' type program that:

Copies itself to RAM;
takes over from the current kernel
nukes the NAND contents
reformats the NAND as: (2? CRAMFS/SQUASHFS, whatever FS and a ?swap/writing? partition)
installs the improved fast-booting kernel and other assorted software.
reboots
displays a nice NEW boot up logo.


Basically a totally automated single '.exe' (pardon the windows speak) that does all the work and leaves you with a clean, fast install.

Also, man that WAS fast! I swear that was not even 24 hours!
 
really interesting =) but i have a little question, why amateur people do things in 24 hours and the professional guys form gph dont do in 3 month?? they spend his time eating noddles¿?
 
ilarri posted on Feb 18 2006 at 08:07 PM said:
really interesting =) but i have a little question, why amateur people do things in 24 hours and the professional guys form gph dont do in 3 month?? they spend his time eating noddles¿?
Well they had to build up everything for the 2x from scratch and they were probably focused on more "vital" things, i.e movie player, executable stuff, getting the thing to actually go.
 
Last edited by a moderator:
There will be an installer that builds a clone of the 1.4 firmware soon enough. It will install the filesystem on the spare area of the NAND. There will be a replacement kernel that you will have to flash as well. Look forward to this in the next couple of days.

As to cramfs vs. squashfs, unless there are compelling reasons otherwise, I will stick to cramfs, since it is already part of the 2.4 tree.
 
i figured this would happen...i have an iRiver h120 and once rockbox got ported to it, it went from having a boot time comparable to the gp2x's to being instant-on. (i realize that the h120's firmware is probably much more bare-bones than a linux implementation, but look at what's already been done...)

it's a good day.
 
Ok, the first test image is available, for you brave souls. Grab it from http://brendan.mine.nu/gp2x/cramfs/

Code:
Fast Boot cramfs image - 0.0.1
==============================

Beta Only - Use at own risk!!!!!

Abuse and other feedback goes to oddbot@oddsoftware.net

This should boot a retail unit to firmware 1.4 in 14 seconds.

Because cramfs is a read-only filesystem, some applications may fail to
work properly. For example, the LCD settings will not be saved.

Instructions:

    1. Download and extract http://brendan.mine.nu/gp2x-cramfs-0.0.1.zip

    2. Turn on your gp2x

    3. Copy cramfs-1.4.dump to your SD card

    4. run:
        dd if=/mnt/sd/cramfs-1.4.dump of=/dev/mtdblock/4 bs=1M
        sync

        This step takes around 2 minutes to complete.

        flash_cramfs.gpu is provided for the terminal impaired, but not tested,
        use at your own risk.

    5. Copy gp2xkernel.img to your SD card, and flash your gp2x as normal

That's it!, enjoy your new boot time

If you want to revert to the old firmware, simply reflash the kernel
to your current firmware, your original filesystem will not be
touched.

Realistically, the chances of brickage are rather low, since GPH's method of flashing the firmware is used, you will be able to flash your old gp2xkernel.img back without any trouble. This system will not modify the original filesystem in any way.
 
I've just done your upgrade, and I must say that the boot time is very fast. I just have a couple of questions.

Is it possible to revert back to a read-write filesystem?
Can I change the skin somehow?

Oh, and it seems to run serial-bash.gpu every time I boot. (USB Serial command line)

Just timed it: 15.09 seconds!
 
Thanks so much oddbot 13.6 Seconds here! I've got the old uboot on my gp2x would updating it to the newer version lower my boot time further? Doesn't really matter now anyway
 
To make it somewhat easier to create your own cramfs images, I've uploaded a starter tarball to my site.

This is mostly based on theoddbot's image, but with a few bootchartd-related things removed, some directories (/root, /home) symlinked to /tmp, and empty /dev directory, since this gets created automatically at startup anyway. In particular, it is assumed that you have your HOME directory set to /mnt/sd, as recommended in other threads.

Assuming that you have a GNU/Linux distribution on your machine, do the following to create a custom image.
  • Download my tarball.
  • Make sure you have the mkcramfs binary available. If you make your own Linux kernel, you probably have this.
  • Code:
    cp cramfs-base-0.0.1/base mycramfs
  • Code:
    su -c "chown -R yourname:yourname mycramfs"
    where "yourname" is your login name.
  • Make your changes.
  • Code:
    su -c "chown -R root:root mycramfs"
  • Code:
    su -c "mkcramfs mycramfs mycramfs.dump"
  • Copy mycramfs.dump to your SD card, and follow theoddbot's instructions for the rest of it, using "mycramfs.dump" instead of "cramfs-1.4.dump".
The reason for using "su" so much is to make sure that everything in the created image is owned by root. You could probably get away with not using "su", but I haven't tested that scenario.

Comments, additions, derivatives, and the like are welcome.
 
Great to hear from everyone who's got it working.

For those who want a different menu skin, etc, mwolsen just saved me the trouble of writing a guide :)

The next release will redirect some things to your sd card, like the LCD settings and stuff, as well as any other suggestion, let me know what you want!
 
The worked fine for me using the gpu script. Went from (I kid you not) 00:01:00.3 to 00:00:12.6. Twelve seconds! Good stuff!

Thank you so much theoddbot! I can't wipe the smile off my face.
 
Back
Top