LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 10-11-2016, 06:52 AM   #16
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,477

Original Poster
Blog Entries: 2

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Question


strange thing:
while in u-boot bot shell i can access and operate the USB devices:
Code:
=> usb reset
=> usb part
=> usb list
all work and evaluate the devices.
Moreover the USB keyboard (called keykoard??) also works - excep the leds don't show CAPS/num no any light?

but after I booted the kernel, any usb device is obscured from me?
Code:
# lsusb -v
yields nothing?

however i have this strange sequence in my dmesg:
Code:
[    0.066981] Serial: AMBA PL011 UART driver
[    0.082155] reg-fixed-voltage usb0-vbus: could not find pctldev for node /soc
@01c00000/pinctrl@01c20800/usb0_vbus_pin@0, deferring probe
[    0.082210] reg-fixed-voltage usb1-vbus: could not find pctldev for node /soc
@01c00000/pinctrl@01c20800/usb1_vbus_pin@0, deferring probe
[    0.082243] reg-fixed-voltage usb2-vbus: could not find pctldev for node /soc
@01c00000/pinctrl@01c20800/usb2_vbus_pin@0, deferring probe
[    0.083081] reg-fixed-voltage gmac-3v3: could not find pctldev for node /soc@
01c00000/pinctrl@01c20800/gmac_power_pin@0, deferring probe
[    0.084177] vgaarb: loaded
what is pctldev and what those errors mean?
 
Old 10-11-2016, 08:32 AM   #17
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,549

Rep: Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313
Quote:
Originally Posted by SCerovec View Post
what is pctldev and what those errors mean?
Which Kernel are you using?
Are you using the correct Device tree blob for Banana Pi Pro?
Are you using the correct u-boot for Banana Pi Pro?
 
Old 10-11-2016, 09:24 AM   #18
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,477

Original Poster
Blog Entries: 2

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Question

Quote:
Originally Posted by drmozes View Post
Which Kernel are you using?
Are you using the correct Device tree blob for Banana Pi Pro?
Are you using the correct u-boot for Banana Pi Pro?
I'm using the one I synced from slackware-arm-current as per the HOWTO?
Code:
$ uname -a
Linux banarm 4.7.5-armv7 #2 SMP Mon Sep 26 22:52:36 BST 2016 armv7l Allwinner sun7i (A20) Family GNU/Linux
the other two questions:
No, I use the Banana Pi M1, so i use the bananapi blobs ?

And my best guess is they have some issues here?
is there an easy way i can check which blob is used?
Quote:
## Error: "sun7i-a20-bananapi.dtb" not defined
for
Code:
printenv ${fdtfile}
on the boot loader shell prompt

Last edited by SCerovec; 10-11-2016 at 09:53 AM. Reason: more info
 
Old 10-11-2016, 11:00 AM   #19
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,549

Rep: Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313
Quote:
Originally Posted by SCerovec View Post
I'm using the one I synced from slackware-arm-current as per the HOWTO?
Code:
$ uname -a
Linux banarm 4.7.5-armv7 #2 SMP Mon Sep 26 22:52:36 BST 2016 armv7l Allwinner sun7i (A20) Family GNU/Linux
the other two questions:
No, I use the Banana Pi M1, so i use the bananapi blobs ?

And my best guess is they have some issues here?
is there an easy way i can check which blob is used?

for
Code:
printenv ${fdtfile}
on the boot loader shell prompt
For some reason I thought that you had a Banana Pi Pro. If you've followed the How to exactly then it should be fine.
You can tell which blob is in use by looking at the config as you have done.

I have 3 Banana Pi's here all installed using the Howto and they all work fine.

I don't know what your issue is I'm afraid!
 
Old 10-11-2016, 11:42 AM   #20
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,477

Original Poster
Blog Entries: 2

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Lightbulb

Quote:
Originally Posted by SCerovec View Post
strange thing:
while in u-boot bot shell i can access and operate the USB devices:
Code:
=> usb reset
=> usb part
=> usb list
all work and evaluate the devices.
Moreover the USB keyboard (called keykoard??) also works - excep the leds don't show CAPS/num no any light?

but after I booted the kernel, any usb device is obscured from me?
Code:
# lsusb -v
yields nothing?

