Use file for cmdline.txt (#1568)

* Remove duplicate config.txt copy statement

* Use static cmdline.txt file

Instead of dynamically creating cmdline.txt use a static version of it.
This aligns with other boot loader/firmware configuration files and makes
it easier to customize the file per board.
This commit is contained in:
Stefan Agner
2021-10-04 14:38:52 +02:00
committed by GitHub
parent 8d69f395c2
commit bdc319d3df
16 changed files with 20 additions and 18 deletions

View File

@@ -0,0 +1 @@
dwc_otg.lpm_enable=0 console=tty1

View File

@@ -14,7 +14,11 @@ function hassos_pre_image() {
else
cp "${BOARD_DIR}/../config.txt" "${BOOT_DATA}/config.txt"
fi
cp "${BOARD_DIR}/../config.txt" "${BOOT_DATA}/config.txt"
if [ -f "${BOARD_DIR}/cmdline.txt" ]; then
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
else
cp "${BOARD_DIR}/../cmdline.txt" "${BOOT_DATA}/cmdline.txt"
fi
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
# EEPROM update for Raspberry Pi 4/Compute Module 4
@@ -23,9 +27,6 @@ function hassos_pre_image() {
cp "${BINARIES_DIR}/rpi-eeprom/pieeprom.upd" "${BOOT_DATA}/pieeprom.upd"
fi
# Set cmd options
echo "dwc_otg.lpm_enable=0 console=tty1" > "${BOOT_DATA}/cmdline.txt"
# Enable 64bit support
if [[ "${BOARD_ID}" =~ "64" ]]; then
sed -i "s|#arm_64bit|arm_64bit|g" "${BOOT_DATA}/config.txt"