The time now is Wed 19 Jun 2013, 00:00
All times are UTC - 4 |
|
Page 25 of 30 Posts_count |
Goto page: Previous 1, 2, 3, ..., 23, 24, 25, 26, 27, 28, 29, 30 Next |
| Author |
Message |
mavrothal

Joined: 24 Aug 2009 Posts: 1062
|
Posted: Sat 15 May 2010, 06:49 Post_subject:
XOpup building howto |
|
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 for testing all the recent puppies (Lupu, quirky, wary etc). Having Step 1 done takes ~10min 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: | 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"
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: | 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: | 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: | | 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: | \ 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: | \ 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: | 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: | 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 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 .
Sound is the only major issue remaining...
| Description |
|

Download |
| Filename |
DOTconfig_xo1_PuppyPatched.gz |
| Filesize |
15.46 KB |
| Downloaded |
336 Time(s) |
_________________ Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too 
Edited_times_total
|
|
Back to top
|
|
 |
mavrothal

Joined: 24 Aug 2009 Posts: 1062
|
Posted: Sat 17 Jul 2010, 07:23 Post_subject:
|
|
Just a small update after 2 months...
Using the latest olpc kernel and lupu-212: No miracle . Sound still does not work
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 ) rpms.
It also includes the vmlinuz and the /lib/modules/kernel_ver folder so you can use them directly for XOpup building.
_________________ Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too 
Edited_times_total
|
|
Back to top
|
|
 |
tempestuous
Joined: 10 Jun 2005 Posts: 4950 Location: Australia
|
Posted: Mon 19 Jul 2010, 07:10 Post_subject:
|
|
| mavrothal wrote: | Using the latest olpc kernel and lupu-212: No miracle . Sound still does not work |
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: | | cat /proc/asound/version |
|
|
Back to top
|
|
 |
mavrothal

Joined: 24 Aug 2009 Posts: 1062
|
Posted: Wed 21 Jul 2010, 14:58 Post_subject:
|
|
Sorry mail notification is a bit spotty...
| tempestuous wrote: | | mavrothal wrote: | Using the latest olpc kernel and lupu-212: No miracle . Sound still does not work |
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: | | 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.
_________________ Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too 
|
|
Back to top
|
|
 |
eowens2
Joined: 27 Aug 2008 Posts: 55
|
Posted: Wed 21 Jul 2010, 22:08 Post_subject:
|
|
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?
|
|
Back to top
|
|
 |
tempestuous
Joined: 10 Jun 2005 Posts: 4950 Location: Australia
|
Posted: Thu 22 Jul 2010, 07:32 Post_subject:
|
|
| 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-lib-1.0.20.tar.bz2
ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.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".
|
|
Back to top
|
|
 |
mavrothal

Joined: 24 Aug 2009 Posts: 1062
|
Posted: Thu 22 Jul 2010, 12:30 Post_subject:
|
|
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
_________________ Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too 
|
|
Back to top
|
|
 |
mavrothal

Joined: 24 Aug 2009 Posts: 1062
|
Posted: Sat 24 Jul 2010, 12:23 Post_subject:
udev? |
|
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?
_________________ Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too 
|
|
Back to top
|
|
 |
eowens2
Joined: 27 Aug 2008 Posts: 55
|
Posted: Thu 29 Jul 2010, 13:19 Post_subject:
|
|
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.
|
|
Back to top
|
|
 |
ttuuxxx

Joined: 05 May 2007 Posts: 10720 Location: Ontario Canada,Sydney Australia
|
Posted: Fri 30 Jul 2010, 02:40 Post_subject:
|
|
| 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/3f57444d2ed1c0076b89f1f88bdd1c7b
ttuuxxx
_________________ http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games

|
|
Back to top
|
|
 |
tempestuous
Joined: 10 Jun 2005 Posts: 4950 Location: Australia
|
Posted: Fri 30 Jul 2010, 04:35 Post_subject:
|
|
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: | | ./configure --disable-xmlto |
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.
|
|
Back to top
|
|
 |
ttuuxxx

Joined: 05 May 2007 Posts: 10720 Location: Ontario Canada,Sydney Australia
|
Posted: Fri 30 Jul 2010, 06:38 Post_subject:
|
|
| tempestuous wrote: |
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: | | ./configure --disable-xmlto |
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

|
|
Back to top
|
|
 |
eowens2
Joined: 27 Aug 2008 Posts: 55
|
Posted: Fri 30 Jul 2010, 22:58 Post_subject:
|
|
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/viewtopic.php?p=344965&sid=467544cd6498e89b62ffb6c5dc0bc609) 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?
|
|
Back to top
|
|
 |
tempestuous
Joined: 10 Jun 2005 Posts: 4950 Location: Australia
|
Posted: Sun 01 Aug 2010, 08:50 Post_subject:
|
|
| 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: | | ./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.
|
|
Back to top
|
|
 |
eowens2
Joined: 27 Aug 2008 Posts: 55
|
Posted: Sun 01 Aug 2010, 14:30 Post_subject:
|
|
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.
|
|
Back to top
|
|
 |
|
|
Page 25 of 30 Posts_count |
Goto page: Previous 1, 2, 3, ..., 23, 24, 25, 26, 27, 28, 29, 30 Next |
|
|
Rules_post_cannot Rules_reply_cannot Rules_edit_cannot Rules_delete_cannot Rules_vote_cannot You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|