“Xen on Hikey960”的版本间的差异
free6d1823(讨论 | 贡献) |
free6d1823(讨论 | 贡献) |
||
(未显示1个用户的13个中间版本) | |||
第10行: | 第10行: | ||
see README-flash-uefi.md to install ser2net first. | see README-flash-uefi.md to install ser2net first. | ||
參考 recovery-flash-uefi-prebuilt.sh 分成三步驟 | 參考 recovery-flash-uefi-prebuilt.sh 分成三步驟 | ||
+ | Ref: https://github.com/96boards-hikey/tools-images-hikey960/issues/33 | ||
+ | |||
(1.a) download prebuild from | (1.a) download prebuild from | ||
+ | |||
https://snapshots.linaro.org/reference-platform/components/uefi-staging/${VERSION}/hikey960/${RELEASE}/ | https://snapshots.linaro.org/reference-platform/components/uefi-staging/${VERSION}/hikey960/${RELEASE}/ | ||
第47行: | 第50行: | ||
## bash ./l-loader.sh hikey960 | ## bash ./l-loader.sh hikey960 | ||
l-loader.sh not found, modify build_uefi.sh | l-loader.sh not found, modify build_uefi.sh | ||
+ | ##OPTEE=1 #no OPTEE | ||
AARCH64_GCC=LINARO_GCC_7_4 | AARCH64_GCC=LINARO_GCC_7_4 | ||
"LINARO_GCC_7_4") ## line#45 | "LINARO_GCC_7_4") ## line#45 | ||
− | + | AARCH64_GCC_7_4=/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin/ | |
− | + | PATH=${AARCH64_GCC_7_4}:${PATH} && export PATH | |
GenFvInternalLib.c:24:23: fatal error: uuid/uuid.h: 沒有此一檔案或目錄 | GenFvInternalLib.c:24:23: fatal error: uuid/uuid.h: 沒有此一檔案或目錄 | ||
(1) vi vi ./edk2/BaseTools/Source/C/GenFv/GenFvInternalLib.c | (1) vi vi ./edk2/BaseTools/Source/C/GenFv/GenFvInternalLib.c | ||
− | #include <linux/uuid.h> | + | #include <linux/uuid.h> //uuid/uuid.h |
(2) sudo ln -sf /lib/x86_64-linux-gnu/libuuid.so.1 /lib/libuuid.so | (2) sudo ln -sf /lib/x86_64-linux-gnu/libuuid.so.1 /lib/libuuid.so | ||
+ | Output imagres including partition table are generated in l-loader directory. | ||
+ | recovery.bin = bl1.bin + BL33_AP_UEFI.fd (by gen_loader_hikey960.py) | ||
+ | l-loader.bin = bl2.bin | ||
+ | fip.bin | ||
+ | (2)flash recovery files | ||
+ | (2.1)prepare config and files (if build from source) | ||
+ | vi config | ||
+ | # The content of config file | ||
+ | ./hisi-sec_usb_xloader.img 0x00020000 | ||
+ | ./hisi-sec_uce_boot.img 0x6A908000 | ||
+ | ./recovery.bin 0x1AC00000 | ||
− | + | Used files: | |
+ | #recovery mode: | ||
+ | hike_idt from 1.a download | ||
+ | config can be copied from 1.a download | ||
+ | hisi-sec_usb_xloader.img from 1.a download | ||
+ | hisi-sec_uce_boot.img from 1.a download | ||
+ | recovery.bin from 1.b | ||
+ | #fastboot mode | ||
+ | prm_ptable.img from 1.a download | ||
+ | hisi-sec_xloader.img from 1.a download | ||
+ | l-loader.bin from 1.b | ||
+ | fip.bin from 1.b | ||
+ | |||
− | (2) change board to recovery mode | + | (2.2) change board to recovery mode |
steps: | steps: | ||
− | 1. board power off, | + | 1. board power off, USB->UART convertor connect to host PC (/dev/ttyUSB0) |
+ | (type picocom -b 115200 /dev/ttyUSB0 in host machine) | ||
2. board in recovery mode: jumper: on-on-off | 2. board in recovery mode: jumper: on-on-off | ||
− | 3. plug type-C in OTG. | + | 3. plug type-C in OTG. |
− | 4. board power on. In host PC, you will see /dev/ | + | 4. board power on. In host PC, you will see /dev/ttyUSB1 node. 只有在recover mode才會有USB 變COM. |
5. cd ./uefi | 5. cd ./uefi | ||
− | 6. sudo ./hikey_idt -c config -p /dev/ | + | 6. sudo ./hikey_idt -c config -p /dev/ttyUSB1 |
− | + | ||
(3) change board to fastboot mode | (3) change board to fastboot mode | ||
− | + | 燒完直接進入fastoot mode, 不用改jumper | |
+ | [[image:Hikey_idt.png]] | ||
sudo fastboot flash ptable prm_ptable.img | sudo fastboot flash ptable prm_ptable.img | ||
第122行: | 第150行: | ||
make defconfig | make defconfig | ||
make -j8 | make -j8 | ||
− | cp xen.efi ../../ | + | cp xen.efi ../../ ##xen.efi is a symbolic link |
+ | cp xen ../../ | ||
+ | |||
4. Extract the wl18xx-fw-4.bin so your WiFi will work | 4. Extract the wl18xx-fw-4.bin so your WiFi will work | ||
第166行: | 第196行: | ||
configfile $prefix/grub.cfg | configfile $prefix/grub.cfg | ||
− | + | create grub.cfg | |
+ | <source lang="c"> | ||
+ | menuentry 'Xen' { | ||
+ | xen_hypervisor /boot/xen.efi loglvl=all console=dtuart dtuart=/soc/serial@fff32000 efi=no-rs | ||
+ | xen_module /boot/Image console=tty0 console=hvc0 root=/dev/sdd10 rw efi=noruntime | ||
+ | devicetree /boot/Image.dtb | ||
+ | } | ||
+ | </source> | ||
+ | |||
+ | copy grub.cfg to root filesystem | ||
+ | grub.cfg ./rootfs/boot/grub/.k | ||
+ | |||
6.3 create grubaa64.efi | 6.3 create grubaa64.efi | ||
export GRUB_MODULES="boot chain configfile echo efinet eval ext2 fat font gettext gfxterm gzio help linux loadenv lsefi normal part_gpt part_msdos read regexp search search_fs_file search_fs_uuid search_label terminal terminfo test tftp time xen_boot" | export GRUB_MODULES="boot chain configfile echo efinet eval ext2 fat font gettext gfxterm gzio help linux loadenv lsefi normal part_gpt part_msdos read regexp search search_fs_file search_fs_uuid search_label terminal terminfo test tftp time xen_boot" | ||
第177行: | 第218行: | ||
--prefix="/boot/grub" \ | --prefix="/boot/grub" \ | ||
$GRUB_MODULES | $GRUB_MODULES | ||
− | |||
+ | 6.4 create new boot.img | ||
+ | |||
+ | sudo mount boot-0.0+AUTOINC+<some number>hikey960-<some number>.uefi.img loop -o loop | ||
+ | cp grubaa64.efi loop/EFI/BOOT | ||
+ | |||
+ | sudo umount loop | ||
+ | *the new grubbaa64.efi will be installed in (hd3,gpt7)/efi/boot/grubaa64.efi | ||
第198行: | 第245行: | ||
sudo fastboot flash boot boot-0.0+AUTOINC+06e4def583-fb1158a365-r0-hikey-20191111073000-224.uefi.img | sudo fastboot flash boot boot-0.0+AUTOINC+06e4def583-fb1158a365-r0-hikey-20191111073000-224.uefi.img | ||
sudo fastboot flash system rootfs.sparse.img | sudo fastboot flash system rootfs.sparse.img | ||
+ | |||
+ | connect UART-USB as /dev/ttyUSB0 | ||
+ | connect USB type-C | ||
+ | board switch to fastbootmode (Jumper :on-off-on) | ||
+ | Power on the board, it will enter fastboot mode (Shows "Press ESCAPE for boot options .Android Fastboot mode - version 0.7.") Press anykey will enter grub. | ||
+ | [[image:Flash_images.png]] | ||
+ | |||
+ | Enter Xen: | ||
+ | <source lang="c"> | ||
+ | |||
+ | Using modules provided by bootloader in FDT | ||
+ | Xen 4.13.0-rc (c/s Tue Sep 24 18:58:39 2019 +0100 git:a458d3b) EFI loader | ||
+ | Xen 4.13.0-rc | ||
+ | (XEN) Xen version 4.13.0-rc (cj@) (aarch64-linux-gnu-gcc (Linaro GCC 7.4-2019.02) 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4]) debug=y Thu Nov 14 15:19:59 CST 2019 | ||
+ | (XEN) Latest ChangeSet: Tue Sep 24 18:58:39 2019 +0100 git:a458d3b | ||
+ | (XEN) build-id: 23c097de1945e8f39d7ad1b9b15905f38a522ad6 | ||
+ | (XEN) Processor: 410fd034: "ARM Limited", variant: 0x0, part 0xd03, rev 0x4 | ||
+ | (XEN) 64-bit Execution: | ||
+ | (XEN) Processor Features: 0000000000002222 0000000000000000 | ||
+ | (XEN) Exception Levels: EL3:64+32 EL2:64+32 EL1:64+32 EL0:64+32 | ||
+ | (XEN) Extensions: FloatingPoint AdvancedSIMD | ||
+ | (XEN) Debug Features: 0000000010305106 0000000000000000 | ||
+ | (XEN) Auxiliary Features: 0000000000000000 0000000000000000 | ||
+ | (XEN) Memory Model Features: 0000000000001122 0000000000000000 | ||
+ | (XEN) ISA Features: 0000000000011120 0000000000000000 | ||
+ | (XEN) 32-bit Execution: | ||
+ | (XEN) Processor Features: 00000131:00011011 | ||
+ | (XEN) Instruction Sets: AArch32 A32 Thumb Thumb-2 Jazelle | ||
+ | (XEN) Extensions: GenericTimer Security | ||
+ | (XEN) Debug Features: 03010066 | ||
+ | (XEN) Auxiliary Features: 00000000 | ||
+ | (XEN) Memory Model Features: 10201105 40000000 01260000 02102211 | ||
+ | (XEN) ISA Features: 02101110 13112111 21232042 01112131 00011142 00011121 | ||
+ | (XEN) Using SMC Calling Convention v1.1 | ||
+ | (XEN) Using PSCI v1.1 | ||
+ | (XEN) SMP: Allowing 8 CPUs | ||
+ | (XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 1920 KHz | ||
+ | (XEN) GICv2 initialization: | ||
+ | (XEN) gic_dist_addr=00000000e82b1000 | ||
+ | (XEN) gic_cpu_addr=00000000e82b2000 | ||
+ | (XEN) gic_hyp_addr=00000000e82b4000 | ||
+ | (XEN) gic_vcpu_addr=00000000e82b6000 | ||
+ | (XEN) gic_maintenance_irq=25 | ||
+ | (XEN) GICv2: 384 lines, 8 cpus, secure (IID 0200143b). | ||
+ | (XEN) XSM Framework v1.0.0 initialized | ||
+ | (XEN) Initialising XSM SILO mode | ||
+ | (XEN) Using scheduler: SMP Credit Scheduler rev2 (credit2) | ||
+ | (XEN) Initializing Credit2 scheduler | ||
+ | (XEN) load_precision_shift: 18 | ||
+ | (XEN) load_window_shift: 30 | ||
+ | (XEN) underload_balance_tolerance: 0 | ||
+ | (XEN) overload_balance_tolerance: -3 | ||
+ | (XEN) runqueues arrangement: socket | ||
+ | (XEN) cap enforcement granularity: 10ms | ||
+ | (XEN) load tracking window length 1073741824 ns | ||
+ | (XEN) Allocated console ring of 64 KiB. | ||
+ | (XEN) CPU0: Guest atomics will try 4 times before pausing the domain | ||
+ | (XEN) Bringing up CPU1 | ||
+ | (XEN) CPU1: Guest atomics will try 20 times before pausing the domain | ||
+ | (XEN) CPU 1 booted. | ||
+ | (XEN) Bringing up CPU2 | ||
+ | (XEN) CPU2: Guest atomics will try 13 times before pausing the domain | ||
+ | (XEN) CPU 2 booted. | ||
+ | (XEN) Bringing up CPU3 | ||
+ | (XEN) CPU3: Guest atomics will try 13 times before pausing the domain | ||
+ | (XEN) CPU 3 booted. | ||
+ | (XEN) Bringing up CPU4 | ||
+ | (XEN) CPU4 MIDR (0x410fd091) does not match boot CPU MIDR (0x410fd034), | ||
+ | (XEN) disable cpu (see big.LITTLE.txt under docs/). | ||
+ | (XEN) CPU4 never came online | ||
+ | (XEN) Failed to bring up CPU 4 (error -5) | ||
+ | (XEN) Bringing up CPU5 | ||
+ | (XEN) CPU5 MIDR (0x410fd091) does not match boot CPU MIDR (0x410fd034), | ||
+ | (XEN) disable cpu (see big.LITTLE.txt under docs/). | ||
+ | (XEN) CPU5 never came online | ||
+ | (XEN) Failed to bring up CPU 5 (error -5) | ||
+ | (XEN) Bringing up CPU6 | ||
+ | (XEN) CPU6 MIDR (0x410fd091) does not match boot CPU MIDR (0x410fd034), | ||
+ | (XEN) disable cpu (see big.LITTLE.txt under docs/). | ||
+ | (XEN) CPU6 never came online | ||
+ | (XEN) Failed to bring up CPU 6 (error -5) | ||
+ | (XEN) Bringing up CPU7 | ||
+ | (XEN) CPU7 MIDR (0x410fd091) does not match boot CPU MIDR (0x410fd034), | ||
+ | (XEN) disable cpu (see big.LITTLE.txt under docs/). | ||
+ | (XEN) CPU7 never came online | ||
+ | (XEN) Failed to bring up CPU 7 (error -5) | ||
+ | (XEN) Brought up 4 CPUs | ||
+ | (XEN) I/O virtualisation disabled | ||
+ | (XEN) P2M: 40-bit IPA with 40-bit PA and 8-bit VMID | ||
+ | (XEN) P2M: 3 levels with order-1 root, VTCR 0x80023558 | ||
+ | (XEN) Adding cpu 0 to runqueue 0 | ||
+ | (XEN) First cpu on runqueue, activating | ||
+ | (XEN) Adding cpu 1 to runqueue 0 | ||
+ | (XEN) Adding cpu 2 to runqueue 0 | ||
+ | (XEN) Adding cpu 3 to runqueue 0 | ||
+ | (XEN) alternatives: Patching with alt table 00000000002d40a8 -> 00000000002d47bc | ||
+ | (XEN) *** LOADING DOMAIN 0 *** | ||
+ | (XEN) Loading d0 kernel from boot module @ 00000000b936c000 | ||
+ | (XEN) Allocating 1:1 mappings totalling 512MB for dom0: | ||
+ | (XEN) BANK[0] 0x000000c0000000-0x000000e0000000 (512MB) | ||
+ | (XEN) Grant table range: 0x000000b921c000-0x000000b925c000 | ||
+ | (XEN) Allocating PPI 16 for event channel interrupt | ||
+ | (XEN) Loading zImage from 00000000b936c000 to 00000000c0080000-00000000c1187200 | ||
+ | (XEN) Loading d0 DTB to 0x00000000c8000000-0x00000000c800a663 | ||
+ | (XEN) Initial low memory virq threshold set at 0x4000 pages. | ||
+ | (XEN) Scrubbing Free RAM in background | ||
+ | (XEN) Std. Loglevel: All | ||
+ | (XEN) Guest Loglevel: All | ||
+ | (XEN) *************************************************** | ||
+ | (XEN) PLEASE SPECIFY dom0_mem PARAMETER - USING 512M FOR NOW | ||
+ | (XEN) *************************************************** | ||
+ | (XEN) 3... 2... 1... | ||
+ | (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input) | ||
+ | (XEN) Freed 356kB init memory. | ||
+ | (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER4 | ||
+ | (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER8 | ||
+ | (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER12 | ||
+ | (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER16 | ||
+ | (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER20 | ||
+ | (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER24 | ||
+ | (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER28 | ||
+ | (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER32 | ||
+ | (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER36 | ||
+ | (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER40 | ||
+ | (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER44 | ||
+ | (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0 | ||
+ | [ 0.000000] Booting Linux on physical CPU 0x0 | ||
+ | [ 0.000000] Linux version 4.14.0-rc7-linaro-hikey960+ (cj@cj-VirtualBox) (gcc version 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4] (Linaro GCC 7.4-2019.02)) #1 SMP PREEMPT Tue Nov 12 10:37:03 CST 2019 | ||
+ | [ 0.000000] Boot CPU: AArch64 Processor [410fd034] | ||
+ | [ 0.000000] Machine model: HiKey960 | ||
+ | [ 0.000000] Xen 4.13 support found | ||
+ | [ 0.000000] efi: Getting EFI parameters from FDT: | ||
+ | [ 0.000000] efi: UEFI not found. | ||
+ | [ 0.000000] cma: Reserved 16 MiB at 0x00000000df000000 | ||
+ | [ 0.000000] NUMA: No NUMA configuration found | ||
+ | [ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x00000000dfffffff] | ||
+ | [ 0.000000] NUMA: NODE_DATA [mem 0xdefb3d80-0xdefb587f] | ||
+ | [ 0.000000] Zone ranges: | ||
+ | [ 0.000000] DMA [mem 0x0000000032000000-0x00000000dfffffff] | ||
+ | [ 0.000000] Normal empty | ||
+ | [ 0.000000] Movable zone start for each node | ||
+ | [ 0.000000] Early memory node ranges | ||
+ | [ 0.000000] node 0: [mem 0x0000000032000000-0x00000000320fffff] | ||
+ | [ 0.000000] node 0: [mem 0x00000000c0000000-0x00000000dfffffff] | ||
+ | [ 0.000000] Initmem setup node 0 [mem 0x0000000032000000-0x00000000dfffffff] | ||
+ | [ 0.000000] psci: probing for conduit method from DT. | ||
+ | [ 0.000000] psci: PSCIv1.1 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 @ffff8000def54000 s55448 r8192 d30568 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: 129276 | ||
+ | [ 0.000000] Policy zone: DMA | ||
+ | [ 0.000000] Kernel command line: console=tty0 console=hvc0 root=/dev/sdd10 rw efi=noruntime | ||
+ | [ 0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes) | ||
+ | [ 0.000000] Memory: 456524K/525312K available (10364K kernel code, 1180K rwdata, 4664K rodata, 1152K init, 405K bss, 52404K 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 - 0xffff000008aa0000 ( 10368 KB) | ||
+ | [ 0.000000] .rodata : 0xffff000008aa0000 - 0xffff000008f40000 ( 4736 KB) | ||
+ | [ 0.000000] .init : 0xffff000008f40000 - 0xffff000009060000 ( 1152 KB) | ||
+ | [ 0.000000] .data : 0xffff000009060000 - 0xffff000009187200 ( 1181 KB) | ||
+ | [ 0.000000] .bss : 0xffff000009187200 - 0xffff0000091ec9e0 ( 406 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] 0xffff7e0000c80000 - 0xffff7e0003800000 ( 43 MB actual) | ||
+ | [ 0.000000] memory : 0xffff800032000000 - 0xffff8000e0000000 ( 2784 MB) | ||
+ | [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 | ||
+ | [ 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] arch_timer: cp15 timer(s) running at 1.92MHz (virt). | ||
+ | [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1c570327e, max_idle_ns: 1763180809505 ns | ||
+ | [ 0.000005] sched_clock: 56 bits at 1920kHz, resolution 520ns, wraps every 4398046510977ns | ||
+ | [ 0.000128] clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58334160866034 ns | ||
+ | [ 0.000601] Console: colour dummy device 80x25 | ||
+ | [ 0.000897] console [tty0] enabled | ||
+ | [ 0.355616] console [hvc0] enabled | ||
+ | [ 0.359173] Calibrating delay loop (skipped), value calculated using timer frequency.. 3.84 BogoMIPS (lpj=7680) | ||
+ | [ 0.369246] pid_max: default: 32768 minimum: 301 | ||
+ | [ 0.373983] Security Framework initialized | ||
+ | [ 0.378269] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes) | ||
+ | [ 0.385212] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes) | ||
+ | [ 0.392081] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes) | ||
+ | [ 0.398751] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes) | ||
+ | [ 0.421998] ASID allocator initialised with 65536 entries | ||
+ | [ 0.428097] xen:grant_table: Grant tables using version 1 layout | ||
+ | [ 0.434050] Grant table initialized | ||
+ | [ 0.437597] xen:events: Using FIFO-based ABI | ||
+ | [ 0.441992] Xen: initializing cpu0 | ||
+ | [ 0.449941] Hierarchical SRCU implementation. | ||
+ | [ 0.463279] EFI services will not be available. | ||
+ | [ 0.475771] smp: Bringing up secondary CPUs ... | ||
+ | (XEN) d0v1: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0 | ||
+ | (XEN) d0v2: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0 | ||
+ | (XEN) d0v3: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0 | ||
+ | [ 0.508465] Detected VIPT I-cache on CPU1 | ||
+ | [ 0.514692] Xen: initializing cpu1 | ||
+ | [ 0.514723] CPU1: Booted secondary processor [410fd034] | ||
+ | [ 0.540531] Detected VIPT I-cache on CPU2 | ||
+ | [ 0.546673] Xen: initializing cpu2 | ||
+ | [ 0.546692] CPU2: Booted secondary processor [410fd034] | ||
+ | [ 0.572658] Detected VIPT I-cache on CPU3 | ||
+ | [ 0.578783] Xen: initializing cpu3 | ||
+ | [ 0.578798] CPU3: Booted secondary processor [410fd034] | ||
+ | [ 0.578887] smp: Brought up 1 node, 4 CPUs | ||
+ | [ 0.621426] SMP: Total of 4 processors activated. | ||
+ | [ 0.626192] CPU features: detected feature: 32-bit EL0 Support | ||
+ | [ 0.632756] CPU: All CPU(s) started at EL1 | ||
+ | [ 0.636795] alternatives: patching kernel code | ||
+ | [ 0.642229] devtmpfs: initialized | ||
+ | [ 0.650582] random: get_random_u32 called from bucket_table_alloc+0x108/0x258 with crng_init=0 | ||
+ | [ 0.659911] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns | ||
+ | [ 0.660098] random: fast init done | ||
+ | [ 0.673061] futex hash table entries: 1024 (order: 5, 131072 bytes) | ||
+ | [ 0.680046] pinctrl core: initialized pinctrl subsystem | ||
+ | [ 0.687255] DMI not present or invalid. | ||
+ | [ 0.691546] NET: Registered protocol family 16 | ||
+ | [ 0.699715] vdso: 2 pages (1 code @ ffff000008aa6000, 1 data @ ffff000009065000) | ||
+ | [ 0.707101] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. | ||
+ | [ 0.714961] DMA: preallocated 256 KiB pool for atomic allocations | ||
+ | [ 0.721147] xen:swiotlb_xen: Warning: only able to allocate 4 MB for software IO TLB | ||
+ | [ 0.729578] software IO TLB [mem 0xdbc00000-0xdc000000] (4MB) mapped at [ffff8000dbc00000-ffff8000dbffffff] | ||
+ | [ 0.739852] Serial: AMBA PL011 UART driver | ||
+ | [ 0.764882] hi3660-mbox e896b000.mailbox: Mailbox enabled | ||
+ | [ 0.771456] uart-pl011 ffd74000.serial: could not find pctldev for node /soc/pinmux@e896c000/uart3_pmx_func, deferring probe | ||
+ | [ 0.782890] uart-pl011 fdf01000.serial: could not find pctldev for node /soc/pinmux@e896c000/uart4_pmx_func, deferring probe | ||
+ | [ 0.801816] Synchronous External Abort: synchronous external abort (0x96000210) at 0xffff00000944dfe0 | ||
+ | [ 0.811029] Internal error: : 96000210 [#1] PREEMPT SMP | ||
+ | [ 0.816251] Modules linked in: | ||
+ | [ 0.819383] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.14.0-rc7-linaro-hikey960+ #1 | ||
+ | [ 0.827174] Hardware name: HiKey960 (DT) | ||
+ | [ 0.831162] task: ffff8000dc910000 task.stack: ffff000008068000 | ||
+ | [ 0.837164] PC is at amba_device_try_add+0xe8/0x268 | ||
+ | [ 0.842089] LR is at amba_device_try_add+0xcc/0x268 | ||
+ | [ 0.847031] pc : [<ffff0000084f5320>] lr : [<ffff0000084f5304>] pstate: 40000045 | ||
+ | [ 0.854489] sp : ffff00000806bbe0 | ||
+ | [ 0.857868] x29: ffff00000806bbe0 x28: ffff000009040588 | ||
+ | [ 0.863246] x27: 0000000000000004 x26: 0000000000000000 | ||
+ | [ 0.868622] x25: ffff8000defe5088 x24: 0000000000000000 | ||
+ | [ 0.873999] x23: ffff00000944d000 x22: 0000000000001000 | ||
+ | [ 0.879380] x21: ffff8000dc21a6f8 x20: 0000000000000000 | ||
+ | [ 0.884752] x19: ffff8000dc21a400 x18: 0000000000000020 | ||
+ | [ 0.890133] x17: 0000000000000001 x16: 00000000deadbeef | ||
+ | [ 0.895505] x15: ffffffffffffffff x14: ffffffffffffffff | ||
+ | [ 0.900882] x13: 0000000000000020 x12: 0101010101010101 | ||
+ | [ 0.906258] x11: 0000000000000028 x10: 0101010101010101 | ||
+ | [ 0.911635] x9 : 0000000000000000 x8 : ffff8000dc203d80 | ||
+ | [ 0.917011] x7 : 0000000000000000 x6 : 000000000000003f | ||
+ | [ 0.922388] x5 : 0000000000000000 x4 : ffff0000091d4190 | ||
+ | [ 0.927765] x3 : 0000000000000000 x2 : ffff00000944dfe0 | ||
+ | [ 0.933141] x1 : 0000000000000000 x0 : 0000000000000000 | ||
+ | [ 0.938519] Process swapper/0 (pid: 1, stack limit = 0xffff000008068000) | ||
+ | [ 0.945285] Call trace: | ||
+ | [ 0.947798] Exception stack(0xffff00000806baa0 to 0xffff00000806bbe0) | ||
+ | [ 0.954304] baa0: 0000000000000000 0000000000000000 ffff00000944dfe0 0000000000000000 | ||
+ | [ 0.962196] bac0: ffff0000091d4190 0000000000000000 000000000000003f 0000000000000000 | ||
+ | [ 0.970091] bae0: ffff8000dc203d80 0000000000000000 0101010101010101 0000000000000028 | ||
+ | [ 0.977979] bb00: 0101010101010101 0000000000000020 ffffffffffffffff ffffffffffffffff | ||
+ | [ 0.985869] bb20: 00000000deadbeef 0000000000000001 0000000000000020 ffff8000dc21a400 | ||
+ | [ 0.993761] bb40: 0000000000000000 ffff8000dc21a6f8 0000000000001000 ffff00000944d000 | ||
+ | [ 1.001653] bb60: 0000000000000000 ffff8000defe5088 0000000000000000 0000000000000004 | ||
+ | [ 1.009548] bb80: ffff000009040588 ffff00000806bbe0 ffff0000084f5304 ffff00000806bbe0 | ||
+ | [ 1.017435] bba0: ffff0000084f5320 0000000040000045 ffff00000806bbe0 ffff0000084f5304 | ||
+ | [ 1.025327] bbc0: ffffffffffffffff 00000000fffffffe ffff00000806bbe0 ffff0000084f5320 | ||
+ | [ 1.033221] [<ffff0000084f5320>] amba_device_try_add+0xe8/0x268 | ||
+ | [ 1.039201] [<ffff0000084f5588>] amba_device_add+0x18/0xe0 | ||
+ | [ 1.044762] [<ffff000008922fc8>] of_platform_bus_create+0x2b8/0x320 | ||
+ | [ 1.051082] [<ffff000008922e74>] of_platform_bus_create+0x164/0x320 | ||
+ | [ 1.057413] [<ffff0000089231a0>] of_platform_populate+0x70/0xd0 | ||
+ | [ 1.063404] [<ffff000008f8e218>] of_platform_default_populate_init+0x64/0x78 | ||
+ | [ 1.070513] [<ffff000008083980>] do_one_initcall+0x38/0x120 | ||
+ | [ 1.076150] [<ffff000008f40d0c>] kernel_init_freeable+0x188/0x22c | ||
+ | [ 1.082305] [<ffff000008a82268>] kernel_init+0x10/0x100 | ||
+ | [ 1.087590] [<ffff000008084b58>] ret_from_fork+0x10/0x18 | ||
+ | [ 1.092969] Code: f9001fb8 8b0202e2 52800001 52800018 (b9400040) | ||
+ | [ 1.099148] ---[ end trace 0af73e04a0d75c0a ]--- | ||
+ | [ 1.103845] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b | ||
+ | [ 1.103845] | ||
+ | [ 1.113090] SMP: stopping secondary CPUs | ||
+ | [ 1.117094] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b | ||
+ | [ 1.117094] | ||
+ | </source> |
2019年11月21日 (四) 10:49的最后版本
Reference: https://wiki.xenproject.org/wiki/HiKey960
1. Building UEFI
export BUILD_PATH=~/build cd ${BUILD_PATH}
download tools-images-hikey960
git clone https://github.com/96boards-hikey/tools-images-hikey960 cd tools-images-hikey960
see README-flash-uefi.md to install ser2net first.
參考 recovery-flash-uefi-prebuilt.sh 分成三步驟
Ref: https://github.com/96boards-hikey/tools-images-hikey960/issues/33
(1.a) download prebuild from
BASE_URL=https://snapshots.linaro.org/reference-platform/components/uefi-staging
VERSION=latest
PRODUCT=hikey960
RELEASE=release
DEVICE=/dev/ttyUSB1
UEFI_URL=${BASE_URL}/${VERSION}/${PRODUCT}/${RELEASE}/
mkdir -p ./uefi cd uefi wget -A bin,config,efi,hikey_idt,img,txt -m -nd -np "$UEFI_URL"
It will download these files:
config hisi-sec_uce_boot.img l-loader.bin recovery.bin fip.bin hisi-sec_usb_xloader.img MD5SUMS.txt sec_ptable.img hikey_idt hisi-sec_xloader.img prm_ptable.img
==>>check this http://www.smartfire.cn/thread-707-1-1.html 2019/11/12
(1.b) build from source:
- fetch repositories:
#git clone https://github.com/ARM-software/arm-trusted-firmware -b integration git clone https://github.com/96boards-hikey/edk2 -b testing/hikey960_v2.5 git clone https://github.com/96boards-hikey/OpenPlatformPkg -b testing/hikey960_v1.3.4 git clone https://github.com/96boards-hikey/l-loader -b testing/hikey960_v1.2 git clone https://github.com/96boards-hikey/atf-fastboot
- Create the symbol link to OpenPlatformPkg in edk2.
$cd ${BUILD_PATH}/edk2 $ln -sf ../OpenPlatformPkg
- prepare AARCH64 toolchain
- build (debug mode)
export LOADER_DIR=${BUILD_PATH}/l-loader cd ${LOADER_DIR} # Build UEFI & ARM Trust Firmware ## bash ./l-loader.sh hikey960
l-loader.sh not found, modify build_uefi.sh
##OPTEE=1 #no OPTEE AARCH64_GCC=LINARO_GCC_7_4 "LINARO_GCC_7_4") ## line#45 AARCH64_GCC_7_4=/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin/ PATH=${AARCH64_GCC_7_4}:${PATH} && export PATH
GenFvInternalLib.c:24:23: fatal error: uuid/uuid.h: 沒有此一檔案或目錄
(1) vi vi ./edk2/BaseTools/Source/C/GenFv/GenFvInternalLib.c #include <linux/uuid.h> //uuid/uuid.h (2) sudo ln -sf /lib/x86_64-linux-gnu/libuuid.so.1 /lib/libuuid.so
Output imagres including partition table are generated in l-loader directory.
recovery.bin = bl1.bin + BL33_AP_UEFI.fd (by gen_loader_hikey960.py) l-loader.bin = bl2.bin fip.bin
(2)flash recovery files
(2.1)prepare config and files (if build from source)
vi config # The content of config file ./hisi-sec_usb_xloader.img 0x00020000 ./hisi-sec_uce_boot.img 0x6A908000 ./recovery.bin 0x1AC00000
Used files:
#recovery mode: hike_idt from 1.a download config can be copied from 1.a download hisi-sec_usb_xloader.img from 1.a download hisi-sec_uce_boot.img from 1.a download recovery.bin from 1.b #fastboot mode prm_ptable.img from 1.a download hisi-sec_xloader.img from 1.a download l-loader.bin from 1.b fip.bin from 1.b
(2.2) change board to recovery mode
steps:
1. board power off, USB->UART convertor connect to host PC (/dev/ttyUSB0)
(type picocom -b 115200 /dev/ttyUSB0 in host machine)
2. board in recovery mode: jumper: on-on-off 3. plug type-C in OTG. 4. board power on. In host PC, you will see /dev/ttyUSB1 node. 只有在recover mode才會有USB 變COM. 5. cd ./uefi 6. sudo ./hikey_idt -c config -p /dev/ttyUSB1
(3) change board to fastboot mode
燒完直接進入fastoot mode, 不用改jumper
sudo fastboot flash ptable prm_ptable.img sudo fastboot flash xloader hisi-sec_xloader.img (無法寫入) sudo fastboot flash fastboot l-loader.bin sudo fastboot flash fip fip.bin
Switch to normal mode, power on
xxx2. Download boot and system image
boot - The FAT32 64MB partition containing GRUB (or xen.efi if desired)
system - The rootfs (Ext4) containing the OS and /boot directory for GRUB to search.
try this:(NO HIKEY960)
https://snapshots.linaro.org/reference-platform/embedded/morty/hikey/latest/rpb/
download rootfs from
rpb-console-image-hikey960-<some number>.rootfs.img.gz (not used)
download uefi boot
boot-0.0+AUTOINC+<some number>hikey960-<some number>.uefi.img
find these:
boot-0.0+AUTOINC+06e4def583-fb1158a365-r0-hikey-20191111073000-224.uefi.img
rpb-console-image-hikey-20191111073000-224.rootfs.img.gz
2. Building Linux
export TOOLS=/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin export PATH=$PATH:$TOOLS git clone https://github.com/96boards-hikey/linux.git cd linux git checkout origin/hikey960-upstream-rebase export CROSS_COMPILE=aarch64-linux-gnu- export ARCH=arm64 make defconfig
check .config, CONFIG_XEN_DOM0=y CONFIG_XEN=y
make -j8 cp -f arch/$ARCH/boot/Image ../Image cp -f arch/$ARCH/boot/dts/hisilicon/hi3660-hikey960.dtb ../Image.dtb
3. Building Xen
git clone git://xenbits.xen.org/xen.git cd xen/xen
export CROSS_COMPILE=aarch64-linux-gnu- export ARCH=arm64 export XEN_TARGET_ARCH=arm64 make defconfig make -j8 cp xen.efi ../../ ##xen.efi is a symbolic link cp xen ../../
4. Extract the wl18xx-fw-4.bin so your WiFi will work
git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git cd linux-firmware cp ti-connectivity/wl18xx-fw-4.bin ../
5.下載 rootfs
check https://releases.linaro.org/debian/images/developer-arm64/latest/
wget https://releases.linaro.org/debian/images/developer-arm64/latest/linaro-stretch-developer- 20170720-71.tar.gz sudo tar -xzf linaro-stretch-developer-20180416-89.tar.gz sudo mv binary rootfs sudo cp Image rootfs/boot sudo cp Image.dtb rootfs/boot sudo cp xen.efi rootfs/boot sudo mkdir -p rootfs/lib/firmware/ti-connectivity sudo cp wl18xx-fw-4.bin rootfs/lib/firmware/ti-connectivity
6. Building GRUB
Pre-requirement:
sudo apt-get install autoconf automake libtool autopoint
6.1 Make
git clone https://git.savannah.gnu.org/git/grub.git cd grub ./bootstrap => autoconf->autogen.sh=>configure export CROSS_COMPILE=aarch64-linux-gnu- export ARCH=arm64 ./configure --prefix=/usr --target=aarch64-linux-gnu --with-platform=efi ## --target=target-type the type of system for which any compiler tools in the package produce code ## --host=host-type the type of system on which the package runs.包grub image 的機器. X86 ## --prefix ## --with-platform make mkdir ../grub-install make DESTDIR=`pwd`/../grub-install install cd ../
6.2 create grub.config
copied from rootfs/usr/share/96boards-tools/grub/grub.configfile
search.fs_label rootfs root set prefix=($root)/boot/grub configfile $prefix/grub.cfg
create grub.cfg
menuentry 'Xen' { xen_hypervisor /boot/xen.efi loglvl=all console=dtuart dtuart=/soc/serial@fff32000 efi=no-rs xen_module /boot/Image console=tty0 console=hvc0 root=/dev/sdd10 rw efi=noruntime devicetree /boot/Image.dtb }
copy grub.cfg to root filesystem
grub.cfg ./rootfs/boot/grub/.k
6.3 create grubaa64.efi
export GRUB_MODULES="boot chain configfile echo efinet eval ext2 fat font gettext gfxterm gzio help linux loadenv lsefi normal part_gpt part_msdos read regexp search search_fs_file search_fs_uuid search_label terminal terminfo test tftp time xen_boot" grub-install/usr/bin/grub-mkimage --config grub.config \ --dtb Image.dtb \ --directory=`pwd`/grub-install/usr/lib/grub/arm64-efi \ ##correct: change lib64 to lib --output=grubaa64.efi \ --format=arm64-efi \ --prefix="/boot/grub" \ $GRUB_MODULES
6.4 create new boot.img
sudo mount boot-0.0+AUTOINC+<some number>hikey960-<some number>.uefi.img loop -o loop cp grubaa64.efi loop/EFI/BOOT
sudo umount loop
- the new grubbaa64.efi will be installed in (hd3,gpt7)/efi/boot/grubaa64.efi
7 create file system image
mkdir loop dd if=/dev/zero of=rootfs.img bs=1M count=2096 mkfs.ext4 -F -L rootfs rootfs.img #kernel use the label rootfs to mount the rootfs as / sudo mount -o loop rootfs.img loop cd rootfs sudo tar -cf - * | (cd ../loop;sudo tar -xf - ) cd .. ##change dir to build/ sudo umount loop img2simg rootfs.img rootfs.sparse.img 4096
Note: need install img2simg
sudo apt install android-tools-fsutils
8. Flash boot.img and system.img
sudo fastboot flash boot boot-0.0+AUTOINC+06e4def583-fb1158a365-r0-hikey-20191111073000-224.uefi.img sudo fastboot flash system rootfs.sparse.img
connect UART-USB as /dev/ttyUSB0
connect USB type-C
board switch to fastbootmode (Jumper :on-off-on)
Power on the board, it will enter fastboot mode (Shows "Press ESCAPE for boot options .Android Fastboot mode - version 0.7.") Press anykey will enter grub.
Enter Xen:
Using modules provided by bootloader in FDT Xen 4.13.0-rc (c/s Tue Sep 24 18:58:39 2019 +0100 git:a458d3b) EFI loader Xen 4.13.0-rc (XEN) Xen version 4.13.0-rc (cj@) (aarch64-linux-gnu-gcc (Linaro GCC 7.4-2019.02) 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4]) debug=y Thu Nov 14 15:19:59 CST 2019 (XEN) Latest ChangeSet: Tue Sep 24 18:58:39 2019 +0100 git:a458d3b (XEN) build-id: 23c097de1945e8f39d7ad1b9b15905f38a522ad6 (XEN) Processor: 410fd034: "ARM Limited", variant: 0x0, part 0xd03, rev 0x4 (XEN) 64-bit Execution: (XEN) Processor Features: 0000000000002222 0000000000000000 (XEN) Exception Levels: EL3:64+32 EL2:64+32 EL1:64+32 EL0:64+32 (XEN) Extensions: FloatingPoint AdvancedSIMD (XEN) Debug Features: 0000000010305106 0000000000000000 (XEN) Auxiliary Features: 0000000000000000 0000000000000000 (XEN) Memory Model Features: 0000000000001122 0000000000000000 (XEN) ISA Features: 0000000000011120 0000000000000000 (XEN) 32-bit Execution: (XEN) Processor Features: 00000131:00011011 (XEN) Instruction Sets: AArch32 A32 Thumb Thumb-2 Jazelle (XEN) Extensions: GenericTimer Security (XEN) Debug Features: 03010066 (XEN) Auxiliary Features: 00000000 (XEN) Memory Model Features: 10201105 40000000 01260000 02102211 (XEN) ISA Features: 02101110 13112111 21232042 01112131 00011142 00011121 (XEN) Using SMC Calling Convention v1.1 (XEN) Using PSCI v1.1 (XEN) SMP: Allowing 8 CPUs (XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 1920 KHz (XEN) GICv2 initialization: (XEN) gic_dist_addr=00000000e82b1000 (XEN) gic_cpu_addr=00000000e82b2000 (XEN) gic_hyp_addr=00000000e82b4000 (XEN) gic_vcpu_addr=00000000e82b6000 (XEN) gic_maintenance_irq=25 (XEN) GICv2: 384 lines, 8 cpus, secure (IID 0200143b). (XEN) XSM Framework v1.0.0 initialized (XEN) Initialising XSM SILO mode (XEN) Using scheduler: SMP Credit Scheduler rev2 (credit2) (XEN) Initializing Credit2 scheduler (XEN) load_precision_shift: 18 (XEN) load_window_shift: 30 (XEN) underload_balance_tolerance: 0 (XEN) overload_balance_tolerance: -3 (XEN) runqueues arrangement: socket (XEN) cap enforcement granularity: 10ms (XEN) load tracking window length 1073741824 ns (XEN) Allocated console ring of 64 KiB. (XEN) CPU0: Guest atomics will try 4 times before pausing the domain (XEN) Bringing up CPU1 (XEN) CPU1: Guest atomics will try 20 times before pausing the domain (XEN) CPU 1 booted. (XEN) Bringing up CPU2 (XEN) CPU2: Guest atomics will try 13 times before pausing the domain (XEN) CPU 2 booted. (XEN) Bringing up CPU3 (XEN) CPU3: Guest atomics will try 13 times before pausing the domain (XEN) CPU 3 booted. (XEN) Bringing up CPU4 (XEN) CPU4 MIDR (0x410fd091) does not match boot CPU MIDR (0x410fd034), (XEN) disable cpu (see big.LITTLE.txt under docs/). (XEN) CPU4 never came online (XEN) Failed to bring up CPU 4 (error -5) (XEN) Bringing up CPU5 (XEN) CPU5 MIDR (0x410fd091) does not match boot CPU MIDR (0x410fd034), (XEN) disable cpu (see big.LITTLE.txt under docs/). (XEN) CPU5 never came online (XEN) Failed to bring up CPU 5 (error -5) (XEN) Bringing up CPU6 (XEN) CPU6 MIDR (0x410fd091) does not match boot CPU MIDR (0x410fd034), (XEN) disable cpu (see big.LITTLE.txt under docs/). (XEN) CPU6 never came online (XEN) Failed to bring up CPU 6 (error -5) (XEN) Bringing up CPU7 (XEN) CPU7 MIDR (0x410fd091) does not match boot CPU MIDR (0x410fd034), (XEN) disable cpu (see big.LITTLE.txt under docs/). (XEN) CPU7 never came online (XEN) Failed to bring up CPU 7 (error -5) (XEN) Brought up 4 CPUs (XEN) I/O virtualisation disabled (XEN) P2M: 40-bit IPA with 40-bit PA and 8-bit VMID (XEN) P2M: 3 levels with order-1 root, VTCR 0x80023558 (XEN) Adding cpu 0 to runqueue 0 (XEN) First cpu on runqueue, activating (XEN) Adding cpu 1 to runqueue 0 (XEN) Adding cpu 2 to runqueue 0 (XEN) Adding cpu 3 to runqueue 0 (XEN) alternatives: Patching with alt table 00000000002d40a8 -> 00000000002d47bc (XEN) *** LOADING DOMAIN 0 *** (XEN) Loading d0 kernel from boot module @ 00000000b936c000 (XEN) Allocating 1:1 mappings totalling 512MB for dom0: (XEN) BANK[0] 0x000000c0000000-0x000000e0000000 (512MB) (XEN) Grant table range: 0x000000b921c000-0x000000b925c000 (XEN) Allocating PPI 16 for event channel interrupt (XEN) Loading zImage from 00000000b936c000 to 00000000c0080000-00000000c1187200 (XEN) Loading d0 DTB to 0x00000000c8000000-0x00000000c800a663 (XEN) Initial low memory virq threshold set at 0x4000 pages. (XEN) Scrubbing Free RAM in background (XEN) Std. Loglevel: All (XEN) Guest Loglevel: All (XEN) *************************************************** (XEN) PLEASE SPECIFY dom0_mem PARAMETER - USING 512M FOR NOW (XEN) *************************************************** (XEN) 3... 2... 1... (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input) (XEN) Freed 356kB init memory. (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER4 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER8 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER12 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER16 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER20 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER24 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER28 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER32 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER36 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER40 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER44 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0 [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.14.0-rc7-linaro-hikey960+ (cj@cj-VirtualBox) (gcc version 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4] (Linaro GCC 7.4-2019.02)) #1 SMP PREEMPT Tue Nov 12 10:37:03 CST 2019 [ 0.000000] Boot CPU: AArch64 Processor [410fd034] [ 0.000000] Machine model: HiKey960 [ 0.000000] Xen 4.13 support found [ 0.000000] efi: Getting EFI parameters from FDT: [ 0.000000] efi: UEFI not found. [ 0.000000] cma: Reserved 16 MiB at 0x00000000df000000 [ 0.000000] NUMA: No NUMA configuration found [ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x00000000dfffffff] [ 0.000000] NUMA: NODE_DATA [mem 0xdefb3d80-0xdefb587f] [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000032000000-0x00000000dfffffff] [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000032000000-0x00000000320fffff] [ 0.000000] node 0: [mem 0x00000000c0000000-0x00000000dfffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000032000000-0x00000000dfffffff] [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: PSCIv1.1 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 @ffff8000def54000 s55448 r8192 d30568 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: 129276 [ 0.000000] Policy zone: DMA [ 0.000000] Kernel command line: console=tty0 console=hvc0 root=/dev/sdd10 rw efi=noruntime [ 0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes) [ 0.000000] Memory: 456524K/525312K available (10364K kernel code, 1180K rwdata, 4664K rodata, 1152K init, 405K bss, 52404K 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 - 0xffff000008aa0000 ( 10368 KB) [ 0.000000] .rodata : 0xffff000008aa0000 - 0xffff000008f40000 ( 4736 KB) [ 0.000000] .init : 0xffff000008f40000 - 0xffff000009060000 ( 1152 KB) [ 0.000000] .data : 0xffff000009060000 - 0xffff000009187200 ( 1181 KB) [ 0.000000] .bss : 0xffff000009187200 - 0xffff0000091ec9e0 ( 406 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] 0xffff7e0000c80000 - 0xffff7e0003800000 ( 43 MB actual) [ 0.000000] memory : 0xffff800032000000 - 0xffff8000e0000000 ( 2784 MB) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 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] arch_timer: cp15 timer(s) running at 1.92MHz (virt). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1c570327e, max_idle_ns: 1763180809505 ns [ 0.000005] sched_clock: 56 bits at 1920kHz, resolution 520ns, wraps every 4398046510977ns [ 0.000128] clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58334160866034 ns [ 0.000601] Console: colour dummy device 80x25 [ 0.000897] console [tty0] enabled [ 0.355616] console [hvc0] enabled [ 0.359173] Calibrating delay loop (skipped), value calculated using timer frequency.. 3.84 BogoMIPS (lpj=7680) [ 0.369246] pid_max: default: 32768 minimum: 301 [ 0.373983] Security Framework initialized [ 0.378269] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes) [ 0.385212] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes) [ 0.392081] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes) [ 0.398751] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes) [ 0.421998] ASID allocator initialised with 65536 entries [ 0.428097] xen:grant_table: Grant tables using version 1 layout [ 0.434050] Grant table initialized [ 0.437597] xen:events: Using FIFO-based ABI [ 0.441992] Xen: initializing cpu0 [ 0.449941] Hierarchical SRCU implementation. [ 0.463279] EFI services will not be available. [ 0.475771] smp: Bringing up secondary CPUs ... (XEN) d0v1: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0 (XEN) d0v2: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0 (XEN) d0v3: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0 [ 0.508465] Detected VIPT I-cache on CPU1 [ 0.514692] Xen: initializing cpu1 [ 0.514723] CPU1: Booted secondary processor [410fd034] [ 0.540531] Detected VIPT I-cache on CPU2 [ 0.546673] Xen: initializing cpu2 [ 0.546692] CPU2: Booted secondary processor [410fd034] [ 0.572658] Detected VIPT I-cache on CPU3 [ 0.578783] Xen: initializing cpu3 [ 0.578798] CPU3: Booted secondary processor [410fd034] [ 0.578887] smp: Brought up 1 node, 4 CPUs [ 0.621426] SMP: Total of 4 processors activated. [ 0.626192] CPU features: detected feature: 32-bit EL0 Support [ 0.632756] CPU: All CPU(s) started at EL1 [ 0.636795] alternatives: patching kernel code [ 0.642229] devtmpfs: initialized [ 0.650582] random: get_random_u32 called from bucket_table_alloc+0x108/0x258 with crng_init=0 [ 0.659911] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.660098] random: fast init done [ 0.673061] futex hash table entries: 1024 (order: 5, 131072 bytes) [ 0.680046] pinctrl core: initialized pinctrl subsystem [ 0.687255] DMI not present or invalid. [ 0.691546] NET: Registered protocol family 16 [ 0.699715] vdso: 2 pages (1 code @ ffff000008aa6000, 1 data @ ffff000009065000) [ 0.707101] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. [ 0.714961] DMA: preallocated 256 KiB pool for atomic allocations [ 0.721147] xen:swiotlb_xen: Warning: only able to allocate 4 MB for software IO TLB [ 0.729578] software IO TLB [mem 0xdbc00000-0xdc000000] (4MB) mapped at [ffff8000dbc00000-ffff8000dbffffff] [ 0.739852] Serial: AMBA PL011 UART driver [ 0.764882] hi3660-mbox e896b000.mailbox: Mailbox enabled [ 0.771456] uart-pl011 ffd74000.serial: could not find pctldev for node /soc/pinmux@e896c000/uart3_pmx_func, deferring probe [ 0.782890] uart-pl011 fdf01000.serial: could not find pctldev for node /soc/pinmux@e896c000/uart4_pmx_func, deferring probe [ 0.801816] Synchronous External Abort: synchronous external abort (0x96000210) at 0xffff00000944dfe0 [ 0.811029] Internal error: : 96000210 [#1] PREEMPT SMP [ 0.816251] Modules linked in: [ 0.819383] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.14.0-rc7-linaro-hikey960+ #1 [ 0.827174] Hardware name: HiKey960 (DT) [ 0.831162] task: ffff8000dc910000 task.stack: ffff000008068000 [ 0.837164] PC is at amba_device_try_add+0xe8/0x268 [ 0.842089] LR is at amba_device_try_add+0xcc/0x268 [ 0.847031] pc : [<ffff0000084f5320>] lr : [<ffff0000084f5304>] pstate: 40000045 [ 0.854489] sp : ffff00000806bbe0 [ 0.857868] x29: ffff00000806bbe0 x28: ffff000009040588 [ 0.863246] x27: 0000000000000004 x26: 0000000000000000 [ 0.868622] x25: ffff8000defe5088 x24: 0000000000000000 [ 0.873999] x23: ffff00000944d000 x22: 0000000000001000 [ 0.879380] x21: ffff8000dc21a6f8 x20: 0000000000000000 [ 0.884752] x19: ffff8000dc21a400 x18: 0000000000000020 [ 0.890133] x17: 0000000000000001 x16: 00000000deadbeef [ 0.895505] x15: ffffffffffffffff x14: ffffffffffffffff [ 0.900882] x13: 0000000000000020 x12: 0101010101010101 [ 0.906258] x11: 0000000000000028 x10: 0101010101010101 [ 0.911635] x9 : 0000000000000000 x8 : ffff8000dc203d80 [ 0.917011] x7 : 0000000000000000 x6 : 000000000000003f [ 0.922388] x5 : 0000000000000000 x4 : ffff0000091d4190 [ 0.927765] x3 : 0000000000000000 x2 : ffff00000944dfe0 [ 0.933141] x1 : 0000000000000000 x0 : 0000000000000000 [ 0.938519] Process swapper/0 (pid: 1, stack limit = 0xffff000008068000) [ 0.945285] Call trace: [ 0.947798] Exception stack(0xffff00000806baa0 to 0xffff00000806bbe0) [ 0.954304] baa0: 0000000000000000 0000000000000000 ffff00000944dfe0 0000000000000000 [ 0.962196] bac0: ffff0000091d4190 0000000000000000 000000000000003f 0000000000000000 [ 0.970091] bae0: ffff8000dc203d80 0000000000000000 0101010101010101 0000000000000028 [ 0.977979] bb00: 0101010101010101 0000000000000020 ffffffffffffffff ffffffffffffffff [ 0.985869] bb20: 00000000deadbeef 0000000000000001 0000000000000020 ffff8000dc21a400 [ 0.993761] bb40: 0000000000000000 ffff8000dc21a6f8 0000000000001000 ffff00000944d000 [ 1.001653] bb60: 0000000000000000 ffff8000defe5088 0000000000000000 0000000000000004 [ 1.009548] bb80: ffff000009040588 ffff00000806bbe0 ffff0000084f5304 ffff00000806bbe0 [ 1.017435] bba0: ffff0000084f5320 0000000040000045 ffff00000806bbe0 ffff0000084f5304 [ 1.025327] bbc0: ffffffffffffffff 00000000fffffffe ffff00000806bbe0 ffff0000084f5320 [ 1.033221] [<ffff0000084f5320>] amba_device_try_add+0xe8/0x268 [ 1.039201] [<ffff0000084f5588>] amba_device_add+0x18/0xe0 [ 1.044762] [<ffff000008922fc8>] of_platform_bus_create+0x2b8/0x320 [ 1.051082] [<ffff000008922e74>] of_platform_bus_create+0x164/0x320 [ 1.057413] [<ffff0000089231a0>] of_platform_populate+0x70/0xd0 [ 1.063404] [<ffff000008f8e218>] of_platform_default_populate_init+0x64/0x78 [ 1.070513] [<ffff000008083980>] do_one_initcall+0x38/0x120 [ 1.076150] [<ffff000008f40d0c>] kernel_init_freeable+0x188/0x22c [ 1.082305] [<ffff000008a82268>] kernel_init+0x10/0x100 [ 1.087590] [<ffff000008084b58>] ret_from_fork+0x10/0x18 [ 1.092969] Code: f9001fb8 8b0202e2 52800001 52800018 (b9400040) [ 1.099148] ---[ end trace 0af73e04a0d75c0a ]--- [ 1.103845] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 1.103845] [ 1.113090] SMP: stopping secondary CPUs [ 1.117094] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 1.117094]