Topic for #qi-hardware is now Copyleft hardware - http://qi-hardware.com | hardware hackers join here to discuss Ben NanoNote, atben / atusb 802.15.4 wireless, and other community driven hw projects | public logging at http://en.qi-hardware.com/irclogs
cladamw has joined #qi-hardware
Ayla has quit [Quit: leaving]
xiangfu has joined #qi-hardware
Openfree` has quit [Ping timeout: 265 seconds]
emeb has quit [Quit: Leaving.]
Openfree` has joined #qi-hardware
wej has quit [Ping timeout: 272 seconds]
<kristianpaul> DocScrutinizer05: did you finally get usb host support for N900?
wej has joined #qi-hardware
<DocScrutinizer05> kristianpaul: ???
<DocScrutinizer05> h-e-n hostmode? since ages
<kristianpaul> eww :)
<DocScrutinizer05> hm?
* DocScrutinizer05 thinks there's something got lost in translation
<kristianpaul> he, sorry just found a cheap n900 on local ebay
<qi-bot> [commit] Adam Wang: he-2row-dip.fpd: based on Werner Almesberger's he10.fpd (master) http://qi-hw.com/p/kicad-libs/e33374c
rejon has joined #qi-hardware
cladamw has quit [Ping timeout: 265 seconds]
compcube has quit [Quit: Leaving]
cladamw has joined #qi-hardware
compcube has joined #qi-hardware
compcube has quit [Changing host]
compcube has joined #qi-hardware
<pabs3> DocScrutinizer05: how many N900 do you need??
rejon has quit [Ping timeout: 245 seconds]
Openfree` has quit [Read error: Connection reset by peer]
Openfree` has joined #qi-hardware
<qi-bot> [commit] Adam Wang: mic-ra-dip.fpd: added package of MIC-RA-DIP-${Dia}x${Height} (master) http://qi-hw.com/p/kicad-libs/3a6c441
rejon has joined #qi-hardware
xwalk_ has joined #qi-hardware
Openfree` has quit [Ping timeout: 265 seconds]
Openfree` has joined #qi-hardware
rejon has quit [Ping timeout: 244 seconds]
cladamw has quit [Quit: Ex-Chat]
wej has quit [Ping timeout: 248 seconds]
rejon has joined #qi-hardware
antgreen has quit [Ping timeout: 244 seconds]
wej has joined #qi-hardware
Openfree` has quit [Ping timeout: 246 seconds]
rejon has quit [Ping timeout: 244 seconds]
rejon has joined #qi-hardware
Openfree` has joined #qi-hardware
rejon has quit [Ping timeout: 246 seconds]
cladamw has joined #qi-hardware
rejon has joined #qi-hardware
rejon has quit [Ping timeout: 246 seconds]
compcube has quit [Ping timeout: 244 seconds]
Aylax has joined #qi-hardware
jluis|work has joined #qi-hardware
jekhor has joined #qi-hardware
rejon has joined #qi-hardware
Ayla has joined #qi-hardware
phirsch has quit [Ping timeout: 265 seconds]
phirsch has joined #qi-hardware
Aylax has quit [Ping timeout: 265 seconds]
Ayla has quit [Ping timeout: 265 seconds]
Ayla has joined #qi-hardware
Ayla has quit [Ping timeout: 252 seconds]
Ayla has joined #qi-hardware
jurting has joined #qi-hardware
rejon has quit [Ping timeout: 246 seconds]
Ayla has quit [Ping timeout: 252 seconds]
Ayla has joined #qi-hardware
Ayla has quit [Ping timeout: 246 seconds]
Ayla has joined #qi-hardware
Ayla has quit [Ping timeout: 246 seconds]
<DocScrutinizer05> pabs3: one, but dunno for how long
Ayla has joined #qi-hardware
rejon has joined #qi-hardware
<qi-bot> [commit] Adam Wang: tactile-sw-spst-ra-dip.fpd: added package of TACTIL-SW-${TYPE}-RA-${A}-${B} (master) http://qi-hw.com/p/kicad-libs/c456f08
kristoffer has joined #qi-hardware
<jurting> http://venturebeat.com/2012/06/14/ethiopia-skype-illegal/ "necessary to protect against security threats" ...
<DocScrutinizer05> yeah, and France forbids pgp-encrypted emails afaik
<DocScrutinizer05> age old saying: "if guns are outlawed, only outlows will have guns"
<DocScrutinizer05> outlaws*
<Ayla> never heard about that
<DocScrutinizer05> applies to security/encryption technology even better than to guns
<Ayla> PGP-encrypted mails are legal here
<Ayla> where did you read that?
<DocScrutinizer05> Ayla: been a long time ago, maybe they planned it and then decided otherwise?
<Ayla> I doubt it, seriously
<DocScrutinizer05> must've been around the same time they started to mandate for 40% french songs in radio
<DocScrutinizer05> honestly loong ago, maybe 10 years or sth. Maybe I lack to recall correctly
<DocScrutinizer05> anyway regarding skype, since USA forced a backdoor into it, it's actually embarrassing to outlaw it - it shows you got no clue about how to handle security stuff on a level like the "grownups" (=USA= ;-P
<DocScrutinizer05> or the exact opposite ;-P
<Ayla> yeah. I can totally understand why they don't trust Skype
<DocScrutinizer05> "since US authorities may crack skype, it's not allowed to use it in Ethiopia"
<DocScrutinizer05> anyway I feel sad about Nokia and all the new casualities
<DocScrutinizer05> all hopes on Samsung now, for a true open phone
rejon has quit [Ping timeout: 265 seconds]
<xiangfu> wpwrak, the atusb works fine.
<xiangfu> but everytime it receive message through 'izchat'. there is one kernel message come up:
<xiangfu> net wpan0: ACK requested, however AACK not supported.
<xiangfu> do we need fix this?
<xiangfu> another thing is . if I send message too fast. like press a then press enter. again and again. there is be :
<xiangfu> usb 1-1: atusb_timer
<xiangfu> shows up
jekhor has quit [Ping timeout: 240 seconds]
jurting has quit [Ping timeout: 245 seconds]
jivs_ has joined #qi-hardware
<qi-bot> [commit] Adam Wang: spacer.fpd: added packages of SPACER-$nominal-$disc-$keepout$type (master) http://qi-hw.com/p/kicad-libs/0f80888
lekernel has joined #qi-hardware
antoniodariuh_ has joined #qi-hardware
wej has quit [Ping timeout: 272 seconds]
<wpwrak> xiangfu: (work) congratulations !
<wpwrak> the ACK requests are not our problem :) the stack doesn't implement then, yet some applications ask for them. and then you get that complaint
<wpwrak> atusb_timer means that a response from the transceiver was lost (the driver then times out and recovers). that's a little odd.
GNUtoo-desktop has joined #qi-hardware
<cladamw> wpwrak, if i want to generate *.mod, all i need is to add necessary fpd filename into MODULES of http://projects.qi-hardware.com/index.php/p/kicad-libs/source/tree/master/modules/Makefile ?
<xiangfu> wpwrak, the izchat works just fine.
<xiangfu> wpwrak,(atben --- atusb) the dirtpan not very stable. compare to my other setup : (atben --- atben)
<xiangfu> wpwrak, a lot of ping lost or DUP.
<xiangfu> the atben --- atusb once 10 cm distance.
xwalk_ has quit [Ping timeout: 240 seconds]
cladamw has quit [Quit: Ex-Chat]
wej has joined #qi-hardware
<wpwrak> yes, atusb has the 1 ms USB delay issue. this causes some trouble with TCP/IP. atben doesn't have such delays.
kristoffer_ has joined #qi-hardware
kristoffer has quit [Ping timeout: 252 seconds]
<xiangfu> wpwrak, ok. got it.
<wpwrak> the atusb problem is that "still unresolved driver issue" i've been mentioning :) basically needs a complete redesign of the way how atusb and kernel communicate
jluis|work has quit [Remote host closed the connection]
wej has quit [Ping timeout: 248 seconds]
wej has joined #qi-hardware
cladamw has joined #qi-hardware
jekhor has joined #qi-hardware
DocScrutinizer05 has quit [Ping timeout: 245 seconds]
DocScrutinizer has quit [Ping timeout: 272 seconds]
<xiangfu> wpwrak, the atusb quiet un-stable compare to atBen.
<xiangfu> I can only run 'ping'. but never success on 'ssh'.
<xiangfu> but izchat works just fine. without any problem.
DocScrutinizer05 has joined #qi-hardware
DocScrutinizer has joined #qi-hardware
<xiangfu> wpwrak, maybe I try to fix that. but the 'redesign' sound hard to me. :-)
<xiangfu> every time the ar71xx OpenWrt boot. it give a kernel oops : http://pastebin.com/12SYPgEC
jekhor has quit [Ping timeout: 244 seconds]
wej has quit [Ping timeout: 272 seconds]
cladamw has quit [Quit: Ex-Chat]
compcube has joined #qi-hardware
compcube has quit [Changing host]
compcube has joined #qi-hardware
wej has joined #qi-hardware
GNUtoo-desktop has quit [Quit: [INFO] fsogsmd : received signal -11, exiting.]
jekhor has joined #qi-hardware
rejon has joined #qi-hardware
<qi-bot> [commit] Xiangfu: nanonote: compile-openwrt-xburst.sh: only send message when success build (master) http://qi-hw.com/p/openwrt-packages/4ae1eb1
<qi-bot> [commit] Xiangfu: new package: urjtag: initial port (master) http://qi-hw.com/p/openwrt-packages/2cc7f1b
<qi-bot> [commit] Xiangfu: new package: bitcoin: initial port, not finish yet (master) http://qi-hw.com/p/openwrt-packages/7858183
xiangfu has quit [Quit: Leaving]
emeb has joined #qi-hardware
compcube has quit [Ping timeout: 244 seconds]
hozer has quit [Ping timeout: 245 seconds]
antgreen has joined #qi-hardware
hozer has joined #qi-hardware
jivs_ has quit [Quit: Leaving]
<kristianpaul> interesting shippenf for HK (Air parcel) took 4 days just to get dispached, and others 5 to arrive, not bad
<kristianpaul> shipment* from*
<wpwrak> by steamboat ?
<kristianpaul> no no
<kristianpaul> air mail
antoniodariuh_ has quit [Remote host closed the connection]
jekhor has quit [Ping timeout: 244 seconds]
GNUtoo-desktop has joined #qi-hardware
antgreen has quit [Remote host closed the connection]
wolfspraul has quit [Ping timeout: 244 seconds]
wolfspraul has joined #qi-hardware
rejon has quit [Read error: Connection reset by peer]
<whitequark> btw, when I look at this: http://www.adafruit.com/products/885
<whitequark> and read that android fully supports these peripherals from 1.5 on almost all devices
<whitequark> I think that google is awesomely open
<whitequark> not exactly true, but still quite friendly to makers
<GNUtoo-desktop> yes, also note that you can run your own apps, and that is compatible with gplv3, contrarly to iphone
<whitequark> yeah, with iphone you can't even use a single charger for all models of the phone
<whitequark> one of biggest and widest tech WTFs
<whitequark> also, arguably the worst use of resistors, ever
<viric> Do you know if there is UserModeLinux for mips?
<viric> I imagine usermodelinux is platform dependant :)
<whitequark> ew
<whitequark> even if there is (I'll look in a sec), it won't run on nn
<whitequark> too small ram
<viric> I've a fuloong
<viric> btrfs people have misaligned access troubles...
<viric> and I thought maybe I could simply run it with UML
rejon has joined #qi-hardware
<whitequark> hmm
<whitequark> fuloong?
<whitequark> sounds weird
<whitequark> besides which, uml won't fix your unaligned access
<whitequark> (unless kernel can emulate unaligned access for usermode processes, which I doubt)
<whitequark> ah ok, seems that it does
<whitequark> but I'd expect it to come with a huge perf penalty
<larsc> it does
<larsc> but the kernel should actually also fix misasligned access in the kernel
<whitequark> larsc: and make you spend a lot of time figuring out why the hell doesn't it work any fast?
<whitequark> exceptions shouldn't be used for control flow
<whitequark> especially when there is no explicit control flow at all
<larsc> whitequark: there is a file in proc which tells you how many unaligend access exceptions you have
<whitequark> larsc: but does it give you a backtrace?
<lindi-> whitequark: you can make it log the IP
<lindi-> and use systemtap to get backtrace
<larsc> whitequark: you can disable the emulation in proc
<whitequark> ah, nice then
<whitequark> no uml for mips
<viric> well, you can tweak if you want the kernel to handle the unaligned accesses, or sigbus
<viric> But the kernel can't handle unaligned accesses *in the kernel*, right?
<viric> whitequark: same for arm I imagine
<larsc> viric: why not?
<viric> larsc: I imagined the kernel will have that only for user mode code
<larsc> unless there is a analigned access in the unaligend access exception handler it will work fine ;)
<viric> :)
<larsc> afaik
<viric> what's the /proc place for that? I Can't find it
<whitequark> well, or if there's something with interrupt priorities
<viric> I remember it, but I fail now
<whitequark> I don't remember mips ISA & exception semantics good enough for that
<larsc> i remember performance issues with openwrt systems where for example ip packets were misaligned, so it should work
<viric> ah
<lindi-> viric: find /proc |grep alignment
<viric> lindi-: that's what I run :)
<viric> nothing
<viric> maybe I miss some kernel feature
<viric> maybe it moved to /sys
<viric> ?
<viric> on ARM I have /sys/module/kernel/parameters/alignment
<viric> ah /proc/cpu/alignment
<viric> (on ARM too, not on mips)
<viric> CONFIG_ALIGNMENT_TRAP=y
<viric> at least on arm. Is it there on mips?
<viric> I fail to find it
<larsc> I think it is always built-in
<viric> arch/mips/kernel/unaligned.c ... but why do I have programs failing with SIGBUS?
<larsc> there should be files in debugfs where you can change the behaviour
<larsc> unaligned_instructions
<viric> aren't those counters?
<larsc> and unaligned_action
<larsc> an action can be
<larsc> UNALIGNED_ACTION_QUIET,
<larsc> UNALIGNED_ACTION_SIGNAL,
<larsc> UNALIGNED_ACTION_SHOW,
<viric> ah, action=0 now...
<larsc> which should be ACTION_QUIET
<viric> but I get sigbus
<viric> :)
<viric> maybe on some instruction not handled by the exception; let's see
<viric> Program received signal SIGBUS, Bus error.
<viric> 0x7741334c in WebCore::TimerBase::stop() ()
<viric> 0x77413348 <+16>: lw t9,16496(v0)
<viric> => 0x7741334c <+20>: b 0x77413010 <_ZN7WebCore9TimerBase15setNextFireTimeEd>
<larsc> that's not a unaligned access i guess
<viric> what can it be?
rejon_ has joined #qi-hardware
<viric> t9: 0x77413010
<viric> v0: 0x77f97490
<viric> 16496+v0 is not aligned... do I understand?
<larsc> if the 16496 is decimal it should be
<viric> hm but I breakpoint there, and it's all fine, until at some point... sigbus there.
rejon has quit [Ping timeout: 265 seconds]
<viric> I don't know what else can cause sigbus.
jekhor has joined #qi-hardware
<larsc> i suppose you did not hot-unplug your ram ;)
<viric> ehem
<viric> no :)
<viric> I think in the fuloong world, everyone considers the sigbus an alignment problem
<viric> that's the kernel with _SHOW
<viric> there are lots of unaligned access before this that gets sigbus though
<viric> but $epc is exactly that.
<viric> I've to find out status and cause now...
<viric> [354412.300000] Status: 240044f3 KX SX UX USER EXL IE
<viric> [354412.300000] Cause : 90008014
<larsc> if it get's to the show part it shouldn't cause a sigbus
<larsc> gets
<viric> The status register says: a) Exception taken in a Branch delay slot. b) Breakpoint exception.
<viric> let's see without gcb
<viric> gdb
<viric> I meant "the cause register", above.
<viric> I tried without gdb, and the cause register is equal. branch delay slot, and breakpoint exception.
<viric> "in a branch delay slot, the EPC register contains the address of the preceding branch instruction"
<viric> I wish I knew what a 'delay slot' is
<larsc> the instruction after the branch
<larsc> so i guess we want to see 0x77413350
<viric> Aha...
<viric> 0x77413350 <+24>: sdc1 $f13,16(a0)
<viric> a0: 0x730378dc
<viric> that's bad alignment, isn't it?
<larsc> case sdc1_op:
<larsc> * I herewith declare: this does not happen. So send SIGBUS.
<larsc> /*
<larsc> goto sigbus;
<larsc> */
<viric> Pfa :D
<viric> Time to write a patch I guess.
<viric> nice hehe
<viric> but it takes knowing mips assembly to write a handler for that..
<larsc> should userspace ever do a sdc?
<viric> it's webkit
<larsc> or is that access to the floatingpoint coprocessor?
<viric> maybe it's invalid code simply?
<viric> it has fpu, yes
<viric> it's listed in the fpu instructions...
<larsc> The effective address must be naturally aligned. If any of the three least-significant bits
<larsc> of the effective address are non-zero, an Address Error exception occurs.
<larsc> MIPS IV: The low-order 3 bits of the offset field must be zero. If they are not, the result
<larsc> of the instruction is undefined.
<viric> clear
<viric> who to blame? gcc?
xwalk has quit [Ping timeout: 246 seconds]
<larsc> if in doubt webkit ;)
<viric> I'll check if there is any fpu instruction there
<viric> But it would be nice if the kernel could handle those
<viric> larsc: what's that manual you checked?
<larsc> mips-iv.pdf
<viric> m_repeatInterval is a double...
<viric> f13 = 0
<larsc> so a gcc bug?
<viric> so it looks like running the m_repeatInterval = 0;, but that member being at an unaligned position. Weird!
alexander_ has joined #qi-hardware
alexander_ has quit [Remote host closed the connection]
<larsc> can you do a print ((TimerBase *)(NULL))->m_repeatInterval?
<larsc> aehm
<larsc> can you do a print &((TimerBase *)(NULL))->m_repeatInterval?
alexander has joined #qi-hardware
<larsc> in gdb
<larsc> should probably be 16
<alexander> Is it possible to have a SD card hub? So one can have 2 SD cards connected to the nano note.
<viric> I don't have debug symbols
xwalk has joined #qi-hardware
<alexander> \help
<viric> (supper)
<larsc> i suppose for some reason the whole object is not 8bit aligned
<viric> 8byte
<larsc> yes :)
<viric> ok let's try to build it with debug symbols then
<larsc> i would assume that m_repeatInterval is properly aligend inside the object
<larsc> but the object is not
<viric> ah could be
<viric> hm well, 'a0' was not aligned, but the offset was 16.
<larsc> exactly
<viric> interesting
<larsc> do you have a backtrace of the sigbus?
<viric> yes
xwalk has quit [Quit: Leaving]
<viric> well, I reproduce it in 10 seconds
<viric> umh
<viric> Webkit has its own allocator
<larsc> and there is no timer->stop() in ~RenderTextControlSingleLine
<viric> It's in the destructor of TimerBase
<viric> I look at JavaScriptCore/wtf/FastMalloc.cpp
<viric> static const size_t kAlignShift = 3;
<viric> static const size_t kAlignment = 1 << kAlignShift;
kristoffer_ has quit [Remote host closed the connection]
<larsc> I'm wondering a bit. The constructor for TimerBase already accesses m_nextFireTIme
<viric> hm
<viric> mistery
<viric> maybe they move objects. They have their own allocator :)
<larsc> you just found a zero day exploit for webkit ;)
<viric> It is even not the latest webkit...
<viric> and I can't find the 'fastmalloc' thing in the latest. :)
phirsch has quit [Ping timeout: 240 seconds]
<viric> well, thank you for the help
<viric> I'll try midori (that uses a newer webkit)
<viric> I'll disassemble the timerbase constructor though
antgreen has joined #qi-hardware
phirsch has joined #qi-hardware
<viric> larsc: the constructor does:
<viric> 90ed18: fc800008 sd zero,8(a0)
<viric> 90ed1c: fc800010 sd zero,16(a0)
<viric> And that's handler by the kernel trap
<larsc> ah, so it doesn't use floating point instructions
<viric> it uses floating point instructions
<viric> but does not access the coprocessor registers
<viric> sd vs sdc
<viric> So it's a bit of saying... mips64 coprocessors are not really that much supported, given the lack of kernel traps :)
<larsc> 'sd' is just normal memory access, isn't it?
<viric> ah doubleword, yes
<viric> I thought 'double' :)
<viric> what's that 1:, 2: ... in front of assembly lines?
<larsc> labels
<larsc> you'll see for example 'b 1b' which means jump to the first label called '1' before this instruction
<larsc> there is also b 1f which jumps to the next label called '1'
<viric> ahh
<viric> thank you
<viric> I can't understand the trap though.
<viric> I wanted to understand one of the implemented traps :)
<viric> .section .fixup,"ax" ...
<viric> magic.
<larsc> i don't get it either
<larsc> or maybe i do
<viric> really?
<viric> what's STR(PTR) there?
<viric> ah, it fills the exception table entry
<larsc> yes
<larsc> PTR is either .dword or .word depending whether it is a 32bit or 64bit kernel
<viric> ahh
<viric> all traps have the same code after the first '.section'
<viric> (in load/store)
<larsc> as far as i understand it, it is used to handle an exception in the fixup code
<viric> ah
<larsc> if there is an exception at address 1b or 2b it will jump to 4b instead
<viric> then it will make it res = -EFAULT
<viric> clear
antgreen has quit [Remote host closed the connection]
<larsc> i suppose to emulate a sdc1 you could do a sdc1 to the value variable
<larsc> and then store value at the unaligned address with two stores
xwalk has joined #qi-hardware
<viric> larsc: do you want to see my ldwc1 trap? :)
<viric> hm the last line is wrong I think
<viric> should not be '.rt'
<viric> I bet for regs->regs[insn.f_format.rd] = value;
<larsc> it shouldn't be modifying regs at all
<viric> it's ldc1
<viric> ldwc1 I mean
<larsc> ah right
<larsc> no
<larsc> wait
<viric> maybe I need an exception handler for mtc
<viric> I added one
<larsc> according to the spec it should be rt
<viric> ouch, typo
<viric> I looked at the mtc1 instruction coding :)
<larsc> but we are writing to a floating point register
<viric> ah yes
<viric> then I did it fine
<viric> it's rd...
<viric> rt is the source
<viric> rd (ft in the manual) the destination
<viric> hm no. all wrong. I don't understand regs->regs :)
<larsc> regs are just the normal registers
<viric> where are the floating point then?
<larsc> struct thread_struct
<larsc> there is a function called get_fpu_regs
<viric> and the thread_struct... where can I get it from? a static variable?
<larsc> get_fpu_regs(current) should give you the fpu registers for the process receiving the signal
<viric> ok
<larsc> anyway time to get some sleep
<larsc> good luck
<viric> :)
<viric> thank you a lot
<viric> fpuregs = get_fpu_regs(current);
<viric> fpuregs[insn.f_format.rd] = value;
emeb has quit [Quit: Leaving.]
emeb has joined #qi-hardware
<whitequark> btw
<whitequark> for building webkit, esp. the debug version, you'll probably need lots of stuff
<whitequark> a recent multicore cpu, at least 8g of RAM, 64-bit OS
<whitequark> and several hours of CPU time
<viric> :)
<whitequark> more precise
<whitequark> several hours of linking time alone
rodgort has joined #qi-hardware
<viric> due to the debug info?
<whitequark> nope
<whitequark> I've seen only the release version to build for this time
<viric> umh my new kernel does not boot. perfect
<whitequark> I've no idea how webkit devs debug it
<whitequark> it has several millions of symbols
<whitequark> you can get reasonable times on a machine with 64g of RAM and full tree on the ramdisk
<whitequark> still it's exceptionally slow
<viric> hm the release version built fine.
<whitequark> oh, and if you turn on lto, it'll link it several hours, then determine that something in webkit prevents it from doing LTO the way it wants to do it
<whitequark> and the linker will START OVER.
<viric> well, turning lto should be hardcore, yes
<viric> let's see the traps!
<viric> ouch. illegal instruction. hell
<viric> ah it's right
<viric> (my first kernel patch :)
<lindi-> whitequark: debian builds webkit on real arm hardware, no cross-compiling
<lindi-> whitequark: for libv8 this actually caught some real bugs too
jekhor has quit [Ping timeout: 265 seconds]
methril has quit [Quit: Leaving]
<viric> I'm also biulding on real mips hw
<viric> took a while, but... what to do.
<alexander> card
<alexander> doh
alexander has quit [Quit: Ex-Chat]