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

A home for all kinds of Puppy related projects
Message
Author
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] ==

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

#381 Post by eowens2 »

I have used all of the boot options ("acpi=off", "irqpoll routeirq", "acpi=noirq", "acpi=force", "acpi=strict", "pci=biosirq" and "pci=nosort") on Puppy 4.31 on the XO-1 using ALSA-1.0.23, and the only difference I could see is that sometimes the boot process seemed to slow.

As before, "aplay -l" and "alsamixer" could not find the device. And as before, alsaconf could find the card identity and post the alias info to the end of modprobe.conf (I deleted the tail of modprobe.conf before running alsaconf to be sure it was posting freshly obtained info). Too bad the system can't seek the counsel of modprobe.conf as to the identity of card0!

And yes when I try to play an actual file I get the same output as Mavrothal. Mavrothal, your "lspci" output from Lupu-508 is interesting. Lupu-508 must be using a newer version of busybox or an "lspci-FULL". What version of ALSA is in lupu-508? And busybox version?

When a new version of Puppy is released (i.e. 4.12, 4.31, Lupu-xxx), especially if a new kernel is present, do the developers typically compile anew major components (i.e. ALSA, X-windows) "under" or "against" the new kernel?

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

#382 Post by mavrothal »

eowens2 wrote: Too bad the system can't seek the counsel of modprobe.conf as to the identity of card0!
On a related issue:
Using the tinycore-xo alsa/alsaconf (that works fine with this kernel) gets through without any ALSA issue.
However, at the end it says

Code: Select all

