kumquat-buildroot/board/pc/post-build.sh
Grégoire Delattre 0b28397a9b board/pc: ensure grub.cfg is copied to target filesystem
Before this commit, the grub configuration file was copied to the
TARGET_DIR in a post-image hook, after the filesystem has been
generated. It was kinda working because the board/pc's grub
configuration and the default one are the same and the later was
copied during the build process of the grub2 package.

This commit ensures the custom board/pc grub configuration is copied at
the right time.

Signed-off-by: Grégoire Delattre <gregoire.delattre@gmail.com>
Reviewed-by: Matt Weber <matthew.weber@rockwellcollin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-12-31 18:45:53 +01:00

16 lines
418 B
Bash
Executable File

#!/bin/sh
set -e
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/i387-pc/boot.img" "$BINARIES_DIR"
fi