diff --git a/config/boards/aml-s9xx-box.tvb b/config/boards/aml-s9xx-box.tvb index 3f2a25cb78..b47f3fda6e 100644 --- a/config/boards/aml-s9xx-box.tvb +++ b/config/boards/aml-s9xx-box.tvb @@ -10,8 +10,27 @@ SERIALCON="ttyAML0" FULL_DESKTOP="yes" ASOUND_STATE="asound.state.mesongx" BOOT_LOGO="desktop" +SRC_EXTLINUX="yes" SRC_CMDLINE='rootflags=data=writeback console=ttyAML0,115200n8 console=tty0' +function aml-s9xx-box-bsp-cli-preinst() { + #update of the board bsp-cli package fails because the filesystem type is + #fat and dpkg tries to create a hard link for the existing files as backup + #so rm the files instead in a preinst step + [ -f /boot/aml_autoscript ] && rm /boot/aml_autoscript + [ -f /boot/emmc_autoscript ] && rm /boot/emmc_autoscript + [ -f /boot/s905_autoscript ] && rm /boot/s905_autoscript + [ -f /boot/u-boot-s905 ] && rm /boot/u-boot-s905 + [ -f /boot/u-boot-s905x-s912 ] && rm /boot/u-boot-s905x-s912 + [ -f /boot/u-boot-s905x2-s922 ] && rm /boot/u-boot-s905x2-s922 + [ -f /boot/u-boot-s905x3 ] && rm /boot/u-boot-s905x3 + [ -f /boot/extlinux/extlinux.conf.template ] && rm /boot/extlinux/extlinux.conf.template + [ -f /boot/build-u-boot/readme.txt ] && rm /boot/build-u-boot/readme.txt + [ -f /boot/build-u-boot/u-boot-s905x-s912.patch ] && rm /boot/build-u-boot/u-boot-s905x-s912.patch + [ -f /boot/build-u-boot/u-boot-s905x2-s922.patch ] && rm /boot/build-u-boot/u-boot-s905x2-s922.patch + [ -f /boot/build-u-boot/u-boot-s905x3.patch ] && rm /boot/build-u-boot/u-boot-s905x3.patch + +} function post_family_tweaks_bsp__config_aml-s9xx-box_bsp() { @@ -25,4 +44,7 @@ function post_family_tweaks_bsp__config_aml-s9xx-box_bsp() { rm "${destination}"/usr/sbin/armbian-install + display_alert "${BOARD}" "Adding bsp-cli preinst logic" "info" + + preinst_functions+=('aml-s9xx-box-bsp-cli-preinst') } diff --git a/packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf b/packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf deleted file mode 100644 index 72ad3a929b..0000000000 --- a/packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf +++ /dev/null @@ -1,11 +0,0 @@ -LABEL Armbian -LINUX /Image -INITRD /uInitrd - -#FDT /dtb/amlogic/meson-gxbb-p200.dtb -#FDT /dtb/amlogic/meson-gxl-s905x-p212.dtb -FDT /dtb/amlogic/meson-gxl-s905w-tx3-mini.dtb -#FDT /dtb/amlogic/meson-gxm-q200.dtb -#FDT /dtb/amlogic/meson-g12a-x96-max.dtb -#FDT /dtb/amlogic/meson-g12b-odroid-n2.dtb - diff --git a/packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf.template b/packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf.template new file mode 100644 index 0000000000..763c2bb171 --- /dev/null +++ b/packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf.template @@ -0,0 +1,14 @@ +label Armbian-unofficial + kernel /Image + initrd /uInitrd + fdtdir /dtb/ + +#Insert the correct FDT line for your box's dtb in the extlinux.conf file +#The dtbs for Amlogic s9xx boxes are located in /boot/dtb/amlogic +#For example for a TX3 mini box the FDT line to insert would look like this: + FDT /dtb/amlogic/meson-gxl-s905w-tx3-mini.dtb + + + append root=UUID= rootflags=data=writeback console=ttyAML0,115200n8 console=tty0 rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles + +