#qi-hardware IRC log for Monday, 2013-04-29

virickyak: whitequark: :>340 8 345? =5 2AQ @02=>06:47
viricwhitequark: 12:19
larscwhat are you guys plotting?12:46
virica meeting :)12:48
larscah ok, it sound all mysterious "tomorrow night?" "Da!" "when and where?" ;)12:49
viricisn't this a common way to meet? :)12:50
larscI guess the russian made it more mysterious12:52
viricimagine if it was german.12:55
viricfar more misterious ;)12:55
whitequarklarsc: hehehe16:36
apeleteI just cloned git://projects.qi-hardware.com/qi-kernel.git, can someone tell me which branch of that repo is actually used to build the nanonote kernel ?19:20
apeletewiki page http://en.qi-hardware.com/wiki/Ben_NanoNote/Kernel says jz-3.3, but isn't that old/outdated ?19:20
larscapelete: jz-3.6 is the latest19:24
larscviric: did you find them?19:25
viric:) yes19:27
larscsay hello from me19:28
viricI mentioned you19:29
viricsomeone mentioned AD :)19:29
viric(I only had good words about you)19:29
apeletelarsc: thanks. so jz-3.6 includes all the qi-hardware kernel patches for the NN ?19:29
viriclarsc: in fact it was whitequark who got into internet after 5 seconds of entering the bar19:30
wpwraklarsc: oh, you mentioned your 3.9 tree. it that on qi-kernel ? i saw that you create a branch but there doesn't seem to be a lot in there.19:30
larscapelete: yes19:30
wpwrakviric: was the vodka not to his liking ?19:30
larscwpwrak: 3.9-rc8 is on qi-kernel19:30
viricin 6 seconds he was already ringing me through SIP, through his VPN n who knows what land, through the bar free wifi.19:30
larscwpwrak: 3.9 is on my laptop19:30
wpwrakah ;-)19:30
larscbut I can push that pu19:31
larscwithout all the dma and clock changes19:31
larscfor now19:31
wpwraki'm curious about your board-qi_lb60.c. i think that's the best place to put what's left from atben.c (mainly code to connect the drivers, plus a small reset function).19:32
apeleteare you guys still working on the nanonote kernel by the way ?19:32
pcercueiof course19:32
wpwrakapelete: that's just what we're talking about :)19:33
apeleteI'm trying to create a BSP for the NN in the openembedded build system19:33
apeleteI think I will start with your work, eg. build a qi-hardware kernel and maybe uboot to create a mninimal bootable image for the NN with openembedded19:35
apeletemy goal is to make the BSP available in oe for those who prefer to use that build sytem instead of openwrt19:37
apeletewhat do you think about it ?19:37
larscgo for it19:38
larscwpwrak: pushed the branch19:38
apeletelarsc: ok, will try to build jz-3.6, and then go from there and try to integrate it inside oe19:40
apeletewill let you know how it goes19:40
larscapelete: you could actually try jz-3.9 now that it is out on the wild19:41
apeletelarsc: ah, that's great, will try that instead then19:42
wpwraklarsc: thanks !19:46
wpwrakapelete: btw, there's also OE-based jlime. i think it hasn't been updated for ages, but there may still be things in there that are useful for you. not sure to what extent they pushed their changes up to OE.19:47
wpwrak(board-qi_lb60.c) oh, refreshingly similar ;)19:48
wpwrakyou;re missing xiangfu's "qi_lb60: NAND: add data partition"19:49
wpwrakbefore that, ubi was VERY unhappy with what it saw19:49
larscthat kernel boots fine on my board19:50
apeletewpwrak: I've been working on oe-based jlime for the past months, fixed a couple of things in the distro and modified it to build a ubi rootfs by default: http://git.openembedded.org/openembedded/commit/?h=2011.03-maintenance&id=91052aa8adea176d1ecb46e6b458a576938e0e8e19:51
apeletewpwrak: now I'm trying to update the BSP, because jlime is still using kernel 2.6.3619:52
wpwrakapelete: oh, great !19:53
wpwraklarsc: hmm, maybe you have a special OWRT installation then. i think it normally doesn't touch the data partition, so whatever is there (if there's anything) will upset UBI19:54
larscI use an image downloaded from downloads.qi-hardware19:55
apeletewpwrak: the qi-hardware kernel seems to be a sensible choice to create an up-to-date BSP, and using your work should help minimize the effort19:55
apeleteif I succeed in creating the BSP, maybe I could help you with upstreaming the patches if you don't mind19:57
larscthe oe patches?19:58
wpwraklarsc: i don't know how UBI is structured internally, but it may just consider the whole partition as containing potential data. in this case, what you get when putting a small image on a larger partition would depend on the history of that partition19:58
apeletelarsc: you said on the ml that some help was needed to write glue code in the kernel: http://lists.en.qi-hardware.com/pipermail/discussion/2013-April/010117.html19:59
larscwpwrak: feel free to apply the patch, I'll see if anything breaks on my side19:59
wpwrakapelete: (use the qi-hw kernel) yes, definitely. i don't think there are any "parallel" kernels that are maintained19:59
larscapelete: for the usb gadget driver. So the situation is that we have a usb gadget driver which is in a horrible shape20:00
wpwraklarsc: i use it in my kernel. first, i tried to run without it, and all hell broke loose.20:00
pcercueiapelete, interested in a tiny bootloader for jz4740 that boots straight to UBI?20:00
larscapelete: and there already is a upstream driver for this ip core which we'd prefer to use, but we need to write the glue code for the jz4740 SoC20:00
wpwraklarsc: this sort of things: http://pastebin.de/3412420:02
apeletelarsc: yes, that's what I understood. maybe we could talk about it later, when I get the BSP working in OE, but I'll gladly help with the coding if necessary20:03
wpwrakmaybe someone from the OWRT crowd would know whether the root/data partition split should be considered mandatory or whether just a large root partition should work too ?20:03
Action: wpwrak waves in the general direction of mth and kyak :)20:03
apeletepcercuei: you mean a bootloader that replaces uboot ?20:04
mthwpwrak: I know very little about OWRT; we're using buildroot instead20:06
mthand we've got a very strict split between root and data, since our rootfs is read-only (squashfs)20:06
larscwpwrak: I think I erased my whole nand before flashing the image, and I think UBI treats erased pages as free spaces, I guess that's why it works20:06
apeletepcercuei: are you running that on GCW Zero game console ?20:06
wpwrakmth: ah, i see, sorry. hmm, i why did i think you were on OWRT ?20:07
mthwe were considering it at some point, but decided it was easier to support a read-only rootfs instead20:09
wpwrakpcercuei: ubi.c is impressively small. but you still need some special partition for the kernel, it seems. pity. (i.e., you can't load, say, a file from the rootfs)20:09
wpwrakah, that must be it20:10
pcercueiapelete: yes20:10
wpwraklarsc: yes, i was thinking of something along these lines (erased blocks == free)20:10
pcercueiwpwrak, the bigger the kernel partition is, the longer it takes to boot20:10
larscwe don't store the kernel in an ubi parition on the nanonote20:11
apeletepcercuei: I'm impressed :)20:11
pcercueihehe why?20:11
apeletelarsc: config file seems to be missing missing in jz-3.9, where can I get it ? (or should I make my own ?)20:12
wpwraklarsc: well, we have a non-UBI partition. same concept, different number of layers :)20:12
apeletepcercuei: I have a strong interested in the kernel and bootloader(s) (low level programming stuff), so I think it's impressive to actually write a bootloader, however tiny it might be :)20:15
pcercueiwell the point was to make it tiny20:15
pcercueithe jz processors only load the first 8kB of data into RAM20:16
pcercueiso u-boot has to be cut in half20:16
wpwrakpiranha instead of whale (u-boot)20:16
pcercueione part that initializes the SD/NAND, one part that initializes the rest20:16
pcercueiubiboot is only ~6k with all the features compiled in (serial, MMC+FAT, NAND+UBI)20:17
larscapelete: it should be in arch/mips/config/qi_lb60_defconfig20:18
larscwpwrak: the uImage contains the size in the header. So the loader first reads the header then the remaining bytes, but only as many as it needs, so it doesn't matter how large the partition is20:19
apeletelarsc: ah, didn't look there, thanks.20:20
larscapelete: make qi_lb60_defconfig20:20
wpwraklarsc: was that for pcercuei ?20:23
larscno for you20:28
kuribasIs it possible to read the nand flash from a running system?20:29
kuribasFor example write it to an SD card?20:29
apeletelarsc: is it possible to 'make uImage' ? or should I 'make vmlinux.bin' and then convert to uImage by using mkimage ?20:30
wpwraklarsc: now i'm confused :)20:30
larscapelete: the later20:30
larscwpwrak: doesn't matter ;)20:30
larsckuribas: yes20:31
wpwrakapelete: i have a few scripts you may find useful in http://projects.qi-hardware.com/index.php/p/wernermisc/source/tree/master/bin20:31
wpwrakapelete: mknnk does "make" for the nanonote kernel (for any make target). nnui does the whole process, including mkimage. fk transfers and flashes the kernel.20:32
wpwrakapelete: nnui and fk don't consider modules, so you'd have to "mknnk modules" and scp them separately20:32
wpwrakapelete: also, fk falls back to usb boot using idbg if it can't scp. since you probably don't have an idbg, that won't work for you.20:33
wpwrakapelete: also, before you can scp, you need to set up usb networking to the ben. the script "ben" would do that. there's a similar one for jlime, called "jlime".20:35
kuribaslarsc: Or I just leave the kernel that it has, it's maybe not worth the effort if it is a discontinued device.20:36
apeletewpwrak: wow, that's great. thanks !20:40
larsckuribas: well your choice. If you are interested in this sort of thing it's an fun exercise20:40
wpwraklarsc: hmm, having second thoughts about a flurry of #ifdefs in board-qi_lb60.c. maybe i should just put the atben driver into arch/mips/jz4740 as a subordinate config option for the ben. alas, we don't have any precedent for multi-file board definitions in MIPS. do you think an arch/mips/jz4740/atben-qi_lb60.c would receive a friendly reception ?20:43
wpwrakperhaps we need an ecosystem-*/ instead of board-*.c ;-)20:45
larscwpwrak: my plan is to switch jz4740 over to devicetree20:46
larscthen you can put whatever you want your dt20:46
wpwrakphew. getting complex :)20:47
larscgetting simple21:06
wpwrakdevtree is the origin of several drivers having platform resources and CONFIG_OF in parallel, no ?21:08
apeletelarsc: I've download the toolchain here http://downloads.qi-hardware.com/software/images/Ben_NanoNote_2GB_NAND/latest/OpenWrt-Toolchain-xburst-for-mipsel-gcc-4.6-linaro_uClibc-
apeletebut when I point CROSS_COMPILE to mipsel-openwrt-linux/bin/ directory I get the error "mipsel-openwrt-linux/bin/gcc: cannot execute binary file "21:24
apeletewhat am I missing here ?21:25
larscnot sure, might be 32bit vs 64bit21:27
apeletelarsc: hmm, didn't think about that, but I'm building on a 32bit debian host (it shouldn't be a problem)21:30
larscwhat does file mipsel-openwrt-linux/bin/gcc say?21:31
larscwhat does `file mipsel-openwrt-linux/bin/gcc` say?21:31
apeletemipsel-openwrt-linux/bin/gcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, BuildID[sha1]=0x8258e7968a8994415f7a33655ca2e340edfdcdef, not stripped21:34
apeletelarsc: so you're right, can't run on my 32bit host21:34
apeleteI also have a 64bit host though, will try to build the kernel there21:36
apeletelarsc: thanks for helping21:37
wpwrakchecking ... still have two 32 bit hosts in regular operation22:01
wpwrakwell, two 32 bit x86 hosts22:01
larschaven't used one in 5 years or so22:09
larscbut I have a couple of 32bit VMs22:09
apeletegcc: error trying to exec 'cc1': execvp: No such file or directory22:13
apeletemaybe I should get the full SDK, not just the toolchain22:14
wpwrakapelete: you could try to run the openwrt build process. that also generates a toolchain.22:17
wpwrakldd /where/ever/mips-*-cc1  would tell you if there are any problems with shlibs22:17
wpwrakafter the architecture, that's usually the next stumbling block. i think the pre-compiled toolchain is for some version of ubuntu. may work on debian.22:18
kyakthe toolchain is for 64 bit hosts -\22:20
kyakxiangfu used to build the 32 bit as well, but not for the latest release22:20
kyakso yeah, just build your own22:20
kyakwpwrak: the 0020-qi_lb60-NAND-add-data-partition.patch is needed, since we changed the default partition layout22:27
kyaki'm not sure why it works without this patch for larsc... 22:27
wpwrakyeah, when i tried without it, i received plenty of fire and brimstone :)22:29
kyaksame for me22:29
kyakbtw, the naming of toolchain tarball does not suggest that it is for 64 bit hosts. I reported it and even submitted a patch: https://dev.openwrt.org/ticket/11264, more than a year ago22:35
kyaka poke to openwrt.22:36
wpwrakyeah, the name is somewhat nasty. perhaps it should also make the "linux" a bit more detailed22:43
wpwrakwell, specific22:43
wpwraki.e., Debian or Ubuntu22:43
apeletegot the kernel compilation finally running (by making a few symbolic links in the downloaded toolchain archive, to put all needed executables in a single directory)22:48
wpwrakvictory is near ;-)22:48
apeletewill test the result on target tomorrow22:49
apeletethanks everyone for helping, time to get some sleep :)22:49
apeletegood night22:49
apelete(will let you know how it went)22:49
qi-bot[commit] Werner Almesberger: atben/misc/atben-spi-performance.txt: SPI performance comparison (master) http://qi-hw.com/p/ben-wpan/ff9c7a822:58
qi-bot[commit] Werner Almesberger: atben-spi-performance.txt: clean up and describe role of referenced code (master) http://qi-hw.com/p/ben-wpan/ec6c09d23:08
--- Tue Apr 30 201300:00

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