Files
build/config/bootscripts/boot-marvell.cmd
zador-blood-stained 0f898f3f31 Cleanup for several boot scripts
Parameters like "selinux" and "enforcing" should not be set by default
2017-03-04 21:23:53 +03:00

51 lines
1.7 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 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 ext4load ${boot_interface} 0:1 ${loadaddr} /boot/armbianEnv.txt || ext4load ${boot_interface} 0:1 ${loadaddr} armbianEnv.txt; then
env import -t ${loadaddr} ${filesize}
fi
setenv bootargs "console=ttyS0,115200 root=${rootdev} rootwait rootfstype=${rootfstype} ubootdev=${boot_interface} cgroup_disable=memory scandelay loglevel=${verbosity} ${extraargs}"
ext4load ${boot_interface} 0:1 ${fdt_addr} boot/dtb/${fdtfile} || ext4load ${boot_interface} 0:1 ${fdt_addr} dtb/${fdtfile}
ext4load ${boot_interface} 0:1 ${ramdisk_addr_r} boot/uInitrd || ext4load ${boot_interface} 0:1 ${ramdisk_addr_r} uInitrd
ext4load ${boot_interface} 0:1 ${kernel_addr_r} boot/zImage || ext4load ${boot_interface} 0:1 ${kernel_addr_r} 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
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