LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   [ LeMaker BananaPi ] USB ports seem to be DOA (https://www.linuxquestions.org/questions/slackware-arm-108/%5B-lemaker-bananapi-%5D-usb-ports-seem-to-be-doa-4175561846/)

ricky_cardo 12-19-2015 12:08 PM

[ LeMaker BananaPi ] USB ports seem to be DOA
 
Hardware Banana Pi - installed with Slackwarearm per Stuart Winter's excellent install doc.

Started with Slackwarearm -current version (Sun Oct 11 07:06:05 UTC 2015)
USB working correctly, had a couple usb powered hubs externals connected.

Well I decided to upgrade to Fri Nov 27 00:27:27 UTC 2015
Black Friday release!

Initially I forgot to un-blacklist aaa_elflibs from /etc/slackpkg.conf

so after reboot got a few complaints like GPG not working and a couple other complaints from some sbo packages.
updated aaa_elflibs, recompiled the SBO packages and things seemed back to normal, although I noticed my UBSs are not working?

That is they seem to not notice devices connected or removed?

(watching from dmesg I see nothing)
-rebooted, re-installed libusb and libusb-compat
-still no activity in dmesg when devices connected or removed?


Code:

rich@banana ~ $ lsusb
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Here is the last 50 on a fresh reboot

Code:

rich@banana ~ $ sudo dmesg | tail -n 50
[  10.694611] ehci-platform 1c14000.usb: irq 29, io mem 0x01c14000
[  10.706996] ehci-platform 1c14000.usb: USB 2.0 started, EHCI 1.00
[  10.723988] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[  10.730910] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[  10.738280] usb usb2: Product: EHCI Host Controller
[  10.743245] usb usb2: Manufacturer: Linux 4.2.6-armv7 ehci_hcd
[  10.749190] usb usb2: SerialNumber: 1c14000.usb
[  10.763099] hub 2-0:1.0: USB hub found
[  10.770183] hub 2-0:1.0: 1 port detected
[  10.780374] axp20x 0-0034: AXP20x variant AXP209 found
[  10.790461] axp20x 0-0034: AXP20X driver loaded
[  10.804478] ohci-platform 1c1c400.usb: Generic Platform OHCI controller
[  10.813229] ohci-platform 1c1c400.usb: new USB bus registered, assigned bus number 3
[  10.825961] ohci-platform 1c1c400.usb: irq 33, io mem 0x01c1c400
[  10.891128] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
[  10.897988] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[  10.905240] usb usb3: Product: Generic Platform OHCI controller
[  10.911174] usb usb3: Manufacturer: Linux 4.2.6-armv7 ohci_hcd
[  10.917014] usb usb3: SerialNumber: 1c1c400.usb
[  10.923013] hub 3-0:1.0: USB hub found
[  10.928164] hub 3-0:1.0: 1 port detected
[  10.934254] ehci-platform 1c1c000.usb: EHCI Host Controller
[  10.939966] ehci-platform 1c1c000.usb: new USB bus registered, assigned bus number 4
[  10.954213] ehci-platform 1c1c000.usb: irq 32, io mem 0x01c1c000
[  10.966936] ehci-platform 1c1c000.usb: USB 2.0 started, EHCI 1.00
[  10.976323] usb usb4: New USB device found, idVendor=1d6b, idProduct=0002
[  10.983210] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[  10.990464] usb usb4: Product: EHCI Host Controller
[  10.995357] usb usb4: Manufacturer: Linux 4.2.6-armv7 ehci_hcd
[  11.001201] usb usb4: SerialNumber: 1c1c000.usb
[  11.006783] hub 4-0:1.0: USB hub found
[  11.010672] hub 4-0:1.0: 1 port detected
[  11.941584] i2c /dev entries driver
[  12.380999] Adding 2097148k swap on /dev/sda1.  Priority:-1 extents:1 across:2097148k FS
[  12.507746] fuse init (API version 7.23)
[  13.910261] EXT4-fs (sda2): re-mounted. Opts: (null)
[  23.702699]  RX IPC Checksum Offload disabled
[  23.702728]  No MAC Management Counters available
[  26.848275] NET: Registered protocol family 10
[  26.856732] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  28.692517] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[  28.692579] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready


Wonder if it is hardware (Bpi) board related or kernel related?

Any one have any suggestions to debug usb?

I tried a known working USB mouse, jump-drive and couple other devices, but see no changes in dmesg.

Not opposed to complete reload, but thought this is a good time to improve t/s procedure.

Suggestions thoughts welcome.

drmozes 12-20-2015 02:05 AM

Quote:

Originally Posted by ricky_cardo (Post 5466409)
Hardware Banana Pi - installed with Slackwarearm per Stuart Winter's excellent install doc.

Thanks!

It's also broken here but I hadn't used it with USB connected peripherals for a while so unfortunately hadn't noticed it.
I can't see what the problem is immediately so if you figure out what it is, please report back.

ricky_cardo 12-21-2015 08:04 AM

That makes me feel better, about it not being physical issue, I'll do the best I can and let you know if I find anything.

drmozes 12-21-2015 01:01 PM

Quote:

Originally Posted by ricky_cardo (Post 5467118)
That makes me feel better, about it not being physical issue, I'll do the best I can and let you know if I find anything.

http://www.spinics.net/lists/arm-kernel/msg470215.html

That explains it then. I'm glad it's not just Slackware as the thought of digging around with eudev right now wasn't an enjoyable thought ;-)
I'll keep an eye on what comes up and include any patches that are made.

justwantin 01-08-2016 10:12 PM

Just a note to any interested. With Black Friday release I have not experienced this problem on a BananaPro

ricky_cardo 01-09-2016 11:25 AM

Thanks for the update Justwantin

--- I have the original bananapi (non-pro version) and the USB is still non-functional.

I fell like I have more questions than answers but this does not bother me in the least :)

To start off I thought I ordered the (pro) but got normal version, [PCB says BP-A20 and it has the smaller row of 10 pins under the gpio]
https://drive.google.com/file/d/0B-i...ew?usp=sharing

When I originally loaded I had to use BananaPiPro.sdcard_latest.img.xz - NOTE the [PRO] version used.
When I tried to use the non-pro I got CRC check fail. (tried a couple more times, and fresh downloads but no dice)

Additionally - In step 4.0 of install doc ftp://ftp.arm.slackware.com/slackwar...L_BANANAPI.TXT
I had to pick
Code:

tftp ${fdt_addr} slackwarearm-current/dtb/sun7i-a20-bananapro.dtb
When I picked non-pro it would hang on loading Kernel.

These issues are no big deal just really ODD, so it works with pro when it is not the pro model? (confusing) (anybody else see this?)


Now back to thread issue USBs out to lunch after blackfriday update, might but be a non pro-issue.
-I see in this thread http://www.spinics.net/lists/arm-kernel/msg470215.html the def-config may be off in kernel upgrade.

So I tried this: (directions from notes not live) ((note: -rah is local appended name))
(((change to dir where kernel source is unpacked)))
Code:

       
        bash$ cp /boot/config-armv7-4.3.3 ./
        bash$ make clean
        bash$ make oldconfig  (make menuconfig here added X-POWERS APX20X PMIC=m and local append name "-armv7-rah")
        bash$ make zImage
        bash$ make dtbs
        bash$ make modules
        bash$ make modules_install
        bash$ cat arch/arm/boot/zImage > /boot/zImage-armv7-4.3.3-rah
        bash$ cp System.map /boot/System.map-armv7-4.3.3-rah
        bash$ cp .config /boot/config-armv7-4.3.3-rah
        bash$ /usr/share/mkinitrd/mkinitrd_command_generator.sh -r

Then something like this:
Code:

cp -r arch/arm/boot/dts /boot/dtb-4.3.3-rah
mkinitrd -c -k 4.3.3-armv7-rah -f ext4 -r /dev/sda2 -m mmc_core.ko.gz:sunxi-mmc.ko.gz:scsi_mod.ko.gz:libata.ko.gz:libahci.ko.gz:libahci_platform.ko.gz:ahci_sunxi.ko.gz:mbcache.ko.gz:jbd2.ko.gz:ext4.ko.gz -u -o /boot/initrd-arm7-4.3.3-rah


rm /usr/src/linux
ln -s /usr/src/linux-4.3.3 /usr/src/linux


cd /boot
rm  dtb System.map-armv7 initrd-armv7 zImage-armv7
ln -s System.map-armv7-4.3.3-rah System.map
ln -s initrd-arm7-4.3.3-rah initrd-armv7
ln -s zImage-armv7-4.3.3-rah zImage-armv7
ln -s dtb-4.3.3-rah dtb


That's all I need to do correct? (believe the uImage and uinitrd not needed for banana..)


I saw notes in bug report to modify this file:
vim /home/rich/4.4.xxx_stuff/linux-4.4.xxx/arch/arm/configs/sunxi_defconfig
But I think that's just if I don't do make menuconfig and hit the option myself

I'll attempt and see if USB is better after this. If I blow the kernel config I'll just pull the sata drive off mount it on my other system and change the symbolic links back to original.

(will report back when kernel compiles up eta 8hs)

ricky_cardo 01-09-2016 04:56 PM

In kernel 4.3.3 I think it's this one:



CONFIG_REGULATOR_AXP20X is not set
Needs to be
3719c3719
< CONFIG_REGULATOR_AXP20X=m


(in make menuconfig: Device Drivers -> Voltage and Current Regulator Support -> X-POWERS APX20X PMIC Regulators)



Let me test and I'll report back

justwantin 01-09-2016 07:15 PM

