ARM64 – Odroid C2 – U-Boot Boots..
After some valuable info received from Brad (see comment on my earlier article, at http://rglinuxtech.com/?p=1723 ), I found the complete set of four patches for initial C2 U-Boot support, and applied these to the latest (May 9) GIT version of U-Boot.. Thanks are also due to Beniamino Galvani for producing these patches..
Detailed instruction on how to cross-compile and create the necessary U-Boot binaries, and install them on the SDcard (or eMMC), can be found in the file u-boot/board/hardkernel/odroid-c2/README after the patches have been applied.. You may have to modify the export CROSS_COMPILE=aarch64-xxxxxx line to match your particular compiler.. For Fedora 23 I changed it to export CROSS_COMPILE=aarch64-linux-gnu-
There is currently no support for MMC etc, so I had to set up a tftp U-Boot command and put the kernel Image and dtb files in /var/lib/tftpboot on the server.. I used the ‘latest’ version of the linux-next kernel, which also has very basic support for the C2..
setenv loadaddr "0x11000000" setenv dtb_loadaddr "0x1000000" setenv serverip 192.168.0.XX setenv ipaddr 192.168.0.XX setenv bootargs "root=/dev/mmcblk0p1 rootwait rw" setenv bootcmd "tftp ${loadaddr} Image; tftp ${dtb_loadaddr} meson-gxbb-odroidc2.dtb; booti ${loadaddr} - ${dtb_loadaddr}"
This produced a partial boot into the Linux kernel, which ended when there was – as expected – no MMC available.. I found that I had to truncate the original bootargs parameters to get the kernel to boot, for some reason..
DataBus test pass! AddrBus test pass! Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x000000b0 Load bl30 from eMMC, src: 0x00010200, des: 0x01000000, size: 0x00009ef0 Sending bl30........................................OK. Run bl30... Load bl301 from eMMC, src: 0x0001c200, des: 0x01000000, size: 0x000017c0 Wait bl30...Done Sending bl301......OK. Run bl301... rom eMMC, src: 0x00020200, des: 0x10100000, size: 0x00011130 --- UART initialized after reboot --- [Reset cause: unknown] [Image: unknown, amlogic_v1.1.3046-00db630 2015-10-28 15:24:31 xiaobo.gu@droid05] bl30: check_permit, count is 1 bl30: check_permit: ok! chipid: ef Load bl33 from eMMC, src: 0x00034200, des: 0x01000000, size: 0x00048ed0 be ad de d f0 ad ba ef be ad de not ES chip [0.298440 Inits done] secure task start! high task start! low task start! NOTICE: BL3-1: v1.0(debug):4d2e34d NOTICE: BL3-1: Built : 17:08:35, Oct 29 2015 INFO: BL3-1: Initializing runtime services 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 2016.05-rc3 (May 09 2016 - 21:39:59 -0700) odroid-c2 DRAM: 2 GiB MMC: MMC Device 0 not found *** Warning - No MMC card found, using default environment In: serial@4c0 Out: serial@4c0 Err: serial@4c0 Net: eth0: eth_designware Odroid C2# setenv loadaddr "0x11000000" Odroid C2# setenv dtb_loadaddr "0x1000000" Odroid C2# setenv serverip 192.168.0.XX Odroid C2# setenv ipaddr 192.168.0.XX Odroid C2# setenv bootargs "root=/dev/mmcblk0p1 rootdelay 2" Odroid C2# setenv bootcmd "tftp ${loadaddr} Image; tftp ${dtb_loadaddr} meson-gxbb-odroidc2.dtb; booti ${loadaddr} - ${dtb_loadaddr}" Odroid C2# boot Speed: 1000, full duplex Using eth_designware device TFTP from server 192.168.0.XX; our IP address is 192.168.0.XX Filename 'Image'. Load address: 0x11000000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################# 6.5 MiB/s done Bytes transferred = 9298944 (8de400 hex) Speed: 1000, full duplex Using eth_designware device TFTP from server 192.168.0.XX; our IP address is 192.168.0.XX Filename 'meson-gxbb-odroidc2.dtb'. Load address: 0x1000000 Loading: # 2.6 MiB/s done Bytes transferred = 2734 (aae hex) ## Flattened Device Tree blob at 01000000 Booting using the fdt blob at 0x1000000 Loading Device Tree to 000000007df63000, end 000000007df66aad ... OK Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.6.0-rc7-next-20160510 (rgadsdon@rglinux-i7) (gcc version 5.3.1 20160212 (Red Hat Cross 5.3.1-2) (GCC) ) #1 SMP PREEMPT Tue May 10 00:17:17 PDT 2016 [ 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 0x000000007f000000 [ 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 18 pages/cpu @ffff80007ef9b000 s42520 r0 d31208 u73728 [ 0.000000] Detected VIPT I-cache on CPU0 [ 0.000000] CPU features: enabling workaround for ARM erratum 845719 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 512064 [ 0.000000] Kernel command line: root=/dev/mmcblk0p1 rootdelay 2 [ 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: 14832(90%) [ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes) [ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes) [ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes) [ 0.000000] software IO TLB [mem 0x78800000-0x7c800000] (64MB) mapped at [ffff800078800000-ffff80007c7fffff] [ 0.000000] Memory: 1952788K/2080768K available (6576K kernel code, 377K rwdata, 1676K rodata, 448K init, 232K bss, 111596K 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 - 0xffff0000086e0000 ( 6528 KB) [ 0.000000] .rodata : 0xffff0000086e0000 - 0xffff000008890000 ( 1728 KB) [ 0.000000] .init : 0xffff000008890000 - 0xffff000008900000 ( 448 KB) [ 0.000000] .data : 0xffff000008900000 - 0xffff00000895e400 ( 377 KB) [ 0.000000] .bss : 0xffff00000895e400 - 0xffff0000089987a4 ( 233 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] Preemptible hierarchical RCU implementation. [ 0.000000] Build-time adjustment of leaf fanout to 64. [ 0.000000] NR_IRQS:64 nr_irqs:64 0 [ 0.000000] GIC: Using split EOI/Deactivate mode [ 0.000000] 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.000002] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns [ 0.000079] Console: colour dummy device 80x25 [ 0.000516] console [tty0] enabled [ 0.000535] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000) [ 0.000556] pid_max: default: 32768 minimum: 301 [ 0.000606] Security Framework initialized [ 0.000640] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes) [ 0.000653] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes) [ 0.001195] ASID allocator initialised with 65536 entries [ 0.001557] EFI services will not be available. [ 0.002400] Detected VIPT I-cache on CPU1 [ 0.002430] CPU1: Booted secondary processor [410fd034] [ 0.003209] Detected VIPT I-cache on CPU2 [ 0.003224] CPU2: Booted secondary processor [410fd034] [ 0.003992] Detected VIPT I-cache on CPU3 [ 0.004007] CPU3: Booted secondary processor [410fd034] [ 0.004036] Brought up 4 CPUs [ 0.004097] SMP: Total of 4 processors activated. [ 0.004108] CPU features: detected feature: 32-bit EL0 Support [ 0.004122] CPU: All CPU(s) started at EL2 [ 0.004143] alternatives: patching kernel code [ 0.004838] devtmpfs: initialized [ 0.005445] DMI not present or invalid. [ 0.005571] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.006436] NET: Registered protocol family 16 [ 0.016021] cpuidle: using governor menu [ 0.016079] vdso: 2 pages (1 code @ ffff0000086e6000, 1 data @ ffff000008904000) [ 0.016102] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. [ 0.016562] DMA: preallocated 256 KiB pool for atomic allocations [ 0.016613] Serial: AMBA PL011 UART driver [ 0.032294] HugeTLB registered 2 MB page size, pre-allocated 0 pages [ 0.032995] SCSI subsystem initialized [ 0.033139] usbcore: registered new interface driver usbfs [ 0.033173] usbcore: registered new interface driver hub [ 0.033229] usbcore: registered new device driver usb [ 0.033353] pps_core: LinuxPPS API ver. 1 registered [ 0.033364] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.033392] PTP clock support registered [ 0.033487] dmi: Firmware registration failed. [ 0.034284] clocksource: Switched to clocksource arch_sys_counter [ 0.034392] VFS: Disk quotas dquot_6.6.0 [ 0.034432] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.039281] NET: Registered protocol family 2 [ 0.039624] TCP established hash table entries: 16384 (order: 5, 131072 bytes) [ 0.039746] TCP bind hash table entries: 16384 (order: 6, 262144 bytes) [ 0.039958] TCP: Hash tables configured (established 16384 bind 16384) [ 0.040029] UDP hash table entries: 1024 (order: 3, 32768 bytes) [ 0.040070] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes) [ 0.040190] NET: Registered protocol family 1 [ 0.040340] RPC: Registered named UNIX socket transport module. [ 0.040352] RPC: Registered udp transport module. [ 0.040362] RPC: Registered tcp transport module. [ 0.040372] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.040658] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available [ 0.041509] futex hash table entries: 1024 (order: 5, 131072 bytes) [ 0.041582] audit: initializing netlink subsys (disabled) [ 0.041633] audit: type=2000 audit(0.036:1): initialized [ 0.041979] workingset: timestamp_bits=44 max_order=19 bucket_order=0 [ 0.048252] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.048790] NFS: Registering the id_resolver key type [ 0.048827] Key type id_resolver registered [ 0.048837] Key type id_legacy registered [ 0.048853] Installing knfsd (copyright (C) 1996 okir@monad.swb.de). [ 0.049369] fuse init (API version 7.24) [ 0.051926] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249) [ 0.051958] io scheduler noop registered [ 0.052062] io scheduler cfq registered (default) [ 0.052355] xenfs: not registering filesystem on non-xen platform [ 0.054205] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 0.054998] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 10, base_baud = 1500000) is a meson_uart [ 0.721689] console [ttyAML0] enabled [ 0.725612] [drm] Initialized drm 1.1.0 20060810 [ 0.729953] Unable to detect cache hierarchy from DT for CPU 0 [ 0.738525] loop: module loaded [ 0.739243] tun: Universal TUN/TAP device driver, 1.6 [ 0.743785] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com> [ 0.750185] VFIO - User Level meta-driver version: 0.3 [ 0.755253] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.761482] ehci-platform: EHCI generic platform driver [ 0.766657] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 0.772747] ohci-platform: OHCI generic platform driver [ 0.778011] usbcore: registered new interface driver usb-storage [ 0.783930] usbcore: registered new interface driver usbserial [ 0.789908] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers [ 0.798656] mousedev: PS/2 mouse device common for all mice [ 0.804214] i2c /dev entries driver [ 0.807760] sdhci: Secure Digital Host Controller Interface driver [ 0.813558] sdhci: Copyright(c) Pierre Ossman [ 0.817903] Synopsys Designware Multimedia Card Interface Driver [ 0.823834] sdhci-pltfm: SDHCI platform and OF driver helper [ 0.829470] ledtrig-cpu: registered to indicate activity on CPUs [ 0.835661] usbcore: registered new interface driver usbhid [ 0.840887] usbhid: USB HID core driver [ 0.844938] NET: Registered protocol family 17 [ 0.849149] Key type dns_resolver registered [ 0.853657] registered taskstats version 1 [ 0.857572] Key type encrypted registered [ 0.861467] hctosys: unable to open rtc device (rtc0) [ 0.872071] VFS: Cannot open root device "mmcblk0p1" or unknown-block(0,0): error -6 [ 0.874167] Please append a correct "root=" boot option; here are the available partitions: [ 0.882460] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) [ 0.890641] SMP: stopping secondary CPUs [ 0.894517] Kernel Offset: disabled [ 0.897964] Memory Limit: none [ 0.900986] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
That seems to be as far as I can get, at present… More progress will be possible when – at least – MMC support is available..
Robert Gadsdon. May 10, 2016.
what about using a SD card?
Same process applies for SDcard _or_ eMMC.. The removable ODROID eMMC module comes with a converter that plugs into a standard micro-SD slot..
RG.