Booting a 4.10 mainline kernel

Martin and his team has already get linux-4.1x running on the Khadas VIM now, and Khadas VIM is excepted to be added in to the support list of linux-v4.12. check this for the information.

2 Likes

http://www.cnx-software.com/2017/03/06/mainline-linux-on-64-bit-arm-amlogic-socs-and-tv-boxes-such-as-wetek-hub-player-2-nexbox-a1-a95x-etc/

Thank you for pointing me to this patchset. If applied it to the the latest kernel sources from Kevin Hilman, here is the dmesg:

ubuntu@kvim:~/kernel/4.11$ dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.11.0-rc1-gx-gd7bf95a-dirty (ubuntu@c3) (gcc version 6.2.0 20160901 (Ubuntu 6.2.0-3ubuntu11~16.04) ) #1 SMP PREEMPT Tue Mar 7 09:38:55 UTC 2017
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 16 MiB at 0x0000000077000000
[    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 0x76fd9600-0x76fdb0ff]
[    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 23 pages/cpu @ffff800076f7a000 s56728 r8192 d29288 u94208
[    0.000000] pcpu-alloc: s56728 r8192 d29288 u94208 alloc=23*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: console=ttyAML0,115200 root=UUID=e9e72a23-6ddc-4e7b-95ad-49986ea27cb6 rootwait rw fsck.repair=yes governor=interactive no_console_suspend
[    0.000000] log_buf_len individual max cpu contribution: 4096 bytes
[    0.000000] log_buf_len total cpu_extra contributions: 12288 bytes
[    0.000000] log_buf_len min size: 16384 bytes
[    0.000000] log_buf_len: 32768 bytes
[    0.000000] early log buf free: 13832(84%)
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Memory: 1876280K/1947648K available (8956K kernel code, 984K rwdata, 3988K rodata, 1088K init, 285K bss, 54984K reserved, 16384K 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 - 0xffff000008940000   (  8960 KB)
[    0.000000]     .rodata : 0xffff000008940000 - 0xffff000008d30000   (  4032 KB)
[    0.000000]       .init : 0xffff000008d30000 - 0xffff000008e40000   (  1088 KB)
[    0.000000]       .data : 0xffff000008e40000 - 0xffff000008f36200   (   985 KB)
[    0.000000]        .bss : 0xffff000008f36200 - 0xffff000008f7d6ac   (   286 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]  Build-time adjustment of leaf fanout to 64.
[    0.000000]  RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=4
[    0.000000] NR_IRQS:64 nr_irqs:64 0
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arm_arch_timer: Architected 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.000003] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000304] Console: colour dummy device 80x25
[    0.000353] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.000362] pid_max: default: 32768 minimum: 301
[    0.000420] Security Framework initialized
[    0.000830] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.002352] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.003039] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.003053] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.011997] ASID allocator initialised with 65536 entries
[    0.032545] EFI services will not be available.
[    0.048051] smp: Bringing up secondary CPUs ...
[    0.080259] Detected VIPT I-cache on CPU1
[    0.080305] CPU1: Booted secondary processor [410fd034]
[    0.112292] Detected VIPT I-cache on CPU2
[    0.112323] CPU2: Booted secondary processor [410fd034]
[    0.144335] Detected VIPT I-cache on CPU3
[    0.144365] CPU3: Booted secondary processor [410fd034]
[    0.144412] smp: Brought up 1 node, 4 CPUs
[    0.144430] SMP: Total of 4 processors activated.
[    0.144436] CPU features: detected feature: 32-bit EL0 Support
[    0.144474] CPU: All CPU(s) started at EL2
[    0.144494] alternatives: patching kernel code
[    0.145045] devtmpfs: initialized
[    0.147624] DMI not present or invalid.
[    0.147802] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.147848] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.148330] pinctrl core: initialized pinctrl subsystem
[    0.149573] NET: Registered protocol family 16
[    0.151015] cpuidle: using governor menu
[    0.151466] vdso: 2 pages (1 code @ ffff000008947000, 1 data @ ffff000008e45000)
[    0.151485] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.152969] DMA: preallocated 256 KiB pool for atomic allocations
[    0.153341] Serial: AMBA PL011 UART driver
[    0.166257] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    0.167212] ACPI: Interpreter disabled.
[    0.169330] vgaarb: loaded
[    0.169655] SCSI subsystem initialized
[    0.169859] libata version 3.00 loaded.
[    0.170276] usbcore: registered new interface driver usbfs
[    0.170349] usbcore: registered new interface driver hub
[    0.170434] usbcore: registered new device driver usb
[    0.171069] pps_core: LinuxPPS API ver. 1 registered
[    0.171078] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.171120] PTP clock support registered
[    0.171388] dmi: Firmware registration failed.
[    0.171721] Advanced Linux Sound Architecture Driver Initialized.
[    0.172587] clocksource: Switched to clocksource arch_sys_counter
[    0.172725] VFS: Disk quotas dquot_6.6.0
[    0.172771] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.173056] pnp: PnP ACPI: disabled
[    0.180543] NET: Registered protocol family 2
[    0.180995] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.181147] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    0.181371] TCP: Hash tables configured (established 16384 bind 16384)
[    0.181484] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    0.181538] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    0.181689] NET: Registered protocol family 1
[    0.181991] RPC: Registered named UNIX socket transport module.
[    0.181999] RPC: Registered udp transport module.
[    0.182003] RPC: Registered tcp transport module.
[    0.182007] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.182016] PCI: CLS 0 bytes, default 128
[    0.182178] Unpacking initramfs...
[    0.439482] Freeing initrd memory: 6220K
[    0.439977] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[    0.440267] kvm [1]: 8-bit VMID
[    0.440273] kvm [1]: IDMAP page: 1934000
[    0.440277] kvm [1]: HYP VA range: 800000000000:ffffffffffff
[    0.440934] kvm [1]: Hyp mode initialized successfully
[    0.440968] kvm [1]: vgic-v2@c4304000
[    0.441045] kvm [1]: vgic interrupt IRQ1
[    0.441056] kvm [1]: virtual timer IRQ4
[    0.443284] audit: initializing netlink subsys (disabled)
[    0.443379] audit: type=2000 audit(0.440:1): state=initialized audit_enabled=0 res=1
[    0.443870] workingset: timestamp_bits=44 max_order=19 bucket_order=0
[    0.451847] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.452530] NFS: Registering the id_resolver key type
[    0.452555] Key type id_resolver registered
[    0.452559] Key type id_legacy registered
[    0.452569] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.452818] 9p: Installing v9fs 9p2000 file system support
[    0.454874] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.454963] io scheduler noop registered
[    0.455105] io scheduler cfq registered (default)
[    0.455111] io scheduler mq-deadline registered
[    0.465365] of_pwm_get(): PWM chip not found
[    0.468371] xenfs: not registering filesystem on non-xen platform
[    0.471525] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.473643] SuperH (H)SCI(F) driver initialized
[    0.474059] c11084c0.serial: ttyAML1 at MMIO 0xc11084c0 (irq = 10, base_baud = 1500000) is a meson_uart
[    0.474379] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 14, base_baud = 1500000) is a meson_uart
[    1.317624] console [ttyAML0] enabled
[    1.321562] c81004e0.serial: ttyAML2 at MMIO 0xc81004e0 (irq = 15, base_baud = 1500000) is a meson_uart
[    1.330987] msm_serial: driver initialized
[    1.345953] loop: module loaded
[    1.346494] hisi_sas: driver version v1.6
[    1.350069] mdio-mux-mmioreg c883455c.eth-phy-mux: failed to register mdio-mux bus /soc/periphs@c8834000/eth-phy-mux
[    1.358469] libphy: Fixed MDIO Bus: probed
[    1.362493] tun: Universal TUN/TAP device driver, 1.6
[    1.366948] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    1.374580] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[    1.378860] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    1.384819] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
[    1.391607] igb: Copyright (c) 2007-2014 Intel Corporation.
[    1.397202] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[    1.404890] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[    1.410841] sky2: driver version 1.30
[    1.415185] VFIO - User Level meta-driver version: 0.3
[    1.421185] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.425944] ehci-pci: EHCI PCI platform driver
[    1.430416] ehci-platform: EHCI generic platform driver
[    1.435751] ehci-exynos: EHCI EXYNOS driver
[    1.439840] ehci-msm: Qualcomm On-Chip EHCI Host Controller
[    1.445348] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.451319] ohci-pci: OHCI PCI platform driver
[    1.455804] ohci-platform: OHCI generic platform driver
[    1.461076] ohci-exynos: OHCI EXYNOS driver
[    1.465749] usbcore: registered new interface driver usb-storage
[    1.473808] i2c /dev entries driver
[    1.479536] sdhci: Secure Digital Host Controller Interface driver
[    1.480523] sdhci: Copyright(c) Pierre Ossman
[    1.485367] Synopsys Designware Multimedia Card Interface Driver
[    1.492201] meson-gx-mmc d0072000.mmc: Got CD GPIO
[    1.536945] meson-gx-mmc d0074000.mmc: allocated mmc-pwrseq
[    1.577014] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.577958] of_pwm_get(): PWM chip not found
[    1.579070] mmc0: new high speed SDHC card at address 0007
[    1.579616] mmcblk0: mmc0:0007 SD16G 14.7 GiB
[    1.580921]  mmcblk0: p1 p2
[    1.595973] leds_pwm pwmleds: unable to request PWM for vim:red:power: -517
[    1.601180] ledtrig-cpu: registered to indicate activity on CPUs
[    1.607380] meson-sm: secure-monitor enabled
[    1.611493] usbcore: registered new interface driver usbhid
[    1.616589] usbhid: USB HID core driver
[    1.620647] platform-mhu c883c404.mailbox: Platform MHU Mailbox registered
[    1.630246] Initializing XFRM netlink socket
[    1.632452] NET: Registered protocol family 17
[    1.636672] 9pnet: Installing 9P2000 support
[    1.639977] Key type dns_resolver registered
[    1.644792] registered taskstats version 1
[    1.651156] of_pwm_get(): PWM chip not found
[    1.653493] mdio-mux-mmioreg c883455c.eth-phy-mux: failed to register mdio-mux bus /soc/periphs@c8834000/eth-phy-mux
[    1.665716] of_pwm_get(): PWM chip not found
[    1.667087] leds_pwm pwmleds: unable to request PWM for vim:red:power: -517
[    1.674911] scpi_protocol scpi: SCP Protocol 0.0 Firmware 0.0.0 version
[    1.689004] cpu cpu0: bL_cpufreq_init: CPU 0 initialized
[    1.690666] arm_big_little: bL_cpufreq_register: Registered platform driver: scpi
[    1.697679] of_pwm_get(): PWM chip not found
[    1.701481] mdio-mux-mmioreg c883455c.eth-phy-mux: failed to register mdio-mux bus /soc/periphs@c8834000/eth-phy-mux
[    1.713439] of_pwm_get(): PWM chip not found
[    1.714990] leds_pwm pwmleds: unable to request PWM for vim:red:power: -517
[    1.722183] hctosys: unable to open rtc device (rtc0)
[    1.727004] ALSA device list:
[    1.729826]   No soundcards found.
[    1.739160] Freeing unused kernel memory: 1088K
[    1.774615] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    1.776453] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    1.777801] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.777910] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.778930] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.779103] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.779295] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.779550] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.779787] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.779834] random: udevadm: uninitialized urandom read (16 bytes read)
[    1.835817] mmc1: new HS200 MMC card at address 0001
[    1.841161] mmcblk1: mmc1:0001 AWPD3R 14.6 GiB
[    1.850667] mmcblk1boot0: mmc1:0001 AWPD3R partition 1 4.00 MiB
[    1.855460] mmcblk1boot1: mmc1:0001 AWPD3R partition 2 4.00 MiB
[    1.857760]  mmcblk1: p1 p2
[    1.861170] of_pwm_get(): PWM chip not found
[    1.864804] mdio-mux-mmioreg c883455c.eth-phy-mux: failed to register mdio-mux bus /soc/periphs@c8834000/eth-phy-mux
[    1.876989] of_pwm_get(): PWM chip not found
[    1.878465] leds_pwm pwmleds: unable to request PWM for vim:red:power: -517
[    1.881608] meson8b-dwmac c9410000.ethernet: PTP uses main clock
[    1.881616] meson8b-dwmac c9410000.ethernet: no reset control found
[    1.881961] stmmac - user ID: 0x11, Synopsys ID: 0x37
[    1.881969] meson8b-dwmac c9410000.ethernet: Ring mode enabled
[    1.881973] meson8b-dwmac c9410000.ethernet: DMA HW capability register supported
[    1.881978] meson8b-dwmac c9410000.ethernet: Normal descriptors
[    1.881980] meson8b-dwmac c9410000.ethernet: RX Checksum Offload Engine supported
[    1.881983] meson8b-dwmac c9410000.ethernet: COE Type 2
[    1.881986] meson8b-dwmac c9410000.ethernet: TX Checksum insertion supported
[    1.881988] meson8b-dwmac c9410000.ethernet: Wake-Up On Lan supported
[    1.882027] meson8b-dwmac c9410000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    1.882161] libphy: stmmac: probed
[    1.895298] meson-drm d0100000.vpu: No output connector available
[    1.965264] of_pwm_get(): PWM chip not found
[    1.970135] libphy: mdio_mux: probed
[    1.976131] libphy: mdio_mux: probed
[    1.976180] mdio-mux-mmioreg c883455c.eth-phy-mux: Version 1.0
[    1.984372] of_pwm_get(): PWM chip not found
[    1.986234] leds_pwm pwmleds: unable to request PWM for vim:red:power: -517
[    1.993485] of_pwm_get(): PWM chip not found
[    2.014394] random: fast init done
[    2.509792] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.956266] systemd[1]: System time before build time, advancing clock.
[    3.033292] NET: Registered protocol family 10
[    3.034050] Segment Routing with IPv6
[    3.088172] 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)
[    3.100846] systemd[1]: Detected architecture arm64.
[    3.125194] systemd[1]: Set hostname to <kvim>.
[    3.393829] systemd[1]: Reached target Remote File Systems (Pre).
[    3.408927] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    3.430012] systemd[1]: Created slice System Slice.
[    3.445833] systemd[1]: Created slice system-serial\x2dgetty.slice.
[    3.460835] systemd[1]: Listening on fsck to fsckd communication Socket.
[    3.480831] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    3.500875] systemd[1]: Listening on udev Control Socket.
[    3.767627] EXT4-fs (mmcblk1p2): re-mounted. Opts: errors=remount-ro
[    4.174365] systemd-journald[1256]: Received request to flush runtime journal from PID 1
[    4.392049] random: crng init done
[    4.695789] of_pwm_get(): PWM chip not found
[    4.695830] leds_pwm pwmleds: unable to request PWM for vim:red:power: -517
[    4.703649] meson-gx-mmc d0070000.mmc: allocated mmc-pwrseq
[    4.765964] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[    4.768254] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[    4.770518] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[    4.774543] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[    4.855506] mmc2: new high speed SDIO card at address 0001
[    5.159443] brcmfmac: F1 signature read @0x18000000=0x15264345
[    5.231512] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.txt failed with error -2
[    5.465862] new mount options do not match the existing superblock, will be ignored
[    5.564727] fuse init (API version 7.26)
[    5.773957] meson8b-dwmac c9410000.ethernet eth0: device MAC address 00:15:18:01:81:31
[    5.846376] Meson GXL Internal PHY 0.e40908ff:08: attached PHY driver [Meson GXL Internal PHY] (mii_bus:phy_addr=0.e40908ff:08, irq=-1)
[    5.914641] meson8b-dwmac c9410000.ethernet eth0: PTP not supported by HW
[    5.914849] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    6.265819] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
[    7.281441] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
[    7.970079] meson8b-dwmac c9410000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[    7.970333] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    9.385574] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.491512] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    9.547474] IPv6: ADDRCONF(NETDEV_UP): lxcbr0: link is not ready
[    9.853101] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[   13.637980] Bridge firewalling registered
[   14.130456] IPv6: ADDRCONF(NETDEV_UP): docker0: link is not ready

You can find a kernel image for download here.

2 Likes

Thank you, downloaded. Will check at home.

I tried both of Your ready-made cores (the links) and i’m Assembly. But while it is impossible to run. Kernel starts, but stops immediately (without message). The behavior is the same as if use the kernel from 3.14 is not the correct dtb file. I think the reason is not the correct u-boot (new kernel). Question, which version of u-boot You have used for testing on VIM ?

You need to modify the the u-boot environment in order to boot a mainline kernel.

  • The console device is now ttyAML0 instead of ttyS0
  • The dtb is called meson-gxl-s905x-khadas-vim.dtb instead of kvim.dtb
  • The kernel Image is called uImage an has to be started with bootm 0x1000000 0x2000000 0xc00000

I’m using the latest u-boot now, but the mainline kernel should boot with the previous version as well.

You may take a look here, I’ve started to write my own set of u-boot macros which makes it easier to manage different configurations at a time and choose a distinct one for booting.

1 Like

I updated u-boot to the latest version (170304). Dropped env in the default state. But the result is the same - no start kernel. Can you show the output of printenv from u-boot ? I want to compare with his as u-boot.

This is the u-boot statement list to boot the mainline kernel from eMMC (kernel image and root filesystem on 2nd partition(ext4)):

setenv fdt_addr_r    '0x01000000'
setenv fdt_high        '0x20000000'

