3 # Detect boot strategy, EFI or BIOS
4 if [ -f ${BINARIES_DIR}/efi-part
/startup.nsh
]; then
6 # grub.cfg needs customization for EFI since the root partition is
7 # number 2, and bzImage is in the EFI partition (1)
8 cat >${BINARIES_DIR}/efi-part
/EFI
/BOOT
/grub.cfg
<<__EOF__
12 menuentry "Buildroot" {
13 linux /bzImage root=/dev/sda2 rootwait console=tty1
18 # Copy grub 1st stage to binaries, required for genimage
19 cp -f ${HOST_DIR}/usr
/lib
/grub
/i386-pc
/boot.img
${BINARIES_DIR}
22 BOARD_DIR
="$(dirname $0)"
23 GENIMAGE_CFG
="${BOARD_DIR}/genimage-${BOOT_TYPE}.cfg"
24 GENIMAGE_TMP
="${BUILD_DIR}/genimage.tmp"
26 rm -rf "${GENIMAGE_TMP}"
29 --rootpath "${TARGET_DIR}" \
30 --tmppath "${GENIMAGE_TMP}" \
31 --inputpath "${BINARIES_DIR}" \
32 --outputpath "${BINARIES_DIR}" \
33 --config "${GENIMAGE_CFG}"