Espressobin. Building atf'+u-boot for SPI nor flash (800/800/1M) working, auto booting from SD/USB should work (tested for SD at the moment), armbianEnv.txt loading, UUID support

This commit is contained in:
Igor Pecovnik 2017-10-02 15:23:06 +02:00
parent 0d6757eee7
commit e2e0959b78
3 changed files with 45 additions and 18 deletions

View File

@ -1,13 +1,32 @@
setenv boot_interface mmc
setenv image_name boot/Image
setenv fdt_name_a boot/dtb/marvell/armada-3720-community.dtb
setenv fdt_name_b boot/dtb/marvell/armada-3720-espressobin.dtb
setenv fdt_high "0xffffffffffffffff"
# 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 initrd_addr "0x1100000"
setenv rootfstype "ext4"
# additional values
setenv initrd_image "boot/uInitrd"
setenv ethaddr "F0:AD:4E:03:64:7F"
setenv bootcmd 'mmc dev 0; ext4load mmc 0:1 $kernel_addr $image_name;ext4load mmc 0:1 $initrd_addr $initrd_image; ext4load mmc 0:1 $fdt_addr $fdt_name_a;ext4load mmc 0:1 $fdt_addr $fdt_name_b;setenv bootargs $console root=$rootdev rw rootwait; booti $kernel_addr $initrd_addr $fdt_addr'
if test -e ${boot_interface} 0 /boot/armbianEnv.txt; then
load ${boot_interface} 0 ${loadaddr} /boot/armbianEnv.txt
env import -t ${loadaddr} ${filesize}
fi
setenv bootargs "$console root=${rootdev} rootfstype=${rootfstype} rootwait loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs}"
setenv fdt_name_a boot/dtb/marvell/armada-3720-community.dtb
setenv fdt_name_b boot/dtb/marvell/armada-3720-espressobin.dtb
ext4load $boot_interface 0:1 $kernel_addr $image_name
ext4load $boot_interface 0:1 $initrd_addr $initrd_image
ext4load $boot_interface 0:1 $fdt_addr $fdt_name_a
ext4load $boot_interface 0:1 $fdt_addr $fdt_name_b
booti $kernel_addr $initrd_addr $fdt_addr
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr

View File

@ -20,7 +20,7 @@ ATFDIR='arm-trusted-firmware-espressobin'
ATFBRANCH='branch:atf-v1.3-armada-17.10'
ATF_USE_GCC='== 4.9'
ATF_COMPILER='arm-linux-gnueabi-'
ATF_TARGET_MAP='DEBUG=1 USE_COHERENT_MEM=0 LOG_LEVEL=20 SECURE=0 CLOCKSPRESET=CPU_800_DDR_800 DDR_TOPOLOGY=2 BOOTDEV=EMMCNORM PARTNUM=0 PLAT=a3700;;build/a3700/debug/bl31.bin'
ATF_TARGET_MAP='DEBUG=1 USE_COHERENT_MEM=0 LOG_LEVEL=20 SECURE=0 CLOCKSPRESET=CPU_800_DDR_800 DDR_TOPOLOGY=2 BOOTDEV=SPINOR PARTNUM=0 PLAT=a3700;;build/a3700/debug/bl31.bin'
case $BRANCH in
default)
KERNELSOURCE='https://github.com/MarvellEmbeddedProcessors/linux-marvell.git'
@ -75,7 +75,7 @@ uboot_custom_postprocess()
toolchain=$(find_toolchain "$ATF_COMPILER" "$ATF_USE_GCC")
cd $atfdir
display_alert "Building boot image" "" "info"
make DEBUG=1 USE_COHERENT_MEM=0 LOG_LEVEL=20 SECURE=0 CLOCKSPRESET=CPU_800_DDR_800 DDR_TOPOLOGY=2 BOOTDEV=EMMCNORM PARTNUM=0 PLAT=a3700 all fip BL33=$SRC/cache/sources/$BOOTDIR/${BOOTBRANCH##*:}/u-boot.bin WTP=../../marvell-tools $CTHREADS CROSS_COMPILE=$ATF_COMPILER > /dev/null 2>&1
make DEBUG=1 USE_COHERENT_MEM=0 LOG_LEVEL=20 SECURE=0 CLOCKSPRESET=CPU_800_DDR_800 DDR_TOPOLOGY=2 BOOTDEV=SPINOR PARTNUM=0 PLAT=a3700 all fip BL33=$SRC/cache/sources/$BOOTDIR/${BOOTBRANCH##*:}/u-boot.bin WTP=../../marvell-tools $CTHREADS CROSS_COMPILE=$ATF_COMPILER > /dev/null 2>&1
cp build/a3700/debug/flash-image.bin $ubootdir
cd $ubootdir
}

View File

@ -1,21 +1,29 @@
diff --git a/include/configs/mvebu_armada-common.h b/include/configs/mvebu_armada-common.h
old mode 100644
new mode 100755
index c406a7a..5677a0a
index c406a7a..ddd7f5e
--- a/include/configs/mvebu_armada-common.h
+++ b/include/configs/mvebu_armada-common.h
@@ -51,6 +51,10 @@
@@ -36,7 +36,7 @@
#define CONFIG_ETHPRIME "eth0"
#define CONFIG_ROOTPATH "/srv/nfs/" /* Default Dir for NFS */
#define CONFIG_EXTRA_ENV_SETTINGS "kernel_addr=0x5000000\0" \
- "initrd_addr=0xa00000\0" \
+ "initrd_addr=0x1100000\0" \
"initrd_size=0x2000000\0" \
"fdt_addr=0x4f00000\0" \
"loadaddr=0x5000000\0" \
@@ -50,7 +50,8 @@
"eth1addr=00:51:82:11:22:01\0" \
"eth2addr=00:51:82:11:22:02\0" \
"eth3addr=00:51:82:11:22:03\0" \
"image_name=Image\0" \
+ "load_script=if test -e mmc 0:1 boot/boot.scr; then echo \"... booting from SD\"; \
+ setenv boot_interface mmc; else echo \"... booting from USB/SATA\"; usb start; \
+ setenv boot_interface usb; fi; if test -e $boot_interface 0:1 boot/boot.scr; \
+ then ext4load $boot_interface 0:1 0x00800000 boot/boot.scr; source; fi\0" \
- "image_name=Image\0" \
+ "image_name=boot/Image\0" \
+ "load_script=if test -e mmc 0:1 boot/boot.scr; then echo \"... booting from SD\";setenv boot_interface mmc;else echo \"... booting from USB/SATA\";usb start;setenv boot_interface usb;fi;if test -e $boot_interface 0:1 boot/boot.scr;then ext4load $boot_interface 0:1 0x00800000 boot/boot.scr; source; fi\0" \
"get_ramfs=if test \"${ramfs_name}\"" \
" != \"-\"; then setenv " \
"ramfs_addr 0x8000000; " \
@@ -69,7 +73,7 @@
@@ -69,7 +70,7 @@
":$netdev:none nfsroot="\
"$serverip:$rootpath " \
"$extra_params"