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

Well with wlan0 it was working also for me as I wrote there. Could you please setup eth0 and do same test? Two users of ArchLinxArm with mainline kernel did reported this, thus I would like to know this from an buntu User.

I’ve encountered the same issue, even with 4.12-rc7.

Would you like to share the kernel config, you’ve used to build the kernel?

1 Like

I hope @numbqq and @Stuff did they own custom config with only stuff for Khadas VIM and not some generic (all enabled config).

Hi umiddelb,

You can refer to config for kvim_defconfig.

Thansk.

Hi numbqq

thank you for sharing. I’ve just tried a mainline kernel built upon this config (I assume you are using the meson-gxl-s905x-khadas-vim.dtb), but I still experience these strange network issues. You may try it by yourself by cloning the Linux source code repository via git, e.g.

 git clone --depth 1 --single-branch -b master https://github.com/ioft/linux/

If the download stalls, a simple ifdown / ifup eth0 (via serial console) will get the network connection operational again.

Cheers
Uli

Hi umiddelb,

When I use scp copy,I got the same issue,too.

# scp nick@192.168.1.253:/home/nick/ubuntu-base-16.04-base-arm64.tar .
 ubuntu-base-16.04-base-arm64.tar.gz             6% 2256KB 418.0KB/s - stalled -

ok, so let s add to the list of known issues this eth0 stalo during some heavy traffic.

I would also mention inability of nmcli to see my wifi ssid which uses channel 13

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