Starting sound driver: snd-cs5535audio  
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
WARNING: All config files need .conf: /etc/modprobe.d/sound, it will be ignored in a future release.
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
WARNING: All config files need .conf: /etc/modprobe.d/sound, it will be ignored in a future release.
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
WARNING: All config files need .conf: /etc/modprobe.d/sound, it will be ignored in a future release.
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
WARNING: All config files need .conf: /etc/modprobe.d/sound, it will be ignored in a future release.
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
WARNING: All config files need .conf: /etc/modprobe.d/sound, it will be ignored in a future release.
amixer: Mixer attach default error: No such device
Setting default volumes...
amixer: Mixer attach default error: No such device
Saving the mixer setup used for this in /etc/asound.state.
alsactl: save_state:1502: No soundcards found...
with the same result :(
eowens2 wrote:What version of ALSA is in lupu-508? And busybox version?
cat /proc/asound/version says 1.0.20 but /root/.packages/woof-installed-packages says alsa-base and alsa-utils 1.0.22
For busybox woof-installed-packages says 1.16.2
== [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

SFS and nand mounting, power management et al.

#383 Post by mavrothal »

Although XOpup's sound remains elusive ( :-( ), wrestling with it from different angles I came up with a couple of interesting tidbits.

OLPC kernels (the original or the ones made in Fedora machines-like the ones I have posted), because of their "funny" naming scheme, do not report the correct KERNELSUBVER(sion), eg "31", in puppy scripts so puppy thinks is an old (2.6.28 or earlier) version. As a result, defaults to squashsf version 3, so version 4 sfs files can not be loaded.
You need to edit 3 scripts, initrd.gz/init, /usr/sbin/bootmanager and /usr/sbin/filemnt to fix that. You just need to add underscore in the KERNELSUBVER string so will look like that

Code: Select all

KERNELSUBVER=`echo -n "$KERNELVER" | cut -f 3 -d '.' | cut -f 1 -d '-' | cut -f 1 -d '_'` #v423, mav:add underscore for OLPC kernels
Then it correctly recognize the olpc kernel version and auto-mounts v4 sfs files (I guess would be nice if included in the official puppy/woof).

In order to mount the XO-1's internal NAND you need the memory technology devices (mtd) missing from puppies. So from an F11-running XO-1 (eg running the new official os851) copy /dev/mtd* or rsync them from updates.laptop.org to puppy's /dev. This will copy mtd0, mtd0ro and mtdblock0. To mount the XO-1 NAND type in terminal

Code: Select all

mount -t jffs2 /dev/mtdblock0 /mount_dir
I usually make /mnt/xo-nand as mount directory but can be anything you want. You can even edit /etc/fstab and add the line

Code: Select all

/dev/mtdblock0  /mnt/xo-nand jffs2 defaults,noauto 0 0
so you'l just need to type "mount /mnt/xo-nand" to mount it. However, I do not recommend automounting or even mounting the NAND at all, unless is absolutely necessary! Puppy has trouble cleanly unmounting file systems and can mess-up your XO-1's nand (did it to me a couple of times...)

I also managed to get power management and brightness and (I assume) sound keys working in XOpups. For pm I used OLPC's powerd and olpc-switchd and supplied the missing strace, rtcwake and yet another device, rtc. For the keys I used the actkbd daemon and a bunch of little scripts from other XO builds. Again the /dev/input/even4 the actual XO-1 keyboard device was missing...
The scripts were started in rc.local and the XO-1 is now even more usable with Puppy, but still silent :-( I have the feeling that the sound issue is also a device issue rather than alsa, I just don't know which, and various I tried all failed. Any device/udev expert out there?

BTW I wonder why the "whereis" command in not present in puppies ??? Is very useful specially with all the extra scripts and the occasional "non-standard" location of things. I guess everyone knows where things are in puppy :shock: ...
== [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

Sound works!!!!

#384 Post by mavrothal »

Looks like that sound works in XOpup :D :D :D
Check it out here
I'm away at the moment but is someone can tide it up would be great.
== [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

Puppy Linux Lucid 5.1 (lupu510) for the XO-1 is here!

#385 Post by mavrothal »

Update 3 Sep. 22 : XOpup has a new build and thread, and is updated to 1.0_RC.
Please look at the new thread for more.

You can still find the old builds HERE

Image

(Check the "visual history" of XOpup HERE)
Last edited by mavrothal on Wed 22 Sep 2010, 08:14, edited 10 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] ==

cobyhoff
Posts: 5
Joined: Tue 10 Nov 2009, 22:26
Location: Hillsboro, Oregon, USA
Contact:

Thank you!

#386 Post by cobyhoff »

I have been lurking here since you announced your intentions on OLPCnews forums. I have been lurking there since Nov '07 (original G1G1). I am so excited to see your success here! I have been running puppy on my Gecko Edubook (www.norhtec.com, www.deviceonchip.com) since I got it, and have been even more excited about the possibility of Puppy on the OLPC. I wish I could have helped the process, but my lack of Linux experience has kept me from volunteering.

Again, Thank you!

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

Lucid Puppy works great on my XO version 1.0 machine

#387 Post by rrolsbe »

Now that it boots into Puppy using the OLPC 1.0 computer, hopefully the user community can make further improvements. My OLPC computer (using Puppy) performs better than anything I have used prior. I knew running out of RAM would be better. I am sure there is a slow down while it decompress the binaries in the RAM disk but you can't have everything.

Thanks Again to all who made this happen.

Regards, Ron

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

XOpup-v2

#388 Post by mavrothal »

A new improved version is available.
See original post above.
Now that it boots into Puppy using the OLPC 1.0 computer, hopefully the user community can make further improvements.
Let's hope. Though most of the things run fine. :D
What does not work is the chromium browser (you need to install the lupu501 version from here), the luvcview webcamera (probably needs recompiling for the XO-1) and most notably xrandr that does not support screen rotation and alternative resolution (the modified xorgwizard in the new version takes care of that). A proper, tray, battery monitor would be also nice.
Hopefully these and other things will get some attention.
== [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

power management

#389 Post by mavrothal »

Added a pet in the original post above that enables "aggressive" power management on inactivity and can considerably increase battery life in casual use.
It actually works better than in the official F11/Sugar 0.84 version :D
== [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

#390 Post by hailpuppy »

Hi Mavrothal, ttuuxxx and all the other dedicated developers who made this happen,

Thank you all for not giving up on what we were all awaiting so eagerly.Of course I could not join the development team due my lack of knowledge in linux development but I too kind of feel happy as I personaly contacted Mitch to draw his attention to this project :). Mavrothal and ttuuxxx you two have been really impressive and guys I am most grateful to for you two for not giving up even when the going got very very tough.

One more thing Mavrothal? Is it now more speedy ? Will you be able to post a video of our most anticipated Xopup?

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

XOpup -v3

#391 Post by mavrothal »

There is a v3 for the XOpup (check original post above) and a permanent home site :D
There you can find the build, sources, docs and a couple of pets, including a slightly modified Chromium-5.0.342-Lucid.pet that will install and run on XOpup fine.

===============

hailpuppy,
just get a $1 USB stick, install, check for yourself and tell us what you think :D Detailed instructions, including stick formatting, is there!
Speed is perceived different by different people... But yes, is faster than other XO builds :wink:
== [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

#392 Post by hailpuppy »

Hi Mavrothal, Thankxx man!!!! I just ran XOpup on my OLPC and its superb!!!! I got even Open Office to run on it using the attached SFS Linker.Well with Openoffice it was slow to then extent that it could not be used but well this is super cool. I even watched an video with .avi extention.the vedio was bit sluggish but it was definitely watchable. Im extremely low literate on linux systems and your detailed instructions was very helpful in setting this up. Web cam was not working for me (perhaps this is because i didnt upgrade the firmware???). These are just initial remarks but hey if we make variations of this XOPup (as its always been the case with puppy linux) we might be able to get even Openoffice to run in RAM by making the OS small?Perhaps one might be able to use different USB s with different variations of XOpup to get different uses from the XOlap?Well i see immense possibilities with all of your achievement. hey guys im so exited thats why I couldnt help upload these few comments to you guys . I will test this system the best way I can and report tp you its statuses. Again Thanks a lot to you all...

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

#393 Post by mavrothal »

Hailpup,
I'm sure that XOpup can be improved. A LOT!
However I'm afraid that this may need the work of someone that actually knows what (s)he's doing... At this stage no matter how functional and fast is just patchwork...

We need to get rid of a lot of stuff, (useless for XOpup), without breaking the system. Rework some monster scripts that are trying to find out what the hardware is and configure it so Puppy can work, but are a burden when the hardware and optimal configuration is already known. Work out some puppy relics (pup_event/udev, xFree86) that are from the era that the XO-1 was not even in the planning stage. And finally recompile and reconfigure many things.
A lot, lot, lot of work...

For example the camera that does not work (luvcview) probably needs recompiling.
The poor video is most likely xserver configurations that does not support some of the geode features (avi video plays without problem in other XO builds), etc, etc.

Let's hope that someone will step up the plate.
== [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

#394 Post by hailpuppy »

Hi Mavrothal,Hmm I guess we can start bugging some experts from now on again huh? Well now that the hardest part is over(i suppose!) thsi shouldnt be as hard as it used to be ?

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

#395 Post by mavrothal »

hailpuppy wrote:Well now that the hardest part is over(i suppose!) thsi shouldnt be as hard as it used to be ?
Actually this IS the hardest part...
Think of it like that. What we have is a baby of a difficult labor.
But now we have to nurture it to become a really good grown up...
If you have kids you'll know what I mean :D
== [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