UEFI ARM Linux boot

For the last few days, I have been working on switching u-boot based bootloader to UEFI based boot loader for a new platform at work. I found out it is useful to able to boot manually with kernel, dtb, initramfs. By doing this, if the thing doesn’t work, we can change any one of them to identify which one has issue.

armada7k boot manually

First you need prepare kernel image as “Image” format, device tree blob (dtb file), and initramfs.

  • Linux kernel image: The Linux Kernel (linux>=3.3) supports EFISTUB (EFI BOOT STUB) booting. This feature allows EFI firmware to load the kernel as an EFI executable from EFI shell. The option is enabled by default on Arch Linux kernels or can be activated by setting CONFIG_EFI_STUB=y in the Kernel configuration.
  • Make an initramfs file in cpio.gz format.
  • Build a dtb file from DTS file using "dtc": e.g. dtc -O dtb -I dts -o myboard.dtb myboard.dts

When all three images are ready, and loaded them into USB pendrive, which needs to be in FAT file system.

Cautions: The board needs to have UEFI boot loader image flashed in SPI flash.

  • If it is running u-boot, then the bootloader image (ATF + UEFI shell + any UEFI Applications) can be burn into SPI flash using u-boot command "bubt". Typically you want to first verify the new UEFI bootloader is working ok before burn into flash, this can be done by running from DRAM, here is an example: (*.fd file is UEFI binary to run, *.bin is ATF+UEFI binary)
  • Marvell>>  usb start
    ...
    Marvell>>  fatls usb 0:1
    06/29/2017  09:38               4,083  armada-7040.dtsi
    06/29/2017  09:37              23,880  armada-7040-sparrow-v1.dtb
    06/29/2017  09:38               5,952  armada-7040-sparrow-v1.dts
    06/29/2017  10:21              23,876  armada-7040-sparrow-v2.dtb
    06/29/2017  09:59          13,362,176  Image.440.eval
    04/14/2017  19:15          13,428,224  Image.anil
    04/19/2017  00:59          13,006,336  image.tsn.weweng
    04/14/2017  19:15          12,651,334  initramfs.anilURam
    04/19/2017  00:43          20,024,514  initramfs0328.uRam
    07/17/2017  15:01          20,024,450  initramfs-0328.cpio.gz
    06/26/2017  12:15           1,403,344  sparrow-u-bootloader-img.bin.S0
    07/19/2017  12:47           1,217,816  flash-image-17.06-u-boot.bin
    07/19/2017  18:14           1,048,576  uefi-img-cisco1.fd
    07/20/2017  09:30           1,048,576  uefi-img-efi-shell.fd
    07/20/2017  10:02           1,606,320  uefi-bootloader-efi-shell.bin
    07/20/2017  13:26           1,048,576  ARMADA_EFI.fd
    07/20/2017  17:27             393,216  CiscoRommon1.efi
    
    # load UEFI binary into DRAM at address 0x2000000
    Marvell>>  fatload usb 0:1 0x2000000 uefi-img-efi-shell.fd
    
    # relocate to address 0
    Marvell>>  cp 0x2000000 0 0x100000
    
    # run UEFI bootloader from address 0
    Marvell>>  go 0
    
    # after verify it boots to UEFI shell, then it can be burn into SPI chip:
    # first reboot the box back to u-boot prompt
    Marvell>> usb start
    Marvell>> fatls usb 0:1
    
    # Note this time you use the *.bin image which has ATF + UEFI together.
    Marvell>> bubt uefi-bootloader-efi-shell.bin spi usb
    
    # after completes, it is ready to reboot and get into UEFI shell
  • If it is running an old version UEFI boot loader and needs to be upgraded, using "fupdate" command.
  •  
    Shell:\> fs0:
    FS0:\> cls
    FS0:\> dir
    Directory of: FS0:\
    07/02/2017  10:49               2,831  linux-login-blogs.txt
    06/28/2017  16:42 <DIR>        32,768  bringup-june26
    06/29/2017  09:38               4,083  armada-7040.dtsi
    06/29/2017  09:37              23,880  armada-7040-sparrow-v1.dtb
    06/29/2017  09:38               5,952  armada-7040-sparrow-v1.dts
    06/29/2017  10:21              23,876  armada-7040-sparrow-v2.dtb
    06/29/2017  09:59          13,362,176  Image.440.eval
    04/14/2017  19:15          13,428,224  Image.anil
    04/19/2017  00:59          13,006,336  image.tsn.weweng
    04/14/2017  19:15          12,651,334  initramfs.anilURam
    04/19/2017  00:43          20,024,514  initramfs0328.uRam
    07/17/2017  15:01          20,024,450  initramfs-0328.cpio.gz
    06/26/2017  12:15           1,403,344  sparrow-u-bootloader-img.bin.S0
    07/19/2017  12:47           1,217,816  flash-image-17.06-u-boot.bin
    07/19/2017  18:14           1,048,576  uefi-img-cisco1.fd
    07/20/2017  09:30           1,048,576  uefi-img-efi-shell.fd
    07/20/2017  10:02           1,606,320  uefi-bootloader-efi-shell.bin
    07/20/2017  13:26           1,048,576  ARMADA_EFI.fd
    07/20/2017  17:27             393,216  CiscoRommon1.efi
    07/20/2017  17:43             393,216  CiscoRommon2.efi
    FS0:\> fupdate file:uefi-bootloader-efi-shell.bin
    ...
    # After it completes, reboot the box to UEFI shell

