XOpup Interest Group. Puppy Linux for the OLPC XO-1 laptop

A home for all kinds of Puppy related projects
Message
Author
wmb@firmworks.com
Posts: 17
Joined: Tue 04 Sep 2007, 21:22

#221 Post by wmb@firmworks.com »

I see from the XOpupDOTconfig that you (mavrothal) posted earlier that indeed CONFIG_USB_LIBUSUAL=y . So you can try either unsetting that config option or "modprobe usb_libusual".

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#222 Post by mavrothal »

mavrothal wrote: PS. I'll upload last night's kernel rmps and srpm somewhere and post the link here shortly.
Here are the kernel rpms
http://www.sendspace.com/file/rgznrx
eefde4b9e9ccc09e4fb2b2dd0ae2100b xopup_kernel_rpms.tgz (11.8MB)

For an F11-running XO you'll need kernel-firmware (install first) and kernel. Kernel-headers and kernel-devel are also included, well, for development. Don't be put off by the "DIRTY" suffix, it follows any unofficial kernel, build with OLPC's build system.

/lib/modules and /lib/firmware here (running on an XO)
http://www.sendspace.com/file/947sw7
80f698a9c6a814d538c5a8371f241854 XOpup_modules_firmw.tar.gz (3.2MB)
Keep in mind that the path is not correct.

The patched kernel source rpm is here
http://www.sendspace.com/file/jxntu3
75a416ed280e5dd4ba527747e079f288 kernel-2.6.31_xo1-20100117.0000.1.olpc.628e024_DIRTY.src.rpm (60MB)

Just in case you want to recompile. Though I strongly suggest to do it from the olpc git source (here is a novice howto)and patch it from source.

Get them while hot because sendspace does not keep them for long.
wmb@firmworks.com wrote: I see from the XOpupDOTconfig that you (mavrothal) posted earlier that indeed CONFIG_USB_LIBUSUAL=y . So you can try either unsetting that config option or "modprobe usb_libusual".
Does the second means that I'll have to add something in the initrd's modules.dep file? (what?) Something else in the initramfs?
Last edited by mavrothal on Sun 17 Jan 2010, 20:32, edited 1 time in total.

wmb@firmworks.com
Posts: 17
Joined: Tue 04 Sep 2007, 21:22

#223 Post by wmb@firmworks.com »

I got the kernel RPM ...
wmb@firmworks.com wrote: I see from the XOpupDOTconfig that you (mavrothal) posted earlier that indeed CONFIG_USB_LIBUSUAL=y . So you can try either unsetting that config option or "modprobe usb_libusual".
Does the second means that I'll have to add something in the initrd's modules.dep file? (what?) Something else in the initramfs?[/quote]

Well, I was thinking you might try typing "modprobe usb-libusual" from the shell prompt, just as a test.

I did that, and got the complaint:

FATAL: Could not load /lib/modules/2.6.31_xo1*/modules.dep: No such file or directory

I looked for that file and, indeed, it isn't present. The containing directory is there, but modules.dep is not. The probable cause is a failure to do "depmod" after creating the modules.

I'm searching for an exact recipe for doing that.

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#224 Post by mavrothal »

wmb@firmworks.com wrote: Well, I was thinking you might try typing "modprobe usb-libusual" from the shell prompt, just as a test.

I did that, and got the complaint:

FATAL: Could not load /lib/modules/2.6.31_xo1*/modules.dep: No such file or directory

I looked for that file and, indeed, it isn't present. The containing directory is there, but modules.dep is not. The probable cause is a failure to do "depmod" after creating the modules.

I'm searching for an exact recipe for doing that.
Assuming we are talking initramfs I rename the included 2.6.31.5 folder lib/modules to my kernel's name and I add '2.6.31.5' symlink to it.
Is certainly not the right way but "modprobe usb_libusual" just complains that the module does not exists and indeed does dot
"modprobe usb_storage" gives the aforementioned complains

I could also upload my modified initamfs folder and vmlinuz and sfs file with the /lib/modules and firmware from this kernel (is a different one than the posted but only in the sense that I used last night's olpc git instead of Jan 9 - too much manual labor to repeat on the fly) if you think it would help. But I do not have the srpm for this build anymore.

wmb@firmworks.com
Posts: 17
Joined: Tue 04 Sep 2007, 21:22

modules.dep

#225 Post by wmb@firmworks.com »

To make the modules.dep, I did this:

Code: Select all

sudo depmod -b $DIR 2.6.31_xo1-20100117.0000.1.olpc.628e024_DIRTY
where $DIR is the staging directory that contains lib/modules/2.6.31_xo1*

I then regenerated the initrd.gz to include the files that depmod created.

The XO-1 now gets much farther. It says it can't find the .sfs file.

/dev/sda is being probed correctly; I can do "fdisk /dev/sda" and view the partition table. But I cannot mount the filesystem. I tried this:

Code: Select all

mkdir /mnt/test
mount /dev/sda1 /mnt/test
and got this:
  • mount: mounting /dev/sda1 on /tmp/foo failed
Now I have to work out why it failed.

wmb@firmworks.com
Posts: 17
Joined: Tue 04 Sep 2007, 21:22

#226 Post by wmb@firmworks.com »

I also tried
  • mount -t vfat /dev/sda1 /mnt/test
    mount -t fat /dev/sda1 /mnt/test
    mount -t msdos /dev/sda1 /mnt/test
... all giving the same "mount .. failed" message.

Busybox is soooooo helpful.

wmb@firmworks.com
Posts: 17
Joined: Tue 04 Sep 2007, 21:22

mount progress

#227 Post by wmb@firmworks.com »

I still can't mount a FAT USB stick, but I did manage to mount an ext2 stick, so I moved all the files onto it.

Now it finds quirky_004.sfs . Here's what happens after that:
  • forced copying into ram
    Setting up the layered filesystem...
    aufs test_add:243:mount[1300]: uid/gid/perm /pup_ro1 0/0/0755, 0/0/01777
    aufs test_add:243:mount[1300]: uik/gid/perm /pup_ro2 0/0/0755, 0/0/01777
    Performing a 'switch root' to the layered filesystem...
    Kernel panic - not syncing: Attempting to kill init!
So my next thought is - is there a copy of /lib/modules in quirky_004.sfs ? If so, it will be for the wrong kernel.

I'm going to sleep now.

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

Re: mount progress

#228 Post by mavrothal »

wmb@firmworks.com wrote: Kernel panic - not syncing: Attempting to kill init![/list]So my next thought is - is there a copy of /lib/modules in quirky_004.sfs ? If so, it will be for the wrong kernel.
Yes quirky-004.sfs has Barry's 2.6.31.5 kernel.
However the progress is amazing. Thank you.

So all is really needed is for Barry, you, ttuuxxx or somebody :D to built the XOpup with an OLPC-patched kernel

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#229 Post by mavrothal »

That is strange :?:
I did add the usb-libusual in my init and added the dependencies for usbcore and usb-storage in modules.dep.
modprobe finds it correctly and usbcore registers new interface. My usb stick is recognized by manifacturer and loaded as sda (SCSI thought :?: ).
Can not find the sfs files still :?
pupinfo script says that it can not mount /dev/sda1 in /mnt/sda1.
So the partition is recognized but for some reason can not be mounted.
It does sees that sda1 has a fat partition, however can not see the files in the partition. In contrast it does see the files in an ext2 formated SDcard (that has another OS)
At the end report correctly all the available disks in dev (stick and SDcard).
Anyone???

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#230 Post by mavrothal »

Going on with an ext3 stick now and an sfs that does have the XOpup kernel modules.
As you can see in the photo everything looks OK, finding sfs, copying to ram etc, but no cigar :x Just stays there. I suspect that there is more to it in the build itself... :shock:

Image

I just hope that Barry will get back to it and Mitch will wake up with a free day and a great enthusiasm :D

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

Re: mount progress

#231 Post by mavrothal »

wmb@firmworks.com wrote:So my next thought is - is there a copy of /lib/modules in quirky_004.sfs ? If so, it will be for the wrong kernel.
Sory I just realised late that you may need kernel modules and firmware so I just uploaded them here
http://www.sendspace.com/file/947sw7
80f698a9c6a814d538c5a8371f241854 XOpup_modules_firmw.tar.gz (3.2MB)

Keep in mind that the path is not correct.

quickboot
Posts: 7
Joined: Mon 17 Nov 2008, 09:18

#232 Post by quickboot »

Just cheering you guys on with your magic! I JUST saw an advertisement on TV for the G1G1 XO here in California. So there will continue to be more of us users wanting Puppy running on the XO.

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

#233 Post by technosaurus »

I rebuilt Barry's initrd.gz with all kernel modules gunzipped (its actually smaller) maybe thats the problem?
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
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#234 Post by mavrothal »

technosaurus wrote:I rebuilt Barry's initrd.gz with all kernel modules gunzipped (its actually smaller) maybe thats the problem?
Not for the OLPC XO unfortunately.
First Barry's kernel will not start, and if you use another one will be the wrong modules. Maybe for other geode LX machines, though is still missing usb-libusual.ko that solves the "find the stick" problem, at least on the XO.

wmb@firmworks.com
Posts: 17
Joined: Tue 04 Sep 2007, 21:22

Success

#235 Post by wmb@firmworks.com »

I'm looking at a Puppy desktop showing a bulldog riding a skateboard.

All I had to do to make it work (with mavrothal's kernel and the corresponding modules added to initrd.gz) was to add the line:

modprobe loop

in init at line 373, right after the "#filesystems" line

I expect that the same thing could be accomplished by modifying mavrothal's .config to have "CONFIG_BLK_DEV_LOOP=y" instead of "..=m", thus making it unnecessary to explicitly pull in the loop device module.

The other config change I would recommend is "CONFIG_NLS_CODEPAGE_437=m" instead of "..=m". That would suppress an error message that shows up in the boot error log, and might possibly solve the problem with FAT-formatted USB sticks.

If you want to see the boot error log, here is a recipe:
  • Add "pfix=rdsh" to the cmdline (boot-file) in olpc.fth
    When you get to the shell prompt, type "more /pup_new/initrd/tmp/bootinit.log"
That log will show some "FATAL: Module pci:..." lines. Here is a list of what they are:
  • ..1022d00000028.. Geode LX Northbridge
    ..1022d00002081.. Geode LX display
    ..1022d00002082.. Geode AES encryption engine
    ..11ABd00004100.. OLPC/Marvell CaFe NAND FLASH controller
    ..11ABd00004101.. OLPC/Marvell CaFe SDHCI
    ..1022d00002093.. CS5536 AC97 audio controller
Those problems do not appear to actually be fatal. In particular, the SDHCI works (you can access SD cards via /dev/mmcblk0) and the display works.

When going through the configuration menus for the display, I just chose some default values like the 'Z' timing option and 1024x768 because the real 1200x900 resolution wasn't offered. It didn't seem to cause any problems - the display came up in the correct resolution anyway.

One problem I did notice is that there were no icons for the desktop applications. Instead, they were represented on-screen by text names below where the icons would have been seen.

I tried the "write" application. It worked.

I did a shutdown. The system offered to make a puppy save file as usual, and that seemed to behave correctly, offering me the choice of saving on a USB stick or an SD card. The next reboot worked as expected, except that the touchpad did not work the second time.

This is with the old 3-section dual-mode ALPS touchpad, not the newer 1-section Synaptics pad. The ALPS touchpad has been a continuing source of problems for OLPC. The console log says:

psmouse serio1: packet spew detected (-2,0)

It is possible that using the OLPC DCON xorg.conf from an OLPC OS distribution might help.

For reference, here is my /boot/olpc.fth file:

Code: Select all

\ OLPC boot script
unfreeze visible setup-smbios
" u:\puppy\initrd.gz" to ramdisk
" setenv boot-file console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22" to boot-file
boot u:\puppy\vmlinuz
The "Saving session to /quirkysave.2fs (sda1)..." step on shutdown is annoyingly slow, even though I chose a relatively small size for the file - 64M I think - without encryption. In my opinion, this long save time is so annoying as to negate some of Puppy's claimed performance advantages. It is possible that this USB stick is just slow, especially since it has an ext2 file system on it, which tends to confuse devices whose firmware is optimized for specific FAT layouts.

Sorry for the long rambling post, but I really have to get back to my real job working on XO-1.5, so I figured I should put down everything I discovered. I won't be able to help any more for awhile. I hope the rest of you can take it from here.

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#236 Post by mavrothal »

Wow :lol:
Just 3 very fast questions.
Is the performance improved over other distros?
and is the change in config "CONFIG_NLS_CODEPAGE_437=m" or "CONFIG_NLS_CODEPAGE_437=y"?
Should initrd/vmlinuz/quircky.sfs be in a "puppy" folder or root of the stick is also OK?
Thanks again

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

Thanks

#237 Post by raffy »

Great to see booting success at last. Thanks, Mitch!

Congratulations, Mav, you supplied the kernel version and other tweaks.

Thanks also to Barry, ttuuxxx and TZ. :)
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

Re: Thanks

#238 Post by mavrothal »

raffy wrote:Great to see booting success at last. Thanks, Mitch!

Congratulations, Mav, you supplied the kernel version and other tweaks.

Thanks also to Barry, ttuuxxx and TZ. :)
Thank you raffy for contacting Mitch and Barry :D

