We all know Odroid C2 support is being initialized in mainline kernel.
I would like to share the process of build and install the kernel so that developers could contribute to the mainline kernel.
Amlogic have different variant of development boards and rich feature sets of devices.
Hardkernel Odroid C2 is one of the device that have Amlogic S905 ARM 64 bit boards.
Here is the development link of the driver that have being merged http://linux-meson.com/doku.php
List of patches that are being considered. https://patchwork.kernel.org/project/li ... ogic/list/ for merge
So Here is the steps to compile the build and test Linux mainline kernel.
Code: Select all
odroid@odroid64:~$ cd /usr/src/
odroid@odroid64:/usr/src$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git odroidc2-4.y-final
odroid@odroid64:/usr/src/odroidc2-4.y-final$ cat build_kernelc2.sh
Code: Select all
#Build the kernel using odroidc2 defconfig
#make mrproper
make defconfig
make -j4 dtbs Image modules LOCALVERSION=-xmlc2
make modules_install LOCALVERSION=-xmlc2
mkimage -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 -n linux-next -d arch/arm64/boot/Image uImage
odroid@odroid64:/usr/src/odroidc2-4.y-final$ cat installc2.sh
Code: Select all
#/bin/bash
set +x
kernelversion=`cat ./include/config/kernel.release`
cp -v .config /boot/config-$kernelversion
echo "kernel version" $kernelversion
cp -v ./arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb /media/boot/meson-gxbb-odroidc2-$kernelversion.dtb
cp -v ./uImage /media/boot/uImage-$kernelversion
cp -v .config /media/boot/config-$kernelversion
sync
#reboot
Note: This is testing for new kernel.
Here are the command for testing.
Code: Select all
setenv bootargs "console=ttyAML0,115200"
setenv dtb_mem_addr "0x1000000"
fatload mmc 0:1 $dtb_mem_addr meson-gxbb-odroidc2-4.7.0-xmlc2.dtb
fatload mmc 0:1 0x01080000 uImage-4.7.0-xmlc2
bootm 0x1080000 - $dtb_mem_addr
Code: Select all
U-Boot 2015.01-00126-g8171a45 (Jun 15 2016 - 18:32:37)
DRAM: 2 GiB
Relocation Offset is: 76f3f000
-------------------------------------------------
* Welcome to Hardkernel's ODROID-C2
-------------------------------------------------
CPU : AMLogic S905
S/N : HKC213254DFCEAFA
MAC : 00:1e:06:33:37:7a
BID : HKC2211604
-------------------------------------------------
register usb cfg[1][0] = 0000000077f97de8
register usb cfg[0][1] = 0000000077f97e08
vpu detect type: 5
vpu clk_level = 7
set vpu clk: 666667000Hz, readback: 666660000Hz(0x300)
MMC: aml_priv->desc_buf = 0x0000000073f37d30
aml_priv->desc_buf = 0x0000000073f39ec0
SDIO Port B: 0, SDIO Port C: 1
ret = 1 .[mmc_init] mmc init success
In: serial
Out: serial
Err: serial
----------------------------------
MMC Size : 32 GB
----------------------------------
reading boot-logo.bmp.gz
** Unable to read file boot-logo.bmp.gz **
reading boot-logo.bmp
** Unable to read file boot-logo.bmp **
movi: the partiton 'logo' is reading...
MMC read: dev # 0, block # 58976, count 4096 ... 4096 blocks read: OK
hpd_state=1
[CANVAS]addr=0x3f800000 width=5760, height=2160
set hdmitx VIC = 16
hdmitx phy setting done
set hdmitx VIC = 16
hdmitx phy setting done
Error: Bad gzipped data
There is no valid bmp file at the given address
Net: Meson_Ethernet
Hit [Enter] key twice to stop autoboot: 0
odroidc2#
odroidc2#
odroidc2#
odroidc2#
odroidc2#
odroidc2#
odroidc2#setenv bootargs "console=ttyAML0,115200"
odroidc2#setenv dtb_mem_addr "0x1000000"
odroidc2#fatload mmc 0:1 $dtb_mem_addr meson-gxbb-odroidc2-4.7.0-xmlc2.dtb
reading meson-gxbb-odroidc2-4.7.0-xmlc2.dtb
2734 bytes read in 8 ms (333 KiB/s)
odroidc2#fatload mmc 0:1 0x01080000 uImage-4.7.0-xmlc2
reading uImage-4.7.0-xmlc2
12719680 bytes read in 576 ms (21.1 MiB/s)
odroidc2#bootm 0x1080000 - $dtb_mem_addr
ee_gate_off ...
## Booting kernel from Legacy Image at 01080000 ...
Image Name: linux-next
Image Type: AArch64 Linux Kernel Image (uncompressed)
Data Size: 12719616 Bytes = 12.1 MiB
Load Address: 01080000
Entry Point: 01080000
Verifying Checksum ... OK
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
Booting using the fdt blob at 0x1000000
Loading Kernel Image ... OK
kernel loaded at 0x01080000, end = 0x01ca1600
Loading Device Tree to 000000001fffc000, end 000000001ffffaad ... OK
Starting kernel ...
uboot time: 66303293 us
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.7.0-xmlc2 (root@odroid64) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.1) ) #1 SMP PREEMPT Mon Jul 25 03:22:18 EDT 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 0x0000000077000000
[ 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 20 pages/cpu @ffff800076f91000 s42776 r8192 d30952 u81920
[ 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: 483840
[ 0.000000] Kernel command line: console=ttyAML0,115200
[ 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: 14844(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 0x70a00000-0x74a00000] (64MB) mapped at [ffff800070a00000-ffff8000749fffff]
[ 0.000000] Memory: 1834692K/1966080K available (7620K kernel code, 645K rwdata, 3192K rodata, 960K init, 260K bss, 115004K 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 - 0xffff0000087e0000 ( 7552 KB)
[ 0.000000] .rodata : 0xffff0000087e0000 - 0xffff000008b10000 ( 3264 KB)
[ 0.000000] .init : 0xffff000008b10000 - 0xffff000008c00000 ( 960 KB)
[ 0.000000] .data : 0xffff000008c00000 - 0xffff000008ca1600 ( 646 KB)
[ 0.000000] .bss : 0xffff000008ca1600 - 0xffff000008ce2934 ( 261 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] 0xffff7e0000000000 - 0xffff7e0001e00000 ( 30 MB actual)
[ 0.000000] memory : 0xffff800000000000 - 0xffff800078000000 ( 1920 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] 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.000084] Console: colour dummy device 80x25
[ 0.000100] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.000107] pid_max: default: 32768 minimum: 301
[ 0.000149] Security Framework initialized
[ 0.000175] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000180] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000742] ASID allocator initialised with 65536 entries
[ 0.024120] EFI services will not be available.
[ 0.048698] Detected VIPT I-cache on CPU1
[ 0.048731] CPU1: Booted secondary processor [410fd034]
[ 0.064698] Detected VIPT I-cache on CPU2
[ 0.064714] CPU2: Booted secondary processor [410fd034]
[ 0.080713] Detected VIPT I-cache on CPU3
[ 0.080728] CPU3: Booted secondary processor [410fd034]
[ 0.080758] Brought up 4 CPUs
[ 0.080771] SMP: Total of 4 processors activated.
[ 0.080775] CPU features: detected feature: 32-bit EL0 Support
[ 0.080781] CPU: All CPU(s) started at EL2
[ 0.080794] alternatives: patching kernel code
[ 0.081450] devtmpfs: initialized
[ 0.082012] DMI not present or invalid.
[ 0.082126] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.082450] pinctrl core: initialized pinctrl subsystem
[ 0.083131] NET: Registered protocol family 16
[ 0.092134] cpuidle: using governor menu
[ 0.092209] vdso: 2 pages (1 code @ ffff0000087e6000, 1 data @ ffff000008c04000)
[ 0.092219] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.092688] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.092815] Serial: AMBA PL011 UART driver
[ 0.109087] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ 0.109550] ACPI: Interpreter disabled.
[ 0.109820] vgaarb: loaded
[ 0.109968] SCSI subsystem initialized
[ 0.110235] usbcore: registered new interface driver usbfs
[ 0.110267] usbcore: registered new interface driver hub
[ 0.110308] usbcore: registered new device driver usb
[ 0.110476] pps_core: LinuxPPS API ver. 1 registered
[ 0.110480] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.110497] PTP clock support registered
[ 0.110586] dmi: Firmware registration failed.
[ 0.110667] Advanced Linux Sound Architecture Driver Initialized.
[ 0.111125] clocksource: Switched to clocksource arch_sys_counter
[ 0.111199] VFS: Disk quotas dquot_6.6.0
[ 0.111232] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.111389] pnp: PnP ACPI: disabled
[ 0.115702] NET: Registered protocol family 2
[ 0.116029] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.116117] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[ 0.116300] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.116364] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[ 0.116396] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[ 0.116503] NET: Registered protocol family 1
[ 0.116643] RPC: Registered named UNIX socket transport module.
[ 0.116647] RPC: Registered udp transport module.
[ 0.116650] RPC: Registered tcp transport module.
[ 0.116652] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.116943] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[ 0.117448] kvm [1]: 8-bit VMID
[ 0.117452] kvm [1]: Hyp mode initialized successfully
[ 0.117482] kvm [1]: vgic-v2@c4304000
[ 0.117502] kvm [1]: vgic interrupt IRQ1
[ 0.117551] kvm [1]: virtual timer IRQ4
[ 0.118516] futex hash table entries: 1024 (order: 5, 131072 bytes)
[ 0.118582] audit: initializing netlink subsys (disabled)
[ 0.118629] audit: type=2000 audit(0.108:1): initialized
[ 0.118988] workingset: timestamp_bits=44 max_order=19 bucket_order=0
[ 0.124925] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.125427] NFS: Registering the id_resolver key type
[ 0.125455] Key type id_resolver registered
[ 0.125458] Key type id_legacy registered
[ 0.125580] fuse init (API version 7.25)
[ 0.125856] 9p: Installing v9fs 9p2000 file system support
[ 0.127306] io scheduler noop registered
[ 0.127425] io scheduler cfq registered (default)
[ 0.128949] xenfs: not registering filesystem on non-xen platform
[ 0.130816] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 0.131723] SuperH (H)SCI(F) driver initialized
[ 0.131861] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 10, base_baud = 1500000) is a meson_uart
[ 0.843567] console [ttyAML0] enabled
[ 0.847470] msm_serial: driver initialized
[ 0.851428] Unable to detect cache hierarchy from DT for CPU 0
[ 0.859828] loop: module loaded
[ 0.861058] tun: Universal TUN/TAP device driver, 1.6
[ 0.865108] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[ 0.871428] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 0.877021] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 0.882907] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.3.0-k
[ 0.889765] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 0.895315] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.0.2-k
[ 0.903048] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 0.908940] sky2: driver version 1.30
[ 0.912761] VFIO - User Level meta-driver version: 0.3
[ 0.918135] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.924098] ehci-pci: EHCI PCI platform driver
[ 0.928534] ehci-platform: EHCI generic platform driver
[ 0.933703] ehci-msm: Qualcomm On-Chip EHCI Host Controller
[ 0.939214] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.945321] ohci-pci: OHCI PCI platform driver
[ 0.949736] ohci-platform: OHCI generic platform driver
[ 0.954978] usbcore: registered new interface driver usb-storage
[ 0.961254] mousedev: PS/2 mouse device common for all mice
[ 0.966696] i2c /dev entries driver
[ 0.970356] sdhci: Secure Digital Host Controller Interface driver
[ 0.975964] sdhci: Copyright(c) Pierre Ossman
[ 0.980264] Synopsys Designware Multimedia Card Interface Driver
[ 0.986331] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.991978] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.998137] usbcore: registered new interface driver usbhid
[ 1.003274] usbhid: USB HID core driver
[ 1.007933] NET: Registered protocol family 17
[ 1.011524] 9pnet: Installing 9P2000 support
[ 1.015741] Key type dns_resolver registered
[ 1.020254] registered taskstats version 1
[ 1.024148] hctosys: unable to open rtc device (rtc0)
[ 1.029046] ALSA device list:
[ 1.031905] No soundcards found.
[ 1.041000] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[ 1.042818] Please append a correct "root=" boot option; here are the available partitions:
[ 1.051116] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 1.059294] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.7.0-xmlc2 #1
[ 1.065588] Hardware name: Hardkernel ODROID-C2 (DT)
[ 1.070504] Call trace:
[ 1.072927] [<ffff000008088948>] dump_backtrace+0x0/0x1a8
[ 1.078269] [<ffff000008088b04>] show_stack+0x14/0x20
[ 1.083273] [<ffff000008346454>] dump_stack+0x94/0xb8
[ 1.088276] [<ffff000008154334>] panic+0x10c/0x250
[ 1.093020] [<ffff000008b110f8>] mount_block_root+0x188/0x260
[ 1.098709] [<ffff000008b112ec>] mount_root+0x11c/0x134
[ 1.103885] [<ffff000008b11440>] prepare_namespace+0x13c/0x184
[ 1.109663] [<ffff000008b10d30>] kernel_init_freeable+0x1c4/0x1e8
[ 1.115702] [<ffff0000087c1568>] kernel_init+0x10/0x100
[ 1.120876] [<ffff000008084e90>] ret_from_fork+0x10/0x40
[ 1.126135] SMP: stopping secondary CPUs
[ 1.130019] Kernel Offset: disabled
[ 1.133466] Memory Limit: none
[ 1.136489] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