With UEFI shell ready and all images are ready , you can boot Linux now:

 
Shell:\> fs0:
FS0:\> cls
FS0:\> dir
Directory of: FS0:\
07/02/2017  10:49               2,831  linux-login-blogs.txt
06/28/2017  16:42 <DIR>        32,768  bringup-june26
06/29/2017  09:38               4,083  armada-7040.dtsi
06/29/2017  09:37              23,880  armada-7040-sparrow-v1.dtb
06/29/2017  09:38               5,952  armada-7040-sparrow-v1.dts
06/29/2017  10:21              23,876  armada-7040-sparrow-v2.dtb
06/29/2017  09:59          13,362,176  Image.440.eval
04/14/2017  19:15          13,428,224  Image.anil
04/19/2017  00:59          13,006,336  image.tsn.weweng
04/14/2017  19:15          12,651,334  initramfs.anilURam
04/19/2017  00:43          20,024,514  initramfs0328.uRam
07/17/2017  15:01          20,024,450  initramfs-0328.cpio.gz
06/26/2017  12:15           1,403,344  sparrow-u-bootloader-img.bin.S0
07/19/2017  12:47           1,217,816  flash-image-17.06-u-boot.bin
07/19/2017  18:14           1,048,576  uefi-img-cisco1.fd
07/20/2017  09:30           1,048,576  uefi-img-efi-shell.fd
07/20/2017  10:02           1,606,320  uefi-bootloader-efi-shell.bin
07/20/2017  13:26           1,048,576  ARMADA_EFI.fd
07/20/2017  17:27             393,216  CiscoRommon1.efi
07/20/2017  17:43             393,216  CiscoRommon2.efi
FS0:\> Image.440.eval dtb=armada-7040-sparrow-v2.dtb initrd=initramfs-0328.cpio.gz console=ttyS0,115200 emergency init=/bin/bash root=/dev/ram0 rw maxloop=64

EFI stub: Booting Linux Kernel...
ConvertPages: range 7F280000 - 7F28FFFF covers multiple entries
EFI stub: Using DTB from command line
EFI stub: Exiting boot services and installing virtual address map...
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.51-armada-17.02.2  (weweng@sjc-asr-124) (gcc version 5.3.0 (GCC) ) #1 SMP Fri Apr 7 11:46:27 PDT 2017
[    0.000000] Boot CPU: AArch64 Processor [410fd081]
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] EFI v2.60 by EDK II
[    0.000000] efi:  SMBIOS 3.0=0x77da0000  ACPI 2.0=0x6e760000
[    0.000000] cma: Reserved 128 MiB at 0x0000000078000000
[    0.000000] pkg not found or empty
[    0.000000]  - disabling package support
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] PERCPU: Embedded 15 pages/cpu @ffffffc0778c1000 s24472 r8192 d28776 u61440
[    0.000000] Detected PIPT I-cache on CPU0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 515088
[    0.000000] Kernel command line: Image.440.eval dtb=armada-7040-sparrow-v2.dtb initrd=initramfs-0328.cpio.gz console=ttyS0,115200 emergency init=/bin/bash root=/dev/ram0 rw maxloop=64
[    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: 14520(88%)
[    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 0x71500000-0x75500000] (64MB) mapped at [ffffffc071100000-ffffffc0750fffff]
[    0.000000] Memory: 1819492K/2093056K available (8820K kernel code, 553K rwdata, 3216K rodata, 452K init, 293K bss, 142492K reserved, 131072K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vmalloc : 0xffffff8000000000 - 0xffffffbdbfff0000   (   246 GB)
[    0.000000]     vmemmap : 0xffffffbdc0000000 - 0xffffffbfc0000000   (     8 GB maximum)
[    0.000000]               0xffffffbdc0010000 - 0xffffffbdc2000000   (    31 MB actual)
[    0.000000]     fixed   : 0xffffffbffa7fd000 - 0xffffffbffac00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbffae00000 - 0xffffffbffbe00000   (    16 MB)
[    0.000000]     modules : 0xffffffbffc000000 - 0xffffffc000000000   (    64 MB)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc07fc00000   (  2044 MB)
[    0.000000]       .init : 0xffffffc000c43000 - 0xffffffc000cb4000   (   452 KB)
[    0.000000]       .text : 0xffffffc000080000 - 0xffffffc000c43000   ( 12044 KB)
[    0.000000]       .data : 0xffffffc000cb4000 - 0xffffffc000d3e400   (   553 KB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] 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] GICv2m: Overriding V2M MSI_TYPER (base:160, num:32)
[    0.000000] GICv2m: Node v2m: range[0xf0280000:0xf0280fff], SPI[160:192]
[    0.000000] GICv2m: Overriding V2M MSI_TYPER (base:192, num:32)
[    0.000000] GICv2m: Node v2m: range[0xf0290000:0xf0290fff], SPI[192:224]
[    0.000000] GICv2m: Overriding V2M MSI_TYPER (base:224, num:32)
[    0.000000] GICv2m: Node v2m: range[0xf02a0000:0xf02a0fff], SPI[224:256]
[    0.000000] GICv2m: Overriding V2M MSI_TYPER (base:256, num:32)
[    0.000000] GICv2m: Node v2m: range[0xf02b0000:0xf02b0fff], SPI[256:288]
[    0.000000] mvebu-pic: registered with 19 irqs
[    0.000000] mvebu-sei: registered with 64 irqs
[    0.000000] Architected cp15 timer(s) running at 25.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x5c40939b5, max_idle_ns: 440795202646 ns
[    0.000002] sched_clock: 56 bits at 25MHz, resolution 40ns, wraps every 4398046511100ns
[    0.000117] Console: colour dummy device 80x25
[    0.000130] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=100000)
[    0.000137] pid_max: default: 32768 minimum: 301
[    0.000174] Security Framework initialized
[    0.000195] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000199] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000596] Initializing cgroup subsys memory
[    0.000613] Initializing cgroup subsys devices
[    0.000619] Initializing cgroup subsys freezer
[    0.000625] Initializing cgroup subsys net_cls
[    0.000630] Initializing cgroup subsys hugetlb
[    0.000652] Syspage size 3832 bytes, 300 task entries
[    0.001235] Remapping and enabling EFI services.
[    0.001242]   EFI remap 0x0000000077810000 => 0000000040000000
[    0.001323]   EFI remap 0x0000000077d20000 => 00000000403e0000
[    0.001377]   EFI remap 0x00000000f2284000 => 00000000406a4000
[    0.001390] ASID allocator initialised with 65536 entries
[    0.002085] Detected PIPT I-cache on CPU1
[    0.002119] CPU1: Booted secondary processor [410fd081]
[    0.002316] Detected PIPT I-cache on CPU2
[    0.002345] CPU2: Booted secondary processor [410fd081]
[    0.002536] Detected PIPT I-cache on CPU3
[    0.002555] CPU3: Booted secondary processor [410fd081]
[    0.002591] Brought up 4 CPUs
[    0.002603] SMP: Total of 4 processors activated.
[    0.002611] CPU: All CPU(s) started at EL2
[    0.002954] devtmpfs: initialized
[    0.005912] SMBIOS 3.0.0 present.
[    0.006035] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.006046] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.007836] xor: measuring software checksum speed
[    0.044003]    8regs     :  4819.000 MB/sec
[    0.084028]    8regs_prefetch:  4216.000 MB/sec
[    0.124055]    32regs    :  5523.000 MB/sec
[    0.164082]    32regs_prefetch:  4580.000 MB/sec
[    0.164085] xor: using function: 32regs (5523.000 MB/sec)
[    0.164101] pinctrl core: initialized pinctrl subsystem
[    0.164680] NET: Registered protocol family 16
[    0.176106] cpuidle: using governor ladder
[    0.186213] cpuidle: using governor menu
[    0.186335] vdso: 2 pages (1 code @ ffffffc000cb9000, 1 data @ ffffffc000cb8000)
[    0.186353] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.200479] DMA: preallocated 256 KiB pool for atomic allocations
[    0.200561] Serial: AMBA PL011 UART driver
[    0.289141] raid6: int64x1  gen()   844 MB/s
[    0.357179] raid6: int64x1  xor()   637 MB/s
[    0.425243] raid6: int64x2  gen()  1325 MB/s
[    0.493288] raid6: int64x2  xor()  1026 MB/s
[    0.561324] raid6: int64x4  gen()  1687 MB/s
[    0.629390] raid6: int64x4  xor()  1064 MB/s
[    0.697426] raid6: int64x8  gen()  1883 MB/s
[    0.765481] raid6: int64x8  xor()  1046 MB/s
[    0.833518] raid6: neonx1   gen()  1617 MB/s
[    0.901581] raid6: neonx1   xor()   985 MB/s
[    0.969628] raid6: neonx2   gen()  2494 MB/s
[    1.037683] raid6: neonx2   xor()  1600 MB/s
[    1.105722] raid6: neonx4   gen()  3232 MB/s
[    1.173777] raid6: neonx4   xor()  1990 MB/s
[    1.241813] raid6: neonx8   gen()  3124 MB/s
[    1.309861] raid6: neonx8   xor()  2109 MB/s
[    1.309865] raid6: using algorithm neonx4 gen() 3232 MB/s
[    1.309868] raid6: .... xor() 1990 MB/s, rmw enabled
[    1.309871] raid6: using intx1 recovery algorithm
[    1.309984] ACPI: Interpreter disabled.
[    1.310079] reg-fixed-voltage usb3-gpio-vbus: could not find pctldev for node /cpn-110-master/config-space/pinctrl@440000/xhci0-vbus-pins, deferring probe
[    1.310138] gpio-regulator ap806:config-space:regulator@0: No 'states' property found
[    1.310145] gpio-regulator: probe of ap806:config-space:regulator@0 failed with error -22
[    1.310312] arm-smmu f0100000.iommu: probing hardware configuration...
[    1.310317] arm-smmu f0100000.iommu: SMMUv2 with:
[    1.310322] arm-smmu f0100000.iommu:         stage 1 translation
[    1.310326] arm-smmu f0100000.iommu:         stage 2 translation
[    1.310329] arm-smmu f0100000.iommu:         nested translation
[    1.310334] arm-smmu f0100000.iommu:         coherent table walk
[    1.310339] arm-smmu f0100000.iommu:         stream matching with 16 register groups, mask 0x7fff
[    1.310344] arm-smmu f0100000.iommu:         8 context banks (0 stage-2 only)
[    1.310350] arm-smmu f0100000.iommu:         Supported page sizes: 0x60211000
[    1.310354] arm-smmu f0100000.iommu:         Stage-1: 48-bit VA -> 48-bit IPA
[    1.310358] arm-smmu f0100000.iommu:         Stage-2: 48-bit IPA -> 48-bit PA
[    1.310402] arm-smmu f0100000.iommu: registered 4 master devices
[    1.310817] iommu: Adding device f2500000.usb3 to group 0
[    1.310832] iommu: Adding device f26a0000.cpxor0 to group 1
[    1.310845] iommu: Adding device f26c0000.cpxor1 to group 2
[    1.311159] vgaarb: loaded
[    1.311289] SCSI subsystem initialized
[    1.311473] usbcore: registered new interface driver usbfs
[    1.311500] usbcore: registered new interface driver hub
[    1.311532] usbcore: registered new device driver usb
[    1.311805] pps_core: LinuxPPS API ver. 1 registered
[    1.311809] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.311820] PTP clock support registered
[    1.312519] clocksource: Switched to clocksource arch_sys_counter
[    1.312764] pnp: PnP ACPI: disabled
[    1.316183] NET: Registered protocol family 2
[    1.316432] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    1.316496] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    1.316624] TCP: Hash tables configured (established 16384 bind 16384)
[    1.316682] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    1.316699] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    1.316791] NET: Registered protocol family 1
[    1.316936] RPC: Registered named UNIX socket transport module.
[    1.316941] RPC: Registered udp transport module.
[    1.316944] RPC: Registered tcp transport module.
[    1.316948] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.317087] Trying to unpack rootfs image as initramfs...
[    1.317087] initrd_start 0xffffffc01ece0000 initrd_end 0xffffffc01fff8c82 size 20024450
[    1.961786] Freeing initrd memory: 19552K (ffffffc01ece0000 - ffffffc01fff8000)
[    1.962065] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available
[    1.962617] kvm [1]: 8-bit VMID
[    1.962622] kvm [1]: Hyp mode initialized successfully
[    1.962705] kvm [1]: interrupt-controller@f0240000 IRQ7
[    1.962826] kvm [1]: timer IRQ5
[    1.964298] audit: initializing netlink subsys (disabled)
[    1.964323] audit: type=2000 audit(1.956:1): initialized
[    1.964719] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    1.968686] VFS: Disk quotas dquot_6.6.0
[    1.968777] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.969488] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.970057] NFS: Registering the id_resolver key type
[    1.970087] Key type id_resolver registered
[    1.970091] Key type id_legacy registered
[    1.970119] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    1.970363] fuse init (API version 7.23)
[    1.970583] 9p: Installing v9fs 9p2000 file system support
[    1.971146] async_tx: api initialized (async)
[    1.971241] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    1.971249] io scheduler noop registered
[    1.971378] io scheduler cfq registered (default)
[    1.971940] armada-ap806-pinctrl f06f4000.pinctrl: registered pinctrl driver
[    1.972366] armada-cp110-pinctrl f2440000.pinctrl: registered pinctrl driver
[    1.972581] irq: Cannot allocate irq_descs @ IRQ38, assuming pre-allocated
[    1.972768] irq: Cannot allocate irq_descs @ IRQ58, assuming pre-allocated
[    1.972911] irq: Cannot allocate irq_descs @ IRQ90, assuming pre-allocated
[    1.973059] Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
[    1.974061] libphy: Fixed MDIO Bus: probed
[    1.974070] tun: Universal TUN/TAP device driver, 1.6
[    1.974073] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    1.974174] libphy: mdio_driver_register: mv88e6085
[    1.974278] libphy: orion_mdio_bus: probed
[    1.974371] libphy: Marvell XSMI MDIO Bus: probed
[    1.974449] sky2: driver version 1.30
[    1.974607] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[    1.974610] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    1.974640] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.3.0-k
[    1.974643] igb: Copyright (c) 2007-2014 Intel Corporation.
[    1.974671] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.0.2-k
[    1.974674] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[    1.974701] ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver - version 4.2.1-k
[    1.974704] ixgbe: Copyright (c) 1999-2015 Intel Corporation.
[    1.974739] ixgbevf: Intel(R) 10 Gigabit PCI Express Virtual Function Network Driver - version 2.12.1-k
[    1.974742] ixgbevf: Copyright (c) 2009 - 2012 Intel Corporation.
[    1.974768] ixgb: Intel(R) PRO/10GbE Network Driver - version 1.0.135-k2-NAPI
[    1.974771] ixgb: Copyright (c) 1999-2008 Intel Corporation.
[    1.974910] usbcore: registered new interface driver asix
[    1.974945] usbcore: registered new interface driver ax88179_178a
[    1.974968] usbcore: registered new interface driver cdc_ether
[    1.974997] usbcore: registered new interface driver smsc75xx
[    1.975019] usbcore: registered new interface driver net1080
[    1.975042] usbcore: registered new interface driver cdc_subset
[    1.975064] usbcore: registered new interface driver zaurus
[    1.975099] usbcore: registered new interface driver cdc_ncm
[    1.975516] mv_xor_v2 f0400000.xor0: Marvell Version 2 XOR driver
[    1.977402] mv_xor_v2 f0420000.xor1: Marvell Version 2 XOR driver
[    1.978995] mv_xor_v2 f0440000.xor2: Marvell Version 2 XOR driver
[    1.980614] mv_xor_v2 f0460000.xor3: Marvell Version 2 XOR driver
[    1.982208] mv_xor_v2 f26a0000.cpxor0: Marvell Version 2 XOR driver
[    1.982283] mv_xor_v2 f26c0000.cpxor1: Marvell Version 2 XOR driver
[    1.983834] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.984486] console [ttyS0] disabled
[    2.004652] f0512000.serial: ttyS0 at MMIO 0xf0512000 (irq = 13, base_baud = 12500000) is a 16550A
[    3.317096] console [ttyS0] enabled
[    3.321121] omap_rng f2760000.trng: initialization failed.
[    3.326752] Unable to detect cache hierarchy from DT for CPU 0
[    3.333009] brd: module loaded
[    3.338449] loop: module loaded
[    3.342529] VFIO - User Level meta-driver version: 0.3
[    3.350074] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.356648] ehci-pci: EHCI PCI platform driver
[    3.361138] ehci-platform: EHCI generic platform driver
[    3.366453] ehci-orion: EHCI orion driver
[    3.370537] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    3.376756] ohci-pci: OHCI PCI platform driver
[    3.381247] ohci-platform: OHCI generic platform driver
[    3.386773] usbcore: registered new interface driver usb-storage
[    3.392859] usbcore: registered new interface driver usbserial
[    3.398997] mousedev: PS/2 mouse device common for all mice
[    3.405025] armada38x-rtc f2284000.rtc: rtc core: registered f2284000.rtc as rtc0
[    3.412708] rtc-efi rtc-efi: rtc core: registered rtc-efi as rtc1
[    3.418843] i2c /dev entries driver
[    3.432631] armada_thermal f06f808c.thermal: Overheat threshold between 93..107
[    3.450105] armada_thermal f2400078.thermal: Overheat threshold between 92..107
[    3.457540] md: linear personality registered for level -1
[    3.463055] md: raid0 personality registered for level 0
[    3.468395] md: raid1 personality registered for level 1
[    3.473738] md: raid10 personality registered for level 10
[    3.479330] md: raid6 personality registered for level 6
[    3.484670] md: raid5 personality registered for level 5
[    3.490008] md: raid4 personality registered for level 4
[    3.495518] device-mapper: ioctl: 4.34.0-ioctl (2015-10-28) initialised: dm-devel@redhat.com
[    3.504455] sdhci: Secure Digital Host Controller Interface driver
[    3.510673] sdhci: Copyright(c) Pierre Ossman
[    3.515054] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.520832] xenon-sdhci f2780000.sdhci: Failed to setup input clk: -517
[    3.527564] ledtrig-cpu: registered to indicate activity on CPUs
[    3.533682] usbcore: registered new interface driver usbhid
[    3.539282] usbhid: USB HID core driver
[    3.543849] coresight-tmc f0809000.etf0: TMC initialized
[    3.549339] coresight-tmc f080a000.etf1: TMC initialized
[    3.554806] coresight-tmc f080b000.etf2: TMC initialized
[    3.560271] coresight-tmc f080c000.etf3: TMC initialized
[    3.565756] coresight-tmc f0811000.etf5: TMC initialized
[    3.575210] coresight-tmc f0812000.etr: TMC initialized
[    3.580660] coresight-funnel f0810000.funnel: FUNNEL initialized
[    3.587026] coresight-etm4x f0c40000.etm0: ETM 4.0 initialized
[    3.593083] coresight-etm4x f0d40000.etm1: ETM 4.0 initialized
[    3.599138] coresight-etm4x f0e40000.etm2: ETM 4.0 initialized
[    3.605190] coresight-etm4x f0f40000.etm3: ETM 4.0 initialized
[    3.611095] of_graph_get_next_endpoint(): no port node found in /ap806/config-space/axim-ddr-rd@840000
[    3.620561] coresight-axim f0840000.axim-ddr-rd: AXIM 4.0 2.0 initialized
[    3.627399] of_graph_get_next_endpoint(): no port node found in /ap806/config-space/axim-ddr-wr@841000
[    3.636849] coresight-axim f0841000.axim-ddr-wr: AXIM 4.0 2.0 initialized
[    3.643689] of_graph_get_next_endpoint(): no port node found in /ap806/config-space/axim-sb-rd@848000
[    3.653055] coresight-axim f0848000.axim-sb-rd: AXIM 4.0 2.0 initialized
[    3.659806] of_graph_get_next_endpoint(): no port node found in /ap806/config-space/axim-sb-wr@849000
[    3.669174] coresight-axim f0849000.axim-sb-wr: AXIM 4.0 2.0 initialized
[    3.675928] of_graph_get_next_endpoint(): no port node found in /cpn-110-master/config-space/axim-cp-rd@3c5000
[    3.686088] coresight-axim f23c5000.axim-cp-rd: AXIM 4.0 1.0 initialized
[    3.692840] of_graph_get_next_endpoint(): no port node found in /cpn-110-master/config-space/axim-cp-wr@3c6000
[    3.703001] coresight-axim f23c6000.axim-cp-wr: AXIM 4.0 1.0 initialized
[    3.709754] of_graph_get_next_endpoint(): no port node found in /cpn-110-master/config-space/axim-ppv2-rd@3c0000
[    3.720089] coresight-axim f23c0000.axim-ppv2-rd: AXIM 4.0 1.0 initialized
[    3.727017] of_graph_get_next_endpoint(): no port node found in /cpn-110-master/config-space/axim-ppv2-wr@3c1000
[    3.737350] coresight-axim f23c1000.axim-ppv2-wr: AXIM 4.0 1.0 initialized
[    3.744277] of_graph_get_next_endpoint(): no port node found in /cpn-110-master/config-space/axim-hb1-rd@3c8000
[    3.754524] coresight-axim f23c8000.axim-hb1-rd: AXIM 4.0 1.0 initialized
[    3.761363] of_graph_get_next_endpoint(): no port node found in /cpn-110-master/config-space/axim-hb1-wr@3c9000
[    3.771613] coresight-axim f23c9000.axim-hb1-wr: AXIM 4.0 1.0 initialized
[    3.778972] NET: Registered protocol family 10
[    3.783903] sit: IPv6 over IPv4 tunneling driver
[    3.788824] NET: Registered protocol family 17
[    3.793315] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    3.806093] 8021q: 802.1Q VLAN Support v1.8
[    3.810328] 9pnet: Installing 9P2000 support
[    3.814657] Key type dns_resolver registered
[    3.818952] openvswitch: Open vSwitch switching datapath
[    3.824417] mpls_gso: MPLS GSO support
[    3.828623] registered taskstats version 1
[    3.833849] Btrfs loaded
[    3.850896] mac_addr 0:0:0:0:0:3
[    3.864042] mvpp2 f2000000.ppv22 eth0: Using device tree mac address 00:00:00:00:00:03
[    3.872358] mv_xor_v2 f26a0000.cpxor0: Marvell Version 2 XOR driver
[    3.880641] mv_xor_v2 f26c0000.cpxor1: Marvell Version 2 XOR driver
[    3.888724] omap_rng f2760000.trng: Random Number Generator ver. 203b34c
[    3.895576] xhci-hcd f2500000.usb3: xHCI Host Controller
[    3.900924] xhci-hcd f2500000.usb3: new USB bus registered, assigned bus number 1
[    3.917037] xhci-hcd f2500000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    3.925641] xhci-hcd f2500000.usb3: irq 27, io mem 0xf2500000
[    3.931831] hub 1-0:1.0: USB hub found
[    3.935625] hub 1-0:1.0: 1 port detected
[    3.939730] xhci-hcd f2500000.usb3: xHCI Host Controller
[    3.945081] xhci-hcd f2500000.usb3: new USB bus registered, assigned bus number 2
[    3.952650] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.961065] hub 2-0:1.0: USB hub found
[    3.964856] hub 2-0:1.0: 1 port detected
[    3.969166] xenon-sdhci f2780000.sdhci: Fail to get Xenon PHY type. Use default eMMC 5.1 PHY
[    3.978949] xenon-sdhci f2780000.sdhci: No vmmc regulator found
[    3.984912] xenon-sdhci f2780000.sdhci: No vqmmc regulator found
[    4.028525] mmc0: SDHCI controller on f2780000.sdhci [f2780000.sdhci] using ADMA 64-bit
[    4.040840] armada38x-rtc f2284000.rtc: setting system clock to 2079-12-13 02:24:14 UTC (3469659854)
[    4.051151] Freeing unused kernel memory: 452K (ffffffc000c43000 - ffffffc000cb4000)
[    4.064651] random: systemd: uninitialized urandom read (16 bytes read, 1 bits of entropy available)
[    4.074318] random: systemd: uninitialized urandom read (16 bytes read, 1 bits of entropy available)
[    4.084421] 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)
[    4.098103] mmc0: MAN_BKOPS_EN bit is not set
[    4.107145] systemd[1]: Detected architecture arm64.
[    4.109402] mmc0: new HS200 MMC card at address 0001
[    4.109648] mmcblk0: mmc0:0001 Q2J55L 7.09 GiB
[    4.109737] mmcblk0boot0: mmc0:0001 Q2J55L partition 1 16.0 MiB
[    4.109829] mmcblk0boot1: mmc0:0001 Q2J55L partition 2 16.0 MiB
[    4.109921] mmcblk0rpmb: mmc0:0001 Q2J55L partition 3 4.00 MiB
[    4.112627]  mmcblk0: p1 p2 < p5 p6 p7 p8 p9 p10 > p3
[    4.144592] systemd[1]: Running with unpopulated /etc.
[    4.149839] systemd[1]: No hostname configured.
[    4.154427] systemd[1]: Set hostname to <localhost>.
[    4.159470] random: systemd: uninitialized urandom read (16 bytes read, 2 bits of entropy available)
[    4.168668] systemd[1]: Initializing machine ID from random generator.
[    4.176466] random: systemd: uninitialized urandom read (16 bytes read, 2 bits of entropy available)
[    4.186211] random: systemd: uninitialized urandom read (16 bytes read, 2 bits of entropy available)
[    4.196445] random: systemd: uninitialized urandom read (16 bytes read, 2 bits of entropy available)
[    4.207839] random: systemd: uninitialized urandom read (16 bytes read, 2 bits of entropy available)
[    4.221062] random: systemd: uninitialized urandom read (16 bytes read, 2 bits of entropy available)
[    4.232749] random: systemd: uninitialized urandom read (16 bytes read, 2 bits of entropy available)
[    4.244142] random: systemd: uninitialized urandom read (16 bytes read, 2 bits of entropy available)
[    4.253781] systemd[1]: Failed to populate /etc with preset unit settings, ignoring: No such file or directory
[    4.301708] systemd[1]: Created slice System Slice.
[    4.324534] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    4.328641] systemd[1]: Started Emergency Shell.
[    4.328975] systemd[1]: Reached target Emergency Mode.
[    4.329045] systemd[1]: Startup finished in 4.057s (kernel) + 266ms (userspace) = 4.324s.
Welcome to emergbash-4.3# [    4.479740] hub 1-1:1.0: USB hub found
[    4.483584] hub 1-1:1.0: 4 ports detected
[    4.776524] usb 1-1.1: new high-speed USB device number 3 using xhci-hcd
[    4.888729] hub 1-1.1:1.0: USB hub found
[    4.892984] hub 1-1.1:1.0: 4 ports detected
[    5.172524] usb 1-1.1.3: new high-speed USB device number 4 using xhci-hcd
[    5.372758] usb 1-1.1.3: ep 0x81 - rounding interval to 128 microframes, ep desc says 255 microframes
[    5.384461] usb 1-1.1.3: ep 0x2 - rounding interval to 128 microframes, ep desc says 255 microframes
[    5.393854] usb-storage 1-1.1.3:1.0: USB Mass Storage device detected
[    5.401678] usb-storage 1-1.1.3:1.0: Quirks match for vid 054c pid 02a5: 80000
[    5.408991] scsi host0: usb-storage 1-1.1.3:1.0

bash-4.3# [    6.591678] scsi 0:0:0:0: Direct-Access     Sony     Storage Media    0100 PQ: 0 ANSI: 4
[    6.600245] sd 0:0:0:0: [sda] 7628544 512-byte logical blocks: (3.91 GB/3.64 GiB)
[    6.608725] sd 0:0:0:0: [sda] No Caching mode page found
[    6.616445]  sda: sda1
[    6.620264] sd 0:0:0:0: [sda] Attached SCSI removable disk

bash-4.3#