Puppy on OLPC- Attempt in progress

Using applications, configuring, problems
Post Reply
Message
Author
PlatonicPimp
Posts: 34
Joined: Tue 26 Jun 2007, 21:56

Puppy on OLPC- Attempt in progress

#1 Post by PlatonicPimp »

OK, So I've been meaning to do this since I got my XO, but I only really got a bug in my shorts about it this week. I've read a lot of speculation on what might need to be done to make Puppy work on an XO, but I haven't heard of anyone actually doing it. Well, my one qualification is a willingness to fail repeatedly until I get it right. This thread is where I will chronicle my failures and ask questions when I hit a brick wall.

My goal is to put Puppy onto an external hard drive, with swap space, that will boot to my XO as well as my other computers: an Itronix Gobook and some rediculously ancient intel box. My resources are the aforementioned computers, a WD passport 80, a 2 gig pendrive, a 512 meg pendrive, and my work computer. I have a regular puppy 4.0 disk as well as buddapup 4.0. I like enlightenment.

The OLPC currently has build 703 on it. I don't intend to take it's native OS off of it.

My first problem so far is that my two older computers don't give enough juice through the USB port to spin up the HD. SO it only works on my work computer and my XO. Neither of which has a CD drive. SO I'm doing a standard usb intstallation to the 2 gig pendrive.

I know that soon I'm going to need to copy certain boot and Kernel files from my XO. I'm not sure exactly which files, but there are lists out there for me to try. I'm also not quite sure where I will need to put them.

If anybody has some general advice, I'd appreciate it. I'll ask specific questions as I hit those hurdles.
I am running Buddapup 4.00 on an Itronix gobook 1 with an intel 85 processer and 256 MB ram, and an old desktop who's stats I completely don't know. In both cases I boot from CD at all times. I'm desperately trying to get this to work on an OLPC.

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

BIOS

#2 Post by raffy »

The trick is perhaps in the BIOS. Look here for the initial discussion.
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

PlatonicPimp
Posts: 34
Joined: Tue 26 Jun 2007, 21:56

#3 Post by PlatonicPimp »

Thanks. I'd been there for much of it by now I'm caught up.

Today's brick wall: Neither of my other computers boot from USB. I want to know the pendrive install works before messing with it. Must wait till monday to use the work computer.
I am running Buddapup 4.00 on an Itronix gobook 1 with an intel 85 processer and 256 MB ram, and an old desktop who's stats I completely don't know. In both cases I boot from CD at all times. I'm desperately trying to get this to work on an OLPC.

rrolsbe
Posts: 185
Joined: Wed 15 Nov 2006, 21:53

#4 Post by rrolsbe »

My ramblings so far hope it helps.

Puppy info on vmlinuz and initrd.gz files ***************************************

# file vmlinuz
vmlinuz: Linux kernel x86 boot executable RO-rootFS, root_dev 0x341, swap_dev 0x1, Normal VGA

# file initrd.gz
initrd.gz: gzip compressed data, was "initrd-tmp", from Unix, last modified: Sun Dec 31 09:19:56 2006, max compression

# cd initrd_contents/
# file *
initrd: Linux rev 1.0 ext2 filesystem data

As long as the OFW2 finds and uses the Puppy vmlinuz file, it should know how to handle the initrd above? NOTE: I did update to the July 3rd 2008 OFW2 firmware that allows XP to boot on the OLPC.

OLPC info on vmlinuz and olpcrd.img **********************************************

# file vmlinuz
vmlinuz: Linux kernel x86 boot executable RO-rootFS, root_dev 0x900, swap_dev 0x1, Normal VGA

I think the major number of hex 9 above has something to do with jffs2 and Root_MTD, IE.. Raw flash MTD using a jffs2 file system

# file olpcrd.img
olpcrd.img: gzip compressed data, was "olpcrd", from Unix, last modified: Wed Dec 5 12:30:46 2007, max compression

# cd olpcrd_contents/
# file *
olpcrd: ASCII cpio archive (SVR4 with no CRC)


******************************
Contents of olpc.fth file on my USB Puppy boot device located in /boot/olpc.fth

# cat olpc.fth
\ To test pretty boot, press left directional arrow when you power on.
\ Boot script
" ro root=/dev/ram0 rootfstype=ext2 pmedia=usbflash console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22" to boot-file
game-key-mask h# 80 and if
\ Boot from "backup" os if circle button is pressed
" nand:\boot-alt\vmlinuz" to boot-device
" nand:\boot-alt\olpcrd.img" to ramdisk
else
" u:\vmlinuz" to boot-device <----Pointng to Puppy vmlinuz file
" u:\initrd.gz" to ramdisk <----Pointing to Puppy initrd.gz (Locks up on loading to ram during boot)
then
boot

The OLPC OFW2 has the following for boot-device environment variable.

printenv boot-device

boot-device /xp disk:\boot\olpc.fth sd:\boot\olpc.fth nand:\boot\olpc.fth /prober /usb/ethernet /usb/wlan

disk: is USB flash device plugged into OLPC
u: is USB flash device plugged into OLPC
sd: is SDCard
nand: is OLPC internal raw flash using jffs2 file system

It does find the olpc.fth file located on the Puppy USB stick located in /boot shown above and tries to boot using the Puppy vmlinuz and initrd.gz files; however; it stops at loading initrd.gz file into ram during the boot process. The vmlinux and rd files are different (see top of this post.)

More info:

OLPC original olpc.fth

\ To test pretty boot, press left directional arrow when you power on.
\ Boot script
" ro root=mtd0 rootfstype=jffs2 console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22" to boot-file
game-key-mask h# 80 and if
\ Boot from "backup" os if circle button is pressed
" nand:\boot-alt\vmlinuz" to boot-device
" nand:\boot-alt\olpcrd.img" to ramdisk
else
" nand:\boot\vmlinuz" to boot-device
" nand:\boot\olpcrd.img" to ramdisk
then
boot

I tried root=/dev/sda1 & /dev/ram0 & rootfstype=ext2 but it still would not load initrd.gz initial ram disk.

Puppy syslinux.cfg file from 2.13 Puppy stick
# cat /initrd/mnt/dev_save/syslinux.cfg
default vmlinuz root=/dev/ram0 initrd=initrd.gz pmedia=usbflash

PlatonicPimp
Posts: 34
Joined: Tue 26 Jun 2007, 21:56

#5 Post by PlatonicPimp »

OK, so If I'm following correctly, what you have is a normal puppy install on a USB key, with olpc.fth added in the boot directory. Did you swap the Kernel or the Initrd.gz files? I've been lead to understand on the OLPC News Forums that swaping the OLPC versions of those files in place of the normal ones is how to start out.

Still Haven't gotten a confirmed-to-work puppy on a stick to start with, myself.
I am running Buddapup 4.00 on an Itronix gobook 1 with an intel 85 processer and 256 MB ram, and an old desktop who's stats I completely don't know. In both cases I boot from CD at all times. I'm desperately trying to get this to work on an OLPC.

rrolsbe
Posts: 185
Joined: Wed 15 Nov 2006, 21:53

#6 Post by rrolsbe »

PlatonicPimp

Yes it is a old Puppy 2.13 bootable USB key I had laying around. The olpc.fth boot file located in /boot on the USB stick was pointing to the the 2.13 Puppy versions of initrd.gz and vmlinux for my testing. For one of my tests I did place the vmlinux and olpcrd.img files from the OLPC onto the Puppy stick and it did go part way though the boot process but I thought using the Puppy vmlinux & initrd.gz files would be the better way to go (since it should not conflict with any of the other puppy stuff after booting), but I have been wrong before. I believe Puppy uses syslinux to pass kernel boot parameters to the Puppy kernel and the OLPC uses the olpc.fth file to pass kernel parameters to the OLPC kernel. I was hoping to find a way to pass the proper kernel boot parameters to the Puppy kernel so Puppys initrd.gz file would be loaded and mounted from RAM and not use the OLPC internal raw NAND flash at all (at least initially). My goal is to run Puppy on the OLPC using the Puppy mounted initrd.gz ext2 file and a Puppyxxx.sfs squash file system totally from within the OLPCs 256MB RAM. Since I think most of the OLPC executables (browser, etc) are loaded from NAND flash, my hope is the same executables would load much faster from a sfs file system mounted on RAM. Since the OLPC doesn't have much horsepower, decompressing an executable from the sfs file system may not be any faster (could be slower) than running the same uncompressed executable from NAND flash.

Since we have a lot of very smart people on this forum and hopefully more than an handful who own the OLPC laptop, putting our collective heads together should (if it is possible) allow us to get Puppy running entirely from RAM on the little green laptop. Oh, and one of those smart people who owns an OLPC laptop is non other than "Puppy Barry" himself.

Just found this regarding 2.6.26 kernel and OLPC.

http://www.murga-linux.com/puppy/viewto ... 37&t=31359

This adds support for OLPC XO hardware.
Open Firmware on XOs don't contain the VSA,
so it is necessary to emulate the PCI BARs
in the kernel. This also
adds functionality for running EC commands,
and a CONFIG_OLPC.

More info on VSA PCI BARs can be found at the two links below...

http://wiki.laptop.org/go/Forth_Lesson_16
http://www.amd.com/files/connectivityso ... config.pdf

Thanks for the comments!
Regards
Ron

HOPEFULLY ---Barry K includes all the OLPC related stuff into the 2.6.26 kernel when he starts using the it on an upcoming version of Puppy (Maybe 4.2??) There is a selection in 2.26.6 for OLPC support when you configure the kernel build using "make menuconfig"
Last edited by rrolsbe on Tue 15 Jul 2008, 23:29, edited 3 times in total.

PlatonicPimp
Posts: 34
Joined: Tue 26 Jun 2007, 21:56

#7 Post by PlatonicPimp »

I've got the same thread going at OLPC news forums. Someone there seems to think that updating to the latest Firware patch on the OLPC will help with boot issues.

http://olpcnews.com/forum/index.php?topic=2974.0
I am running Buddapup 4.00 on an Itronix gobook 1 with an intel 85 processer and 256 MB ram, and an old desktop who's stats I completely don't know. In both cases I boot from CD at all times. I'm desperately trying to get this to work on an OLPC.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#8 Post by tempestuous »

2.6.26 is the first kernel that will boot and run on an XO
http://lwn.net/Articles/289878/

Additional details here
http://www.murga-linux.com/puppy/viewtopic.php?t=31359

PlatonicPimp
Posts: 34
Joined: Tue 26 Jun 2007, 21:56

#9 Post by PlatonicPimp »

OK. How would I go about putting that Kernel into puppy?

Or should I just wait for someone else to do it and make a package out of it?
I am running Buddapup 4.00 on an Itronix gobook 1 with an intel 85 processer and 256 MB ram, and an old desktop who's stats I completely don't know. In both cases I boot from CD at all times. I'm desperately trying to get this to work on an OLPC.

rrolsbe
Posts: 185
Joined: Wed 15 Nov 2006, 21:53

Rebuild Puppy Kernel

#10 Post by rrolsbe »

http://www.puppylinux.com/development/compilekernel.htm

I have never rebuilt a Puppy kernel but I have rebuilt kernels on other linux Distros. If you have a way to get back to square one, it can't hurt to try. At the worst, you will learn from the attempt.

Good Luck
Last edited by rrolsbe on Wed 23 Jul 2008, 17:11, edited 1 time in total.

PlatonicPimp
Posts: 34
Joined: Tue 26 Jun 2007, 21:56

#11 Post by PlatonicPimp »

Well, Like I said, My one qualification is a willingness to mess up repeatedly.

