Commit 1782ffdc authored by Anton Midyukov's avatar Anton Midyukov

arm-rpi4, build-vm, tar2fs: Add new argument VM_BOOTTYPE for tar2fs

While this argument can only have one "EFI" value. Thus, the problem of building an image for Raspberry Pi on armh, where there is no grub-efi, was solved.
parent 583074da
......@@ -41,6 +41,8 @@ else
ARCH="$(arch)"
fi
BOOTTYPE="$8"
case "$ARCH" in
e2k)
BOOTFSTYPE="ext2" # firmware knows it
......@@ -55,15 +57,8 @@ ppc*)
BOOTLOADERPARTSIZEM="8"
ROOTPART="2"
;;
arm*|aarch64)
BLOCKDEV="/dev/sda"
EFIPART="1"
EFIPARTSIZEM="256"
EFIPARTFSTYPE="fat"
ROOTPART="2"
;;
*)
if [ "$BOOTLOADER" == grub-efi ]; then
if [ "$BOOTLOADER" == grub-efi -o "$BOOTTYPE" == EFI ]; then
EFIPART="1"
EFIPARTSIZEM="256"
EFIPARTFSTYPE="fat"
......
......@@ -6,6 +6,7 @@ use/arm-rpi4: use/bootloader/uboot
endif
@$(call add_feature)
@$(call set,VM_PARTTABLE,msdos)
@$(call set,VM_BOOTTYPE,EFI)
@$(call add,BASE_KMODULES,staging)
@$(call add,THE_LISTS,uboot)
@$(call add,THE_PACKAGES,u-boot-tools)
......
......@@ -45,7 +45,8 @@ tar2fs: check-sudo prepare-tarball-qemu
fi; \
if ! sudo $$TOPDIR/bin/tar2fs \
"$(VM_TARBALL)" "$(VM_RAWDISK)" "$(VM_SIZE)" "$(VM_FSTYPE)" \
"$(VM_BOOTLOADER)" "$(ARCH)" "$(VM_PARTTABLE)"; then \
"$(VM_BOOTLOADER)" "$(ARCH)" "$(VM_PARTTABLE)" \
"$(VM_BOOTTYPE)"; then \
echo "** error: sudo tar2fs failed, see build log" >&2; \
exit 1; \
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment