Asami Doi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34367 )
Change subject: util: Add new util to make a payload for QEMU/AArch64 ......................................................................
util: Add new util to make a payload for QEMU/AArch64
[WIP] This CL allows to make a payload for QEMU/AArch64. 1. Build a kernel 2. Get a dtb file from QEMU by the command 3. Make a FIT image from payload.its by mkimage
Signed-off-by: Asami Doi d0iasm.pub@gmail.com Change-Id: Ie299f5391ddc2fa3a71c9fdc988b2965f8742f10 --- A util/qemu_aarch64/Makefile A util/qemu_aarch64/payload.its 2 files changed, 53 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/34367/1
diff --git a/util/qemu_aarch64/Makefile b/util/qemu_aarch64/Makefile new file mode 100644 index 0000000..f0f5501 --- /dev/null +++ b/util/qemu_aarch64/Makefile @@ -0,0 +1,16 @@ +# +# This file is part of the coreboot project. +# +# Copyright (C) 2019 Asami Doi d0iasm.pub@gmail.com +# +# SPDX-License-Identifier: GPL-2.0-or-later + +payload: linux virt.dtb + mkimage -f payload.its payload.itb + +linux: + #TODO: Download the latest linux kernel and build it. + #TODO: Look up how to compress the kernel. + +virt.dtb: + qemu-system-aarch64 -machine virt-2.9,dumpdtb=virt.dtb -nographic diff --git a/util/qemu_aarch64/payload.its b/util/qemu_aarch64/payload.its new file mode 100644 index 0000000..d8e0e64 --- /dev/null +++ b/util/qemu_aarch64/payload.its @@ -0,0 +1,37 @@ +/dts-v1/; +/ { + description = "Image for QEMU/AArch64 with the latest Linux kernel and the FDT blob of QEMU virt machine"; + #address-cells = <1>; + images { + kernel@1 { + description = "Latest Linux kernel"; + data = /incbin/("./vmlinux"); + type = "kernel"; + arch = "arm"; + os = "linux"; + compression = "gzip"; + load = <0x40000000>; + entry = <0x40000000>; + hash@1 { + algo = "crc32"; + }; + hash@2 { + algo = "sha1"; + }; + }; + + fdt@1 { + description = "Flattened Device Tree blob for QEMU virt machine"; + data = /incbin/("./virt.dtb"); + type = "flat_dt"; + arch = "arm"; + compression = "gzip"; + hash@1 { + algo = "crc32"; + }; + hash@2 { + algo = "sha1"; + }; + }; + }; +};