4e4545246f
Add two new sample defconfigs oriented towards real PC targets. It adds two variants for BIOS and EFI boot strategy. On the build side we enable eudev to autoload relevant kernel modules/support when necessary. It adds a bunch of drivers and extra filesystem support which is by no means extensive/complete, mostly geared towards the hardware i've got at hand to test with. This is accomplished by adding on top of the Qemu x86_64 kernel sample config. Build connman since by using eudev network interfaces get renamed on boot thus complicating any form of automatic and friendly bringup. It also makes Wi-Fi configuration/support easier. In principle these base defconfigs should work just fine for other storage media != pendrive like sata or ssd disk, however driver support isn't there quite yet, and pendrive is mostly supported by usb storage plus the usual usb host controller drivers. Tested on old Lenovo laptop (BIOS) and Asus Zenbook (EFI). Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
36 lines
958 B
Bash
Executable File
36 lines
958 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}/usr/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 $?
|