Ubuntu server ROM linux mainline V170624 pre-alpha version[EMMC INSTALLATION]

You can find it already here the one i found / reported / some of them got fixed.

Does https://www.spinics.net/lists/kernel/msg2535052.html mean usb2 support for vim arrives in mainline kernel soon ?

Patch for meson gxl usb support is here : https://patchwork.kernel.org/patch/9684303/
Would someone try to patch a 4.12 rc6 with this and build a test kernel for us to deploy?

This patch here adds an USB driver, but I need a dts related patch as well, since USB nodes are missing for GXL boards in arch/arm64/boot/dts/amlogic.

I’ve found this patch here. The kernel can see the root hub,

ubuntu@kvim:~$ sudo lsusb -v
[sudo] password for ubuntu:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         3
  bMaxPacketSize0         9
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0003 3.0 root hub
  bcdDevice            4.12
  iManufacturer           3 Linux 4.12.0-rc7-gx-g7da10bd-dirty xhci-hcd
  iProduct                2 xHCI Host Controller
  iSerial                 1 xhci-hcd.0.auto
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           31
    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 Unused
      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
        bMaxBurst               0
Hub Descriptor:
  bLength              12
  bDescriptorType      42
  nNbrPorts             0
  wHubCharacteristic 0x000a
    No power switching (usb 1.0)
    Per-port overcurrent protection
  bPwrOn2PwrGood       10 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  bHubDecLat          0.0 micro seconds
  wHubDelay             0 nano seconds
  DeviceRemovable    0x00
 Hub Port Status:
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           15
  bNumDeviceCaps          1
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x02
      Latency Tolerance Messages (LTM) Supported
    wSpeedsSupported   0x0008
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   3
      Lowest fully-functional device speed is SuperSpeed (5Gbps)
    bU1DevExitLat           0 micro seconds
    bU2DevExitLat           0 micro seconds
Device Status:     0x0001
  Self Powered

Bus 001 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 Unused
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            4.12
  iManufacturer           3 Linux 4.12.0-rc7-gx-g7da10bd-dirty xhci-hcd
  iProduct                2 xHCI Host Controller
  iSerial                 1 xhci-hcd.0.auto
  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 Unused
      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             2
  wHubCharacteristic 0x000a
    No power switching (usb 1.0)
    Per-port overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood       10 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0100 power
Device Status:     0x0001
  Self Powered

but non of the USB devices connected to the receptacle are recognized.

Ouch ! But good try anyway, tks.

unfortunately this is only 50% of what we need the other half is [0]. Devs are estimating to have USB mainline support in kernel 4.14.

[0] https://www.spinics.net/lists/linux-usb/msg151837.html

1 Like

@numbqq,
what is your plan for further evolutions of this alpha version ?
we know mainline still has blocking issues like USB support etc…
but, in the meantime, a working set of instructions on how you did build this emmc installable ROM from a mainline Linux branch would be very welcome and could let the community help khadas developers up to some point.

I do not know well how to clone exactly kernel 4.12 rc6 sources from somewhere and be able to correctly build image, an appropriate dtb and the needed modules out of it.

Hi @ravelo,

We will publish a version of mainline this month later.

As we have not push mainline branch to Khadas GitHub yet, but you can refer to here for VIM 4.12-rc6 kernel.

1 Like

thank you !
are these source already updated to compile and run ok on the Vim pro or should I still apply the patchset and changes you mentioned in my topic here DIY mainline kernel (4.12)+ ubuntu base 17.04 (zesty) for vim pro and EMMC install ?

Hi @ravelo,

Yes, you can run it on VIM Pro without apply any patches.

ok, great, I try to use this source tree with @Tang73’s 123sh script to generate my own xenial bootable image

edit:
xenial has been built, flashed and does boot OK.
but no keyboard (due to no USB probably).
worst thing is : no serial console, so totally useless for now, I need to find what’s wrong,
I think console activation is controlled by u-boot and also maybe by kernel.
to be precise, I can see boot messages in console window (I use putty on Windows), I can break the boot process and get uboot prompt, but login prompt is only displayed on the HDMI screen, and not in the putty window, what the hell!

1 Like

ok, here are the trace in console, no login prompt in console even when i type enter a few times.

[MSG]Burn complete
Downloading %100
BULKcmd[download get_status]
[info]success
BULKcmd[verify sha1sum 66779379df7bdbe11923caa7a420e4926f3b0c0a]
[MSG]Verify Start...
[MSG]To verify part rootfs in fmt normal
[MSG]Verify End
[MSG]VERIFY OK
[info]success

ID[16]
tplcmd[download store bootloader normal 917504]
[MSG]Down(store) part(bootloader) sz(0xe0000) fmt(normal)
[MSG]totalSlotNum = 0, nextWriteBackSlot 14
[info]success
[MSG]Burn Start...
mmc switch to boot0 success
mmc switch to boot1 success
mmc switch to user success
[MSG]align bootloader sz from 0xe0000 to 0x100000
[MSG]Burn complete
BULKcmd[download get_status]
[info]success
BULKcmd[verify sha1sum 5df4a568ec52522e5d85b9504f81d709ac657b77]
mmc switch to boot0 success
mmc switch to boot1 success
mmc switch to user success
[MSG]VERIFY OK
[info]success
BULKcmd[save_setting]
## save_setting ##
[MSG]Set upgrade_step to 2
Saving Environment to aml-storage...
mmc env offset: 0x6c00000
Writing to MMC(1)... done
[info]success
BULKcmd[burn_complete 1]
reboot mode: normal
INFO:    PSCI Affinity Map:
INFO:      AffInst: Level 0, MPID 0x0, State ON
INFO:      AffInst: Level 0, MPID 0x1, State OFF
INFO:      AffInst: Level 0, MPID 0x2, State OFF
INFO:      AffInst: Level 0, MPID 0x3, State OFF
bl31 reboot reason: 0xd
bl31 reboot reason: 0x1
system cmd  1.
GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 116301

