3 BOARD_DIR
="$(dirname $0)"
4 BOARD_NAME
="$(basename ${BOARD_DIR})"
5 GENIMAGE_CFG
="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg"
6 GENIMAGE_TMP
="${BUILD_DIR}/genimage.tmp"
9 --add-pi3-miniuart-bt-overlay)
10 if ! grep -qE '^dtoverlay=' "${BINARIES_DIR}/rpi-firmware/config.txt"; then
11 echo "Adding 'dtoverlay=pi3-miniuart-bt' to config.txt (fixes ttyAMA0 serial console)."
12 cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt"
14 # fixes rpi3 ttyAMA0 serial console
15 dtoverlay=pi3-miniuart-bt
21 # Mark the kernel as DT-enabled
22 mkdir
-p "${BINARIES_DIR}/kernel-marked"
23 ${HOST_DIR}/usr
/bin
/mkknlimg
"${BINARIES_DIR}/zImage" \
24 "${BINARIES_DIR}/kernel-marked/zImage"
26 rm -rf "${GENIMAGE_TMP}"
29 --rootpath "${TARGET_DIR}" \
30 --tmppath "${GENIMAGE_TMP}" \
31 --inputpath "${BINARIES_DIR}" \
32 --outputpath "${BINARIES_DIR}" \
33 --config "${GENIMAGE_CFG}"