package/wavemon: bump to version 0.8.1
[buildroot-gz.git] / board / pc / post-image.sh
blob3b51409c248720813e51380095f6ea7e92b8632b
1 #!/bin/sh
3 # Detect boot strategy, EFI or BIOS
4 if [ -f ${BINARIES_DIR}/efi-part/startup.nsh ]; then
5 BOOT_TYPE=efi
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__
9 set default="0"
10 set timeout="5"
12 menuentry "Buildroot" {
13 linux /bzImage root=/dev/sda2 rootwait console=tty1
15 __EOF__
16 else
17 BOOT_TYPE=bios
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}"
28 genimage \
29 --rootpath "${TARGET_DIR}" \
30 --tmppath "${GENIMAGE_TMP}" \
31 --inputpath "${BINARIES_DIR}" \
32 --outputpath "${BINARIES_DIR}" \
33 --config "${GENIMAGE_CFG}"
35 exit $?