BL2 Built : 13:48:56, Sep 23 2016.
gxl g7459bd4 - jianxin.pan@droid06

set vcck to 1120 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR3 chl: Rank0+1 @ 768MHz - PASS
Rank0: 1024MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
-s
Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from eMMC, src: 0x00020200, des: 0x10100000, size: 0x00015400
Load bl33 from eMMC, src: 0x00038200, des: 0x01000000, size: 0x000a5c00
NOTICE:  BL3-1: v1.0(debug):fb68908
NOTICE:  BL3-1: Built : 18:30:11, Nov  1 2016
aml log : bl31 normal boot !
[Image: gxl_v1.1.3154-065f772 2016-09-29 14:08:54 yan.wang@droid05]
OPS=0x82
9d 42 bd c7 a1 12 ec 2f 5f 6 30 b8 [0.356359 Inits done]
secure task start!
high task start!
low task start!
INFO:    BL3-1: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL3-1: Preparing for EL3 exit to normal world
INFO:    BL3-1: Next image address = 0x1000000
INFO:    BL3-1: Next image spsr = 0x3c9


U-Boot 2015.01 (Jul 29 2017 - 17:39:56)

DRAM:  2 GiB
Relocation Offset is: 76ecf000
register usb cfg[0][1] = 0000000077f61908
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: clk_level = 7
vpu: set clk: 666667000Hz, readback: 666660000Hz(0x300)
vpp: vpp_init
boot_device_flag : 1
Nand PHY Ver:1.01.001.0006 (c) 2013 Amlogic Inc.
init bus_cycle=6, bus_timing=7, system=5.0ns
reset failed
get_chip_type and ret:fffffffe
get_chip_type and ret:fffffffe
chip detect failed and ret:fffffffe
nandphy_init failed and ret=0xfffffff1
MMC:   aml_priv->desc_buf = 0x0000000073ecf6b0
aml_priv->desc_buf = 0x0000000073ed19d0
SDIO Port B: 0, SDIO Port C: 1
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
[mmc_startup] mmc refix success
[mmc_init] mmc init success
mmc read lba=0x14000, blocks=0x400
start dts,buffer=0000000073ed4270,dt_addr=0000000073ed4270
parts: 3
00:      logo   0000000002000000 1
01:   ramdisk   0000000002000000 1
02:    rootfs   ffffffffffffffff 4
get_dtb_struct: Get emmc dtb OK!
Partition table get from SPL is :
        name                        offset              size              flag
================================================================================                                                                             ===
   0: bootloader                         0            400000                  0
   1: reserved                     2400000           4000000                  0
   2: env                          6c00000            800000                  0
   3: logo                         7c00000           2000000                  1
   4: ramdisk                      a400000           2000000                  1
   5: rootfs                       cc00000         397200000                  4
mmc read lba=0x12000, blocks=0x2
mmc read lba=0x12002, blocks=0x2
mmc_read_partition_tbl: mmc read partition OK!
eMMC/TSD partition table have been checked OK!
mmc env offset: 0x6c00000
In:    serial
Out:   serial
Err:   serial
reboot_mode=normal
hpd_state=1
set hdmitx VIC = 16
config HPLL = 2970
HPLL: 0xc000027b
config HPLL done
j = 4  vid_clk_div = 1
hdmitx phy setting done
hdmitx: set enc for VIC: 16
rx version is 1.4 or below  div=10
hdmtix: set audio
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[CANVAS]canvas init
[CANVAS]addr=0x3d800000 width=3840, height=2160
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
read emmc dtb
gpio: pin GPIOAO_2 (gpio 102) value is 1
get_cpu_id flag_12bit=1
Product checking: Khadas VIM.
Net:   dwmac.c9410000
Hit Enter or space or Ctrl+C key to stop autoboot -- :  0
ee_gate_off ...
## Booting Android Image at 0x01080000 ...
load dtb from 0x1000000 ......
   Loading Kernel Image(COMP_NONE) ... OK
   kernel loaded at 0x01080000, end = 0x01f1ba00
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
[rsvmem] bl31 reserved memory set addr error.
   Loading Ramdisk to 73b21000, end 73ebd2d7 ... OK
   Loading Device Tree to 000000001fff7000, end 000000001ffff077 ... OK

Starting kernel ...

uboot time: 1629126 us

I now need to check if I am even able to build some other system using another kernel but with a fully working console

1 Like

I’ve seen something in bootargs in kvim.h

I will replace

“root=LABEL=ROOTFS rootflags=data=writeback rw logo=osd1,loaded,0x3d800000,1080p60hz,full hdmimode=1080p60hz m_bpp=32 dmfc=3 vout=hdmi cvbsmode=576cvbs console=ttyS0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.repair=yes net.ifnames=0\0” \

