Tks @narmstrong
Now, @Terry @numbqq and @Gouwa
Could you update the fenix process to use neil’s patches on uboot and kernel ?
Tks @narmstrong
Now, @Terry @numbqq and @Gouwa
Could you update the fenix process to use neil’s patches on uboot and kernel ?
Hi ravelo,
Maybe more testing is needed for mainline u-boot.
trying to subsitute legacy u-boot w/ mainline u-boot in the existing automatic khadas building process (fenix for now) is probably needed to check if the u-boot and kernel still can be built without error; then we will need to check that there is no regression on the functional point of view for uboot, then for uboot+kernel+ubuntu
Hi ravelo,
I’ve tried Neil’s mainline u-boot, and booted successed, uart and ethernet can work, but sdcard can’t work.And many others.And I’ll add a mainline u-boot branch to Fenix for testing.
Thanks.
Hi @numbqq, do you mean that the internal functions of the mainline u-boot modified by neil are not anymore able to use the SDCARD ?
if so, then this is a roadblock (unless the OS to boot is on the EMMC),
I understand that, once ubuntu (or android) is booted, that OS can use all the hardware like if it was booted by the legacy u-boot, correct ?
Hi ravelo,
I made a quick compilation test, and found that sdcard can’t work. I will double check tomorrow.
Hey, has work on the Vim1 been abandoned… ?
Looks like it’s 99% of the way to having mainline linux support… I guess the release on the Vim2 has put a nail in the coffin for the Vim1
Hi, i personaly do not mind if sdcard does not work under uboot if emmc works fine
you know, I might have replied in the wrong thread
But looking at the “mainline linux” thread it seems like you’ve hit some walls with your awesome work. Seem the Khadas guys were helping you out before - so I thought I’d ping them
Wish I could be a bit more constructive - but building kernels is really outside my experience
Hi, Geokon:
Our team and 3rd party developers still working on VIM1, you can check that we just released both Android N and DualOS ROMs for both VIM1 and VIM2 last week, actually, as I said before, VIM1 users will get at least 5 years technical supporting.
Do worry about that, I think may be we still need to focus more and develop more better ROMs for both VIMs.
Anyway, thanks for the voice!
PS: it did off topic here
You can upload these files to u-boot ?
Hi balbes150,
Sorry I can’t understand well, do you mean u-boot image or source code?
Thanks.
I mean the files are ready
u-boot.bin
u-boot.bin.sd.bin
Hi numbqq
Tried your files, u-boot from the SD card starts.
Tried to compile from source Baylibre\u-boot\khadas-vim (using the instructions for building u-boot for Khadas). Got the file u-boot.bin u-boot-nodtb.bin u-boot.elf etc. have Tried to use these files, there is not any reaction. Maybe I incorrectly collected. What commands you used to build ?
By the way, your version of u-boot.bin.sd.bin the SD card works. I can manually load it with the kernel, initrd, dtb and run booti. The kernel starts normally. But for some reason not running the script executing s905_autoscript. The system writes about a bad voltage for the SD card. Perhaps the reason is that in the no team “autoscr” and have to try to use the command “source”.
Make a simple script (for mainline u-boot) to test the kernel from the SD card on VIM. Kernel 4.x this script runs, but the whole system has not yet run. I think it’s because of the wrong kernel and dtb.
https://yadi.sk/d/PW-H2_a23QDsjV
Log runs u-boot and system
3.368998] libphy: mdiGXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:3;RCY:0;EMMC:0;READ:0;CHK:AA;SD:0;READ:0;0.0;CHK:0;
no sdio debug board detected
TE: 703579
BL2 Built : 14:59:36, Aug 9 2017.
gxl ge8c6a83 - xiaobo.gu@droid12
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!
Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from SD, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from SD, src: 0x00020200, des: 0x05100000, size: 0x0002c600
Load bl33 from SD, src: 0x00050200, des: 0x01000000, size: 0x00064600
NOTICE: BL3-1: v1.0(release):801e730
NOTICE: BL3-1: Built : 22:09:38, Aug 10 2017
[BL31]: GXL CPU setup!
mpu_config_enable:ok
[Image: gxl_v1.1.3244-a3237e2 2017-08-16 14:01:18 hong.guo@droid04]
OPS=0x82
b0 c4 73 e0 9f 56 e8 5 65 6f e 2b [1.027867 Inits done]
secure task start!
high task start!
low task start!
ERROR: Error initializing runtime service opteed_fast
U-Boot 2017.11-rc1-02078-gabbda8e (Oct 24 2017 - 19:04:11 +0800) khadas-vim
DRAM: 2 GiB
MMC: mmc@70000: 0, mmc@72000: 1, mmc@74000: 2
Using default environment
In: serial@4c0
Out: serial@4c0
Err: serial@4c0
[BL31]: tee size: 0
[BL31]: tee size: 0
Net:
Warning: ethernet@c9410000 (eth0) using random MAC address
eth0: ethernet@c9410000
Hit any key to stop autoboot: 0
Card did not respond to voltage select!
mmc_init: -95, time 9
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1…
Found U-Boot script /boot.scr
reading /boot.scr
628 bytes read in 1 ms (613.3 KiB/s)
Executing script at 1f000000
reading uInitrd
5148100 bytes read in 222 ms (22.1 MiB/s)
reading zImage
17490432 bytes read in 749 ms (22.3 MiB/s)
reading dtb.img
25652 bytes read in 3 ms (8.2 MiB/s)
Loading init Ramdisk from Legacy Image at 13000000 …
Image Name: uInitrd
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 5148036 Bytes = 4.9 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum … OK
Flattened Device Tree blob at 01000000
Booting using the fdt blob at 0x1000000
Loading Ramdisk to 7da80000, end 7df68d84 … OK
Loading Device Tree to 000000007da76000, end 000000007da7f433 … OK
Starting kernel …
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.0-rc2-next-20170929-amlogics905x (root@user-VirtualBox) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)) #32 SMP PREEMPT Fri Sep7
[ 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 0x0000000071c00000, 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-0x000000007fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x7ffce500-0x7ffcffff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000001000000-0x000000007fffffff]
[ 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-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000001000000-0x000000007fffffff]
[ 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] random: fast init done
[ 0.000000] percpu: Embedded 23 pages/cpu @ffff80007ff6f000 s55960 r8192 d30056 u94208
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum 845719
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 511552
[ 0.000000] Policy zone: DMA
[ 0.000000] Kernel command line: root=LABEL=ROOTFS rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.repair=y=
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] Memory: 1827032K/2078720K available (11644K kernel code, 824K rwdata, 3904K rodata, 640K init, 559K bss, 59176K 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 : 0xffff000009080000 - 0xffff000009be0000 ( 11648 KB)
[ 0.000000] .rodata : 0xffff000009be0000 - 0xffff000009fc0000 ( 3968 KB)
[ 0.000000] .init : 0xffff000009fc0000 - 0xffff00000a060000 ( 640 KB)
[ 0.000000] .data : 0xffff00000a060000 - 0xffff00000a12e200 ( 825 KB)
[ 0.000000] .bss : 0xffff00000a12e200 - 0xffff00000a1b9f98 ( 560 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 - 0xffff7e0002000000 ( 31 MB actual)
[ 0.000000] memory : 0xffff800001000000 - 0xffff800080000000 ( 2032 MB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] vmstat: NUMA stat updates are skipped unless they have been used
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 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.000356] Console: colour dummy device 80x25
[ 0.000844] console [tty0] enabled
[ 0.000899] Calibrating delay loop (skipped), value calculated using timer frequency… 48.00 BogoMIPS (lpj=96000)
[ 0.000920] pid_max: default: 32768 minimum: 301
[ 0.000999] Security Framework initialized
[ 0.001722] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 0.002087] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.002122] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.002146] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.016002] ASID allocator initialised with 65536 entries
[ 0.023986] Hierarchical SRCU implementation.
[ 0.032329] EFI services will not be available.
[ 0.040026] smp: Bringing up secondary CPUs …
[ 0.068214] Detected VIPT I-cache on CPU1
[ 0.068262] CPU1: Booted secondary processor [410fd034]
[ 0.096248] Detected VIPT I-cache on CPU2
[ 0.096284] CPU2: Booted secondary processor [410fd034]
[ 0.124291] Detected VIPT I-cache on CPU3
[ 0.124323] CPU3: Booted secondary processor [410fd034]
[ 0.124383] smp: Brought up 1 node, 4 CPUs
[ 0.124444] SMP: Total of 4 processors activated.
[ 0.124456] CPU features: detected feature: 32-bit EL0 Support
[ 0.124582] CPU: All CPU(s) started at EL2
[ 0.124607] alternatives: patching kernel code
[ 0.125264] devtmpfs: initialized
[ 0.129377] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.129440] futex hash table entries: 1024 (order: 5, 131072 bytes)
[ 0.133369] xor: measuring software checksum speed
[ 0.172276] 8regs : 2303.000 MB/sec
[ 0.212301] 8regs_prefetch: 2053.000 MB/sec
[ 0.252331] 32regs : 2830.000 MB/sec
[ 0.292364] 32regs_prefetch: 2379.000 MB/sec
[ 0.292375] xor: using function: 32regs (2830.000 MB/sec)
[ 0.292393] pinctrl core: initialized pinctrl subsystem
[ 0.293136] DMI not present or invalid.
[ 0.293404] NET: Registered protocol family 16
[ 0.293815] audit: initializing netlink subsys (disabled)
[ 0.293926] audit: type=2000 audit(0.292:1): state=initialized audit_enabled=0 res=1
[ 0.294672] cpuidle: using governor menu
[ 0.295342] vdso: 2 pages (1 code @ ffff000009be6000, 1 data @ ffff00000a065000)
[ 0.295373] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.297071] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.297229] Serial: AMBA PL011 UART driver
[ 0.311145] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.376608] raid6: int64x1 gen() 469 MB/s
[ 0.444684] raid6: int64x1 xor() 442 MB/s
[ 0.512719] raid6: int64x2 gen() 710 MB/s
[ 0.580710] raid6: int64x2 xor() 599 MB/s
[ 0.648765] raid6: int64x4 gen() 1025 MB/s
[ 0.716826] raid6: int64x4 xor() 743 MB/s
[ 0.784865] raid6: int64x8 gen() 1172 MB/s
[ 0.852931] raid6: int64x8 xor() 750 MB/s
[ 0.920984] raid6: neonx1 gen() 761 MB/s
[ 0.988986] raid6: neonx1 xor() 846 MB/s
[ 1.057033] raid6: neonx2 gen() 1228 MB/s
[ 1.125097] raid6: neonx2 xor() 1209 MB/s
[ 1.193160] raid6: neonx4 gen() 1583 MB/s
[ 1.261186] raid6: neonx4 xor() 1460 MB/s
[ 1.329225] raid6: neonx8 gen() 1692 MB/s
[ 1.397278] raid6: neonx8 xor() 1549 MB/s
[ 1.397288] raid6: using algorithm neonx8 gen() 1692 MB/s
[ 1.397303] raid6: … xor() 1549 MB/s, rmw enabled
[ 1.397314] raid6: using neon recovery algorithm
[ 1.397710] ACPI: Interpreter disabled.
[ 1.398959] vgaarb: loaded
[ 1.399208] SCSI subsystem initialized
[ 1.399616] usbcore: registered new interface driver usbfs
[ 1.399683] usbcore: registered new interface driver hub
[ 1.399766] usbcore: registered new device driver usb
[ 1.400110] pps_core: LinuxPPS API ver. 1 registered
[ 1.400131] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it
[ 1.400160] PTP clock support registered
[ 1.400373] EDAC MC: Ver: 3.0.0
[ 1.400675] dmi: Firmware registration failed.
[ 1.400862] Advanced Linux Sound Architecture Driver Initialized.
[ 1.401649] clocksource: Switched to clocksource arch_sys_counter
[ 1.401817] VFS: Disk quotas dquot_6.6.0
[ 1.401872] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 1.402008] pnp: PnP ACPI: disabled
[ 1.407044] NET: Registered protocol family 2
[ 1.407504] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 1.407667] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[ 1.407899] TCP: Hash tables configured (established 16384 bind 16384)
[ 1.408021] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[ 1.408083] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[ 1.408237] NET: Registered protocol family 1
[ 1.408551] RPC: Registered named UNIX socket transport module.
[ 1.408567] RPC: Registered udp transport module.
[ 1.408577] RPC: Registered tcp transport module.
[ 1.408586] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.408746] Unpacking initramfs…
[ 1.617862] Freeing initrd memory: 5024K
[ 1.618538] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[ 1.618854] kvm [1]: 8-bit VMID
[ 1.618869] kvm [1]: IDMAP page: 11bcf000
[ 1.618878] kvm [1]: HYP VA range: 800000000000:ffffffffffff
[ 1.619524] kvm [1]: Hyp mode initialized successfully
[ 1.619617] kvm [1]: vgic-v2@c4304000
[ 1.619701] kvm [1]: vgic interrupt IRQ1
[ 1.619721] kvm [1]: virtual timer IRQ4
[ 1.623168] workingset: timestamp_bits=44 max_order=19 bucket_order=0
[ 1.628896] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 1.629480] NFS: Registering the id_resolver key type
[ 1.629519] Key type id_resolver registered
[ 1.629529] Key type id_legacy registered
[ 1.629546] nfs4filelayout_init: NFSv4 File Layout Driver Registering…
[ 1.629577] ntfs: driver 2.1.32 [Flags: R/W].
[ 1.629965] fuse init (API version 7.26)
[ 1.630508] JFS: nTxBlock = 8192, nTxLock = 65536
[ 1.634874] SGI XFS with security attributes, no debug enabled
[ 1.635976] 9p: Installing v9fs 9p2000 file system support
[ 1.636336] ocfs2: Registered cluster interface o2cb
[ 1.636523] OCFS2 User DLM kernel interface loaded
[ 1.638411] gfs2: GFS2 installed
[ 1.640794] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 1.640824] io scheduler noop registered
[ 1.641044] io scheduler cfq registered (default)
[ 1.641061] io scheduler mq-deadline registered
[ 1.641071] io scheduler kyber registered
[ 1.647921] soc soc0: Amlogic Meson GXL (S905D) Revision 21:82 (b:2) Detected
[ 1.651044] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 1.652591] c11084c0.serial: ttyAML1 at MMIO 0xc11084c0 (irq = 10, base_baud = 1500000) is a meson_uart
[ 1.653014] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 15, base_baud = 1500000) is a meson_uart
[ 2.626932] console [ttyAML0] enabled
[ 2.630956] c81004e0.serial: ttyAML2 at MMIO 0xc81004e0 (irq = 16, base_baud = 1500000) is a meson_uart
[ 2.641038] meson-drm d0100000.vpu: Queued 2 outputs on vpu
[ 2.646089] meson-drm d0100000.vpu: Failed to create debugfs directory
[ 2.651873] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.658395] [drm] No driver support for vblank timestamp query.
Hi balbes150,
So you can load files from SD card? When try to read SD card info, I got some errors.
=> mmcinfo
Card did not respond to voltage select!
mmc_init: -95, time 9
=>
This message does not stop to retrieve files from SD card. Pay attention to the number of the SD card in this u-boot is set to 1 (fatload mmc 1 0x1100000 zImage).
Above I showed the log run from SD card the kernel (using the automatic script boot.scr).
Now check the run this u-boot with SD card in the VIM2 (S912) … everything works the same as VIM (S905X) . This means that these files, u-boot has support for both platforms VIM and VIM2.