Insert extlinux.conf and zImage in post image script
This commit is contained in:
4
board/raspberrypi/extlinux.conf
Normal file
4
board/raspberrypi/extlinux.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
label buildroot
|
||||
kernel /zImage
|
||||
devicetree /bcm2708-rpi-b-plus.dtb
|
||||
append root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200
|
||||
@@ -7,6 +7,10 @@ BOARD_NAME="$(basename ${BOARD_DIR})"
|
||||
GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg"
|
||||
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
|
||||
|
||||
# Prepare extlinux directory in BINARIES_DIR
|
||||
mkdir -p "${BINARIES_DIR}/extlinux"
|
||||
cp "${BOARD_DIR}/extlinux.conf" "${BINARIES_DIR}/extlinux/extlinux.conf"
|
||||
|
||||
# generate genimage from template if a board specific variant doesn't exists
|
||||
if [ ! -e "${GENIMAGE_CFG}" ]; then
|
||||
GENIMAGE_CFG="${BINARIES_DIR}/genimage.cfg"
|
||||
@@ -16,8 +20,9 @@ if [ ! -e "${GENIMAGE_CFG}" ]; then
|
||||
FILES+=( "${i#${BINARIES_DIR}/}" )
|
||||
done
|
||||
|
||||
KERNEL=$(sed -n 's/^kernel=//p' "${BINARIES_DIR}/rpi-firmware/config.txt")
|
||||
FILES+=( "${KERNEL}" )
|
||||
FILES+=( "u-boot.bin" )
|
||||
FILES+=( "zImage" )
|
||||
FILES+=( "extlinux/" )
|
||||
|
||||
BOOT_FILES=$(printf '\\t\\t\\t"%s",\\n' "${FILES[@]}")
|
||||
sed "s|#BOOT_FILES#|${BOOT_FILES}|" "${BOARD_DIR}/genimage.cfg.in" \
|
||||
@@ -41,4 +46,4 @@ genimage \
|
||||
--outputpath "${BINARIES_DIR}" \
|
||||
--config "${GENIMAGE_CFG}"
|
||||
|
||||
exit $?
|
||||
exit $?
|
||||
Reference in New Issue
Block a user