however i have this strange sequence in my dmesg:
Code:
[    0.066981] Serial: AMBA PL011 UART driver
[    0.082155] reg-fixed-voltage usb0-vbus: could not find pctldev for node /soc
@01c00000/pinctrl@01c20800/usb0_vbus_pin@0, deferring probe
[    0.082210] reg-fixed-voltage usb1-vbus: could not find pctldev for node /soc
@01c00000/pinctrl@01c20800/usb1_vbus_pin@0, deferring probe
[    0.082243] reg-fixed-voltage usb2-vbus: could not find pctldev for node /soc
@01c00000/pinctrl@01c20800/usb2_vbus_pin@0, deferring probe
[    0.083081] reg-fixed-voltage gmac-3v3: could not find pctldev for node /soc@
01c00000/pinctrl@01c20800/gmac_power_pin@0, deferring probe
[    0.084177] vgaarb: loaded
what is pctldev and what those errors mean?
Quote:
Originally Posted by drmozes View Post
For some reason I thought that you had a Banana Pi Pro. If you've followed the How to exactly then it should be fine.
You can tell which blob is in use by looking at the config as you have done.

I have 3 Banana Pi's here all installed using the Howto and they all work fine.

I don't know what your issue is I'm afraid!
up there in red

could You please run
Code:
lsusb -v
for me?
apparently the device tree is the culprit?
I did measure all test points and they are all within few percent (1.5 test point yields 1.48V, 5v0 yields 5.23V, USB input is 4.8V)
the plugged device has ~3V on one data lead, all other are 0V.
As the USB devices all resolve on u-boot i assume the dtb/* holds the key?
 
Old 10-11-2016, 01:10 PM   #21
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,549

Rep: Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313
Quote:
Originally Posted by SCerovec View Post
up there in red

could You please run
Code:
lsusb -v
Code:
root@platano:~# lsusb -v 2>&1 | less
can't get debug descriptor: Resource temporarily unavailable
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0001 1.1 root hub
  bcdDevice            4.04
  iManufacturer           3 Linux 4.4.19-armv7 ohci_hcd
  iProduct                2 Generic Platform OHCI controller
  iSerial                 1 1c1c400.usb
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0002  1x 2 bytes
        bInterval             255
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             1
  wHubCharacteristic 0x0012
    No power switching (usb 1.0)
    No overcurrent protection
  bPwrOn2PwrGood        2 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0100 power
Device Status:     0x0001
  Self Powered

Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            4.04
  iManufacturer           3 Linux 4.4.19-armv7 ehci_hcd
  iProduct                2 EHCI Host Controller
  iSerial                 1 1c1c000.usb
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             1
  wHubCharacteristic 0x000a
    No power switching (usb 1.0)
    Per-port overcurrent protection
  bPwrOn2PwrGood       10 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0100 power
Device Status:     0x0001
  Self Powered

Bus 001 Dcan't get debug descriptor: Resource temporarily unavailable
evice 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0001 1.1 root hub
  bcdDevice            4.04
  iManufacturer           3 Linux 4.4.19-armv7 ohci_hcd
  iProduct                2 Generic Platform OHCI controller
  iSerial                 1 1c14400.usb
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0002  1x 2 bytes
        bInterval             255
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             1
  wHubCharacteristic 0x0012
    No power switching (usb 1.0)
    No overcurrent protection
  bPwrOn2PwrGood        2 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0100 power
Device Status:     0x0001
  Self Powered

Bus 003 Device 003: ID 10d5:5000 Uni Class Technology Co., Ltd
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x10d5 Uni Class Technology Co., Ltd
  idProduct          0x5000
  bcdDevice            0.00
  iManufacturer           1 No brand
  iProduct                2 Combo Free KVM
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           59
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               98mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
     bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      65
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfcan't get debug descriptor: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
aceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     110
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
Device Status:     0x0000
  (Bus Powered)

Bus 003 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x05e3 Genesys Logic, Inc.
  idProduct          0x0608 Hub
  bcdDevice           77.63
  iManufacturer           0
  iProduct                1 USB2.0 Hub
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             4
  wHubCharacteristic 0x00e4
    Ganged power switching
    Compound device
    Ganged overcurrent protection
    TT think time 32 FS bits
    Port indicators
  bPwrOn2PwrGood       50 * 2 milli seconds
  bHubContrCurrent    100 milli Ampere
  DeviceRemovable    0x02
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0303 lowspeed power enable connect
   Port 2: 0000.0100 power
   Port 3: 0000.0100 power
   Port 4: 0000.0100 power
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            4.04
  iManufacturer           3 Linux 4.4.19-armv7 ehci_hcd
  iProduct                2 EHCI Host Controller
  iSerial                 1 1c14000.usb
  bNumConfigurations      1
  Configuration Descriptocan't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
r:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             1
  wHubCharacteristic 0x000a
    No power switching (usb 1.0)
    Per-port overcurrent protection
  bPwrOn2PwrGood       10 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0503 highspeed power enable connect
Device Status:     0x0001
  Self Powered
 
Old 10-11-2016, 01:13 PM   #22
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,477

Original Poster
Blog Entries: 2

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
kind thanks!
mine just does not show anything
 
Old 10-12-2016, 11:32 AM   #23
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,477

Original Poster
Blog Entries: 2

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
this is for another thread, I focus for now on headless install.
Will report back
 
Old 10-13-2016, 10:12 AM   #24
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,549

Rep: Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313
Quote:
Originally Posted by SCerovec View Post
this is for another thread, I focus for now on headless install.
Will report back
I have just upgraded to Linux 4.8.1 and testing it has found that USB keyboard no longer works in U-Boot (yet it was previously since I was using it as the desktop test machine!)

I have upgraded to the latest build on the SD Card here, which has restored keyboard access in the u-boot console.

http://armed.slackware.com/tmp/Banan...dfsg1-1.img.xz

I've also found now after upgrading to Linux 4.8.1 that I get nothing on USB either. I'm checking the Kernel configs - it might be that some how the machine I'm using got a botched package upgrade and some how continued to work; and that the Kernel currently shipped doesn't work with USB on the Pi -- which explains your problem!

I'm looking into it.

Last edited by drmozes; 10-13-2016 at 10:47 AM.
 
Old 10-13-2016, 10:59 AM   #25
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,549

Rep: Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313
Quote:
Originally Posted by drmozes View Post

I'm looking into it.
I've found that a config merge has managed to remove the power module required to make USB work.
I can only assume that some how I botched the package upgrades on my desktop -current Banana Pi which is why I didn't notice before now. The primary build machine for -current gets reinstalled regularly, but the desktop test one just gets upgraded.

I'm rebuilding Linux 4.8.1 with the new config and will reinstall both, and probably push out the new packages tomorrow once I've tested them.
You'll have working USB in Linux soon!

Last edited by drmozes; 10-13-2016 at 11:11 AM.
 
Old 10-13-2016, 12:47 PM   #26
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,477

Original Poster
Blog Entries: 2

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Arrow files to be tested


thats great news!
I'm been busy also
here the "magic" script that needs be tested thoroughly.

first prerequisites:
serial connection for debug
tftp setup for testing
MMC card/setup
USB drive/setup
SATA drive/setup
microUSB cable for the OTG port

file boot.cmd
Code:
###
#
#  v0.1-alpha (C) GPL cest73@ya.ru 2016 for Slackware ARM and U-BOOT
#
#  Generic (hopefully) Uboot script with templates for many scenarios
#  typical on-disk layout:
#  /boot/ for kernel and initrd
#  /boot/dtb/ for device tree files
#  /boot.scr /boot.scr.uimg out filename and format:
#  generated by
#  ./mkimage -C none -A arm -T script -d boot.cmd boot.scr
#
#  filename: boot.cmd
###

echo 'for SlackwareARM FEL boot v0.1...'
###
#
# defining the host specific parameters
#
###
# for Banana PI:
setenv fdtfile '/boot/dtb/sun7i-a20-bananapi.dtb'
setenv kernelfile '/boot/zImage-armv7'
# for setup
setenv setupfs '/boot/initrd-armv7.img'
# for everyday
setenv initrdfile '/boot/initrd-armv7'

setenv tftpfdtfile 'slackwarearm-current/dtb/sun7i-a20-bananapi.dtb'
setenv tftpkernelfile 'slackwarearm-current/zImage-armv7'
# for setup
setenv tftpsetupfs 'slackwarearm-current/initrd-armv7.img'
# for everyday
setenv tftpinitrdfile 'slackwarearm-current/initrd-armv7'

###
#
# defining the load addresses
#
###
# derived from UBOOT-FEL load address
#setenv fdt_addr_r 0x43000000
#setenv kernel_addr_r 0x42000000
#setenv ramdisk_addr_r 0x43300000

# use this for tftfp setup
setenv fdt_addr_r 0x43000000
setenv kernel_addr_r 0x46000000
setenv ramdisk_addr_r 0x47000000


###
#
# crafting the file source commands
#
###

# by ftfpboot .......... setup in the install on Banana PI HOWTO
# adjust to own TFTP server/host
setenv serverip 192.168.168.102
setenv ipaddr 192.168.168.128

tftp ${fdt_addr} ${tftpfdtfile}
tftp ${kernel_addr_r} $tftpkernelfile
# for setup
tftp ${ramdisk_addr_r} $tftpsetupfs
# for everyday
#tftp ${ramdisk_addr_r} $tftpinitrdfile

# from SCSI/SATA
#scsi reset; scsi scan
#ext4load scsi 0:1 ${fdt_addr_r} ${fdtfile}
#ext4load scsi 0:1 ${kernel_addr_r} ${kernelfile}
# for setup
#ext4load scsi 0:1 ${ramdisk_addr_r} ${setupfs}
# for every day
#ext4load scsi 0:1 ${ramdisk_addr_r} ${initrdfile}

# from MMC (tested so far)
#ext4load mmc 0:1 ${fdt_addr_r} ${fdtfile}
#ext4load mmc 0:1 ${kernel_addr_r} ${kernelfile}
# for setup
#ext4load mmc 0:1 ${ramdisk_addr_r} ${setupfs}
# for every day
#ext4load mmc 0:1 ${ramdisk_addr_r} ${initrdfile}

# from USB media
#usb reset; usb scan
#load usb 0:1 ${fdt_addr_r} ${fdtfile}
#load usb 0:1 ${kernel_addr_r} ${kernelfile}
# for setup
#load usb 0:1 ${ramdisk_addr_r} ${setupfs}
# for every day
#load usb 0:1  ${ramdisk_addr_r} ${initrdfile}

#for FEL just comment all above out - we load via the cable O.o

fdt addr ${fdt_addr_r} 0x40000

###
#
# crafting the boot arguments
#
###

### common boot arguments
#setenv bootcmd_generic ' debug earlyprintk sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 disp.screen0_output_mode=EDID
:1280x720p50 hdmi.audio=EDID:0'
setenv bootcmd_generic ' sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0'
#setenv bootcmd_generic ' debug earlyprintk'

### initial output

# for serial console
setenv slkconsole ' console=ttyS0,115200'
# or for HDMI
#setenv slkconsole ' console=tty1'

### OS related parameters

# setup with automatic network parameters
#setenv osargs " TERM=screen-256color nic=auto:eth0:dhcp root=/dev/ram rw"
# setup without LAN network
setenv osargs " TERM=screen-256color nodhcp root=/dev/ram rw"
# everyday parameters for MMC/SD card
#setenv osargs " resumedev=/dev/mmcblk0p2 root=/dev/mmcblk0p1 rootfstype=ext4 ro"
# everyday parameters for SCSI or USB
#setenv osargs " resumedev=/dev/sda2 root=/dev/sda1 waitforroot=2 rootfstype=ext4 ro"

### gluing it all together

# kernel command line
setenv bootargs ${slkconsole} ${bootcmd_generic} ${osargs}

###
#
# initial output
#
###

# passing control to kernel

bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}

# here from You should be with Slackware setup or system
this file alone is *magic* , where ever You put it on root (/) it pulls the belonging /boot/* residing files into operation - if edited correctly (by means of toggling the many #)

then the "wizard" script doing all the "brain muscle" in our stead:

file fel-setup.sh
Code:
#!/bin/bash

####
#
# (c) GPL v3 for Slackware for ARM and Banana PI
# by cest73@yandex.ru (support on linuxquestions.org)
#
###

#init:
prog=$(which sunxi-fel)
conv=$(which mkimage)
string="AWUSBFEX soc=00001651(A20) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000"
spl="u-boot-sunxi-with-spl.bin"
bootcmd="boot.cmd"
bootscr="boot.scr"

echo "checking for ${conv}"
if [ -x ${conv} ] ; then
   echo "converting:"
   $conv -C none -A arm -T script -d ${bootcmd} ${bootscr}
else
   echo "can't convert the ${bootcmd} file."
   if [ -a ${bootscr} ] ; then
     echo "WARNING: present [${bootscr}] will be used!"
   else
     echo "we have nothing to fall back to, aborting."
     exit 2
   fi
fi

echo "checking for ${prog}"
if [ -x ${prog} ] ; then
  echo "detecting:"
  device=$(lsusb -d 1f3a:efe8 | awk '{print $2"-"$4}' | sed -e "s/://" -e "s/-/:/")
  if [ -z $device ]; then
    echo -ne "Did You plug the USB to DC or OTG port?\n Also the board needs to be in FEL mode.\n"
    exit 2
  fi
  echo "device detected: ["${device}"],"
  echo "checking:"
  extract=$($prog -d ${device} ver)
  echo "got response:["${extract}"]"
  if [ "X${extract}"=="X${string}" ]; then
    echo "*** it's a match! ***"
  else
    echo "it's not a match."
    exit 2
  fi
else
  echo "no executable found: sunxi-fel is part of sunxi tools from sunxi u-boot package"
  exit 2

fi

echo "locating the SPI file:["$spl"]:"

#spl_file=$(slocate -n1 ${spl} | grep "\/${file}")
spl_file=${spl}

echo "checking for ["$spl_file"]"
if [ -a "${spl_file}" ] ; then
   echo "found ["${spl_file}"]"
else
   echo "no spi file found"
   exit 2
fi

   echo "uploading to device:"
# this is for "zero playload" cases as tftp boot etc...
#   $prog -p -v uboot ${spl_file} \
#    write 0x43100000 boot.scr

#exit 1

   $prog -p -v uboot ${spl_file} \
    write 0x43100000 boot.scr \
    write 0x43000000 sun7i-a20-bananapi.dtb \
    write 0x46000000 zImage-armv7 \
    write 0x47000000 initrd-armv7.img  #<-- setup
WARNING: ALPHA CODE - it will break things, errors are only marginally handled!
patches only are welcome
insufficiently commented patches will be > /dev/null
tested so far:
OTG works
boot.scr works via OTG ("fel-boot")
fel-boot works - reset while holding K3 key
USB works in u-boot (latest stable 2016 here)
auto detection in U-boot works (mostly)
MMC boot works (this script boots my MMC setup)
tftp boot works (only way setup wants to mount /dev/ram is tftp - why?)
fel-boot works for MMC (i boot the USB supplied kernel and run the MMC residing OS)

fel-boot can't mount "root" fs from setup's initrd? yet it mounts from tftp - the same exact files

also i provided a downloadable tarbal with my binary files I tested all with:
fel-setup-01tar.gz ~56Mb

Last edited by SCerovec; 10-14-2016 at 12:48 AM. Reason: re stated welcome inputs
 
Old 10-14-2016, 12:47 AM   #27
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,477

Original Poster
Blog Entries: 2

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Talking

Quote:
Originally Posted by drmozes View Post
I've found that a config merge has managed to remove the power module required to make USB work.
I can only assume that some how I botched the package upgrades on my desktop -current Banana Pi which is why I didn't notice before now. The primary build machine for -current gets reinstalled regularly, but the desktop test one just gets upgraded.

I'm rebuilding Linux 4.8.1 with the new config and will reinstall both, and probably push out the new packages tomorrow once I've tested them.
You'll have working USB in Linux soon!
In no way am I to be considered an authority on kernel builds, but so far I found that doing a cross-release config merge is fastest accomplished by hand:

1. run a diff on .configs and examine only changes that might be enabled
2. any changes made that make the "menuconfig" menu structure look odd will probably result in a compile break
3. Probably You'll end up doing something in between oldconfig and newconfig so take the time
4. enabling as few at a time and test-compile is a good idea

Last time i tried to merge a config (4.8 -> 4.7.?) i ended up in abandoning the try all together?
Also it's understood that moving a config is only reasonable on a vanilla kernel

I noticed PCI support on "our" kernel, are there ARM based PCI boards too?
 
Old 11-11-2016, 04:51 AM   #28
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,477

Original Poster
Blog Entries: 2

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Update: the banana pi is happily serving as NAS with the 1TB 3.5" HDD in our house:

smb/ftp/ssh

has screen/tmux for torrent sessions
has sbotools and slackpkg for maintainance

I only miss the GBit LAN switch for full feature set now.

maybe there be pictures...
 
  


Reply

Tags
arm7, bananam1, boot, install, slackware



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
slackware arm on banana pi? inkscape Slackware - ARM 8 06-14-2015 04:39 AM
[SOLVED] Alternate keyboard layout in Openbox kexolino Linux - Newbie 1 07-03-2011 06:34 AM
Modifying partition layout & partition order rm_-rf_windows Linux - General 3 06-28-2007 05:16 AM
alternate partition table format for linux trabant Linux - Software 0 09-21-2005 08:27 AM
Installing gentoo with an alternate partition scheme Goatdemon Linux - Distributions 3 03-26-2003 04:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 03:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration