“Xen on Hikey960”的版本间的差异
free6d1823(讨论 | 贡献) |
free6d1823(讨论 | 贡献) |
||
第61行: | 第61行: | ||
cp -f arch/$ARCH/boot/Image ../Image | cp -f arch/$ARCH/boot/Image ../Image | ||
cp -f arch/$ARCH/boot/dts/hisilicon/hi3660-hikey960.dtb ../Image.dtb | cp -f arch/$ARCH/boot/dts/hisilicon/hi3660-hikey960.dtb ../Image.dtb | ||
+ | |||
+ | 4. Building Xen | ||
+ | git clone git://xenbits.xen.org/xen.git | ||
+ | cd xen | ||
+ | export TOOLS=/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin | ||
+ | export CROSS_COMPILE=${TOOLS}/aarch64-linux-gnu- | ||
+ | export ARCH=arm64 | ||
+ | export XEN_TARGET_ARCH=arm64 | ||
+ | make defconfig | ||
+ | make -j8 | ||
+ | cp xen.efi ../../ |
2019年11月12日 (二) 19:12的版本
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 分成三步驟
(1) download prebuild from
https://snapshots.linaro.org/reference-platform/components/uefi-staging/${VERSION}/hikey960/${RELEASE}/
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"
(2) change board to recovery mode
download hikey_idt hisi-sec_usb_xloader.img, hisi-sec_uce_boot.img, hisi-sec_fastboot.img
sudo ./hikey_idt -c config -p ${DEVICE}
(沒成功)
(3) change board to fastboot mode
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
2. 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
download uefi boot
boot-0.0+AUTOINC+<some number>hikey960-<some number>.uefi.img
3. Building Linux
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
4. Building Xen
git clone git://xenbits.xen.org/xen.git cd xen export TOOLS=/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin export CROSS_COMPILE=${TOOLS}/aarch64-linux-gnu- export ARCH=arm64 export XEN_TARGET_ARCH=arm64 make defconfig make -j8 cp xen.efi ../../