check for /boot/firmware dir during build (#4529)

This commit is contained in:
openoms 2024-04-06 21:19:39 +02:00 committed by openoms
parent 4d4762106e
commit f9ae449ebb
No known key found for this signature in database
GPG key ID: 5BFB77609B081B65

View file

@ -441,14 +441,18 @@ if [ "${baseimage}" = "raspios_arm64" ]; then
[ "${wifi_region}" != "off" ] && raspi-config nonint do_wifi_country $wifi_region
# see https://github.com/rootzoll/raspiblitz/issues/428#issuecomment-472822840
configFile="/boot/firmware/config.txt"
if [ -d /boot/firmware ];then
configFile="/boot/firmware/config.txt"
else
configFile="/boot/config.txt"
fi
if ! grep "Raspiblitz" $configFile; then
echo "# Adding Raspiblitz Edits to $configFile"
echo | tee -a $configFile
echo "# Raspiblitz" | tee -a $configFile
# ensure that kernel8.img is used to set PAGE_SIZE to 4K
# https://github.com/raspiblitz/raspiblitz/issues/4346
if [ -f /boot/firmware/kernel8.img ]; then
if [ -f /boot/kernel8.img ] || [ -f /boot/firmware/kernel8.img ]; then
echo 'kernel=kernel8.img' | tee -a $configFile
fi
echo "max_usb_current=1" | tee -a $configFile