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

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?

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

#366 Post by tempestuous »

eowens2 wrote: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?
Whoa. You're making this way too complicated.
I'm simply saying that whatever version of ALSA driver is provided by your distribution should, ideally, be matched to the same version of ALSA library/utilities.
mavrothal wrote:Driver version 1.0.20
OK, you can try compiling the compatible 1.0.20 ALSA library and utilities. Get them here -
ftp://ftp.alsa-project.org/pub/lib/alsa ... 20.tar.bz2
ftp://ftp.alsa-project.org/pub/utils/al ... 20.tar.bz2
mavrothal wrote:alasamixer does not work. "No such device" is the response error.
... but that looks ominous. It looks like the snd-cs5535audio driver fails to load. You should look at the output of "dmesg" for anything relating to "snd-cs5535audio".

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

#367 Post by mavrothal »

tempestuous wrote:
mavrothal wrote:Driver version 1.0.20
OK, you can try compiling the compatible 1.0.20 ALSA library and utilities. Get them here -
ftp://ftp.alsa-project.org/pub/lib/alsa ... 20.tar.bz2
ftp://ftp.alsa-project.org/pub/utils/al ... 20.tar.bz2
I guess... :?
tempestuous wrote:
mavrothal wrote:alasamixer does not work. "No such device" is the response error.
... but that looks ominous. It looks like the snd-cs5535audio driver fails to load. You should look at the output of "dmesg" for anything relating to "snd-cs5535audio".
As described previously the only dmesg entry is:
[ 244.724161] cs5535audio 0000:00:0f.3: setting latency timer to 64
[ 244.733862] Failure reading codec reg 0x7e,Last value=0x7e805368
[ 244.748005] Failure reading codec reg 0x7e,Last value=0x7e805368
But this is really benign. You can find the same entry in Fedora/Ubuntu/Tinycore but sound works fine.
Actually Alsawizard find the card and everything but no sound :(
== [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

udev?

#368 Post by mavrothal »

This is frustrating…
I went ahead and removed all asla from puppy (luci212) including wizards and every related script I could find.
I replaced that with the alsa sfs (tcz) from Tinycore that I know it works on the XO with the very same kernel. Made the needed mods for paths etc.
"alsasound start" runs with no complains all libraries and scripts are there but at the end gives me the cryptic "mixer not found"
/dev, /sys/devices, /sys/class, sys/modules etc shows that everything is there but /dev/.udev/db shows that a number of \x2fdevices including pci, sound, card0, audio, mixer, sequencer etc fail with broken symlinks.
/etc/udev/ruled.d has nothing about alsa. Could it be the 85-pcmcia.rules or something else about udev?
Other distros that run on the XO (including the official) have nothing about pcmcia in udev. I guess I'll remove it and see what happens...

Edit: Removing 85-pcmcia.rules did not change anything in sound or /dev/.udev/db. Any 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

#369 Post by eowens2 »

Tempestuous, thanks for the links to the ALSA-1.0.20 source.

The ./configure and make on the alsa-lib went without error.

The ./configure on alsa-utils went without error.

But the make on alsa-utils crashed with "xmlto: Command not found".

I am compiling on the XO using Puppy 4.31 and devx-431. Where might I be able to find "xmlto"?

Thanks.

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#370 Post by ttuuxxx »

eowens2 wrote:Tempestuous, thanks for the links to the ALSA-1.0.20 source.

The ./configure and make on the alsa-lib went without error.

The ./configure on alsa-utils went without error.

But the make on alsa-utils crashed with "xmlto: Command not found".

I am compiling on the XO using Puppy 4.31 and devx-431. Where might I be able to find "xmlto"?

Thanks.
you can find the sources at
http://freshmeat.net/urls/3f57444d2ed1c ... f88bdd1c7b
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

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

#371 Post by tempestuous »

ttuuxxx wrote:you can find the sources at
http://freshmeat.net/urls/3f57444d2ed1c ... f88bdd1c7b
ttuuxxx
Well that's the much older version 0.0.18
The most recent version of xmlto is 0.0.23, available from
https://fedorahosted.org/releases/x/m/xmlto/

... but wait ... xmlto is very messy to install and configure, and it requires several other utilities.
It's much easier just to disable it. Do this

Code: Select all

./configure --disable-xmlto

Code: Select all

make

Code: Select all

make install
I just tried it now under Puppy 4.3. Works fine.
I still suspect that matched ALSA libraries/utilities will help, but there's no guarantee. Let us know how it goes. I have another trick up my sleeve.

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#372 Post by ttuuxxx »

tempestuous wrote:
ttuuxxx wrote:you can find the sources at
http://freshmeat.net/urls/3f57444d2ed1c ... f88bdd1c7b
ttuuxxx
Well that's the much older version 0.0.18
The most recent version of xmlto is 0.0.23, available from
https://fedorahosted.org/releases/x/m/xmlto/

... but wait ... xmlto is very messy to install and configure, and it requires several other utilities.
It's much easier just to disable it. Do this

Code: Select all

./configure --disable-xmlto

Code: Select all

make

Code: Select all

make install
I just tried it now under Puppy 4.3. Works fine.
I still suspect that matched ALSA libraries/utilities will help, but there's no guarantee. Let us know how it goes. I have another trick up my sleeve.
Yes but the link I gave was the latest version at freshmeat, You can't blame me if I gave the latest link, also what I provided is what was asked for, I'm not actually looking into it until tomorrow.
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

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

#373 Post by eowens2 »

Hey guys, after posting the "could not find xmlto" error I came across a posting by Patriot from last year (http://www.murga-linux.com/puppy/viewto ... c5dc0bc609) in which he recommended using "./configure --disable-xmlto", which I tried, and make proceeded without error.

With the freshly made alsa-libs and alsa-utilities, aplay -l and alsamixer still gave ""no such device" and "no soundcards found" and no sound was heard. lsmod, cat /proc/asound/cards, modinfo, and depmod still had the same output as described before.

I kept googling, and noted that some people recommended, in setting up sound, "alsa-driver"; so I downloaded alsa-driver-1.020 from alsa-project.org. I used "./configure --with-kernel=dir" (directing it to the source files for our XO-puppy kernel). The configure went without error. The "make" however, after churning along for quite a while, came to a halt with: "scripts /mod/modpost: /lib/libc.so.6: version 'GLIBC_2.8' not found". Again I was doing this on the XO with Puppy 4.31 and devx-431.

ldd -v /lib/libc.so.6 version information on this system gives : ld-linux.so2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2, ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2, and ld-linux.so2 (GLIBC_2.1) => /lib/ld-linux.so.2. Does this mean that I need to find libc.so.6 and ld-linux.so.2 compiled under GLIBC_2.8? Wouldn't this break a bunch of other programs dependent on the older libraries?

The more I wander in to this problem, the more confused I get! What EXACTLY is the "driver"???? I thought it was the module snd-cs5535audio created at the time of kernel compile. If so, what the heck does "alsa-driver-1.0.2.0" do?

Any other ideas?

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

#374 Post by tempestuous »

eowens2 wrote:What EXACTLY is the "driver"???? I thought it was the module snd-cs5535audio created at the time of kernel compile.
Yes, that's correct.
eowens2 wrote:If so, what the heck does "alsa-driver-1.0.2.0" do?
Nothing, in the case of kernel source which already provides ALSA ver 1.0.20 (which is so with the 2.6.30.5 kernel in Puppy 4.3) unless you want to make a particular configuration change to the ALSA drivers.

Your ALSA driver is failing, so I see little point in compiling the same 1.0.20 driver version again.
It would be a good idea, at this point, to upgrade to a newer ALSA driver version (plus matched library/utilities).
At this time, that means ALSA 1.0.23.
eowens2 wrote:The "make" however, after churning along for quite a while, came to a halt with: "scripts /mod/modpost: /lib/libc.so.6: version 'GLIBC_2.8' not found". Again I was doing this on the XO with Puppy 4.31 and devx-431.
I just ran configure and make in my Puppy 4.3 installation with alsa-driver-1.0.20. It compiled just fine with no error messages.
I have a suspicion that you may have mismatched development environments - one on your your machine which compiled the XO-1 kernel, and the XO-1 installation itself.
I suggest you compile alsa-driver-1.0.23 on your original (non-XO1) machine, pointing the configuration to your XO-1 kernel sources -

Code: Select all

./configure --with-cards=cs5535audio --with-kernel=/path/to/XO-1/kernel/source
Notice I specified ONLY your particular driver. This will save having to compile all the other ALSA drivers which are not relevant to you, and save space, too.
Hopefully this should compile OK. Then you need to copy the freshly compiled ALSA drivers over to your XO-1 installation, and then run depmod.
This means ALL the core ALSA drivers, not just the snd-cs5535audio driver.
I can help you with the exact details, and the correct directory paths if you need help.

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

#375 Post by eowens2 »

Tempestuous, you are absolutly correct!

I compiled the kernel and modules (including cs5535audio and the other sound modules) on my desktop under Ubuntu 9.04, so I guess that is where the GLIBC_2.8 business sneaked in.

So, if I understand you correctly, you are suggesting using the enviornment in which my kernel and modules were created, to compile alsa-1.0.23 alsa-driver, alsa-lib and alsa-utils, and then to move them over to the XO-1/Puppy 4.31 system.

On the alsa-project.org 1.0.23 download page, alongside the above mentioned driver/lib/utils, are also alsa-firmware, alsa-plugins, alsa-tools and pyalsa (all for alsa-1.0.23). I take it that (at least at this point anyway) none of these latter elements are necessary?

Thank you for your help.

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

#376 Post by tempestuous »

eowens2 wrote:if I understand you correctly, you are suggesting using the environment in which my kernel and modules were created, to compile alsa-1.0.23 alsa-driver, alsa-lib and alsa-utils
Just the ALSA driver modules.
Then it's best to compile the ALSA library and utilities in your Puppy installation.
eowens2 wrote:On the alsa-project.org 1.0.23 download page, alongside the above mentioned driver/lib/utils, are also alsa-firmware, alsa-plugins, alsa-tools and pyalsa (all for alsa-1.0.23). I take it that (at least at this point anyway) none of these latter elements are necessary?
Correct.
Strictly speaking, you should compile the alsa-oss compatibility library, since this is included in Puppy.
Personally, I avoid alsa-oss whenever I'm compiling my own kernel. It's far more elegant to disable alsa-oss compatibility when compiling the ALSA drivers, then the alsa-oss libraries become redundant.
Any half-decent audio application in Linux will be 100% ALSA compatible, and won't require the OSS compatibility modules/libraries.

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

#377 Post by eowens2 »

I had hoped to report success.

I downloaded alsa-1.0.23 (alsa-driver + alsa-utils + alsa-lib) from alsa-project.org..

The alsa-driver I compiled on my desktop system under Ubuntu 9.04, which was the same system that compiled the 2.6.31 kernel and modules on my xopup. No errors were reported in the processs. I moved the 12 new modules over to the xo-1 and did a depmod.

Alsa-lib and alsa-utils I compiled on the xo-1 under Puppy 4.31 and devx-4.31 with no errors reported, and did a make install.

The system booted fine, I ran alsaconf, but no sound was made.

# alsamixer
cannot open mixer: No such device
#
# aplay -l
aplay: device_list:235: no soundcards found...
#
# lspci
00:01.0 Class 0600: 1022:0028 (rev 21)
00:01.1 Class 0300: 1022:2081
00:01.2 Class 1010: 1022:2082
00:0c.0 Class 0501: 11ab:4100 (rev 10)
00:0c.1 Class 0805: 11ab:4101 (rev 10)
00:0c.2 Class 0400: 11ab:4102 (rev 10)
00:0f.0 Class 0601: 1022:2090 (rev 03)
00:0f.3 Class 0401: 1022:2093 (rev 01)
00:0f.4 Class 0c03: 1022:2094 (rev 02)
00:0f.5 Class 0c03: 1022:2095 (rev 02)
#
# cat /proc/asound/cards
--- no soundcards ---
(NOTE: this is a different output from before. Earlier the system HAD reported card0 as cs5535audio)
#
but oddly,
# cat /proc/asound/devices
33: : timer
#
# lsmod | grep snd
snd_cs5535audio 12656 0
snd_ac97_codec 93984 1 snd_cs5535audio
snd_pcm 68004 2 snd_cs5535audio,snd_ac97_codec
snd_timer 18748 1 snd_pcm
snd 53072 4 snd_cs5535audio,snd_ac97_codec,snd_pcm,snd_timer
ac97_bus 1660 1 snd_ac97_codec
snd_page_alloc 8468 2 snd_cs5535audio,snd_pcm
(this is fewer modules than before with ALSA-1.0.2.0)
#
# modinfo snd
filename: /lib/modules/2.6.31_xo1-20100428.0000.1.olpc.628e024_DIRTY/kernel/sound/acore/snd.ko
alias: char-major-116-*
license: GPL
description: Advanced Linux Sound Architecture driver for soundcards.
author: Jaroslav Kysela <perex@perex.cz>
srcversion: 2AFF637B797434DB66BC936
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)

# modinfo snd_cs5535audio
filename: /lib/modules/2.6.31_xo1-20100428.0000.1.olpc.628e024_DIRTY/kernel/sound/pci/cs5535audio/snd-cs5535audio.ko
description: CS5535 Audio
license: GPL
author: Jaya Kumar
srcversion: 98980B105DFA3EB2F6567C7
alias: pci:v00001022d00002093sv*sd*bc*sc*i*
alias: pci:v0000100Bd0000002Esv*sd*bc*sc*i*
depends: snd-ac97-codec,snd-pcm,snd,snd-page-alloc
vermagic: 2.6.31_xo1-20100428.0000.1.olpc.628e024_DIRTY preempt mod_unload modversions GEODE 4KSTACKS
parm: ac97_quirk:AC'97 board specific workarounds. (charp)
parm: index:Index value for cs5535audio (array of int)
parm: id:ID string for cs5535audio (array of charp)
parm: enable:Enable cs5535audio (array of bool)
#

#tail /etc/modprobe.conf
# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF version 1.0.23 ---
alias snd-card-0 snd-cs5535audio
alias sound-slot-0 snd-cs5535audio
# --- END: Generated by ALSACONF, do not edit. ---

Any ideas?

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

#378 Post by mavrothal »

I start thinking that the issue may not be ALSA per se but some other subsystem (dbus, hal, apci, udev) that may interfere with card "visibilty" by the system.
As I said in a previous mail this ALSA sfs (tcz really from tinycore-xo) works fine on the XO-1 with the very same kernel. However it fails with the same symptoms under puppy.
This tells me at least that is not ALSA itself that generates the 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] ==

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

#379 Post by tempestuous »

Yes, it's looking like a low-level hardware resource issue.
Try booting with the "acpi=off" boot option.
If still no success, try each of these boot options -

irqpoll routeirq ##(both options together)
acpi=noirq
acpi=force
acpi=strict
pci=biosirq
pci=nosort

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

#380 Post by mavrothal »

In contrast to eowens2 on a fresh lupu-508 install with my kernel I get

Code: Select all

# lspci
00:01.0 Host bridge: Advanced Micro Devices [AMD] Device 0028 (rev 21)
00:01.1 VGA compatible controller: Advanced Micro Devices [AMD] Geode LX Video
00:01.2 Entertainment encryption device: Advanced Micro Devices [AMD] Geode LX AES Security Block
00:0c.0 FLASH memory: Marvell Technology Group Ltd. Device 4100 (rev 10)
00:0c.1 SD Host controller: Marvell Technology Group Ltd. OLPC Cafe Controller Secure Digital Controller (rev 10)
00:0c.2 Multimedia video controller: Marvell Technology Group Ltd. Device 4102 (rev 10)
00:0f.0 ISA bridge: Advanced Micro Devices [AMD] CS5536 [Geode companion] ISA (rev 03)
00:0f.3 Multimedia audio controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] Audio (rev 01)
00:0f.4 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] OHC (rev 02)
00:0f.5 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] EHC (rev 02)
 
# cat /proc/asound/cards
 0 [Audio          ]: cs5535audio - CS5535 Audio
                      CS5535 Audio cs5535audio at 0x1480, irq 5

# cat /proc/asound/devices
  2:        : timer
  3: [ 0- 0]: digital audio playback
  4: [ 0- 0]: digital audio capture
  5: [ 0]   : control
  6:        : sequencer
However

Code: Select all

# aplay -l
aplay: device_list:223: no soundcards found...
# alsamixer
cannot open mixer: No such device
alsaconf goes smoothly and finds the cards as before but at the end (as before) reports

Code: Select all

Setting default volumes...
amixer: Mixer attach default error: No such device
and trying to play a sound spits

Code: Select all

ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib conf.c:4633:(snd_config_expand) Evaluate error: No such device
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:608: audio open error: No such device
Saving the mixer setup used for this in /etc/asound.state.
/usr/sbin/alsactl: save_state:1502: No soundcards found...
But still exits ironically with
"Now ALSA is ready to use.
For adjustment of volumes, use your favorite mixer.
Have a lot of fun!"

acpi=off
irqpoll routeirq
acpi=noirq
acpi=force
acpi=strict
pci=biosirq
pci=nosort
makes no difference... :?:
== [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] ==

Post Reply