with

“root=/dev/mmcblk0p1 rootflags=data=writeback rw rootwait console=ttyAML0,115200 console=tty0 earlyprintk=aml-uart,0xc81004c0 fsck.repair=yes governor=ondemand no_console_suspend elevator=noop\0” \

and test…
edit : fail as /dev/mmcblk0p1 does not exist dixit uboot (as opposed to /dev/mmcblk1p01 !)

finally : this did the trick

"root=LABEL=ROOTFS rootflags=data=writeback rw rootwait console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 logo=osd1,loaded,0x3d800000,1080p60hz,full hdmimode=1080p60hz m_bpp=32 dmfc=3 vout=hdmi cvbsmode=576cvbs fsck.repair=yes net.ifnames=0\0" \

now I have a xenial base 16.04.3 booting on top of 4.12-rc6 (from numbqq) :star_struck:, serial console is working, as well as ethernet (sudo apt-get dist-upgrade went ok);
login prompt appear on hdmi monitor, but usb keyboard not working (known) so cannot log in that way !

3 Likes

for the record, here is my dmesg
boot trace sofar

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.0-rc6 (raxy@bodhi-giada) (gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1) ) #1 SMP PREEMPT Tue Aug 1 14:44:52 CEST 2017
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: Khadas VIM
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x0000000067c00000, size 188 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] NUMA: No NUMA configuration found
[    0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x0000000077ffffff]
[    0.000000] NUMA: Adding memblock [0x1000000 - 0xfffffff] on node 0
[    0.000000] NUMA: Adding memblock [0x10200000 - 0x77ffffff] on node 0
[    0.000000] NUMA: Initmem setup node 0 [mem 0x01000000-0x77ffffff]
[    0.000000] NUMA: NODE_DATA [mem 0x77fd1f80-0x77fd3a7f]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000001000000-0x0000000077ffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000001000000-0x000000000fffffff]
[    0.000000]   node   0: [mem 0x0000000010200000-0x0000000077ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000001000000-0x0000000077ffffff]
[    0.000000] On node 0 totalpages: 486912
[    0.000000]   DMA zone: 7616 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 486912 pages, LIFO batch:31
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] percpu: Embedded 24 pages/cpu @ffff800077f6e000 s59520 r8192 d30592 u98304
[    0.000000] pcpu-alloc: s59520 r8192 d30592 u98304 alloc=24*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists in Node order, mobility grouping on.  Total pages: 479296
[    0.000000] Policy zone: DMA
[    0.000000] Kernel command line: root=LABEL=ROOTFS rootflags=data=writeback rw rootwait console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 logo=osd1,loaded,0x3d800000,1080p60hz,full hdmimode=1080p60hz m_bpp=32 dmfc=3 vout=hdmi cvbsmode=576cvbs fsck.repair=yes net.ifnames=0
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Memory: 1702600K/1947648K available (9916K kernel code, 750K rwdata, 3600K rodata, 640K init, 445K bss, 52536K reserved, 192512K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffff000000000000 - 0xffff000008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffff000008000000 - 0xffff7dffbfff0000   (129022 GB)
[    0.000000]       .text : 0xffff000008080000 - 0xffff000008a30000   (  9920 KB)
[    0.000000]     .rodata : 0xffff000008a30000 - 0xffff000008dc0000   (  3648 KB)
[    0.000000]       .init : 0xffff000008dc0000 - 0xffff000008e60000   (   640 KB)
[    0.000000]       .data : 0xffff000008e60000 - 0xffff000008f1ba00   (   751 KB)
[    0.000000]        .bss : 0xffff000008f1ba00 - 0xffff000008f8b0c8   (   446 KB)
[    0.000000]     fixed   : 0xffff7dfffe7fd000 - 0xffff7dfffec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffff7dfffee00000 - 0xffff7dffffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffff7e0000000000 - 0xffff800000000000   (  2048 GB maximum)
[    0.000000]               0xffff7e0000040000 - 0xffff7e0001e00000   (    29 MB actual)
[    0.000000]     memory  : 0xffff800001000000 - 0xffff800078000000   (  1904 MB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS:64 nr_irqs:64 0
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000004] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000292] Console: colour dummy device 80x25
[    0.001044] console [tty0] enabled
[    0.001100] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.001129] pid_max: default: 32768 minimum: 301
[    0.001198] Security Framework initialized
[    0.001633] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.003177] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.004132] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.004156] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.020042] ASID allocator initialised with 65536 entries
[    0.036353] EFI services will not be available.
[    0.052076] smp: Bringing up secondary CPUs ...
[    0.084290] Detected VIPT I-cache on CPU1
[    0.084338] CPU1: Booted secondary processor [410fd034]
[    0.116323] Detected VIPT I-cache on CPU2
[    0.116356] CPU2: Booted secondary processor [410fd034]
[    0.148370] Detected VIPT I-cache on CPU3
[    0.148403] CPU3: Booted secondary processor [410fd034]
[    0.148453] smp: Brought up 1 node, 4 CPUs
[    0.148542] SMP: Total of 4 processors activated.
[    0.148559] CPU features: detected feature: 32-bit EL0 Support
[    0.148578] CPU: All CPU(s) started at EL2
[    0.148605] alternatives: patching kernel code
[    0.149281] devtmpfs: initialized
[    0.152839] DMI not present or invalid.
[    0.153051] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.153120] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.157113] pinctrl core: initialized pinctrl subsystem
[    0.158099] NET: Registered protocol family 16
[    0.160449] cpuidle: using governor menu
[    0.161161] vdso: 2 pages (1 code @ ffff000008a37000, 1 data @ ffff000008e65000)
[    0.161198] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.165025] DMA: preallocated 256 KiB pool for atomic allocations
[    0.165171] Serial: AMBA PL011 UART driver
[    0.179517] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    0.180392] ACPI: Interpreter disabled.
[    0.181526] vgaarb: loaded
[    0.181764] SCSI subsystem initialized
[    0.181925] libata version 3.00 loaded.
[    0.182149] usbcore: registered new interface driver usbfs
[    0.182220] usbcore: registered new interface driver hub
[    0.182305] usbcore: registered new device driver usb
[    0.182558] media: Linux media interface: v0.10
[    0.182606] Linux video capture interface: v2.00
[    0.182673] pps_core: LinuxPPS API ver. 1 registered
[    0.182690] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.182727] PTP clock support registered
[    0.182837] dmi: Firmware registration failed.
[    0.182954] Advanced Linux Sound Architecture Driver Initialized.
[    0.183312] Bluetooth: Core ver 2.22
[    0.183366] NET: Registered protocol family 31
[    0.183381] Bluetooth: HCI device and connection manager initialized
[    0.183402] Bluetooth: HCI socket layer initialized
[    0.183419] Bluetooth: L2CAP socket layer initialized
[    0.183467] Bluetooth: SCO socket layer initialized
[    0.184529] clocksource: Switched to clocksource arch_sys_counter
[    0.184704] VFS: Disk quotas dquot_6.6.0
[    0.184759] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.184977] pnp: PnP ACPI: disabled
[    0.191597] NET: Registered protocol family 2
[    0.192034] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.192237] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    0.192504] TCP: Hash tables configured (established 16384 bind 16384)
[    0.192691] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    0.192765] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    0.192948] NET: Registered protocol family 1
[    0.193263] RPC: Registered named UNIX socket transport module.
[    0.193283] RPC: Registered udp transport module.
[    0.193296] RPC: Registered tcp transport module.
[    0.193310] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.193329] PCI: CLS 0 bytes, default 128
[    0.193469] Unpacking initramfs...
[    0.347788] Freeing initrd memory: 3696K
[    0.348636] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[    0.348907] kvm [1]: 8-bit VMID
[    0.348923] kvm [1]: IDMAP page: 1a20000
[    0.348937] kvm [1]: HYP VA range: 800000000000:ffffffffffff
[    0.349526] kvm [1]: Hyp mode initialized successfully
[    0.349571] kvm [1]: vgic-v2@c4304000
[    0.349645] kvm [1]: vgic interrupt IRQ1
[    0.349667] kvm [1]: virtual timer IRQ4
[    0.351499] audit: initializing netlink subsys (disabled)
[    0.351613] audit: type=2000 audit(0.351:1): state=initialized audit_enabled=0 res=1
[    0.351932] workingset: timestamp_bits=44 max_order=19 bucket_order=0
[    0.357623] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.358174] NFS: Registering the id_resolver key type
[    0.358214] Key type id_resolver registered
[    0.358228] Key type id_legacy registered
[    0.358248] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.358407] 9p: Installing v9fs 9p2000 file system support
[    0.360408] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.360444] io scheduler noop registered
[    0.360691] io scheduler cfq registered (default)
[    0.360713] io scheduler mq-deadline registered
[    0.360727] io scheduler kyber registered
[    0.364514] of_pwm_get(): PWM chip not found
[    0.366359] xenfs: not registering filesystem on non-xen platform
[    0.369228] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.370696] c11084c0.serial: ttyAML1 at MMIO 0xc11084c0 (irq = 10, base_baud = 1500000) is a meson_uart
[    0.371048] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 14, base_baud = 1500000) is a meson_uart
[    1.248546] console [ttyAML0] enabled
[    1.252552] c81004e0.serial: ttyAML2 at MMIO 0xc81004e0 (irq = 15, base_baud = 1500000) is a meson_uart
[    1.262494] meson-drm d0100000.vpu: Queued 2 outputs on vpu
[    1.267551] meson-drm d0100000.vpu: Failed to create debugfs directory
[    1.273489] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.280016] [drm] No driver support for vblank timestamp query.
[    1.285953] meson-drm d0100000.vpu: CVBS Output connector not available
[    1.320585] meson-dw-hdmi c883a000.hdmi-tx: Detected HDMI TX controller v2.01a with HDCP (meson_dw_hdmi_phy)
[    1.324998] meson-dw-hdmi c883a000.hdmi-tx: registered DesignWare HDMI I2C bus driver
[    1.332731] meson-drm d0100000.vpu: bound c883a000.hdmi-tx (ops meson_dw_hdmi_ops)
[    1.446589] random: fast init done
[    1.661354] Console: switching to colour frame buffer device 240x67
[    1.700608] meson-drm d0100000.vpu: fb0:  frame buffer device
[    1.706686] [drm] Initialized meson 1.0.0 20161109 for d0100000.vpu on minor 0
[    1.720121] loop: module loaded
[    1.720633] hisi_sas: driver version v1.6
[    1.723515] mdio-mux-mmioreg c883455c.eth-phy-mux: failed to register mdio-mux bus /soc/periphs@c8834000/eth-phy-mux
[    1.732447] libphy: Fixed MDIO Bus: probed
[    1.736696] tun: Universal TUN/TAP device driver, 1.6
[    1.742170] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[    1.746975] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    1.752892] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
[    1.759728] igb: Copyright (c) 2007-2014 Intel Corporation.
[    1.765322] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[    1.773013] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[    1.779073] sky2: driver version 1.30
[    1.783134] meson8b-dwmac c9410000.ethernet: PTP uses main clock
[    1.788460] meson8b-dwmac c9410000.ethernet: no reset control found
[    1.794871] stmmac - user ID: 0x11, Synopsys ID: 0x37
[    1.799665] meson8b-dwmac c9410000.ethernet: Ring mode enabled
[    1.805443] meson8b-dwmac c9410000.ethernet: DMA HW capability register supported
[    1.812855] meson8b-dwmac c9410000.ethernet: Normal descriptors
[    1.818722] meson8b-dwmac c9410000.ethernet: RX Checksum Offload Engine supported
[    1.826138] meson8b-dwmac c9410000.ethernet: COE Type 2
[    1.831314] meson8b-dwmac c9410000.ethernet: TX Checksum insertion supported
[    1.838298] meson8b-dwmac c9410000.ethernet: Wake-Up On Lan supported
[    1.844713] meson8b-dwmac c9410000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    1.852706] libphy: stmmac: probed
[    1.856705] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver
[    1.863390] usbcore: registered new interface driver pegasus
[    1.868973] usbcore: registered new interface driver rtl8150
[    1.874570] usbcore: registered new interface driver r8152
[    1.880009] usbcore: registered new interface driver asix
[    1.885363] usbcore: registered new interface driver ax88179_178a
[    1.891388] usbcore: registered new interface driver cdc_ether
[    1.897164] usbcore: registered new interface driver dm9601
[    1.902702] usbcore: registered new interface driver CoreChips
[    1.908477] usbcore: registered new interface driver smsc75xx
[    1.914166] usbcore: registered new interface driver smsc95xx
[    1.919880] usbcore: registered new interface driver net1080
[    1.925481] usbcore: registered new interface driver plusb
[    1.930922] usbcore: registered new interface driver cdc_subset
[    1.936781] usbcore: registered new interface driver zaurus
[    1.942299] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[    1.949648] usbcore: registered new interface driver cdc_ncm
[    1.955365] VFIO - User Level meta-driver version: 0.3
[    1.961488] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.967250] ehci-pci: EHCI PCI platform driver
[    1.972162] ehci-platform: EHCI generic platform driver
[    1.977194] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.982958] ohci-pci: OHCI PCI platform driver
[    1.987779] ohci-platform: OHCI generic platform driver
[    1.993126] usbcore: registered new interface driver usb-storage
[    1.999944] i2c /dev entries driver
[    2.006854] Bluetooth: HCI UART driver ver 2.3
[    2.011640] Bluetooth: HCI UART protocol H4 registered
[    2.017136] sdhci: Secure Digital Host Controller Interface driver
[    2.022369] sdhci: Copyright(c) Pierre Ossman
[    2.027131] Synopsys Designware Multimedia Card Interface Driver
[    2.033947] meson-gx-mmc d0072000.mmc: Got CD GPIO
[    2.077992] meson-gx-mmc d0074000.mmc: allocated mmc-pwrseq
[    2.120736] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.126151] of_pwm_get(): PWM chip not found
[    2.131796] leds_pwm pwmleds: unable to request PWM for vim:red:power: -517
[    2.140014] ledtrig-cpu: registered to indicate activity on CPUs
[    2.145511] meson-sm: secure-monitor enabled
[    2.150602] usbcore: registered new interface driver usbhid
[    2.155291] usbhid: USB HID core driver
[    2.160041] platform-mhu c883c404.mailbox: Platform MHU Mailbox registered
[    2.167811] amlogic rfkill init
[    2.172802] enter bt_probe of_node
[    2.177248] not get gpio_en
[    2.181481] power on valid level is high
[    2.181484] bt: power_on_pin_OD = 0;
[    2.189970] BT_RADIO going: on
[    2.194174] BCM_BT: going ON
[    2.337020] meson-gx-mmc d0074000.mmc: (re)tuning...
[    2.341224] mmc1: new HS200 MMC card at address 0001
[    2.345707] mmcblk1: mmc1:0001 AWPD3R 14.6 GiB
[    2.349970] mmcblk1boot0: mmc1:0001 AWPD3R partition 1 4.00 MiB
[    2.359825] mmcblk1boot1: mmc1:0001 AWPD3R partition 2 4.00 MiB
[    2.368256] mmcblk1rpmb: mmc1:0001 AWPD3R partition 3 4.00 MiB
[    2.373341] Enter aml_emmc_partition_ops
[    2.377792] [mmc_read_partition_tbl] mmc read partition OK!
[    2.381823] add_emmc_partition
[    2.385967] [mmcblk1p01]           bootloader  offset 0x000000000000, size 0x000000400000
[    2.393200] [mmcblk1p02]             reserved  offset 0x000002400000, size 0x000004000000
[    2.401391] [mmcblk1p03]                  env  offset 0x000006c00000, size 0x000000800000
[    2.409574] [mmcblk1p04]                 logo  offset 0x000007c00000, size 0x000002000000
[    2.417776] [mmcblk1p05]              ramdisk  offset 0x00000a400000, size 0x000002000000
[    2.425970] [mmcblk1p06]               rootfs  offset 0x00000cc00000, size 0x000397200000
[    2.434024] card key: card_blk_probe.
[    2.437872] emmc_key_init:184 emmc key lba_start:0x12020,lba_end:0x12220
[    2.444267] emmc key: emmc_key_init:206 ok.
[    2.448408] amlmmc_dtb_init: register dtb chardev
[    2.448586] amlmmc_dtb_init: register dtb chardev OK
[    2.453115] Exit aml_emmc_partition_ops OK.
[    2.613663] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[    2.618712] ip_tables: (C) 2000-2006 Netfilter Core Team
[    2.623999] NET: Registered protocol family 10
[    2.629146] Segment Routing with IPv6
[    2.633597] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    2.638200] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.644045] NET: Registered protocol family 17
[    2.648680] Bridge firewalling registered
[    2.653267] Bluetooth: RFCOMM TTY layer initialized
[    2.657796] Bluetooth: RFCOMM socket layer initialized
[    2.662281] Bluetooth: RFCOMM ver 1.11
[    2.666674] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.671065] Bluetooth: BNEP filters: protocol multicast
[    2.676239] Bluetooth: BNEP socket layer initialized
[    2.681151] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.687023] Bluetooth: HIDP socket layer initialized
[    2.691965] 8021q: 802.1Q VLAN Support v1.8
[    2.696289] 9pnet: Installing 9P2000 support
[    2.700631] Key type dns_resolver registered
[    2.705740] registered taskstats version 1
[    2.714870] libphy: mdio_mux: probed
[    2.722333] libphy: mdio_mux: probed
[    2.726601] mdio-mux-mmioreg c883455c.eth-phy-mux: Version 1.0
[    2.732092] meson-gx-mmc d0070000.mmc: allocated mmc-pwrseq
[    2.777657] scpi_protocol scpi: SCP Protocol 0.0 Firmware 0.0.0 version
[    2.783920] hctosys: unable to open rtc device (rtc0)
[    2.788640] ALSA device list:
[    2.794056]   No soundcards found.
[    2.799887] Freeing unused kernel memory: 640K
[    2.802118] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[    2.804127] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.806139] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.809755] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[    2.882868] mmc2: new high speed SDIO card at address 0001
[   13.282773] EXT4-fs (mmcblk1p6): mounted filesystem with writeback data mode. Opts: data=writeback
[   13.416159] systemd[1]: System time before build time, advancing clock.
[   13.441214] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
[   13.459248] systemd[1]: Detected architecture arm64.
[   13.481400] systemd[1]: Set hostname to <ivnVimPro>.
[   13.617949] systemd[1]: Created slice User and Session Slice.
[   13.629178] systemd[1]: Reached target Encrypted Volumes.
[   13.640214] systemd[1]: Listening on Journal Audit Socket.
[   13.651263] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[   13.663605] systemd[1]: Reached target Remote File Systems (Pre).
[   13.675202] systemd[1]: Listening on udev Kernel Socket.
[   13.686600] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[   14.024030] systemd-journald[1291]: Received request to flush runtime journal from PID 1
[   14.547266] input: adc-keys as /devices/platform/adc-keys/input/input0
[   14.716351] brcmfmac: F1 signature read @0x18000000=0x15264345
[   14.722927] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.bin failed with error -2
[   14.942334] BT_RADIO going: on
[   14.942337] BCM_BT: going ON
[   14.999692] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   14.999871] meson8b-dwmac c9410000.ethernet eth0: device MAC address 00:15:18:01:81:31
[   15.070356] Meson GXL Internal PHY 0.e40908ff:08: attached PHY driver [Meson GXL Internal PHY] (mii_bus:phy_addr=0.e40908ff:08, irq=-1)
[   15.160570] meson8b-dwmac c9410000.ethernet eth0: PTP not supported by HW
[   15.160773] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   15.772617] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
[   16.787909] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
[  119.548843] random: crng init done
[  244.774058] Meson GXL Internal PHY 0.e40908ff:08: attached PHY driver [Meson GXL Internal PHY] (mii_bus:phy_addr=0.e40908ff:08, irq=-1)
[  244.804584] meson8b-dwmac c9410000.ethernet eth0: PTP not supported by HW
[  244.804758] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  247.873094] meson8b-dwmac c9410000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[  247.873127] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

