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

A home for all kinds of Puppy related projects
Message
Author
User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#346 Post by mavrothal »

tempestuous wrote:
mavrothal wrote:cs5535_gpio is included as a module by default in OLPC kernels
Without me having to read all 23 pages of this thread, can someone tell me exactly what kernel is under discussion here?

I see that eowens2 appears to be modifying the Puppy 4.31 kernel, and I know for a fact that the cs5535_gpio module is not included in Puppy 4.31 as standard.

But when you guys do recompile a kernel (whatever kernel version that might be) you should enable the cs5535_gpio module, and rebuild the snd-cs5535audio module at the same time.
THEN it might be worth loading the cs5535_gpio module at boot up ... because the (updated) snd-cs5535audio module may rely on it for OLPC-specific functions.
mavrothal wrote:

Code: Select all

modinfo: could not open kernel/sound/core/snd.ko: No such file or directory
If the snd kernel module cannot be located, someone has made a major stuff-up ...
and this is clearly not the same situation as exists for eowens2, because I see the snd module listed in eowens2's lsmod output.
Eowens2 and I are not using the same kernels (I think). However, we both use an OLPC modified 2.6.31 kernel patched for Aufs2 (I believe).

In my case (with the version at hand) I have the entire kernel in initrd/lib/modules and all the aforementioned modules are loaded and present in lsmod output. However, depmode-FULL still complains that can not be found though the module is loaded and alsaconf proceeds normally and reports success.

As you may see in the (added) parenthesis in my previous post the full module path is needed for the modprobe to work.
If modules.dep is in the "kernel/driver/whaterver.ko" format it does not work. If it is in the "/lib/modules/kernel_ver/kernel/driver/whatever.ko" is OK ???


