| qi-bot | [commit] Xiangfu: debian: regular update (master) http://qi-hw.com/p/fped/9ab9ae6 | 03:09 |
|---|---|---|
| qi-bot | [commit] Xiangfu: move debian/* to https://github.com/xiangfu/deb-pkg/ (master) http://qi-hw.com/p/fped/d59b472 | 03:09 |
| kyak | mth: i see.. the same results i have. We'll see if 3.6 makes any difference for JZ4740 | 05:01 |
| LunaVorax | Does anyone knows here where I can buy a Neo Freerunner with a GTA04 board? | 05:53 |
| roh | LunaVorax: i think only here: http://www.handheld-linux.com/wiki.php?page=GTA04 | 05:56 |
| mth | viric, larsc: this line was not integrated into mainline: "select SYS_SUPPORTS_ZBOOT_UART16550" | 10:40 |
| mth | is that no longer needed or should I keep a commit containing that one line? | 10:40 |
| mth | http://www.treewalker.org/temp/vmlinuz-leftover.patch | 10:41 |
| viric | ah no idea | 10:41 |
| larsc | good question, any idea why it didn't make it? | 10:49 |
| mth | no idea, I just noticed that when cherry-picking all 3.5 commits into 3.6 this one didn't end up empty | 10:50 |
| larsc | the line is in the commit though, just at a different position | 10:54 |
| mth | ah, git failed to detect that then | 10:54 |
| larsc | I guess Ralf reordered it | 10:54 |
| mth | anyway, thanks for looking at it | 10:56 |
| mth | larsc, kyak, xiangfu: I pushed the jz-3.6 branch to qi-kernel | 11:54 |
| mth | as always, tested on A320, builds for Nanonote but not tested there | 11:54 |
| mth | the board-qi_lb60.c might need an update for the pwm beeper | 11:55 |
| mth | see ad8f4827 for the update on board-a320.c for an example | 11:56 |
| mth | the pwm device is already added for the NN, but the new-style mapping is not | 11:56 |
| viric | the board has a pwm beeper? | 12:34 |
| mth | "static struct platform_device qi_lb60_pwm_beeper" says it does :) | 12:51 |
| viric | nice :) | 12:53 |
| whitequark | DocScrutinizer05: what do you think about Jolla? | 13:19 |
| larsc | mth: thanks | 13:26 |
| larsc | viric: yes. try to enter beep on the console | 13:26 |
| viric | but is that separate from the speaker? | 13:30 |
| viric | (I don't have the NN at hand) | 13:30 |
| xiangfu | mth, thanks. I will test it on nanonote. | 13:32 |
| larsc | viric: yes | 13:35 |
| larsc | there is a piezo | 13:36 |
| viric | ahh | 13:40 |
| viric | interesting :) | 13:41 |
| pabs3 | whitequark: yawn | 14:27 |
| whitequark | pabs3: huh? | 15:00 |
| paul_boddie | Does anyone want to answer a stupid Linux kernel programming question? | 15:06 |
| kyak | mth: thanks! | 15:14 |
| paul_boddie | OK, 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_boddie | So, 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 |
| larsc | paul_boddie: yes ;) | 15:31 |
| kyak | mth: jz-3.6 boots with Nanonote :) | 15:33 |
| mth | does the beeper still work? | 15:34 |
| paul_boddie | It'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 |
| kyak | the beeper doesn't work, but i didn't modify the board.c | 15:36 |
| larsc | kyak: it should work without modifing it | 15:37 |
| kyak | something must be wrong with config options.. proc is not mounted | 15:37 |
| larsc | kyak: your init is probably not /etc/preinit | 15:37 |
| paul_boddie | And 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 |
| viric | I never understood the openwrt game on the 'init' path | 15:38 |
| larsc | paul_boddie: what exactly are you trying to do? | 15:38 |
| kyak | larsc: should i patch the kernel to use /etc/preinit or modify the cmdline in uboot? | 15:38 |
| larsc | kyak: both is possible | 15:38 |
| larsc | and should work | 15:39 |
| larsc | if you have serial access to uboot it should be faster | 15:39 |
| viric | why are the openwrt people not using the usual init paths? | 15:39 |
| larsc | good question | 15:39 |
| viric | I find it annoying :) | 15:39 |
| paul_boddie | Doesn't the stock NanoNote bootloader specify /etc/preinit? | 15:42 |
| kyak | larsc: fixed the problem with init, still it doesn't beep | 15:42 |
| kyak | paul_boddie: interestingly, not. I guess it relies on the kernel patch | 15:43 |
| paul_boddie | kyak: 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 |
| kyak | larsc: after fixing init stuff, i don't need CONFIG_DEVTMPFS :) | 15:51 |
| larsc | kyak: what's the output of /sys/bus/platform/{devices,drivers}? | 15:52 |
| larsc | Is CONFIG_PWM_BEEPER enabled in your config? | 15:54 |
| kyak | http://dpaste.org/w4o0y/ | 15:54 |
| kyak | grep CONFIG_PWM_BEEPER .config returns nothing | 15:54 |
| larsc | there is the problem | 15:54 |
| kyak | btw, ash doesn't like curly brackets :) | 15:54 |
| larsc | I figured you'd be smart enough to decode what I meant ;) | 15:55 |
| kyak | now i'm smarter than ash, good --) | 15:56 |
| kyak | ok.. so where is CONFIG_PWM_BEEPER gone? | 15:56 |
| larsc | try to edit drivers/input/misc/Kconfig and replace HAVE_PWM with PWM | 15:56 |
| larsc | mth: did you put the PWM patches in jz-3.6? | 15:59 |
| kyak | now i have CONFIG_INPUT_PWM_BEEPER=y. Is this what we are lookign for? | 15:59 |
| larsc | yes | 15:59 |
| viric | input? | 16:00 |
| larsc | yes | 16:00 |
| kyak | yep, it beeps now | 16:01 |
| larsc | input is really a misnomer these days. it's more about hid, so it supports both hid input and output | 16:01 |
| larsc | but well you don't simply rename a subsystem | 16:02 |
| larsc | kyak: good | 16:02 |
| mth | larsc: yes, I added the commits that didn't make it into 3.6 | 16:04 |
| larsc | ok | 16:06 |
| larsc | the one modifying drivers/input/misc/Kconfig is missing ;) | 16:06 |
| larsc | https://patchwork.kernel.org/patch/1544851/ | 16:07 |
| paul_boddie | larsc: I'm trying to get the usbip driver to talk over a serial device instead of a socket. | 16:18 |
| larsc | so you want to do usb over serial? | 16:19 |
| paul_boddie | Well, if it works over TCP/IP, why not over something behaving like a serial line? | 16:24 |
| mth | larsc: we don't have "IS_ENABLED(CONFIG_PWM)" in include/linux/pwm.h, so perhaps another patch is missing too? | 16:24 |
| paul_boddie | I 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 |
| larsc | paul_boddie: I'd expect it to work to. where do you get the fd from, do you pass it in from userspace? | 16:29 |
| larsc | mth: 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/7220711 | 16:37 |
| qi-bot | [commit] Thierry Reding: pwm: Get rid of HAVE_PWM (jz-3.6) http://qi-hw.com/p/qi-kernel/90bf225 | 16:37 |
| paul_boddie | So, 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_boddie | http://lxr.free-electrons.com/source/drivers/staging/usbip/usbip_common.c?v=3.5#L399 | 16:38 |
| larsc | that's kind of crazy | 16:40 |
| qi-bot | [commit] Maarten ter Huurne: MIPS: JZ4740: qi_lb60: Update defconfig (jz-3.6) http://qi-hw.com/p/qi-kernel/6395c34 | 16:41 |
| paul_boddie | I can sort of understand the motivation for it, though. | 16:41 |
| larsc | but sysfs files are stateless while a fd is stateful | 16:42 |
| larsc | or does it lookup the socket the moment the sysfs file is written? | 16:43 |
| paul_boddie | http://lxr.free-electrons.com/source/drivers/staging/usbip/vhci_sysfs.c?v=3.5#L169 | 16:44 |
| paul_boddie | On 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 |
| larsc | ok, i guess that could work, but still. and you kept the same behaviour and just skipped the socket part | 16:45 |
| paul_boddie | Yes, 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_boddie | I'm open to better suggestions about how this could be done, but I understand how it probably came about. | 16:48 |
| larsc | I don't think you need set_fs if you are already in kernel space | 16:48 |
| larsc | -EFAULT would suggest that you don't have premission to read the memory area you want to write to the console | 16:49 |
| paul_boddie | There's precious little (coherent) documentation about this, at least on the Internet. | 16:49 |
| larsc | can you paste your diff somewhere? | 16:50 |
| paul_boddie | Yes, 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_boddie | I'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 compiler | 16:51 |
| paul_boddie | I'm either missing something super-obvious or there's a more serious issue. | 16:52 |
| paul_boddie | What 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_boddie | Maybe we should port the HURD to the NanoNote. :-) | 16:58 |
| DocScrutinizer05 | whitequark: (jolla) they don't get the catch to hire me - what can I say ;-P | 17:03 |
| DocScrutinizer05 | prolly they'll buy some cheap chinese phone and rebrand it ;-) | 17:03 |
| paul_boddie | Don't reveal Nokia's eventual business model to us! ;-) | 17:05 |
| Action: paul_boddie is back with his patches later on. | 17:55 | |
| paul_boddie | larsc: Finally uploaded the diff: http://en.qi-hardware.com/wiki/File:Usbip-socket-to-file.diff.txt | 21:26 |
| larsc | paul_boddie: looks pretty much ok to me | 21:44 |
| paul_boddie | There must be something really stupidly obvious I'm doing wrong, but I don't see it! | 21:45 |
| paul_boddie | Maybe 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_boddie | Just 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_boddie | Actually, 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 | |
| pabs3 | whitequark: in reply to your question about Jolla. they do not seem interesting in any way | 23:41 |
| --- Wed Oct 10 2012 | 00:00 | |
Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!