and here is my u-boot trace in console during a reboot

raxy@ivnVimPro:~$ sync; sudo reboot
[  771.272293] watchdog: watchdog0: watchdog did not stop!
[  771.973397] reboot: Restarting system
INFO:    PSCI Affinity Map:
INFO:      AffInst: Level 0, MPID 0x0, State ON
INFO:      AffInst: Level 0, MPID 0x1, State ON
INFO:      AffInst: Level 0, MPID 0x2, State ON
INFO:      AffInst: Level 0, MPID 0x3, State ON
bl31 reboot reason: 0xd
bl31 reboot reason: 0x0
system cmd  1.
GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 97829

BL2 Built : 13:48:56, Sep 23 2016.
gxl g7459bd4 - jianxin.pan@droid06

set vcck to 1120 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR3 chl: Rank0+1 @ 768MHz - PASS
Rank0: 1024MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
-s
Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from eMMC, src: 0x00020200, des: 0x10100000, size: 0x00015400
Load bl33 from eMMC, src: 0x00038200, des: 0x01000000, size: 0x000a5c00
NOTICE:  BL3-1: v1.0(debug):fb68908
NOTICE:  BL3-1: Built : 18:30:11, Nov  1 2016
aml log : bl31 normal boot !
[Image: gxl_v1.1.3154-065f772 2016-09-29 14:08:54 yan.wang@droid05]
OPS=0x82
9d 42 bd c7 a1 12 ec 2f 5f 6 30 b8 [0.338089 Inits done]
secure task start!
high task start!
low task start!
INFO:    BL3-1: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL3-1: Preparing for EL3 exit to normal world
INFO:    BL3-1: Next image address = 0x1000000
INFO:    BL3-1: Next image spsr = 0x3c9