And now, all happy and that, can we get to work? :D

So ttuuxxx will you get it from here or would you rather have me (or any other willing person :D ) patch-up something that boots with the right kernel and initrd and make the real XOpup from there? Eg is it easier for development to have all the pieces yourself there (so a proper devx.sfs/kernel source can be posted) or you are ok the other way around?
Just in case you go for the full monty 8) I attache the DOTconfig with Mitch' suggestions incorporated.
Attachments
XOpupDOTconfig_mitch.zip
(15.54 KiB) Downloaded 419 times

wmb@firmworks.com
Posts: 17
Joined: Tue 04 Sep 2007, 21:22

#239 Post by wmb@firmworks.com »

mavrothal wrote:Wow :lol:
Just 3 very fast questions.
Is the performance improved over other distros?
I don't know. I haven't done any serious benchmarks. The boot time is certainly faster that the OLPC OS with Sugar, but its not hugely faster than DebXO. The shutdown time, as I mentioned, is annoyingly slow. I expect the application startup time might be faster considering that things are already in RAM, but I haven't tested that specifically.
and is the change in config "CONFIG_NLS_CODEPAGE_437=m" or "CONFIG_NLS_CODEPAGE_437=y"?
If you make it to be "=m", then the "modprobe nls_cp437" line that is in init won't fail. I don't know if that is a real problem or not; you would think that having the code hard-compiled would be sufficient.
Should initrd/vmlinuz/quircky.sfs be in a "puppy" folder or root of the stick is also OK?
Thanks again
vmlinuz and initrd can be wherever the olpc.fth say they are. The location of the quirky*.sfs file depends on the search algorithm in init. I put quirky*.sfs in root, but it's possible that init will find it elsewhere too.

It would be a really good thing for you to study init carefully and understand it. I get the sense that you are hesistant to do so, and several of the questions that you have asked me in the past seem to stem from the resulting knowledge gap.

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#240 Post by mavrothal »

wmb@firmworks.com wrote:It would be a really good thing for you to study init carefully and understand it. I get the sense that you are hesistant to do so, and several of the questions that you have asked me in the past seem to stem from the resulting knowledge gap.
You are pushing it :D
My last computer class was on a univac and never got even close to it again (other than using a computer).
I got into linux less that 2 years ago when my last son declared the G1G1 XO-1 "too slow" and abandoned it.
For the most part scripting looks like Chinese stenography to me (no offense).
So we are not talking "gap" we are talking "abyss". :lol:
And looking for info and structured knowledge in linux is a very painful story. (The most common answer -if any- to "what's wrong with this lemon" is "have another one" at best, and "have an orange" usually :roll: )

Anyway, enough with my life's story.
Are you posting your XOpup anywhere?

Post Reply