IRC log of #cubox of Sun 02 Feb 2014. All times are in CET < Back to index

09:50 jnettlet_ I think we should start trying to organize information about what cards have had problems so we can start attacking some of these problems in a more organized manner.
09:51 jnettlet_ unfortunately with having multiple SPL images there is margin for user error as well.
10:13 MikeSeth I will start a known issues section in the wiki, and that's where it will all go
10:18 hste MikeSeth: have u tried dd the image from the working sdcard to the one with problems and see if it boots then?
10:44 MikeSeth hste: no, but I will try to figure out what's up in the evening
10:45 MikeSeth I currently don't have a native linux box and the card is written via virtualbox usb driver so it's all a bit.. fishy
11:17 sickness morning all :)
11:26 MikeSeth 'lo
12:53 MikeSeth hste: tried a bunch of tests, nothing helps, uboot can't read the card
12:54 MikeSeth this isn't a big issue, but I am curious why it does this
13:38 _Adik_ MikeSeth: did you try jnettlet_'s build of u-boot that seems to fix this?
13:39 MikeSeth _Adik_: no, I use rabeeh's one, but isn't jnettlet_'s fix for voltage issues in UHS cards?
13:40 _Adik_ maybe, but in my case it works much better with this u-boot build
13:40 MikeSeth do you have the git repo URL?
13:41 _Adik_ no, but if jnettlet_ have not yet removed these builds they should still be available from his dropbox
13:41 _Adik_ want a link for it?
13:42 MikeSeth If you don't mind
13:42 jnettlet_ They are still there
13:42 MikeSet 13:42 * MikeSeth pets jnettlet_
13:42 MikeSeth you really love u-boot don't you ;)
13:42 _Adik_ jnettlet_: I was wondering if you have time to sleep sometimes ;)
13:42 jnettlet_ _Adik_, yeah like last night after one too many beers at the dinner party I went out to
13:43 jnettlet_ :-)
13:43 _Adik_ lol ;)
13:44 jnettlet_ MikeSeth, the u-boot fixes that I had _Adik_ try are actually for an errata that some of the iMX6 chips have, where the PFD's don't reset and lock on Power On Reset
13:44 jnettlet_ There was a fix in u-boot already but I found that the existing fix didn't always fix the problems, and in some cases could actually trigger it.
13:44 MikeSeth so clocks get skewed?
13:45 _Adik_ MikeSeth: https://dl.dropboxusercontent.com/u/736509/i4pro/u-boot/SPL https://dl.dropboxusercontent.com/u/736509/i4pro/u-boot/u-boot.img
13:45 jnettlet_ they don't get set properly at all, because the PFD's need to be locked for clock changes to take effect.
13:47 _rmk_ jnettlet: I have wifi botched to work with ojn's stuff... botched in the sense that I work around the oscillator power issue by just declaring an always-on regulator for it
13:47 _Adik_ jnettlet_: what I have seen so far is that even if the new u-boot build works better, when it boots kernel and the kernel freezes, then there is still a chance that if I unplug the power and power it again u-boot can lock and cannot boot then
13:47 jnettlet_ the FSL errata fix is to just ungate and the re-gate each pfd. I found that if the SOC was in this state and one pfd was locked and the other wasn't that doing this just flip-flopped one being lock and the other not. I am just selectively doing the clock gate cycle based on the lock status debug registers
13:48 jnettlet_ _Adik_, I think that is also partially because of the soc
13:48 _rmk_ jnettlet: argh, that's annoying... but sounds very similar to the hdmi workaround
13:48 _rmk_ jnettlet: sometimes doing the workaround fixes it, and sometimes it causes it
13:52 _rmk_ jnettlet: on the wifi, the brcmfmac driver looks like it falls apart - it spews errors and can't keep a list of nearby APs... I've sent broadcom a kernel log and request for help
13:53 _rmk_ that's why it didn't apparantly see the networks in range when I first tested it - it /can/ see the RF signals, it's just that it falls over very quickly.
13:54 _rmk_ _dab_: which patches of mine were you after?
13:54 jnettlet_ _rmk_, really?
13:55 jnettlet_ I think there is another driver that they use for Android.
13:55 _rmk_ yep, it will occasionally get a boot-time glimse of the other networks around here, and then its game over: you can never get another AP list out of the driver because it just times out
13:55 _rmk_ the initialisation of the card is littered with errors as well.
13:56 _rmk_ errors returned by the firmware on the card
13:56 jnettlet_ sounds very similar to the mess with went through at OLPC with Marvell's libertas wifi cards and driver
13:57 _rmk_ I've gone through and confirmed the firmware blob is what Rabeeh has in his repo, which is what ubuntu has in their linux-firmware package, and cross-checked that with another source too
13:57 jnettlet_ we just got that straightened out before Marvell retired the card and then it all started again with the 8787
13:57 jnettlet_ well at least they are distributing a consistent firmware
13:57 jnettlet_ instead of one vendor gets one and another gets another
13:57 _rmk_ yep
13:58 _rmk_ it looks like this:
13:58 _rmk_ brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Sep 2 2011 14:48:19 version 4.220.48
13:58 _rmk_ brcmfmac: brcmf_fil_cmd_data: Failed err=-23
13:58 _rmk_ brcmfmac: brcmf_fil_cmd_data: Failed err=-23
13:58 jnettlet_ so bcmdhd is the driver that broadcom released
13:58 _rmk_ brcmfmac: brcmf_fws_init: failed to set bdcv2 tlv signaling
13:58 _rmk_ brcmfmac: brcmf_fil_cmd_data: Failed err=-23
13:58 _rmk_
13:58 _rmk_ brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
13:58 _rmk_
13:58 _rmk_ brcmfmac: _brcmf_set_multicast_list: Setting BRCMF_C_SET_PROMISC failed, -23
13:58 _rmk_ and eventually:
13:58 _rmk_ brcmfmac: brcmf_escan_timeout: timer expired
13:59 _dab_ _rmk_: I will happily test any patches you consider worthwhile. Something that gets HDMI going would be good. I like the idea of latest stable + patchset = operable cubox
13:59 _rmk_ and at that point, the list of APs will be permanently empty :(
13:59 _rmk_ _dab_: how about 3.13.1 source plus my 3.13 patches at http://www.home.arm.linux.org.uk/~rmk/cubox/ ?
14:00 _rmk_ I'm assuming you're talking about cubox-i not cubox?
14:00 _dab_ Thank you. and yes cubox-i
14:00 _dab_ I have an i4pro
14:00 _rmk_ Note that I work on both, so being clear about which you mean is important :)
14:02 _rmk_ jnettlet: I've been through the driver trying to work out what the -23 means, and it's an error code returned by the firmware on the wifi itself
14:02 jnettlet_ _rmk_, wifi is connected through sdhc3?
14:02 _rmk_ sdhc1
14:03 _rmk_ it's not a sdio communication error
14:03 _rmk_ it sends a command packet to the wifi firmware, and the wifi firmware responds with a properly formatted response packet which has an 'error' bit set and an error code of -23
14:04 MikeSeth _rmk_: fyi brcmfmac is horrible in 3.0 series
14:04 MikeSeth all br* drivers are
14:04 jnettlet_ sounds like a lot of fun to be had there.
14:04 _rmk_ MikeSeth: agreed, it took me a long while to unwind what the driver was doing
14:04 jnettlet 14:04 * jnettlet_ has to head out for another hour to finish Sunday errands.
14:05 _rmk_ you look in one file. it calls a function, that function is not in that .c file but somewhere else
14:05 jnettlet_ luckily until I get my replacement CBi4pro this won't be much of a distraction for me
14:05 _rmk_ it's very rare for a function to call another function in the same file!
14:06 _rmk_ and the built-in debugging that they have in the driver is woefully inadequate
14:06 MikeSeth I am still subscribed to linux-wireless because of all the interesting things I had to deal with in brcmsmac/mrcmfmac
14:06 _dab_ I just spent the day battling with brcmsmac on a Dell laptop. The wifi driver craps itself when CPU utilzation is high. The downloadable BC drivers from http://www.broadcom.com/docs/linux_sta are less featured but seem to be more stable
14:06 _dab_ an option for the cubox?
14:06 MikeSeth _dab_: which kernel version?
14:07 MikeSeth _dab_: no, no arm port for wl.ko
14:07 _dab_ 3.11
14:07 _dab_ bummer
14:08 MikeSeth brcmsmac worked for me on 3.11 pre-releases, on that bt and wifi combo board Lenovo likes to use in cheap laptops
14:09 _dab_ It works for me until CPU hits ~100% for 15 minutes. Then it always dies with - brcmsmac bcma0:0: wl0: brcms_c_watchdog: dead chip
14:09 _rmk_ I also did a load of digging around on brcm wifi/bt combos. it seems that it's only possible to talk to the BT via the UART and not via SDIO, despite the SDIO declaring that there is an interface function for BT.
14:10 _rmk_ that's quite annoying because it causes btsdio to get loaded - that needs blacklisting to prevent that behaviour
14:13 _rmk_ mikeseth: was there much help forthcoming from broadcom on that stuff?
14:14 MikeSeth _rmk_: broadcom itself? None, but a couple of broadcom devs are active on the linux-wireless mailing list
14:14 _dab_ gotta be better than mvwifi
14:14 _rmk_ I was thinking of [email protected]
14:14 _rmk_ 'cause that's where I sent my report yesterday...
14:16 MikeSeth _rmk_: brcmXmac developers are in [email protected]
14:16 MikeSeth oh wait
14:17 MikeSeth they got themselves a separate list indeed
14:17 MikeSeth _rmk_: Arend is a nice fellow
14:18 _rmk_ yea, there's four people, that list and the linux-wireless list in MAINTAINERS for the brcmXmac stuff
14:19 _rmk_ we'll see next week what happens :)
14:19 _dab_ The linuxmint forum has lots of "not working BCM" wifi posts
14:20 MikeSeth I'm seeing SDIO patches from two weeks ago for brcmfmac, dunno if that'd help you _rmk_
14:23 _rmk_ http://comments.gmane.org/gmane.linux.kernel.wireless.general/118014 ?
14:23 _dab_ _rmk_: Dumbo question - where is your 3.13.1 source?
14:24 _rmk_ I don't have 3.13.1, but... if you grab the 3.13.1 kernel source from kernel.org, and then apply my 3.13 patches, they should apply on top of 3.13.1.
14:25 _dab_ ok
14:25 _rmk_ from my site, you want:
14:25 _rmk_ hummingboard-cubox-i-v3.13-20140120.diff
14:25 _rmk_ hummingboard-cubox-i-v3.13-20140120-errata.diff
14:26 _dab_ ok
14:27 _dab_ Which BCM firmware (if any) are you guys using?
14:28 _rmk_ _dab_: it's the one in the linux-firmware package: you may need to rename the firmware file though
14:29 _rmk_ but... wifi isn't supported in the above patches, that's something I've been tinkering with only recently
14:31 _dab_ ok
14:35 _dab_ _rmk_: I will report back after sleep, (12:30am here)
14:38 MikeSeth _rmk_: http://www.spinics.net/lists/linux-wireless/msg117942.html but looking at the patches I doubt it's useful
14:38 MikeSeth gmane won't let me find those for some reason
14:41 _rmk_ I'm not a fan of gmane anyway :)
14:42 _dab_ b4 I go, I think rabeehs cubox-i uboot is now pretty good. Works for what I have tried (nfs boot, dhcp and sd boots)
14:42 _rmk_ brcmfmac: enable firmware console logging functionality
14:42 _rmk_ that might be useful
14:43 MikeSeth hmmmm
14:43 MikeSeth apparently I can get myself a BusPirate
14:43 MikeSeth that could be useful
14:44 _rmk 14:44 * _rmk_ imagines Johnny Depp on a London bus.
14:59 dv_ _rmk_: what is your opinion on armv8? good step forward?
18:20 MikeSeth jnettlet_: your uboot images have no effect, still can't read this particular card
18:25 crypt0s_ do I need a boot.scr to boot the Cubox-i
18:25 crypt0s_ and if I do, how do I get one?
18:26 crypt0s_ And does anyone have a vanilla uENV.txt they could pastebin me?
18:32 MikeSeth crypt0s_: not for the new uboot you don't
18:33 MikeSeth bootfile=/boot/uImage
18:33 MikeSeth mmcargs=setenv bootargs root=/dev/mmcblk0p1 rootwait video=mxcfb0:dev=hdmi consoleblank=0
18:33 MikeSeth ^^ uEnv.txt
18:33 crypt0s_ MikeSeth: thank you :)
18:33 crypt0s_ i am guessing i still need the uEnv.txt
18:39 crypt0s_ MikeSeth: hrm, i'm still getting invalid partition errors
18:40 crypt0s_ i have a ext4 FS on /dev/sdb2
18:40 crypt0s_ so i set the root partition as mmcblk0p2
18:40 crypt0s_ MikeSeth: any ideas?
18:40 MikeSeth crypt0s_: you get invalid partition from u-boot?
18:40 crypt0s_ yea
18:40 crypt0s_ MikeSeth: Correct
18:41 MikeSeth and your partition table is valid and can be seen by fdisk -l on the host machine?
18:41 MikeSeth do this in uboot console: mmc read 0 1 1, do you get an error?
18:41 crypt0s_ MikeSeth: one sec while i get a keyboard.
18:41 crypt0s_ MikeSeth: yes i see it in fdisk
18:43 MikeSeth crypt0s_: run the command I gave you in uboot console, if you get an error then it's a broken card, I have one that does the same
18:43 crypt0s_ MikeSeth: do i put the serial connection line in uEnv.txt to enable the serial mode?
18:43 MikeSeth tell me the type of the card
18:43 MikeSeth crypt0s_: for the kernel, yes
18:44 crypt0s_ Sandisk 16g
18:44 crypt0s_ card reads good AFIAK
18:44 MikeSeth if you see uboot messages then you don't need a serial, the uboot console can be summoned by pressing any key on the keyboard
18:44 MikeSeth so in the first 3 seconds of boot
18:45 MikeSeth which class is your card?
18:45 crypt0s_ MikeSeth: having issue finding a keyboard that isn't on a laptop :P
18:45 MikeSeth no USB one around?
18:46 MikeSeth in any case try another card, I have the exact same issue with a Transcend Micro while 3 other Sandisk cards work
18:46 MikeSeth the card reads and writes fine on the host machine, but uboot can't read from it even though it can load itself from it
18:48 crypt0s_ MikeSeth: i did the mmcread
18:48 crypt0s_ MikeSeth: outputs blocks read: ERROR
18:48 crypt0s_ MikeSeth: remember though i have the data partition for the OS on the second logical part
18:51 crypt0s_ MikeSeth: and when i rescan and do mmc list i do get something
18:52 MikeSeth if it says error and invalid partition table then it is unable to access the card at all
18:53 MikeSeth I have spent almost a day trying to figure out a way around this, no dice, the card is doing something that U-boot can't handle, use another card
18:54 crypt0s_ MikeSeth: damn...are SanDisk SDHC cards just not supported?
18:56 MikeSeth Mine works just fine
18:56 MikeSeth what class is your card?
18:59 MikeSeth crypt0s_: if you followed the instructions from the wiki do note I've just updated them
18:59 MikeSeth http://imx.solid-run.com/wiki/index.php?title=Building_the_kernel_and_u-boot_for_the_CuBox-i_and_the_HummingBoard#Flashing_U-boot_and_the_kernel
19:00 MikeSeth the old procedure was incomplete and intended for older uboot
19:00 crypt0s_ MikeSeth: class 10 i think.
19:00 crypt0s_ MikeSeth: OK I'll take a look that is what I was using though i did screw up.
19:05 MikeSeth crypt0s_: please try another card and report if it solves your problem; I maintain a list of incompatible cards
19:06 crypt0s_ MikeSeth: OK.
19:07 crypt0s_ MikeSeth: stupid question though so i can follow the wiki exactly: how do i create an offset partition with fdisk
19:15 MikeSeth it asks you where to begin the partition
19:15 MikeSeth the default value on my system is 2048 which is sufficient
19:17 MikeSeth also if fdisk feels irky to you, use cfdisk
19:17 crypt0s_ that's usually what I use
19:17 crypt0s_ question though: the jessi disk image i deployed to test the SD card worked
19:18 crypt0s_ MikeSeth: also: that Jessi image only had one partition with 1MB of free space at the beginning.
19:18 MikeSeth that is correct
19:19 MikeSeth the jessi image has an older bootloader which might very well work for this card
19:19 MikeSeth in which case this is a regression
19:19 crypt0s_ Ah.
19:19 MikeSeth I am quote sure I tried the jessi bootloader and it didnt work
19:19 MikeSeth are you 100% certain?
19:20 MikeSeth quite*
19:20 crypt0s_ Yea i was using it yesterday to make sure the device worked before I started making my custom gentoo for it
19:20 MikeSeth oh
19:20 MikeSeth okay lemme verify that real quick
19:20 crypt0s_ kk
19:23 MikeSeth I will be making several Debian images for different card sizes soon
19:23 MikeSeth need to finish my vagrant environment first
19:32 crypt0s_ MikeSeth: I wonder if I want to just write the Jessi image down, then wipe out the data in the EXT4 partition and replace with the stage3 tarball
19:35 MikeSeth you can but then you'd be living off an unsupported bootloader
19:36 MikeSeth and you are right the old uboot works which means this is a regression
19:36 MikeSeth jnettlet_: ^
19:36 MikeSeth rabeeh: ^
19:36 crypt0s_ woo i found a bug
19:36 crypt0s_ MikeSeth: I can always update the bootloader though, that's just a DD command away
19:37 MikeSeth oh and you'll have to deal with uboot.scr and mkimage etc
19:37 MikeSeth ....at least I think so, that is
19:37 crypt0s_ well i already have a uImage of the kernel
19:38 MikeSeth uboot mkimage
19:38 crypt0s_ yea
19:38 crypt0s_ wait -- what's the difference
19:38 crypt0s_ I made the mkimage from the mxi6 uboot build
19:38 crypt0s_ added it to my toolchain
19:38 crypt0s_ then made the kernel with make uImage
19:44 MikeSeth you dont need the mkimage step for SPL uboot
19:44 MikeSeth the default configuration is provided from uboot source and embedded in second stage bootloader
19:44 MikeSeth uEnv.txt amends it
19:45 MikeSeth it was mentioned in the flashing instructions because of the old pre-SPL uboot procedure
19:46 MikeSeth (again this is what I learned through exploration and I may be wrong)
19:47 MikeSeth hste: would you happen to know from which uboot tree and commit point your jessi uboot was generated?
19:47 MikeSeth hste: I want to try bisecting
19:57 hste MikeSeth: it was from http://imx.solid-run.com/wiki/index.php?title=Building_the_kernel_and_u-boot_for_the_CuBox-i_and_the_HummingBoard&oldid=96
19:59 MikeSeth thanks, so it's the same tree
19:59 hste MikeSeth: patches up tp dec 15
19:59 MikeSeth hste: ok, that will probably isolate it
19:59 MikeSeth thanks
20:02 crypt0s_ hrm ok i think the kernel uImage that I built with the new uboot tools build is not compatible with old bootloader
20:02 MikeSeth crypt0s_: that shouldn't be the case
20:02 crypt0s_ so i will try rebuilding the kernel with mkimage from the older version of the uboot tools
20:02 crypt0s_ MikeSeth: ok -- maybe my build is bad then
20:03 crypt0s_ I tried using the Jessi config.gz as a base though
20:03 crypt0s_ so not sure what (if anything) i would have done wrong -- uboot starts loading the kernel and then resets
20:03 crypt0s_ "data abort"
20:04 MikeSeth uhhh
20:04 MikeSeth no idea here sorry
20:04 MikeSeth during uboot or during kernel?
20:05 crypt0s_ MikeSeth: during uboot loading kernel image
20:06 crypt0s_ I'm just trying to get a path to get gentoo on the thing, having quite the learning experience
20:09 MikeSeth well, you'd save yourself a lot of trouble by using another card
20:11 crypt0s_ MikeSeth: I have a 32g class 4 samsung SDHC
20:11 crypt0s_ are those known-good?
20:11 MikeSeth I have no report on those
20:28 hste MikeSeth: I have the old u-boot files here: http://stende.no-ip.info/imx6/solidrun-hb/uboot/
20:29 MikeSeth hste: it's ok, I already found the culprit commits, now studying them
20:43 MikeSeth commit a577b broke it