U-Boot 2015.01 (Aug 02 2017 - 00:52:04)

DRAM:  2 GiB
Relocation Offset is: 76ecf000
register usb cfg[0][1] = 0000000077f61918
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: clk_level = 7
vpu: set clk: 666667000Hz, readback: 666660000Hz(0x300)
vpp: vpp_init
boot_device_flag : 1
Nand PHY Ver:1.01.001.0006 (c) 2013 Amlogic Inc.
init bus_cycle=6, bus_timing=7, system=5.0ns
reset failed
get_chip_type and ret:fffffffe
get_chip_type and ret:fffffffe
chip detect failed and ret:fffffffe
nandphy_init failed and ret=0xfffffff1
MMC:   aml_priv->desc_buf = 0x0000000073ecf6b0
aml_priv->desc_buf = 0x0000000073ed19d0
SDIO Port B: 0, SDIO Port C: 1
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
[mmc_startup] mmc refix success
[mmc_init] mmc init success
mmc read lba=0x14000, blocks=0x400
start dts,buffer=0000000073ed4270,dt_addr=0000000073ed4270
parts: 3
00:      logo   0000000002000000 1
01:   ramdisk   0000000002000000 1
02:    rootfs   ffffffffffffffff 4
get_dtb_struct: Get emmc dtb OK!
Partition table get from SPL is :
        name                        offset              size              flag
===================================================================================
   0: bootloader                         0            400000                  0
   1: reserved                     2400000           4000000                  0
   2: env                          6c00000            800000                  0
   3: logo                         7c00000           2000000                  1
   4: ramdisk                      a400000           2000000                  1
   5: rootfs                       cc00000         397200000                  4
mmc read lba=0x12000, blocks=0x2
mmc read lba=0x12002, blocks=0x2
mmc_read_partition_tbl: mmc read partition OK!
eMMC/TSD partition table have been checked OK!
mmc env offset: 0x6c00000
In:    serial
Out:   serial
Err:   serial
reboot_mode=cold_boot
hpd_state=1
set hdmitx VIC = 16
config HPLL = 2970
HPLL: 0xc000027b
config HPLL done
j = 4  vid_clk_div = 1
hdmitx phy setting done
hdmitx: set enc for VIC: 16
rx version is 1.4 or below  div=10
hdmtix: set audio
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[CANVAS]canvas init
[CANVAS]addr=0x3d800000 width=3840, height=2160
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
read emmc dtb
gpio: pin GPIOAO_2 (gpio 102) value is 1
get_cpu_id flag_12bit=1
Product checking: Khadas VIM.
Net:   dwmac.c9410000
Hit Enter or space or Ctrl+C key to stop autoboot -- :  0
ee_gate_off ...
## Booting Android Image at 0x01080000 ...
load dtb from 0x1000000 ......
   Loading Kernel Image(COMP_NONE) ... OK
   kernel loaded at 0x01080000, end = 0x01f1ba00
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
[rsvmem] bl31 reserved memory set addr error.
   Loading Ramdisk to 73b21000, end 73ebd4d2 ... OK
   Loading Device Tree to 000000001fff7000, end 000000001ffff077 ... OK

Starting kernel ...

uboot time: 1613584 us

hi @numbqq
is it worth it to try to use Bluetooth to connect a keyboard and use it instead of an USB keyboard ?
if it works, we will have a workaround for non functional usb while we wait for an official support to arrive via mainline kernel.

My issue for now is that I cannot see any appropriate device for sdio bluetooth in /sys/bus/mmc/devices
So, no possibility to activate bluetooth yet…
What could be wrong ?

raxy@ivnVimPro:~$ sudo cat /sys/bus/mmc/devices/sdio:0001/sdio:0001:1/device
[sudo] password for raxy:
cat: ‘/sys/bus/mmc/devices/sdio:0001/sdio:0001:1/device’: No such file or directory
raxy@ivnVimPro:~$ ls -l /sys/bus/mmc/devices
total 0
lrwxrwxrwx 1 root root 0 janv. 1 1970 mmc1:0001 → …/…/…/devices/platform/soc/d0000000.apb/d0074000.mmc/mmc_host/mmc1/mmc1:0001
lrwxrwxrwx 1 root root 0 janv. 1 1970 mmc2:0001 → …/…/…/devices/platform/soc/d0000000.apb/d0070000.mmc/mmc_host/mmc2/mmc2:0001
raxy@ivnVimPro:~$

meanwhile, and as expected, /etc/modules contains

dhd
hci_uart

and dmesg says…

[ 15.772617] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
[ 16.787909] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50

but , wrongly, lsmod does not list hci-uart

raxy@ivnVimPro:~$ lsmod
Module Size Used by
brcmfmac 307200 0
brcmutil 20480 1 brcmfmac
meson_rng 16384 0
rng_core 16384 1 meson_rng
meson_gxbb_wdt 16384 0
adc_keys 16384 0
input_polldev 16384 1 adc_keys

Hi @ravelo,

You should update bluetooth-khadas.sh for mainline

diff --git a/archives/hwpacks/bluez/bluetooth-khadas.sh b/archives/hwpacks/bluez/bluetooth-khadas.sh
index c936c71..fb0d4cb 100755
--- a/archives/hwpacks/bluez/bluetooth-khadas.sh
+++ b/archives/hwpacks/bluez/bluetooth-khadas.sh
@@ -1,18 +1,25 @@
 #!/bin/sh
 
-model=`cat /sys/bus/mmc/devices/sdio:0001/sdio:0001:1/device`
+#model=`cat /sys/bus/mmc/devices/sdio:0001/sdio:0001:1/device`
+
+# mainline
+model=`cat /sys/bus/mmc/devices/mmc2\:0001/mmc2\:0001\:1/device`
+
+echo 0  > /sys/class/rfkill/rfkill0/state
+/bin/sleep 1
+echo 1  > /sys/class/rfkill/rfkill0/state
 
 # Load the firmware
 if [ "$model" = "0xa9bf" ]; then
     # VIM Pro
-    /usr/local/bin/brcm_patchram_plus --patchram /lib/firmware/brcm/BCM4345C0.hcd --enable_hci --no2bytes --tosleep 1000 /dev/ttyS1
+    /usr/local/bin/brcm_patchram_plus --patchram /lib/firmware/brcm/BCM4345C0.hcd --enable_hci --no2bytes --tosleep 1000 /dev/ttyAML1
 else
     # VIM
-    /usr/local/bin/brcm_patchram_plus --patchram /lib/firmware/brcm/bcm43438a1.hcd --enable_hci --no2bytes --tosleep 1000 /dev/ttyS1
+    /usr/local/bin/brcm_patchram_plus --patchram /lib/firmware/brcm/bcm43438a1.hcd --enable_hci --no2bytes --tosleep 1000 /dev/ttyAML1
 fi
 
 # FIXME Delay
 /bin/sleep 1
 
 # Attach HCI adapter
-/usr/bin/hciattach /dev/ttyS1 any
+/usr/bin/hciattach /dev/ttyAML1 any

2 Likes

and here are the other traces from systemctl…

raxy@ivnVimPro:~$ sudo systemctl status bluetooth-khadas
[sudo] password for raxy:
● bluetooth-khadas.service - Khadas Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth-khadas.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since mer. 2017-08-02 09:27:37 UTC; 29min ago
Process: 1372 ExecStart=/usr/local/bin/bluetooth-khadas.sh (code=killed, signal=TERM)

août 02 09:26:07 ivnVimPro systemd[1]: Starting Khadas Bluetooth service…
août 02 09:26:07 ivnVimPro bluetooth-khadas.sh[1372]: cat: ‘/sys/bus/mmc/devices/sdio:0001/sdio:0001
:1/device’: No such file or directory
août 02 09:27:37 ivnVimPro systemd[1]: bluetooth-khadas.service: Start operation timed out.
Terminating.
août 02 09:27:37 ivnVimPro systemd[1]: Failed to start Khadas Bluetooth service.
août 02 09:27:37 ivnVimPro systemd[1]: bluetooth-khadas.service: Unit entered failed state.

août 02 09:27:37 ivnVimPro systemd[1]: bluetooth-khadas.service: Failed with result 'timeout
'.

Hi @ravelo,

And if you want to use wifi you should rename the wifi firmware.

diff --git a/scripts/server.sh b/scripts/server.sh
index ae0e1de..3c07d42 100755
--- a/scripts/server.sh
+++ b/scripts/server.sh
@@ -35,6 +35,14 @@ sudo cp -r archives/filesystem/etc/initramfs-tools/ rootfs/etc/
 # WIFI
 sudo mkdir rootfs/lib/firmware
 sudo cp -r archives/hwpacks/wlan-firmware/brcm/ rootfs/lib/firmware/
+# rename firmware to support mainline
+# 6212
+sudo cp rootfs/lib/firmware/brcm/fw_bcm43438a1.bin rootfs/lib/firmware/brcm/brcmfmac43430-sdio.bin
+sudo cp rootfs/lib/firmware/brcm/nvram_ap6212a.txt rootfs/lib/firmware/brcm/brcmfmac43430-sdio.txt
+# 6255
+sudo cp rootfs/lib/firmware/brcm/fw_bcm43455c0_ag.bin rootfs/lib/firmware/brcm/brcmfmac43455-sdio.bin
+sudo cp rootfs/lib/firmware/brcm/nvram_ap6255.txt rootfs/lib/firmware/brcm/brcmfmac43455-sdio.txt
+

2 Likes