Seprate config template file.
This commit is contained in:
parent
4ad628ee2c
commit
757618595b
|
@ -0,0 +1,6 @@
|
|||
# Enable spidev node
|
||||
dtparam=spi=on
|
||||
|
||||
# Add PCF8574A GPIO expander
|
||||
dtoverlay=pcf8574a,addr=0x3f,interrupt=22
|
||||
|
|
@ -6,6 +6,7 @@ BOARD_DIR="$(dirname $0)"
|
|||
BOARD_NAME="$(basename ${BOARD_DIR})"
|
||||
GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg"
|
||||
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
|
||||
CONFIG_TEMPLATE="${BOARD_DIR}/config.tmpl.txt"
|
||||
|
||||
for arg in "$@"
|
||||
do
|
||||
|
@ -28,16 +29,6 @@ __EOF__
|
|||
|
||||
# enable 64bits support
|
||||
arm_64bit=1
|
||||
__EOF__
|
||||
fi
|
||||
;;
|
||||
--add-pcf8574a-overlay)
|
||||
if ! grep -qE '^dtoverlay=pcf8574a' "${BINARIES_DIR}/rpi-firmware/config.txt"; then
|
||||
echo "Adding 'dtoverlay=pcf8574a' to config.txt."
|
||||
cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt"
|
||||
|
||||
# Add PCF8574A GPIO expander
|
||||
dtoverlay=pcf8574a,addr=0x3f,interrupt=22
|
||||
__EOF__
|
||||
fi
|
||||
;;
|
||||
|
@ -50,6 +41,11 @@ __EOF__
|
|||
|
||||
done
|
||||
|
||||
if [[ -f "${CONFIG_TEMPLATE}" ]]; then
|
||||
echo "Config template file exists, append to config.txt"
|
||||
cat "${CONFIG_TEMPLATE}" >> "${BINARIES_DIR}/rpi-firmware/config.txt"
|
||||
fi
|
||||
|
||||
# Pass an empty rootpath. genimage makes a full copy of the given rootpath to
|
||||
# ${GENIMAGE_TMP}/root so passing TARGET_DIR would be a waste of time and disk
|
||||
# space. We don't rely on genimage to build the rootfs image, just to insert a
|
||||
|
|
|
@ -23,7 +23,7 @@ BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_system_agent_PATH)/customizations/users.
|
|||
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_system_agent_PATH)/customizations/overlay"
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_system_agent_PATH)/board/iminc/raspberrypi-4b-system-agent/post-build.sh"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_system_agent_PATH)/board/iminc/raspberrypi-4b-system-agent/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --aarch64 --add-pcf8574a-overlay"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --aarch64"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,081f560bde7188ca6f40cf297bd55c680e0179c0)/linux-081f560bde7188ca6f40cf297bd55c680e0179c0.tar.gz"
|
||||
|
|
Loading…
Reference in New Issue