Edit: Crash course in (my) puppy-xo kernels. :D
Build a kernel.rpm in a Fedora 11 machine.
Install on the XO-1 running Fedora11. Check that everything works on the XO-1 running this kernel.
Modify the puppy initrd.gz by removing the lib/modules/puppy_kernel_ver and replace with the /lib/modules/puppy-xo-kernel_ver from the F11 running XO-1 .
Edit the modules.dep to include the full path (Required. Is this way in the original initrd too. When booted the /lib/modules/kern_ver/modules.dep has the "normal" format)
add "modprobe usb-libusual" in initrd/init (not needed if the full kernel is used in initrd)
Done.
To minimize sfs size and possible conflicts, remove from the puppy_variant.sfs
/lib/modules/puppy_kernel_ver/
/lib/modules/all-firmware/
/lib/firmware/* (and add usb8388.bin in it).
Edit /etc/modprobe.conf with the XO-1 F11 configuration (optional)
Delete unneeded video drivers (optional)
Repack the sfs.
Replace Puppy vmlinuz with the one from the puppy-xo kernel
Your XOpup is ready for testing :D
Last edited by mavrothal on Wed 12 May 2010, 16:10, edited 2 times in total.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

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

#347 Post by mavrothal »

tempestuous wrote:
mavrothal wrote:

Code: Select all

modinfo: could not open kernel/sound/core/snd.ko: No such file or directory
If the snd kernel module cannot be located, someone has made a major stuff-up ...
and this is clearly not the same situation as exists for eowens2, because I see the snd module listed in eowens2's lsmod output.
It actually is! I guess eowens2 did not catch it because it just flies by.
Here is the modinfo and lsmod in my case

Code: Select all

# modinfo snd
filename:       /lib/modules/2.6.31_xo1-20100507.1858.1.olpc.7223ce6_PuppyPatched/kernel/sound/core/snd.ko
alias:          char-major-116-*
license:        GPL
description:    Advanced Linux Sound Architecture driver for soundcards.
author:         Jaroslav Kysela <perex@perex.cz>
srcversion:     DB7976AF0DFD038DB4F46CD
depends:        
vermagic:       2.6.31_xo1-20100507.1858.1.olpc.7223ce6_PuppyPatched preempt mod_unload modversions GEODE 4KSTACKS 
parm:           slots:Module names assigned to the slots. (array of charp)
parm:           major:Major # for sound driver. (int)
parm:           cards_limit:Count of auto-loadable soundcards. (int)
#
# lsmod
Module                  Size  Used by
snd_cs5535audio         5788  0 
snd_ac97_codec         66728  1 snd_cs5535audio
snd_pcm                38380  2 snd_cs5535audio,snd_ac97_codec
snd_timer              11120  1 snd_pcm
snd                    28404  4 snd_cs5535audio,snd_ac97_codec,snd_pcm,snd_timer
mousedev                6600  1 
usb8xxx                10468  0 
libertas              116236  1 usb8xxx
lib80211                2272  1 libertas
serio_raw               2520  0 
fuse                   36028  0 
aufs                  103476  459 
nls_iso8859_1           2804  0 
nls_cp437               4336  0 
usbhid                 15724  0 
usb_storage            21344  1 
sr_mod                  9916  0 
cdrom                  23828  1 sr_mod
squashfs               15688  1 
ohci_hcd               14964  0 
ac97_bus                 512  1 snd_ac97_codec
snd_page_alloc          4300  2 snd_cs5535audio,snd_pcm
cs5535_gpio             1560  0 
cafe_ccic              12244  0 
ehci_hcd               23628  0 
psmouse                16448  0 
usb_libusual            7228  1 usb_storage
usbcore                83268  7 usb8xxx,usbhid,usb_storage,ohci_hcd,ehci_hcd,usb_libusual
Now why depmod-FULL reports that can not find it I do not know but

Code: Select all

# depmod-FULL snd
FATAL: modules must be specified using absolute paths.
"snd" is a relative path
# depmod snd
depmod: can't stat 'lib/modules/2.6.31_xo1-20100507.1858.1.olpc.7223ce6_PuppyPatched/snd': No such file or directory
# 
So there is something strange with depmod/demod-FULL but I just can't figure this.
Any Idea?
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

eowens2
Posts: 177
Joined: Wed 27 Aug 2008, 17:57

#348 Post by eowens2 »

tempestuous, the kernel is from the olpc repository: git clone git://dev.laptop.org/olpc-2.6 and git checkout origin/olpc-2.6.31. We then patched in aufs2 and squashfs. The stock olpc kernel has snd compiled into the body of the kernel, so on re-compile we configured snd as modular.

Theoretically, we could have begun with the Puppy's kernel and patched in the XO's hardware (I did try this a while), but I get the impression that this is a much harder route...see Mitch Bradley's <wmb@firmworks.com>post in this thread from 17 Jan 2010 http://www.murga-linux.com/puppy/viewto ... &start=210. Mitch is one of the developers at OLPC, whose main area of interest is Open Firmware.

When I add the parameters "enable=true with or without ac97_quirk=inv_eapd" to modprobe snd_cs5535audio, I get "Invalid Argument". When I boot Puppy 4.31 to desktop, open a console and do "lsmod", cs5535_gpio is present, though I am not sure where in the boot process it is loaded.

I think that I am at about the same place as Mavrothal. Here is my output:

# lsmod

Module Size Used by
snd_pcm_oss 34044 0
snd_seq_dummy 2660 0
snd_seq_oss 24044 0
snd_seq_midi_event 6724 1 snd_seq_oss
snd_seq 42080 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device 6608 3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_mixer_oss 14504 1 snd_pcm_oss
snd_cs5535audio 12740 0
snd_ac97_codec 93820 1 snd_cs5535audio
ac97_bus 1660 1 snd_ac97_codec
usb8xxx 14632 0
snd_pcm 64488 3 snd_pcm_oss,snd_cs5535audio,snd_ac97_codec
libertas 141200 1 usb8xxx
snd_timer 18596 2 snd_seq,snd_pcm
lib80211 6256 1 libertas
snd 51500 9 snd_pcm_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_mixer_oss,snd_cs5535audio,snd_ac97_codec,snd_pcm,snd_timer
snd_page_alloc 8404 2 snd_cs5535audio,snd_pcm
serio_raw 5260 0
cafe_ccic 18720 0
cs5535_gpio 3736 0
psmouse 25560 0
ohci_hcd 20028 0
mousedev 11028 1
fuse 52864 0
aufs 119796 1
nls_iso8859_1 3872 0
usb_storage 33356 1
usbhid 24228 0
usb_libusual 20080 1 usb_storage
squashfs 20440 1
ehci_hcd 30124 0
usbcore 132400 7 usb8xxx,ohci_hcd,usb_storage,usbhid,usb_libusual,ehci_hcd
#

# modinfo snd
filename: /lib/modules/2.6.31_xo1-20100428.0000.1.olpc.628e024_DIRTY/kernel/sound/core/snd.ko
alias: char-major-116-*
license: GPL
description: Advanced Linux Sound Architecture driver for soundcards.
author: Jaroslav Kysela <perex@perex.cz>
srcversion: DB7976AF0DFD038DB4F46CD
depends:
vermagic: 2.6.31_xo1-20100428.0000.1.olpc.628e024_DIRTY preempt mod_unload modversions GEODE 4KSTACKS
parm: slots:Module names assigned to the slots. (array of charp)
parm: major:Major # for sound driver. (int)
parm: cards_limit:Count of auto-loadable soundcards. (int)
#

# depmod-FULL snd
WARNING: Can't read module snd: No such file or directory
FATAL: grab_module() failed for module snd
#

# depmod snd
depmod: can't stat 'lib/modules/2.6.31_xo1-20100428.0000.1.olpc.628e024_DIRTY/snd': No such file or directory
#

The process of getting a modules.dep into the initrd was puzzling. To construct it I did a depmod -b $DIR <kernel_name> where $DIR is the staging directory that contains lib/modules/<kernel_name>. This does create a modules.dep in the right place with the right modules, with a module listing in the form "kernel/fs/aufs/aufs.ko". But this format of the listing leads to "aufs.ko - no such file or directory". Finally, at my wit's end, I added manually "/lib/modules/<kernel_name>/" as a prefix to each listing in modules.dep, and the modules were found and loaded. Afterwards I found that in a pristine puppy 4.31 initrd, the modules.dep listing is the full pathway.

Also interesting is that the modules.dep in /initrd/pup_ro1 has the full pathway whereas the modules.dep for the .sfs (/initrd/pup_ro2) has the abbreviated pathway (i.e. kernel/fs/aufs/aufs.ko) which contains snd.

I do not understand why initrd can find and load modules, but the fully booted OS has difficulty.

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

#349 Post by tempestuous »

When you run "modinfo snd" the location of the snd module is reported as:

/lib/modules/2.6.31_xo1-20100428.0000.1.olpc.628e024_DIRTY/kernel/sound/core/snd.ko


But when you run "depmod-FULL" the system expects it here:

/lib/modules/2.6.31_xo1-20100428.0000.1.olpc.628e024_DIRTY/snd


It looks like you have located the snd module in 2 different locations. I'm not sure whether that applies to the normal filesystem, the initrd, or both. You need to investigate, and sort it out.
The correct location is /lib/modules/<kernelversion>/kernel/sound/core

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

#350 Post by mavrothal »

eowens2
I can see we have identical behavior, so I was thinking that might be something in the kernel building that Pupy/depmode can not cope with.

Are you building kernel rpms? Have you ever tried just "make"?
Are you building in a fedora Machine? Have you tried in a Puppy machine?
From the kernel naming I can see that you use the olpc/Makefile, did you ever tried with a puppy makefile? (I'm not sure if this thing exists).

I think I have seen that cross post depmode does not work always, so this might be at the root of this problem.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

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

#351 Post by mavrothal »

mavrothal wrote: Are you building in a fedora Machine? Have you tried in a Puppy machine?
I did rebuild the kernel in Puppy 4.3.1.
The only difference is that indeed the modules.dep file has the full module paths instead of assuming the /lib/modures/`uname -r`/ default location.

However, ALSAwizard/depmod/depmod-FULL/sound has the ECAXT same behavior, as with the fedora-build kernel. :cry:

Wizards,...wizards... :?
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

hailpuppy
Posts: 73
Joined: Wed 28 Oct 2009, 07:49

#352 Post by hailpuppy »

Hm..When the going gets tough...tough gets the going...GUys I love u al...Never say die...say puppy..... :wink:

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

#353 Post by mavrothal »

tempestuous wrote:When you run "modinfo snd" the location of the snd module is reported as:

/lib/modules/2.6.31_xo1-20100428.0000.1.olpc.628e024_DIRTY/kernel/sound/core/snd.ko


But when you run "depmod-FULL" the system expects it here:

/lib/modules/2.6.31_xo1-20100428.0000.1.olpc.628e024_DIRTY/snd


It looks like you have located the snd module in 2 different locations. I'm not sure whether that applies to the normal filesystem, the initrd, or both. You need to investigate, and sort it out.
The correct location is /lib/modules/<kernelversion>/kernel/sound/core
It looks strange but actually this is normal for puppy :shock:
Tried it in 3 different unmodified puppy versions. In all cases
modinfo reports correctly,
depmod-FULL can not find the module (and asks for full path in someversions)
and the trimmed version of depmod looks always for the module at /lib/mudules/`uname -r`/module_name (and never finds it of course).

There is certainly something wrong, but this has nothing to do with the kernels... Also I do not think it has to do with the missing sound either!
I tried alsaconf from another mini-distro. Went through fine, reported success, no errors in /var/log/messages and yet the mixer could not be found when time for testing arrived ???

Just a general question
did anyone ever got sound from cs5535 with any puppy??? and if yes how?
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

eowens2
Posts: 177
Joined: Wed 27 Aug 2008, 17:57

#354 Post by eowens2 »

Mavrothal, I have done most of my puppy work on an HP desktop running Ubuntu 9.04 and compiling with gcc-4.3.

I got interested in depmod, and read several man pages on it, and at least one said that when it is followed by a filename as an argument, the output may not be meaningful.

So I took a Puppy 4.3.1 CD and made a fresh copy of 4.3.1 on a USB stick to run on my desktop. I set up ALSA and got the audible two barks test sound clearly.

Opening a terminal, I typed in "depmod snd" and guess what I got?
# depmod snd
depmod: can't stat 'lib/modules/2.6.30.5/snd': No such file or directory
#

and
# depmod-FULL snd
WARNING: Can't read module snd: No such file or directory
FATAL: grab_module() failed for module snd

So the output of these 2 commands on a functioning system fails to provide support to the idea that on our Xopups the snd modules have been placed in two different locations, making them impossible to find.

Back to the drawing boards!

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

cs5535

#355 Post by mavrothal »

hmmm,
the only other reference to cs5535audio and puppy I could find is from earlytv back in 2008 and guess what?
everything looked fine but the card could not be found :shock:
ref1 ref2 ref3
I'm wondering if earlytv is still around 8)
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

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

#356 Post by Aitch »

Hi Guys

More possibilities....

I've read that the CS5535 was used in a WYSE thinclient

Also experimented in DSL

NOTE:
I got Puppy linux to boot easy but until Puppy 4.1 the sound wouldnt work at all?
http://www.damnsmalllinux.org/f/topic-3-18-20460-0.html

Best result, IMHO, google groups, - patch

http://groups.google.com/group/linux.ke ... 8570ac9ed4

Else ALSA wiki

http://www.alsa-project.org/main/index.php/Main_Page

HTH

Aitch :)

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

#357 Post by mavrothal »

Aitch wrote:
HTH

Aitch :)
Not really, but thanks.
There is nothing wrong with alsa, the cs5535 driver or the kernel. They all work in Fedora, Debian, Ubuntu and TinyCore (that I have checked). Is in puppy that they fail.

Could be something totally unrelated like the ancient bash version that puppy uses, or some of its recompiled stripped libraries that is misinterpreting some cs5535 output. I do not really know. :? ...

Any other ideas?
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

eowens2
Posts: 177
Joined: Wed 27 Aug 2008, 17:57

#358 Post by eowens2 »

Thanks for the links, Aitch!

The DSL link does suggest that that individual did get some sound with a cs5535 chip with Puppy 4.1. I wish there were more details!

I am 99% certain that the Jaya Kumar patches for the kernel mentioned in the google groups have been incorporated into the base kernel from the OLPC repository that we have furthur patched for Puppy. Sound with the CS5535 chip works fine on the base XO running Sugar, it works fine on the XO with Ubuntu Intrepid. It works well on the XO with Debian Squeeze (I just moved "2barks.au" from puppy over to Squeeze and the doggie performs admirably!).

And I have been wandering around www.alsa-project.org for several days, hoping that something will ring a bell (no pun intended).

Thank you for your interest, and keep the suggestions coming!

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

2.02/2.13

#359 Post by raffy »

mavrothal wrote:Just a general question
did anyone ever got sound from cs5535 with any puppy??? and if yes how?
Sound runs in 2.02/2.13, with ISOs available at
http://minipc.org/pup/ and http://minipc.org/safepup/.

ADD: It's a proprietary BIOS.
Last edited by raffy on Tue 11 May 2010, 09:49, edited 1 time in total.
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: 2.02/2.13

#360 Post by mavrothal »

raffy wrote:
mavrothal wrote:Just a general question
did anyone ever got sound from cs5535 with any puppy??? and if yes how?
Sound runs in 2.02/2.13, with ISOs available at
http://minipc.org/pup/ and http://minipc.org/safepup/.
Thanks!
Board/firmware (if known)?
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

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

XOpup building howto

#361 Post by mavrothal »

Thought to writeup a bit mote detailed howto on making an XOpup-base from any Puppy/pupplet that has a geode video driver. Hopefully other people can use it and solve some of the outstanding issues, like sound.
So this is my routine :D for testing all the recent puppies (Lupu, quirky, wary etc). Having Step 1 done takes ~10min :shock: to make the XOpup

Step 1
You need to compile a kernel that will boot the XO-1 eg an OLPC kernel and is patched with a layered file system eg Aufs2. In puppy you will need the devx.sfs of your pupplet. In other distros, the usual development/compiling tools and Git.
You will also need 3GB of space or more and a relatively fast computer (NOT the XO-1) if you do not want to spend your time waiting.
So

Code: Select all

git clone git://dev.laptop.org/olpc-2.6
cd olpc-2.6
git checkout origin/olpc-2.6.31
cd ..
git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git aufs2-standalone.git
cd aufs2-standalone.git
git checkout origin/aufs2-31
So now you have the kernel-sources and aufs2-patch directories.
Patch your source with the Aufs patch and configure your kernel (you can use the attached DOTconfig file as configuration base - Edit: see comment on next post).
Make your kernel.
"make install" will place your vmlinuz and system.map in /boot and modules in /lib/modules/2.6.31.6 folder
"make xo_1-kernel-rpm" (in a Fedora machine) will place the kernel rpm in the olpc/ folder. You can either install on the Fedora-running XO-1 by "rpm -ivvh" and get your vmlinuz and /lib/modules/kernel_version or run "rpm2cpio kernel_version.rpm | cpio -icd" to get the rpm contents and place them accordingly.
Now you have a kernel that will boot Puppy on the XO-1 laptop
Attention: make sure that the /lib/modules/2.6.31.x/modules.dep file has the complete paths. eg the ones that start with "/lib/modules/..." and NOT with "kernel/....". If you build your kernel in puppy is the default, but in Fedora you must edit the file manually. I just do a 'find/replace all' of "kernel/" with "/lib/modules/<my_kernel_name>/kernel/"
Warning: Some newer version of gcc will not compile a working XO-1 kernel. Kernel building has been tested in F11 and Puppy 4.3.1. Ubuntu Intrepid or Jaunty may also work but not Lucid.

EDIT: You could download a ready olpc-puppy kernel from here so you are done with "step 1" :wink:

Step 2
Now you need to download the ISO of your XOpup-base and modify the initrd.gz to boot your XOpup.
I usually copy the puppy inirtd.gz and the new XO-kernel (eg from /lib/modules/2.6.31.x) in my working folder but can be anywhere.
So (as sudo if you are not in Puppy)

Code: Select all

mkdir initramfs
cd initramfs
gunzip -c /<path_to_puppy_initrd>/initrd.gz | cpio -i
rm -rf lib/modules/*
cp -aR /<path_to_your_xo_kernel>/2.6.31.x lib/molules/
find . -print | cpio -H newc -o | gzip -9 >../initrd.gz
cd..
Your new XO-capable initrd.gz is ready.

Step 3
Modifying the puppy sfs file to decrease its size and thus RAM requirement. It saves you ~30MB of RAM and improves speed. Here we asume the original name is "puppy-123.sfs" but usually relates to the variant and version eg "lupu-500.sfs" for Ludic Puppy.
If you are not using Puppy you may need to install squashfs-tools for this step
So (still as sudo if not in puppy)

Code: Select all

mkdir /mnt/sfs
mkdir puppydata
mount -o loop /path_to_puppy_sfs/puppy-123.sfs /mnt/sfs
cp -aR /mnt/sfs/* puppydata/
rm -rf puppydata/lib/modules/*
rm -rf puppydata/lib/firmware/*
rsync --archive --checksum rsync://updates.laptop.org/build-802/root/lib/firmware/usb8388.bin puppydata/lib/firmware/
You can also delete all the video drivers except the "geode_drv.so" and "ztv_drv.so". They are usually in puppydata/usr/lib/xorg/modules/drivers. In newer puppies you can also delete driver-alternatives/ and drivers-backup/ folders.
repack your sfs

Code: Select all

mksquashfs puppydata/* puppy-123.sfs
where puppy-123 should has the identical name to the original sfs file.

Step 4.
Now you are ready to make your USB stick/SDcard to boot your XO-1 with.
Copy the modified "initrd.gz" and "puppy-123.sfs" files and the "vmlinuz" corresponding to your xo-kernel build, at the root of an ext2/3 formatted USB stick or SD card.
Also at the root of the stick/card make the "/boot" folder and in put the "olpc.fth" file.
The content of the /boot/olpc.fth file should look like that

Code: Select all

\ OLPC boot script
unfreeze visible setup-smbios
" u:\initrd.gz" to ramdisk
" setenv boot-file console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22 pmedia=usbhd" to boot-file
boot u:\vmlinuz
if you are booting from a USB stick.
For an SDcard use

Code: Select all

\ OLPC boot script
unfreeze visible setup-smbios
" sd:\initrd.gz" to ramdisk
" setenv boot-file console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22 pmedia=usbhd" to boot-file
boot sd:\vmlinuz
I recommend SDcards because (in contrast to USB sticks) <save to the entire partition> works well so the looooong shutdown times are eliminated.

Transfer the USB stick/SDcard to your XO and power up. You should get the familiar puppy dialogs (or your desktop if you use lupu)

In newer puppies you may need to add "modprobe mousedev" in "/etc/rc.d/rc.local" and/or edit the mouse option of /etc/X11/xorg.conf to "/dev/input/mice", to have a proper mouse behavior.
Since most pups do not have .../X11/xkb/compat/olpc and .../X11/xkb/symbols/olpc, you also need some additions for the rocker keys and game keys.
In the /etc/rc.d/rc.local add

Code: Select all

setkeycodes 65 103 # up
setkeycodes 66 108 # down
setkeycodes 67 105 # left
setkeycodes 68 106 # right
setkeycodes 69 101 # rotation button
for the rocker  and drop an .Xmodmap file in /root with

Code: Select all

keycode 229 = KP_Prior
keycode 231 = KP_Home
keycode 232 = KP_End
keycode 230 = KP_Next
for the game keys.

If you want to go all the way :D you could also get powerd and kbdshim from the OLPC git repository and compile them for puppy to get power management and brightness and sound keys, screen rotation etc! But even without these should be a pretty usable XOpup :D .

Sound is the only major issue remaining... :wink:
Attachments
DOTconfig_xo1_PuppyPatched.gz
(15.46 KiB) Downloaded 622 times
Last edited by mavrothal on Thu 29 Jul 2010, 10:57, edited 7 times in total.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

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

#362 Post by mavrothal »

Just a small update after 2 months...
Using the latest olpc kernel and lupu-212: No miracle :P . Sound still does not work :cry:

FYI the above DOTconfig will not work with the letest olpc repository due to some additions (rfkill). Please do a diff first with the olpc original xo_1_defconfig and edit DOTconfig accordingly.

EDIT: I did upload a newer kernel here.
It includes kernel-firmware-, kernel- and kernel-headers- (in case you need to compile something :wink: ) rpms.
It also includes the vmlinuz and the /lib/modules/kernel_ver folder so you can use them directly for XOpup building.
Last edited by mavrothal on Tue 27 Jul 2010, 08:24, edited 3 times in total.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

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

#363 Post by tempestuous »

mavrothal wrote:Using the latest olpc kernel and lupu-212: No miracle :P . Sound still does not work :cry:
I can think of 2 possibilities:

1. The snd-cs5535audio driver might actually be working, but it maps the chip's audio output signal to the wrong pins. This is a known problem with certain combinations of ALSA driver/audio chipset. Run "alsamixer" in a terminal. If it launches successfully and you can raise/lower the volume settings, this indicates that the driver is working. Try connecting some powered computer speakers to ALL of the audio jacks INCLUDING the headphone jack. You might be surprised.
If successful, there's an additional parameter which can be defined for the snd-cs5535audio module: "ac97_quirk=..."
which might provide a proper fix.

2. You need to match Puppy's ALSA libraries to the exact version of ALSA driver used by the OLPC kernel.
Run this command to find the ALSA driver version -

Code: Select all

cat /proc/asound/version

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

#364 Post by mavrothal »

Sorry mail notification is a bit spotty...
tempestuous wrote:
mavrothal wrote:Using the latest olpc kernel and lupu-212: No miracle :P . Sound still does not work :cry:
I can think of 2 possibilities:

1. The snd-cs5535audio driver might actually be working, but it maps the chip's audio output signal to the wrong pins. This is a known problem with certain combinations of ALSA driver/audio chipset. Run "alsamixer" in a terminal. If it launches successfully and you can raise/lower the volume settings, this indicates that the driver is working. Try connecting some powered computer speakers to ALL of the audio jacks INCLUDING the headphone jack. You might be surprised.
If successful, there's an additional parameter which can be defined for the snd-cs5535audio module: "ac97_quirk=..."
which might provide a proper fix.
No alasamixer does not work. "No such device" is the response error.
Look at the previous 2 pages for extended info.
tempestuous wrote:
2. You need to match Puppy's ALSA libraries to the exact version of ALSA driver used by the OLPC kernel.
Run this command to find the ALSA driver version -

Code: Select all

cat /proc/asound/version
Driver version 1.0.20
I think Lulu has 1.0.20 too
I really do not know how do go about this and as far as I know OLPC has currently no one that is an ALSA expert and may be able to help.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

eowens2
Posts: 177
Joined: Wed 27 Aug 2008, 17:57

#365 Post by eowens2 »

Tempestuous, are you saying in your comment #2 above, that the ALSA version being used with a kernel needs to have been compiled by that kernel?

In effect, that the alsa-libs and a kernel are a "matched pair" in the same sense that a kernel and its modules are a matched pair?

Would the ALSA-1.0.2.0 and its alsa-libs found in Puppy 4.1.2 work if dropped into Puppy 4.3.1 or one of the Lupu's if they had the same kernel? If they each had a different kernel?

If there is a mismatch between a kernel and alsa-lib is there an error message of some sort generated somewhere, or does ALSA simply fail to generate a sound?

Post Reply