diff options
author | 2018-10-12 00:24:45 +0200 | |
---|---|---|
committer | 2018-12-31 18:45:53 +0100 | |
commit | 0b28397a9bed339e9aca2acfe51b1f0c68dbee65 (patch) | |
tree | f9d5d2e2b80044773cc18b7f96398c2a0e3e0ee4 /board/pc | |
parent | 42fa5bcbfb48f188c2c180854c0bbdefd98c32c8 (diff) | |
download | buildroot-0b28397a9bed339e9aca2acfe51b1f0c68dbee65.tar.gz buildroot-0b28397a9bed339e9aca2acfe51b1f0c68dbee65.tar.bz2 |
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>
Diffstat (limited to 'board/pc')
-rwxr-xr-x | board/pc/post-build.sh | 15 | ||||
-rwxr-xr-x | board/pc/post-image.sh | 14 |
2 files changed, 15 insertions, 14 deletions
diff --git a/board/pc/post-build.sh b/board/pc/post-build.sh new file mode 100755 index 0000000000..552d488160 --- /dev/null +++ b/board/pc/post-build.sh @@ -0,0 +1,15 @@ +#!/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 diff --git a/board/pc/post-image.sh b/board/pc/post-image.sh deleted file mode 100755 index bdd0847ec5..0000000000 --- a/board/pc/post-image.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/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 $? |