Thanks for the info. I was planning on installing the most recent current today but it seems that after booting the 4.3.3-armv7 kernel that my USB stick is not recognised. I did my Black Friday install from a tree on the same stick after mounting it. Happily I have not done anything to the 2.5' drive yet so I'll hold on the new install for now.

I don't know if mi problem es tu problem but I need to compile a new kernel with GPIO_SYSFS [=y] on Black Friday after I get distcc set up so I'll be interested to see how you fare.

A while back I got an install up with the bananapi.dtb on my pro so maybe its possible the other way as well but you may lose some functionality. Dunno much about this arm stuff yet. :<{
Quote:

When I picked non-pro it would hang on loading Kernel.
I've hung more than I've booted, finally did a workaround to install using a boot.scr in a boot directory on the 2.5' hdd instead of manually entering everything

justwantin 01-09-2016 09:36 PM

Quote:

--- I have the original bananapi (non-pro version) and the USB is still non-functional.
Note that you have a BPI-M1 made by Sinovoip, not a BananaPi made by Lemaker. Not guite the same but obviously close enough to work with the dtbs intended for the Lemaker gear.

ricky_cardo 01-09-2016 11:36 PM

That's really good info no wonder...
make modules is still cooking... I'll update the thread in the am. (midnight on the east coast US)

Peep this

https://www.kickstarter.com/projects...d-super-comput


Tapped out from St Nick's visit but looks pretty good. I just like the sata port from the banana.

ricky_cardo 01-10-2016 09:25 AM

ssh banana
ssh: connect to host banana port 22: No route to host

Surprise Surprise, must have dropped the ball somewhere.

Better hook up to the console and see whats up.
--Amending above to exact commands
Code:

[    1.490882] Freeing unused kernel memory: 864K (c0902000 - c09da000)
[    1.603855] random: udevd urandom read with 0 bits of entropy available
[    1.761658] udevd[80]: starting eudev-3.1.5
/boot/initrd-armv7-4.3.3-rah:  Loading kernel modules from initrd image:
mount: mounting /dev/sda2 on /mnt failed: No such device
ERROR:  No /sbin/init found on rootdev (or not mounted).  Trouble ahead.
        You can try to fix it. Type 'exit' when things are done.

/bin/sh: can't access tty; job control turned off

must be issue with initrd

ricky_cardo 01-10-2016 10:16 AM

looks like my initrd is considerably smaller than the stock one from current
-rw-r--r-- 1 root root 8955354 Dec 27 06:53 initrd-armv7-4.3.3
-rw-r--r-- 1 root root 5012495 Jan 10 08:42 initrd-armv7-4.3.3-rah

changed link back to the original initrd, thinking it will work since it's the same kernel version just one usb difference.

reverted all symbolic links back, it boots up again.

I think I'm not doing the initrd correctly.

mkinitrd -c -k 4.3.3-armv7-rah -f ext4 -r /dev/sda2 -m mmc_core:sunxi-mmc.ko.gz:scsi_mod:libata:libahci:libahci_platform.ko.gz:ahci_sunxi:mbcache.ko.gz:jbd2:ext4.ko.gz -u -o /boot/initrd-armv7-4.3.3-rah

ricky_cardo 01-10-2016 11:33 AM

Reading the vim slackwarearm-current/source/k/kernel.SlackBuild

ARMv7 and greater systems (section-- line 401) going to try a better mkinitrd

ricky_cardo 01-10-2016 06:56 PM

Ok, UNCLE, compiling the kernel again, my attempt to pull just initrd is failing...
Thought I had the goods from here:
slackwarearm-current/source/k/configs/armv7-initrd-bananpi

But no matter I just modified the config-armv7 found here:
root@banana /home/rich/public_html/Slackware/slackwarearm/slackwarearm-current/source/k/configs

and ran this "arm/build armv7"
from here: /home/rich/public_html/Slackware/slackwarearm/slackwarearm-current/source/k

You need to grab ftp://ftp.arm.slackware.com/slackwar...1.05-arm-1.txz

(and have a local copy of the tree) or maybe just k

Can be adapted from these directions: http://mindplusplus.wordpress.com/20...-raspberry-pi/

drmozes 01-11-2016 05:35 AM

Quote:

Originally Posted by ricky_cardo (Post 5475731)
In kernel 4.3.3 I think it's this one:



CONFIG_REGULATOR_AXP20X is not set
Needs to be
3719c3719
< CONFIG_REGULATOR_AXP20X=m


(in make menuconfig: Device Drivers -> Voltage and Current Regulator Support -> X-POWERS APX20X PMIC Regulators)



Let me test and I'll report back

I found the answer for this for Linux 4.4 on the weekend but CONFIG_REGULATOR_AXP20X doesn't make any difference here.
I need another config option introduced in Linux 4.4 which apparently makes USB work. I will be upgrading to Linux 4.4 in -current once it's mainstream.


All times are GMT -5. The time now is 12:55 PM.