mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
* Helios4: Add workaround for SPI and SATA concurrent access issue Concurrent access on SPI NOR and SATA drives can lead to unstable SATA. Therefore as workaround, disable SATA controller when SPI flash access is needed and make it as user configurable item in armbianEnv.txt This workaround might applies to Clearfog too. Signed-off-by: Aditya Prayoga <aditya@kobol.io> * Helios4: Add U-Boot SPI Signed-off-by: Aditya Prayoga <aditya@kobol.io> * Helios4: Add SPI bootloader install feature This will allow to use nand-sata-install to perform the following operations on Helios4 : - Install bootloader to SPI NOR Flash (Option 5 in Menu). - Copy RootFS to USB storage in order to boot from SPI with RootFS on USB (Option 6 in Menu). * Unmount temp mount points in create_armbian() instead of hardcoded /dev/sda
63 lines
1.9 KiB
Batchfile
63 lines
1.9 KiB
Batchfile
# DO NOT EDIT THIS FILE
|
|
#
|
|
# Please edit /boot/armbianEnv.txt to set supported parameters
|
|
#
|
|
|
|
# default values
|
|
setenv rootdev "/dev/mmcblk0p1"
|
|
setenv rootfstype "ext4"
|
|
setenv verbosity "1"
|
|
setenv emmc_fix "off"
|
|
setenv spi_workaround "off"
|
|
setenv ethaddr "00:50:43:84:fb:2f"
|
|
setenv eth1addr "00:50:43:25:fb:84"
|
|
setenv eth2addr "00:50:43:84:25:2f"
|
|
setenv eth3addr "00:50:43:0d:19:18"
|
|
|
|
# fdtfile should come from compile-time u-boot patches
|
|
if test -z "${fdtfile}"; then
|
|
setenv fdtfile "armada-388-clearfog.dtb"
|
|
fi
|
|
|
|
test -z "${boot_interface}" && setenv boot_interface "mmc"
|
|
|
|
echo "Boot script loaded from ${boot_interface}"
|
|
|
|
if load ${boot_interface} 0:1 ${loadaddr} ${prefix}armbianEnv.txt; then
|
|
env import -t ${loadaddr} ${filesize}
|
|
fi
|
|
|
|
setenv bootargs "console=ttyS0,115200 root=${rootdev} rootwait rootfstype=${rootfstype} ubootdev=${boot_interface} scandelay loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs}"
|
|
|
|
load ${boot_interface} 0:1 ${fdt_addr} ${prefix}dtb/${fdtfile}
|
|
load ${boot_interface} 0:1 ${ramdisk_addr_r} ${prefix}uInitrd
|
|
load ${boot_interface} 0:1 ${kernel_addr_r} ${prefix}zImage
|
|
|
|
setenv fdt_high 0xffffffff
|
|
setenv initrd_high 0xffffffff
|
|
|
|
# eMMC fix
|
|
if test "${emmc_fix}" = "on"; then
|
|
echo "Applying eMMC compatibility fix to the DT"
|
|
fdt addr ${fdt_addr}
|
|
fdt resize
|
|
fdt rm /soc/internal-regs/sdhci@d8000/ cd-gpios
|
|
fdt set /soc/internal-regs/sdhci@d8000/ non-removable
|
|
fi
|
|
|
|
# SPI - SATA workaround
|
|
if test "${spi_workaround}" = "on"; then
|
|
echo "Applying SPI workaround to the DT"
|
|
fdt addr ${fdt_addr}
|
|
fdt resize
|
|
fdt set /soc/internal-regs/sata@e0000 status "disabled"
|
|
fdt set /soc/internal-regs/sata@a8000 status "disabled"
|
|
fdt set /soc/spi@10680 status "okay"
|
|
fdt set /soc/spi@10680/spi-flash@0 status "okay"
|
|
fi
|
|
|
|
bootz ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr}
|
|
|
|
# Recompile with:
|
|
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
|