setenv ramdisk_addr_r    '0x13000000'
setenv initrd_high    '0x60000000'

setenv kernel_addr_r    '0x01080000'

setenv kernel 'uImage'
setenv ramdisk 'uInitrd'
setenv fdt 'meson-gxl-s905x-khadas-vim.dtb'

setenv part '1:2'
setenv dev 'mmc'
setenv prefix '/boot/kernel.d/linux-4.11.0-rc1-gx-gd7bf95a-dirty'

setenv bootargs 'console=tty0 console=ttyAML0,115200 earlyprintk=aml-uart,0xc81004c0 root=/dev/mmcblk0p2 rootwait rw fsck.repair=yes governor=ondemand no_console_suspend elevator=noop';
ext4load ${dev} ${part} ${kernel_addr_r} ${prefix}/${kernel};
ext4load ${dev} ${part} ${ramdisk_addr_r} ${prefix}/${ramdisk};
ext4load ${dev} ${part} ${fdt_addr_r} ${prefix}/${fdt};
bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r};
2 Likes

I’ve updated to kernel version 4.15, you can find the source here und images here. This image also boots on a VIM2 (using a different dtb). At this time USB is still unsupported but the tedious network errors/hangs have gone.

5 Likes

Hi umiddelb,

Long time no see, and thanks for your sharing.:wink:

2 Likes

small update: 4.17-rc3 comes with usb support for kvim and kvim2.
Please disable the internal wifi device first before boot, e.g. add

blacklist brcmfmac

to

/etc/modprobe.d/blacklist.conf

5 Likes

thank you! worth trying soon

Is it possible to have a complete image (ubuntu) with this 4.17 kernel, which an enduser can burn to khadas vim 1?
At the moment I use the kvim only for Coreelec, which is ok. But this wasnt the idea when I bought this thing.

I tried to to build kernel 4.17, but I failed

Go for an Armbian image by balbes150. See the thread here: rc3 images are in the test directory.

I have struggled, and failed, to get umiddelb work to boot, even copying it on top of an existing bootable SDcard.

Thanks, I have only noticed Kernel 4.16 Builds and didnt see the test directory.

The are some issues with the mainline kernel which you should know about.

The plan vanilla kernel doesn’t reduce the clock frequency for eMMC access, so you will experience lots of error messages. I’d recommend to build the mainline kernel from my repository.

The current u-boot loader fails to boot a mainline kernel unless the image is converted to an uImage, so you have to modify the boot environment.

1 Like

If you use two small patches, the main kernel can be easily started with any u-boot without any conversion of the resulting kernel file (Image) with the standard “booti” command. All images Armbian default to this mode and abilities core “4.1 x” on any u-boot.

2 Likes

I have difficulties to identify the right bits and pieces here

Here are the correct links.

1 Like