aboutsummaryrefslogtreecommitdiff
path: root/board/pc/post-build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'board/pc/post-build.sh')
-rwxr-xr-xboard/pc/post-build.sh15
1 files changed, 15 insertions, 0 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