#qi-hardware IRC log for Saturday, 2010-08-21

turtleeand these tools allow you to make physical RAM pretend that it's swap?00:00
qwebirc91025is there any way to compile the hello world C application for nanonote and execute it on the platform without actually recompiling the whole kernel00:00
Action: turtlee welcomes qwebirc00:00
wolfspraulwe need to publish the toolchain or some kind of SDK...00:02
nebajothnot just pretend to be swap00:04
nebajothpretend to be swap, and compress and decompress on the fly in and out00:04
turtleenebajoth: just making sure I understand what you're doing. =D00:04
wpwrakyes !!!! :)00:04
nebajothmost distros seem to be using this already00:04
nebajothat least for their installers00:04
nebajothturtlee: yes00:04
qwebirc91025anybody having a solution for my problem00:04
wpwrakwolfspraul: keep is simple. toolchain and selected headers/libraries. like in openmoko. that worked great.00:04
nebajothwhy would you have to recompile the kernel?00:05
wpwraknebajoth: probably as part of building all of openwrt ...00:05
qwebirc91025yes exactly00:05
nebajothI dunno anything about that00:06
nebajothI run openwrt on my routers :P00:06
nebajothnot my gtd nn00:06
qwebirc91025cant we have any toolchain only to compile the C file and port it on nanonote using usbnet and run it00:06
wpwrakqwebirc91025: i just bit the bullet, ran the whole build, and then symlinked all the executables into /usr/local/bin00:07
nebajothqwebirc91025: yeah that should work00:08
nebajothhell I'm running openwrt compiled sound modules in my debian I think00:08
qwebirc91025but how ?00:09
qwebirc91025can you plz tell me the procedure00:09
nebajothI'm not sure I know it00:09
nebajothI have to compile with a mips toolchain myself00:09
wpwrakqwebirc91025: here it is: http://en.qi-hardware.com/wiki/Building_Software_Image00:09
qwebirc91025right now I just need to develop a C aplication to print some thing on console00:09
nebajothI was either going to do it with openwrt00:09
nebajothor right on the nn00:09
nebajothyou can compile on the NN with debian :P00:10
wpwrakonce done,  ln -s staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.32/usr/bin/mipsel-openwrt-linux-* /usr/local/bin/00:10
qwebirc91025wpwrak : if i go with this procedure then i need to port the kernel image ?00:11
qwebirc91025am I correct  ?00:11
turtleedoes the basic pyneo debian install slow the NN noticably more than the stock OpenWRT?00:11
wpwraki think it builds a kernel in the process. you will be asked a few questions. just hit enter to accept the defaults.00:12
nebajothturtlee: I didn't keep openwrt on there long enough to know really00:12
nebajothbut yeah probabl00:12
nebajothI still find it totally usable though00:12
nebajothbootup takes a little longer00:12
nebajothit could probably be optimized though00:12
qwebirc91025but ultimately we need to port the whole kernel image ? isnt00:12
wpwrakqwebirc91025: why worry about the kernel ? there's plenty more junk in openwrt ;-)00:13
wpwrakqwebirc91025: the build process takes care of it all. you don't have to pay attention to all the things it builds.00:14
wpwrakqwebirc91025: for the configuration, instead of "menuconfig" use "oldconfig". i.e., accept things as they are.00:14
nebajothrofl: "When code from the staging tree is loaded in the kernel, a warning message will be printed to the kernel log, and the kernel will be tainted with the TAINT_CRAP flag."00:15
wpwraksounds like Greg :)00:16
Action: turtlee would snort his beverage out his nose if he had a beverage.00:16
nebajothwpwrak: yep00:18
qwebirc91025I am worrried about that because in software development for a minor in my application I will have to port the whole kernel again and again00:19
nebajothinstall debian, compile on the Nanonote itself :D00:20
wpwrakqwebirc91025: the kernel is already ported, openwrt merely compiles it one more time :)00:21
wpwrakqwebirc91025: and no, you don't need to go through that ritual again once you have built your toolchain00:21
wpwrakqwebirc91025: you'll have a mipsel-openwrt-linux-gcc, mipsel-openwrt-linux-ld, etc., which you then use for cross-compiling00:22
qwebirc91025I am little bit confused now00:26
qwebirc91025let me tell you what all I have already done00:27
qwebirc91025I have downloaded source code and toolchian from Ben nanonote website00:27
wpwrakqwebirc91025: the "toolchain" or the "tools" ?00:28
qwebirc91025and configured it as per http://en.qi-hardware.com/wiki/Building_Software_Image00:29
nebajothdoes this thing have an internal clock?00:29
qwebirc91025I am having one folder namely toolchain having binutils , gcc etc varous folders00:30
qwebirc91025and tools folder is also present but not in toolchain directory00:31
wpwrakqwebirc91025: sounds good so far00:31
rafanebajoth: what do you mean?00:32
nebajothI mean00:33
nebajoththat it loses the date00:33
nebajothand I have to rdate it back00:33
nebajothI haven't looked into it at all00:33
nebajothmaybe this has already been addressed on the wiki or mailing list00:33
nebajothmaybe its debian specific00:34
nebajothdo you have that issue with jLime?00:34
rafanebajoth: no.. rtc works okey00:35
nebajothso its a debian thing00:36
rafanebajoth: but it did not do before.. I had to add /dev/rtc* device files..00:36
rafaso hwclock -w .. etc works00:36
nebajothjust add the device files and it works?00:36
rafanebajoth: well.. it has several parts.. you need a kernel with rtc driver, etc..00:37
rafathen you need the proper files under /dev/*00:37
rafaand then to test hwclock/date commands ;)00:37
nebajothyeah, I'm about to compile 2.6.36 anyway00:37
nebajothI'll check for rtc driver now00:37
nebajothyou have it compiled into the kernel or as a module?00:37
qwebirc91025now if I go to openwrt-xburst directory and execute make menuconfig FORCE=1 cmd then kernel configuration screen pops up00:37
rafainside the kernel00:37
qwebirc91025now tell me what to do next ?00:38
nebajothI'm sure its turned on actually00:38
nebajothI grabbed your config file00:38
nebajothto build on00:38
wpwrakqwebirc91025: i would run  make oldconfig, not menuconfig. just hit ENTER for all the questions.00:38
nebajothor yes "" | make oldconfig00:39
wpwrakqwebirc91025: also, FORCE doesn't work reliably. you'll have to edit out the silly test in include/prereq-build.mk00:39
rafanebajoth: you can check you rtc driver in nn kernel with :00:39
rafaJlime$ dmesg | grep -i rtc00:39
rafajz4740-rtc jz4740-rtc: rtc core: registered jz4740-rtc as rtc000:39
rafajz4740-rtc jz4740-rtc: setting system clock to 2010-06-20 20:30:31 UTC (1277065831)00:39
nebajoth"yes "" | make oldconfig"00:39
rafa(for example)00:39
nebajothdamned double quotes00:39
nebajothbut you get my point00:39
nebajoththis is my favourite irc channel00:40
nebajothI'm using the older qi-hw kernel00:40
nebajothand yes, rtc is on00:41
nebajoth[    9.660000] jz4740-rtc jz4740-rtc: setting system clock to 1970-01-01 00:00:00 UTC (0)00:41
nebajoth/dev/rtc0 exists00:42
rafadid you change the time at some moment? :)00:42
rafadate,...hwclock ?00:43
qi-bot[commit] Werner Almesberger: Added register definitons and simplified register naming. http://qi-hw.com/p/ben-wpan/1d777aa00:43
qi-bot[commit] Werner Almesberger: fw/atspi/atspi.c (reset_rf): added reset timing measurement http://qi-hw.com/p/ben-wpan/44f0c3800:43
qi-bot[commit] Werner Almesberger: Enter TRX_OFF to enable DVDD regulator. Plus minor cleanup. http://qi-hw.com/p/ben-wpan/7a534d200:43
qwebirc91025what has to be done to remove FORCE=1 option ?00:43
nebajothI've set it with rdate00:43
nebajothmultiple times00:43
nebajothrdate -s time.nrc.ca00:43
wpwrakqwebirc91025: where it says "define Require/non-root", change the next line to "true"00:44
nebajothafter running rdate00:44
nebajoththe command "date" shows the new correct time00:44
nebajothbut hwclock00:44
nebajothstill shows 197000:44
nebajothran hwclock -w00:46
nebajothlets see how it goes now :P00:46
nebajoththx rafa00:46
qwebirc91025can you plz tell me the syntac00:47
qwebirc91025in next line "[ "$$(shell whoami)" != "root" ] is written00:48
rafanebajoth: you are welcome00:48
qwebirc91025I have made it "== root"00:51
qwebirc91025so dont need to use FORCE=100:51
qwebirc91025now what ?00:51
nebajothis the LED connected via GPIO?00:53
wpwrakqwebirc91025: yes "" | make oldconfig00:59
wpwrakqwebirc91025: make -j <number_of_cores_you_have_plus_1>00:59
wpwrake.g., make -j501:00
wpwraklean back and relax while openwrt builds all the stuff01:00
wpwrakyour toolchain will be in staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.32/usr/bin/01:01
wpwrakhmm. i better get some sleep. barbecue in 12 hours. terrace oblige :)01:02
rafais not barbecue some meat made with fire only? :)01:03
wolfspraulbarbecue, nice - 'night01:04
qwebirc91025how to chek that hwo many cores are there01:04
nebajothhaha terrace oblige01:06
nebajothhow many cores are where?01:06
nebajothin your computer?01:06
nebajothcat /proc/cpuinfo |grep processor|wc -l01:07
qwebirc91025are you talking about processor or ?01:07
nebajothOK gentlemen01:09
nebajothI believe he was01:09
nebajothwhat other kinds of core are there?01:09
nebajothOK gentlemen, I'm undertaking a kernel compile FOR the nanonote, ON the nanonote01:09
nebajothI am timing it :P01:09
nebajothI'll let you know what the results are01:10
nebajoth... in a few days01:10
nebajoth... when its complete01:10
qwebirc91025I got it01:11
osokuronebajoth: thanks for the advice. wish me luck on my debian install.01:18
nebajothah yes01:18
nebajothgood luck :D01:18
nebajothlmk how it goes01:18
nebajothI'll be here for a bit still01:18
osokuroHeh. I won't. time for sleeping. will try the flash over the next day or two.01:19
nebajothgood luck :)01:19
nebajothI eventually intend to release a new rootfs01:20
nebajothbut I want to get this new kernel working first01:20
nebajothNN is gonna be busy for the next couple days01:20
nebajothcompiling :P01:20
osokuroVery cool.01:20
osokuroone more thing.01:20
osokuroany recommendation on how to go about formatting and setting up a swap part on the nand?01:21
nebajothare you going to use the whole thing or partition it?01:21
nebajothnot sure it would be very easy to partition it01:21
nebajothummm, you can either use the whole mtd partition01:22
nebajothor you can make a swap file01:22
nebajothup to you01:22
nebajothguess you don't need that big a swap file01:22
nebajother that big a swap01:22
nebajothso I'd make a swap file on the nand and use that01:23
nebajoththat tickles my memory of something on the mailing list involving xiang-fu01:23
nebajothbut I didn't see it while cruising through the last 6 months yesterday01:23
osokuroswap file is super-obvious. sorry.01:23
osokuroalright. time for sleeping.01:24
osokurosee you later.01:24
nebajothhe's a nice fellow01:27
wolfspraulnebajoth: yes we are lucky with the people that show up. it drives me nuts that the NanoNote is not more useful from a regular user standpoint today. argh. but the direction is right...01:47
nebajothwe'll get there02:02
viricwolfspraul: one program I lack in the nanonote is something that would allow me to store and navigate maps04:55
viricI have to try that nanomap still.04:55
wolfspraulviric: yes, nanomap :-) but I haven't tried it myself yet...04:59
wolfsprauldefinitely I want that too though04:59
qi-bot[commit] Andres Calderon: ddr-vref improved placement http://qi-hw.com/p/xue/1ba752508:18
viricanyone using mpg321 in the nanonote?09:05
kristianpaulnope that i'm aware off09:08
kristianpauldid you tried gmu?09:08
kristianpaulthere is also a command line program to play music called: oggplay09:18
viricI'll try09:20
viricI simply saw that mpg321 seems to require more cpu power than the ben has09:20
viricwhile madplay seems to have plenty of cpu09:21
urandom__mpg321? well gmu plays mp3 fine but uses mpg123 i think09:35
urandom__cpu power shouldnt be any problem at all for playing music09:36
viricmpg123 should be using floating point, while mpg321 should not09:39
viric(for what I read about them)09:39
viricso mpg321 should work *faster* in a cpu without fpu09:39
viricand at the end, mpg321 uses libmad, that of madplay too.09:39
urandom__well mpg123 works fine so just use it09:40
viricI'll try.09:41
urandom__if you need binarys, use the ones from the dingoo version of gmu09:42
viricno no, I build myself09:42
viricthank you09:42
wejpmpg321 is very old and generally should not be used09:44
wejpalso, mpg123 has both floating point and fixed point decoders included09:45
viricThere was a time when mpg321 was newer than mpg123 :)09:46
wejpthat is long ago09:46
wejpmpg123 is actively maintained09:46
wejplast mpg123 release is from july 11th 201009:47
wejpyeah, works really good09:48
viricdo you use softvol?09:56
viricI'd like to get from someone the alsa config for that.09:56
viricI could not manage to get it working09:56
qi-bot[commit] Andres Calderon: some eth-phy to s6 nets has been routed http://qi-hw.com/p/xue/419310910:03
qi-bot[commit] Andres Calderon: some eth-phy to s6 nets has been routed http://qi-hw.com/p/xue/195bfb910:14
hike85hello everybody12:08
hike85I'm trying to compile the toolchain for the new image, but I get this error:12:16
hike85In file included from ./include/bits/syscalls.h:11,12:16
hike85                 from ./include/sys/syscall.h:34,12:16
hike85                 from ./libc/sysdeps/linux/common/sysdep.h:20,12:16
hike85                 from ./libc/sysdeps/linux/mips/sysdep.h:25,12:16
hike85                 from libpthread/nptl/sysdeps/mips/tcb-offsets.c:1:12:16
hike85./include/errno.h:69: error: thread-local storage not supported for this target12:16
hike85./include/errno.h:69: warning: `tls_model' attribute ignored12:16
hike85make[4]: *** [libpthread/nptl/sysdeps/mips/tcb-offsets.s] Error 112:16
viricwejp: I just built mpg123 (generic-cpu optimizations), and it looks like not having enough cpu either12:16
viric99% of the CPU spent on 'system'12:17
viricusing the 'alsa backend'12:17
viricclearly something goes wrong12:17
wejpviric, you nee to build it with generic_no-fpu12:17
wejpthe generic decoder uses floating point math, you really need to tell configure to use the no_fpu decoder12:17
viricah ok12:18
viricah, hence the 'system' load! I guess it's using the kernel fpu emulation12:18
wejpwith that decoder gmu is able to decode mp3 files with any bitrate with less than 25 % cpu load on the ben12:18
viricI've seen 22% on madplay12:18
wejphehe, yeah kernel fpu emulation is especially slow ;)12:18
wejpyeah, madplay is a little slower than mpg123 but still okay12:19
viricnevertheless I don't know what code my gcc generated, so that the kernel fpu operations are used12:19
wejpfor ARM cpus mpg123 has an even more optimized decoder, but that doesn't help you on mips cpus ;)12:19
viricI did not expect my gcc to produce code for fpu12:19
viricI have a sheevaplug, but no sound card on it.12:19
viricMaybe for the gp2x I could do something :)12:20
wejpyou could attach an usb soundcard :D12:20
viric:) yes12:20
wejpyeah, gmu on the gp2x uses mpg123 with the arm optimized version :)12:20
viricHow can I know if gcc generated fpu instructions?12:23
viricthere may be an elf flag for it12:24
wejpyou can tell gcc to explicitly use its own fpu emulation layer, i think it is -mfloat-abi=softfp12:24
wejpbut you don't want that12:24
viricI know how to set that explicit12:24
wejpit is much faster than kernel emulation, but still damn slow12:24
viricWa! Here I go!12:25
viric13% user cpu, 2% system1 :)12:25
viric192kbps stereo12:25
wejpyep :)12:25
viricfar below 25% :)12:25
wejpyeah, just decoding mp3 is pretty fast12:25
viricwell, it plays.12:25
viricso it goes to the sound card12:25
wejpgmu does some graphics output too, which needs some cpu, but it is still pretty fast even with that12:26
viricnothing I need, that gmu :)12:26
viricthank you very much12:26
wejpyou're welcome :)12:26
viricAren't you using softvol, btw?12:26
viriccan you paste your softvol configuration so I could take a look?12:26
viricI could not manage to configure it12:27
wejpwhat exactly do you mean? the source code?12:27
viricthe asoundrd file12:27
wejpoh, sorry, no i do not use alsa for software volume control12:27
viricit should have the description of the softvol mixer setting12:28
viricThen what volume do you use?12:28
viricthe hardware mixer? :)12:28
wejpi scale the audio signal itself before giving it to alsa (or whatever audio driver is being used)12:28
viricmpg123 can do that?12:28
viricoh :)12:29
wejpi use mpg123 just for decoding mp3 data, the volume control and audio output takes place at another point12:29
viricmaybe I could pipe it to sox12:29
wejpthat should be possible12:30
wejpi think the mpg123 executable can output the data to stdout12:30
viricbut doing that on the *decoded* signal looks like a heavy job.12:30
viricmany samples a second12:30
wejpit is not that bad and actually you could not even do it easily on the encoded signal12:31
wejpand even if you could, you would not want to do that in a music player that is capable of decoding lots of different file formats12:31
viricI mean that if mpg123 did that, it would not that be that a heavy task I guess12:31
viricfor the cpu12:31
viricanyway, I have mp3 playing. Great! :)12:32
viricI wonder what I need more...12:32
wejpit could be even worse, the decoding process is quite complex ;)12:32
viricI should try to start X some day.12:32
wejpi think X is a bit overkill on such a device12:32
viricthere is the tiny keith X12:33
viricit should run fine there12:33
viricI could cross-build it, but I did not go into configuring. :)12:33
wejpi've used X on the zipit z2 (which has similar specs) and it is rather slow and the screen resolution does not help either ;)12:33
wejpbut it is possible12:33
wejpshould be possible on the Ben too12:34
viricWhat other options are, to run GTK or qt programs?12:34
wejpyou can use fbdev for video output12:34
viricfor mplayer I know12:34
viricmaybe people use qtopia on the fbdev?12:34
wejpyou can use fbdev for X and there is a gtk port which outputs to fbdev directly12:34
wejpthere were some problems with that on the ben, though12:34
wejpyeah, qtopia runs on fbdev too12:35
viricthere are plenty of things to learn :)12:35
wejpmaybe one could run a tiny x server instead of xorg12:35
viricThe keith server I said12:36
viricIt comes with xorg.12:36
viricbuild the server with "--enable-keith" and you are there12:36
wejpyeah, you could try that one12:36
viricit runs on fbdev12:36
viric--enable-kdrive, sorry12:37
viricI built it, but I did not try to start it12:37
wejpyep right, kdrive was the name :)12:37
virickdrive is made by Keith. I always mix that :)12:37
viricI'm busy with another mips... kdrive for another day.12:38
hike85guys, sorry to interrupt, but I'm trying to compile the mpg123 lib for gmu12:38
hike85but I get errors when compiling the tool-chain :(12:38
wejpwhat kind of errors? could you show us some error log?12:39
hike85In file included from ./include/bits/syscalls.h:11,12:40
hike85                 from ./include/sys/syscall.h:34,12:40
hike85                 from ./libc/sysdeps/linux/common/sysdep.h:20,12:40
hike85                 from ./libc/sysdeps/linux/mips/sysdep.h:25,12:40
hike85                 from libpthread/nptl/sysdeps/mips/tcb-offsets.c:1:12:40
hike85./include/errno.h:69: error: thread-local storage not supported for this target12:40
hike85./include/errno.h:69: warning: `tls_model' attribute ignored12:40
hike85make[4]: *** [libpthread/nptl/sysdeps/mips/tcb-offsets.s] Error 112:40
hike85this is where it stops... I'm on Ubuntu 10.04 and I have all the dependencies needed12:40
hike85I just added qt and libSDL to the config file12:41
nebajoth373 minutes, 20 seconds12:51
nebajothto compile 2.6.36 kernel12:52
nebajothON the nanonote12:52
nebajothactually that's not as bad as I thought it would be12:52
viricnebajoth: with gcc?13:06
viricnebajoth: I would not expect gcc to have enough ram13:06
nebajothit doesn't13:07
nebajoththat's why I gave it 1G of swap :P13:07
nebajothI run debian13:07
nebajothI had to assign swap anyway, just to run apt-get13:07
viricuh :)13:07
viricswap on SD?13:08
viricor a network block device?13:08
viric(just not to wear down Flash memory :)13:08
viricYou don't love that microsd very much :)13:08
nebajoth#1 no13:09
nebajothI don't13:09
nebajothI have 4 others identical to it13:09
nebajoth#2 wearing out takes forever13:09
nebajothmuch longer than I'll likely have a practical use for it13:09
nebajothpeople get really upset about wearing of flash memory13:09
nebajothand I don't really understand why13:09
nebajothwhen they generally outlive their mechanical cousins13:09
viricI never got a flash memory to wear down too13:10
nebajothI'm sure it does happen13:11
nebajothbut last time I looked at the numbers13:11
nebajothit was like13:11
viricI have some friends that worked on embedded systems, and they are used to flash wearing down13:11
viricBut maybe they write the flash a lot.13:11
viricargh, there is already.13:12
mthyou can swap to zram too, by the way13:16
mtha compressed block device stored in RAM13:16
mthgives you some extra memory before swapping to SD13:17
virichow much you set for zram?13:21
mthAyla set it to 10 MB on Dingux, afaik13:22
viricdingux is a device or a gnu distribution?13:23
mthDingux is Linux for the Dingoo A320/A33013:23
viricdoes that have also 32MB of RAM?13:23
mthzram is new in 2.6.3513:23
mthI backported it to 2.6.34 though13:24
viricI run 2.6.3513:24
viricI could try.13:24
viric(with 2.6.34, mmc does not work for me)13:24
mththere was a bug fixed in the MMC insert detection, I don't know if that's related?13:25
nebajothmth: yes13:42
nebajothI have it compiled into the kernel that took 6h to compile :P13:42
nebajothzram, that is13:43
nebajothin fact, that's the entire reason I undertook to build the kernel13:43
mth6h? you compile it on the NanoNote itself?13:43
nebajothI was interested in how long it would take13:43
nebajoth6h was a lot shorter than I expected, tbh13:43
nebajothI thought it'd still be going when I woke up toda13:44
viricmth: no, the insert detection worked fine. It simply did not understand my sd card13:44
kristoffernebajoth, 6hours isnt that bad :) good to know that it works14:05
nebajothdoes anybody know if there's anything special that must be done to compiled kernel before it can be flashed to the NN?14:40
wejpnothing special, you just need the compiled uImage15:33
qi-bot[commit] Andres Calderon: s6 to eth-phy connections has been completed http://qi-hw.com/p/xue/30b128217:39
qi-bot[commit] Andres Calderon: nand routing just started http://qi-hw.com/p/xue/de965fa19:08
rafa_nebajoth: you really need to learn how to use a toolchain man19:16
rafa_nebajoth: building on host is nice and fun.. but it is not to suffer19:16
rafa_nebajoth: you can do the same using a toolchain.. and you will have a kernel built in just a few seconds.. or minutes19:17
nebajothrafa: oh totally, I was just curious and didn't feel like setting up a toolchain yet22:29
nebajothI'll definitely be doing that this week22:29
--- Sun Aug 22 201000:00

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!