#qi-hardware IRC log for Tuesday, 2012-10-09

qi-bot[commit] Xiangfu: debian: regular update (master) http://qi-hw.com/p/fped/9ab9ae603:09
qi-bot[commit] Xiangfu: move debian/* to https://github.com/xiangfu/deb-pkg/ (master) http://qi-hw.com/p/fped/d59b47203:09
kyakmth: i see.. the same results i have. We'll see if 3.6 makes any difference for JZ474005:01
LunaVoraxDoes anyone knows here where I can buy a Neo Freerunner with a GTA04 board?05:53
rohLunaVorax: i think only here: http://www.handheld-linux.com/wiki.php?page=GTA0405:56
mthviric, larsc: this line was not integrated into mainline: "select SYS_SUPPORTS_ZBOOT_UART16550"10:40
mthis that no longer needed or should I keep a commit containing that one line?10:40
mthhttp://www.treewalker.org/temp/vmlinuz-leftover.patch10:41
viricah no idea10:41
larscgood question, any idea why it didn't make it?10:49
mthno idea, I just noticed that when cherry-picking all 3.5 commits into 3.6 this one didn't end up empty10:50
larscthe line is in the commit though, just at a different position10:54
mthah, git failed to detect that then10:54
larscI guess Ralf reordered it10:54
mthanyway, thanks for looking at it10:56
mthlarsc, kyak, xiangfu: I pushed the jz-3.6 branch to qi-kernel11:54
mthas always, tested on A320, builds for Nanonote but not tested there11:54
mththe board-qi_lb60.c might need an update for the pwm beeper11:55
mthsee ad8f4827 for the update on board-a320.c for an example11:56
mththe pwm device is already added for the NN, but the new-style mapping is not11:56
viricthe board has a pwm beeper?12:34
mth"static struct platform_device qi_lb60_pwm_beeper" says it does :)12:51
viricnice :)12:53
whitequarkDocScrutinizer05: what do you think about Jolla?13:19
larscmth: thanks13:26
larscviric: yes. try to enter beep on the console13:26
viricbut is that separate from the speaker?13:30
viric(I don't have the NN at hand)13:30
xiangfumth, thanks. I will test it on nanonote.13:32
larscviric: yes13:35
larscthere is a piezo13:36
viricahh13:40
viricinteresting :)13:41
pabs3whitequark: yawn14:27
whitequarkpabs3: huh?15:00
paul_boddieDoes anyone want to answer a stupid Linux kernel programming question?15:06
kyakmth: thanks!15:14
paul_boddieOK, well, I'll ask it anyway and see if anyone has any opinion. It's actually about that USB/IP kernel module I mentioned before. That module appears to obtain a socket from a process using its file descriptor table, and I've been trying to obtain a usable "struct file" instead using fget, in order to use it with a tty character device file.15:16
paul_boddieSo, is it possible to obtain a usable "struct file" and use it to write to a character device within the kernel using, say, vfs_write? I do the set_fs magic but still get EFAULT.15:21
larscpaul_boddie: yes ;)15:31
kyakmth: jz-3.6 boots with Nanonote :)15:33
mthdoes the beeper still work?15:34
paul_boddieIt's weird because I do fget, which should give me the file object that I need to actually write something, and I do the set_fs(KERNEL_DS) stuff to stop the address validation, but I start to wonder whether there are memory allocation issues that I haven't thought about, even though the socket-based stuff appears to use stack-allocated memory and synchronous I/O.15:36
kyakthe beeper doesn't work, but i didn't modify the board.c15:36
larsckyak: it should work without modifing it15:37
kyaksomething must be wrong with config options.. proc is not mounted15:37
larsckyak: your init is probably not /etc/preinit15:37
paul_boddieAnd it's quite hard to find a discussion about this on the Internet because everyone is wailing "Don't open files in the kernel!" (I'm not) and pointing to a 2005 article about doing bad things in the kernel.15:37
viricI never understood the openwrt game on the 'init' path15:38
larscpaul_boddie: what exactly are you trying to do?15:38
kyaklarsc: should i patch the kernel to use /etc/preinit or modify the cmdline in uboot?15:38
larsckyak: both is possible15:38
larscand should work15:39
larscif you have serial access to uboot it should be faster15:39
viricwhy are the openwrt people not using the usual init paths?15:39
larscgood question15:39
viricI find it annoying :)15:39
paul_boddieDoesn't the stock NanoNote bootloader specify /etc/preinit?15:42
kyaklarsc: fixed the problem with init, still it doesn't beep15:42
kyakpaul_boddie: interestingly, not. I guess it relies on the kernel patch15:43
paul_boddiekyak: I couldn't remember where the setting got applied, but I found that the Debian userland obviously wouldn't work without some preinit "glue".15:44
kyaklarsc: after fixing init stuff, i don't need CONFIG_DEVTMPFS :)15:51
larsckyak: what's the output of /sys/bus/platform/{devices,drivers}?15:52
larscIs CONFIG_PWM_BEEPER enabled in your config?15:54
kyakhttp://dpaste.org/w4o0y/15:54
kyakgrep CONFIG_PWM_BEEPER .config returns nothing15:54
larscthere is the problem15:54
kyakbtw, ash doesn't like curly brackets :)15:54
larscI figured you'd be smart enough to decode what I meant ;)15:55
kyaknow i'm smarter than ash, good --)15:56
kyakok.. so where is CONFIG_PWM_BEEPER gone?15:56
larsctry to edit drivers/input/misc/Kconfig and replace HAVE_PWM with PWM15:56
larscmth: did you put the PWM patches in jz-3.6?15:59
kyaknow i have CONFIG_INPUT_PWM_BEEPER=y. Is this what we are lookign for?15:59
larscyes15:59
viricinput?16:00
larscyes16:00
kyakyep, it beeps now16:01
larscinput is really a misnomer these days. it's more about hid, so it supports both hid input and output16:01
larscbut well you don't simply rename a subsystem16:02
larsckyak: good16:02
mthlarsc: yes, I added the commits that didn't make it into 3.616:04
larscok16:06
larscthe one modifying drivers/input/misc/Kconfig is missing ;)16:06
larschttps://patchwork.kernel.org/patch/1544851/16:07
paul_boddielarsc: I'm trying to get the usbip driver to talk over a serial device instead of a socket.16:18
larscso you want to do usb over serial?16:19
paul_boddieWell, if it works over TCP/IP, why not over something behaving like a serial line?16:24
mthlarsc: we don't have "IS_ENABLED(CONFIG_PWM)" in include/linux/pwm.h, so perhaps another patch is missing too?16:24
paul_boddieI actually thought the modifications would be relatively trivial, but I think I must have underestimated the Linux kernel's capacity to infuriate again.16:24
larscpaul_boddie: I'd expect it to work to. where do you get the fd from, do you pass it in from userspace?16:29
larscmth: https://patchwork.kernel.org/patch/1441841/16:32
qi-bot[commit] Tushar Behera: pwm: Fix compilation error when CONFIG_PWM is not defined (jz-3.6) http://qi-hw.com/p/qi-kernel/722071116:37
qi-bot[commit] Thierry Reding: pwm: Get rid of HAVE_PWM (jz-3.6) http://qi-hw.com/p/qi-kernel/90bf22516:37
paul_boddieSo, the usbip driver does a scanf on some integers written to a sysfs file. It then does an fget to get a "struct file" and then tests for a socket before calling SOCKET_I on the inode of the file.16:38
paul_boddiehttp://lxr.free-electrons.com/source/drivers/staging/usbip/usbip_common.c?v=3.5#L39916:38
larscthat's kind of crazy16:40
qi-bot[commit] Maarten ter Huurne: MIPS: JZ4740: qi_lb60: Update defconfig (jz-3.6) http://qi-hw.com/p/qi-kernel/6395c3416:41
paul_boddieI can sort of understand the motivation for it, though.16:41
larscbut sysfs files are stateless while a fd is stateful16:42
larscor does it lookup the socket the moment the sysfs file is written?16:43
paul_boddiehttp://lxr.free-electrons.com/source/drivers/staging/usbip/vhci_sysfs.c?v=3.5#L16916:44
paul_boddieOn being written. The socket is opened in user space and the sysfs file/attribute is used to tell the kernel/module to take over.16:45
larscok, i guess that could work, but still. and you kept the same behaviour and just skipped the socket part16:45
paul_boddieYes, I use fget but don't do any "conversion" to a socket. I suspect that there's something in the socket handling that allows this module to use kernel-allocated memory because there's no set_fs stuff in that module at all.16:48
paul_boddieI'm open to better suggestions about how this could be done, but I understand how it probably came about.16:48
larscI don't think you need set_fs if you are already in kernel space16:48
larsc-EFAULT would suggest that you don't have premission to read the memory area you want to write to the console16:49
paul_boddieThere's precious little (coherent) documentation about this, at least on the Internet.16:49
larsccan you paste your diff somewhere?16:50
paul_boddieYes, in fact before getting EFAULT, I found that I was actually causing an "oops" or backtrace, but I think that was because I was using __user pointers directly with kernel addresses.16:50
paul_boddieI'll try and paste a diff later on. Currently, I'm not where my diff actually is. :-)16:50
larsc__user is just a hint for the compiler16:51
paul_boddieI'm either missing something super-obvious or there's a more serious issue.16:52
paul_boddieWhat I found was that the vfs functions all seem to need __user pointers at some level, but in this case all work is being done in the kernel and there's no user space client.16:57
paul_boddieMaybe we should port the HURD to the NanoNote. :-)16:58
DocScrutinizer05whitequark: (jolla) they don't get the catch to hire me - what can I say ;-P17:03
DocScrutinizer05prolly they'll buy some cheap chinese phone and rebrand it ;-)17:03
paul_boddieDon't reveal Nokia's eventual business model to us! ;-)17:05
Action: paul_boddie is back with his patches later on.17:55
paul_boddielarsc: Finally uploaded the diff: http://en.qi-hardware.com/wiki/File:Usbip-socket-to-file.diff.txt21:26
larscpaul_boddie: looks pretty much ok to me21:44
paul_boddieThere must be something really stupidly obvious I'm doing wrong, but I don't see it!21:45
paul_boddieMaybe I should open a normal file and pass a descriptor for that. I did try opening the device file in the kernel itself, but that didn't change anything.21:46
paul_boddieJust tried with a normal file, and that didn't fault, so maybe something is happening in the driver behind the serial device.22:25
paul_boddieActually, I think a normal file doesn't seem to exercise the writing code, but it does attempt a read, gets zero bytes, and then the driver pronounces it a "disconnect".23:08
Action: paul_boddie will look at this later.23:12
pabs3whitequark: in reply to your question about Jolla. they do not seem interesting in any way23:41
--- Wed Oct 10 201200:00

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