31be2ec220
Since things are no longer installed in $(HOST_DIR)/usr, the callers should also not refer to it. This is a mechanical change with git grep -l 'HOST_DIR}\?/usr/' board | xargs sed -i 's%\(HOST_DIR}\?\)/usr/%\1/%g' Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
36 lines
954 B
Bash
Executable File
36 lines
954 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Detect boot strategy, EFI or BIOS
|
|
if [ -f ${BINARIES_DIR}/efi-part/startup.nsh ]; then
|
|
BOOT_TYPE=efi
|
|
# grub.cfg needs customization for EFI since the root partition is
|
|
# number 2, and bzImage is in the EFI partition (1)
|
|
cat >${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg <<__EOF__
|
|
set default="0"
|
|
set timeout="5"
|
|
|
|
menuentry "Buildroot" {
|
|
linux /bzImage root=/dev/sda2 rootwait console=tty1
|
|
}
|
|
__EOF__
|
|
else
|
|
BOOT_TYPE=bios
|
|
# Copy grub 1st stage to binaries, required for genimage
|
|
cp -f ${HOST_DIR}/lib/grub/i386-pc/boot.img ${BINARIES_DIR}
|
|
fi
|
|
|
|
BOARD_DIR="$(dirname $0)"
|
|
GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOOT_TYPE}.cfg"
|
|
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
|
|
|
|
rm -rf "${GENIMAGE_TMP}"
|
|
|
|
genimage \
|
|
--rootpath "${TARGET_DIR}" \
|
|
--tmppath "${GENIMAGE_TMP}" \
|
|
--inputpath "${BINARIES_DIR}" \
|
|
--outputpath "${BINARIES_DIR}" \
|
|
--config "${GENIMAGE_CFG}"
|
|
|
|
exit $?
|