I've been held up on this because I cannot confirm that my USB stick version works before I mess with it, as stated above, but If I can't get access to a computer other than my XO that boots linux from USB, I'll just proceed with messing with it. In the mean time I've been getting XFCE to work on the red hat build it came with.
I am running Buddapup 4.00 on an Itronix gobook 1 with an intel 85 processer and 256 MB ram, and an old desktop who's stats I completely don't know. In both cases I boot from CD at all times. I'm desperately trying to get this to work on an OLPC.

PlatonicPimp
Posts: 34
Joined: Tue 26 Jun 2007, 21:56

#12 Post by PlatonicPimp »

I'm back, with a computer that can boot from USB to confirm I have a working puppy build. Which I do, yay. Now I can finally work on getting it on the XO.

Since the latest Kernel (2.6.26) is supposed to include OLPC support out of the box, the first thing I want to try is updating the Kernel. How should I do this in Puppy? I've found a link to a howto, but it's for the 2.14 version of puppy. Has anything changed?

It's been confirmed that the important file for OLPC booting is a forth script called olpc.fth. There is a page on how to configure it here: http://wiki.laptop.org/go/Olpc.fth

SO any device that is going to boot from the OLPC needs that file on the drive, with the right parameters set. Will this work with the .sfs method puppy uses? What parameters should I use?
I am running Buddapup 4.00 on an Itronix gobook 1 with an intel 85 processer and 256 MB ram, and an old desktop who's stats I completely don't know. In both cases I boot from CD at all times. I'm desperately trying to get this to work on an OLPC.

User avatar
Fox7777
Posts: 132
Joined: Fri 27 May 2005, 22:02
Location: Lacey, WA
Contact:

Trying to boot Puppy flash drive or Puppy usb cdrom on OLPC

#13 Post by Fox7777 »

I have the developer key installed on an older OLPC laptop so can hit escape and enter what I'm trying to boot. I have tried Puppy 4.3.1 on a flash drive (which boots OK on my HP laptop) with variations suggested in http://wiki.laptop.org/go/Olpc.fth but no success. The same applies to my external usb DVD/RW with Puppy 4.3.1. I would prefer to leave the Sugar software on the OLPC laptop and boot Puppy from the flash drive or usb cdrom. Has anyone successfully done this? Otherwise installing direct to the SSD would be OK. Is it possible to have both on the SSD and use Grub to boot?.- Thanks

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

Re: Trying to boot Puppy flash drive or Puppy usb cdrom on OLPC

#14 Post by Sit Heel Speak »

Fox7777 wrote:I have the developer key installed on an older OLPC laptop so can hit escape and enter what I'm trying to boot...
Hi Joel,

OLPC support has to be switched-on in 'make menuconfig' at the time the kernel is compiled. As of the official 2.6.33.2 Puppy kernel which is used in Quirky, Wary, and all renditions of Lucid Pup to date, Barry is not switching-on the OLPC support.

I have succeeded in compiling a 2.6.33.2 kernel with both realtime preemption and all the OLPC support, but it has some mysterious issues, most notably it breaks PNethood and will not drive my snd_emu10k1 sound card. This latter glitch exists even though Puppy 4.20-rt-smp does drive this sound card, and lsmod shows all the same drivers loaded.

As soon as I can sort these issues out, I will bring you my "alternate rendition of Lucid Pup," developed for the Dell Mini-9, and we can try it on the OLPC. Except for sound and PNethood, so far I am quite pleased with it.

For interested parties, the kernel-compile-time switch settings for the OLPC in k2.6.33.2 are:

CONFIG_PCI_GOOLPC
CONFIG_PCI_OLPC
CONFIG_OLPC
CONFIG_MOUSE_PS2_OLPC
CONFIG_BATTERY_OLPC

Philip

PS Sorry for being such a puck earlier.

PPS I would like to get my hands on an AMD 64 machine. Ya got?

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

AMD64

#15 Post by raffy »

Sit Heel Speak wrote:PPS I would like to get my hands on an AMD 64 machine. Ya got?
Isn't the AMD Sempron a budget 64-bit processor?
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

Post Reply