Created
April 13, 2022 05:49
-
-
Save shimomura1004/7d29567786f733f8224001263a8c5720 to your computer and use it in GitHub Desktop.
Raspberry Pi 4B (BCM2711C0) で Xen をブートするための u-boot スクリプトを作る
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boot.source の雛形を作成 | |
bash ../imagebuilder/scripts/uboot-script-gen -c config3 -d . -t sd | |
boot.source を修正 | |
====================================================================================================== | |
fdt get value bootargs /chosen bootargs | |
fatload mmc 0:1 0xE00000 Image | |
fatload mmc 0:1 0x2600000 xen-raspberrypi4-64 | |
load mmc 0:1 0x2800000 bcm2711-rpi-4-b.dtb | |
fdt addr 0x2800000 | |
#fdt resize 1024 | |
fdt resize 0x1000 | |
fdt set /chosen \#address-cells <0x2> | |
fdt set /chosen \#size-cells <0x2> | |
fdt set /chosen xen,xen-bootargs "console=dtuart dtuart=/soc/serial@7e215040 dom0_mem='256M' dom0_max_vcpus=1 bootscrub=0 sync_console" | |
fdt mknod /chosen dom0 | |
fdt set /chosen/dom0 compatible "xen,linux-zimage" "xen,multiboot-module" | |
fdt set /scb/pcie@7d500000 device_type "pci" | |
fdt set /chosen/dom0 reg <0x0 0xE00000 0x0 0x1719a00> | |
fdt set /chosen xen,dom0-bootargs "console=hvc0 earlycon=xenboot debug root=/dev/mmcblk0p2 rw rootwait console=serial0,115200 console=tty1 type=ext4" | |
#setenv fdt_high 0xffffffffffffffff | |
fdt print /chosen | |
booti 0x2600000 - 0x2800000 | |
====================================================================================================== | |
boot.source を修正したあと、以下のコマンドで boot.scr を再生成 | |
mkimage -A arm64 -T script -C none -a 0xC00000 -e 0xC00000 -d boot.source boot.scr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment