Julius Werner 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:
(3 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.
You could just put a marker string like ###KERNEL_FILE### in it, copy it into the build directory and then use 'sed' to replace it with what you want? See the rule for fmap.fmd in coreboot's toplevel Makefile.inc, it does something similar. We try to avoid Python dependencies where possible.
I don't see the benefit. It's not related to qemu_aarch64 at all.
- That's already in the documentation
- That's already integrated into the make system if you select LinuxBoot payload.
Not everyone is using LinuxBoot? I think having something that helps people in building a simple FIT image from scratch may be useful... whether it should be tied to QEMU or not is debatable (for non-QEMU boards you'd have to pass a .dts or .dtb in as well, then). I guess we could consider integrating this into payloads/external/linux instead of having a separate thing under util/, maybe that would be better?
For payloads/external/LinuxBoot, I agree that it would be nice to integrate support for auto-generating the DTB when using QEMU there.
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 12: compression = "gzip";
cbfs-compression-tool seems to rewrite the magic number. […]
The magic number of what? This compresses the whole file, so of course any magic numbers in there will also be compressed afterwards. coreboot should decompress it before it does anything else with it. The fact that you got "Failed to unflatten" without a message about the decompression before that suggests that it didn't detect the compression attribute right... are you sure that you had compression = "lz4" (or "lzma") in the .its script that you built?
https://review.coreboot.org/c/coreboot/+/34367/1/util/qemu_aarch64/payload.i... PS1, Line 13: load = <0x40000000>;
I deleted entry, hash@1, and hash@2 in kernel@1 and hash@1 and hash@2 in fdt@1.
You should be able to delete 'load' as well, we don't use it.
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. […]
No, this looks correct... what does it say when you don't have that node? In that case, it shouldn't find any FDT and should die.