diff --git a/images/installer.yml.in b/images/installer.yml.in index 7987b399b1..d2d0284431 100644 --- a/images/installer.yml.in +++ b/images/installer.yml.in @@ -19,6 +19,7 @@ onboot: image: INSTALLER_TAG binds.add: - mkimage-raw-efi:/mkimage:ro # so that it has access to make-raw + - uboot:/uboot:ro # additional necessary parts for boot, appear inside image as /boot and /u-boot, so need to have in separate path - /rootfs.img:/bits/rootfs.img:ro # this is the rootfs it will install - /persist.img:/bits/persist.img:ro # this is the persist image - /config.img:/bits/config.img:ro # this is the config image @@ -29,6 +30,9 @@ volumes: - name: mkimage-raw-efi image: MKRAW_TAG readonly: true +- name: uboot + image: UBOOT_TAG + readonly: true files: - path: /etc/eve-release source: eve_version diff --git a/pkg/installer/install b/pkg/installer/install index e712f6a5b7..f11124c554 100755 --- a/pkg/installer/install +++ b/pkg/installer/install @@ -317,7 +317,7 @@ ln -s /bits/* ${ARTIFACTS_DIR} 2>/dev/null # symlink to the root filesystem [ -e ${ROOTFS_IMG} ] || { echo "ERROR: no rootfs.img found"; exit 1; } [ -e ${EFI_DIR} ] || ln -s /root/EFI ${EFI_DIR} -[ -e ${BOOT_DIR} ] || ln -s /root/boot ${BOOT_DIR} +[ -e ${BOOT_DIR} ] || ln -s /uboot/boot ${BOOT_DIR} # finally lets see if we were given any overrides for i in rootfs config persist; do diff --git a/pkg/mkimage-raw-efi/make-raw b/pkg/mkimage-raw-efi/make-raw index 29e1712065..0ccaa1cc21 100755 --- a/pkg/mkimage-raw-efi/make-raw +++ b/pkg/mkimage-raw-efi/make-raw @@ -272,11 +272,6 @@ dir2vfat() { echo $IMG } -mkefifs() { - rm -rf /efifs/* - cp -Lr "$EFI_DIR" /efifs/EFI -} - do_system_vfat_part() { eval "local SEC_START=\$$1" local SEC_END="$(grow_part "$SEC_START" "$2")" @@ -304,7 +299,11 @@ do_system_vfat_part() { do_efi() { eval "local SEC_START=\$$1" local customparts=$2 - mkefifs + + # Create EFI partition and include the bootloaders + rm -rf /efifs/* + cp -Lr "$EFI_DIR" /efifs/EFI + # the grub.cfg.in is embedded in the script to avoid any external filesystem dependency for this make-raw script sed -e 's#@PATH_TO_GRUB@#'"$(cd /efifs; echo EFI/BOOT/BOOT*EFI)"'#' > /efifs/EFI/BOOT/grub.cfg <<'EOF' # this finds the next available bootable partition in GPT, with the highest priority @@ -349,7 +348,6 @@ efi_installer_extension() { fi # Copy bootloaders to boot folder for installer mkdir -p /efifs/boot - cp -r "$BOOT_DIR"/* /efifs/boot/ 2>/dev/null touch /efifs/boot/.boot_repository od -An -x -N 16 /dev/random | tr -d ' ' > /efifs/boot/.uuid cp /UsbInvocationScript.txt /efifs diff --git a/tools/parse-pkgs.sh b/tools/parse-pkgs.sh index c128195903..34f3d690d6 100755 --- a/tools/parse-pkgs.sh +++ b/tools/parse-pkgs.sh @@ -126,6 +126,7 @@ WWAN_TAG=${WWAN_TAG} WLAN_TAG=${WLAN_TAG} GUACD_TAG=${GUACD_TAG} GRUB_TAG=${GRUB_TAG} +UBOOT_TAG=${UBOOT_TAG} GPTTOOLS_TAG=${GPTTOOLS_TAG} NEWLOGD_TAG=${NEWLOGD_TAG} NVIDIA_TAG=${NVIDIA_TAG} @@ -173,6 +174,7 @@ XENTOOLS_TAG=$(linuxkit_tag pkg/xen-tools) XEN_TAG=$(linuxkit_tag pkg/xen) ACRN_TAG=$(linuxkit_tag pkg/acrn) GRUB_TAG=$(linuxkit_tag pkg/grub) +UBOOT_TAG=$(linuxkit_tag pkg/u-boot) DNSMASQ_TAG=$(linuxkit_tag pkg/dnsmasq) DOM0ZTOOLS_TAG=$(linuxkit_tag pkg/dom0-ztools) RNGD_TAG=$(linuxkit_tag pkg/rngd)