kumquat-buildroot/board/pc/post-image.sh
Erico Nunes 6fab243237 configs/pc: refactor to use genimage and grub.cfg
This simplifies the pc configs and respective post image scripts to use
the shared genimage script and separate grub config files.
Separate grub files are cleaner to maintain and easier to copy and
modify, for example to support booting the pc defconfigs in qemu.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-10-22 16:27:53 +02:00

15 lines
410 B
Bash
Executable File

#!/bin/sh
BOARD_DIR="$(dirname $0)"
# Detect boot strategy, EFI or BIOS
if [ -f ${BINARIES_DIR}/efi-part/startup.nsh ]; then
cp -f ${BOARD_DIR}/grub-efi.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
else
cp -f ${BOARD_DIR}/grub-bios.cfg ${TARGET_DIR}/boot/grub/grub.cfg
# Copy grub 1st stage to binaries, required for genimage
cp -f ${HOST_DIR}/lib/grub/i386-pc/boot.img ${BINARIES_DIR}
fi
exit $?