Asami Doi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34367 )
Change subject: util: Add new util to make a payload for QEMU/AArch64 ......................................................................
Patch Set 2:
(7 comments)
I'm thinking to write shell/python script to generate payload.its because I want to use an environmental variable (e.g. specifying the place of Linux kernel) but .its file seems not to support variables. In this case, Makefile will change and payload.its will be removed.
https://review.coreboot.org/c/coreboot/+/34367/1/util/qemu_aarch64/Makefile File util/qemu_aarch64/Makefile:
https://review.coreboot.org/c/coreboot/+/34367/1/util/qemu_aarch64/Makefile@... PS1, Line 8: payload: linux virt.dtb
Ideally, all output should go into a subdirectory ("out" or "build" or such) and there should be a ' […]
I updated the output directory to "build" and added 'clean' target.
https://review.coreboot.org/c/coreboot/+/34367/1/util/qemu_aarch64/Makefile@... PS1, Line 13: #TODO: Look up how to compress the kernel.
I don't think this should be in this Makefile TBH, it's a little far out of scope. […]
OK. I removed 'linux' target. I don't know how to use environmental variables in .its file so I probably have to write a script for dynamically generating .its file which has environmental variables such as kernel file name.
https://review.coreboot.org/c/coreboot/+/34367/1/util/qemu_aarch64/Makefile@... PS1, Line 17:
nit: maybe a 'help' target that's also the default target that explains the other available targets?
Ack
https://review.coreboot.org/c/coreboot/+/34367/1/util/qemu_aarch64/payload.i... File util/qemu_aarch64/payload.its:
https://review.coreboot.org/c/coreboot/+/34367/1/util/qemu_aarch64/payload.i... PS1, Line 10: arch = "arm";
I think this should be arm64? (coreboot doesn't actually use it. […]
You're right. Thank you!
https://review.coreboot.org/c/coreboot/+/34367/1/util/qemu_aarch64/payload.i... PS1, Line 12: compression = "gzip"; cbfs-compression-tool seems to rewrite the magic number. The magic number is 0x5d000080 when I don't use cbfs-compression-tool. (It doesn't work well either.).
FIT: Compat preference (lowest to highest priority) : qemu,qemu-aarch64 FIT: config config@1 (default), kernel kernel@1, fdt fdt@1, compat qemu,qemu-aarch64 (match) FIT: Choosing best match config@1 for compat qemu,qemu-aarch64. Invalid device tree magic 0x01000010! ERROR: Failed to unflatten the FDT.
https://review.coreboot.org/c/coreboot/+/34367/1/util/qemu_aarch64/payload.i... PS1, Line 13: load = <0x40000000>;
Nothing below here is used by coreboot, I think you might as well leave it out (or does mkimage chok […]
I deleted entry, hash@1, and hash@2 in kernel@1 and hash@1 and hash@2 in fdt@1.
https://review.coreboot.org/c/coreboot/+/34367/1/util/qemu_aarch64/payload.i... PS1, Line 36: }; I don't know why but the line compatible = "qemu,qemu-aarch64" emits the following error. It moves to the next stage when I deleted the compatible line.
FIT: config config@1 (default), kernel kernel@1, fdt fdt@1, compat qemu,qemu-aarch64 (match) FIT: Choosing best match config@1 for compat qemu,qemu-aarch64. Invalid device tree magic 0x5d000080! ERROR: Failed to unflatten the FDT.