diff options
author | Cristian Prundeanu <cristian.prundeanu@arm.com> | 2019-04-24 14:59:08 -0500 |
---|---|---|
committer | Yash Goyal <yash.goyal@arm.com> | 2020-06-10 12:57:22 -0500 |
commit | 4b572afc0846f27aba3aba8ac4a5c159ce6135fc (patch) | |
tree | cefca0c503befdb2a1a17a9bc7561d9584f8cf21 /recipes-bsp | |
parent | 63167508a83129dc5e0437b730ca0b850854e494 (diff) |
Add boot from USB capability to boot.scr
Signed-off-by: Cristian Prundeanu <cristian.prundeanu@arm.com>
Diffstat (limited to 'recipes-bsp')
-rw-r--r-- | recipes-bsp/mbl-boot-scr/files/raspberrypi3-mbl/boot.cmd | 42 | ||||
-rw-r--r-- | recipes-bsp/mbl-boot-scr/mbl-boot-scr.bbappend | 1 |
2 files changed, 43 insertions, 0 deletions
diff --git a/recipes-bsp/mbl-boot-scr/files/raspberrypi3-mbl/boot.cmd b/recipes-bsp/mbl-boot-scr/files/raspberrypi3-mbl/boot.cmd new file mode 100644 index 0000000..c604f06 --- /dev/null +++ b/recipes-bsp/mbl-boot-scr/files/raspberrypi3-mbl/boot.cmd @@ -0,0 +1,42 @@ +# Copyright (c) 2018 Arm Limited and Contributors. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause + +#setenv bootdelay 0 + +echo " " +echo " _____ ______ _ " +echo "/ ___| | ___ (_)" +echo "\ `--. ___ ___ _ _ _ __ ___| |_/ /_ " +echo " `--. \/ _ \/ __| | | | '__/ _ \ __/| |" +echo "/\__/ / __/ (__| |_| | | | __/ | | |" +echo "\____/ \___|\___|\__,_|_| \___\_| |_|" +echo " " + +# The FIT image contains this script plus the kernel and initramfs; it will look +# like we load ourselves recursively, but we actually run a different part of the image next +fitimg_name=boot.scr +fitimg_addr=0x02100000 +msg_src=MMC + +#fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs + +# The area between 0x10000000 and 0x11000000 has to be kept for secure +# world so that the kernel doesn't use it. +setenv bootargs "${bootargs} memmap=16M$256M" + +# Set serial console parameters +setenv bootargs "${bootargs} 8250.nr_uarts=1 console=ttyS0,115200 rootwait rw" + +# Disable FIQs in the USB driver. Using FIQs in USB driver causes the TF-A to crash. +setenv bootargs "${bootargs} dwc_otg.fiq_enable=0 dwc_otg.fiq_fsm_enable=0 dwc_otg.nak_holdoff=0" + +if fatload usb 0:1 ${fitimg_addr} ${fitimg_name} || ext4load usb 0:1 ${fitimg_addr} /boot/${fitimg_name}; then + msg_src=USB +else + fatload mmc 0:1 ${fitimg_addr} ${fitimg_name} || ext4load mmc 0:1 ${fitimg_addr} ${fitimg_name} +fi + +echo Booting secure image from ${msg_src} +#@@KERNEL_BOOTCMD@@ ${kernel_addr_r} ${kernel_param_initramfs} ${fdt_addr} +bootm ${fitimg_addr}#conf@bcm2710-rpi-3-b-plus.dtb diff --git a/recipes-bsp/mbl-boot-scr/mbl-boot-scr.bbappend b/recipes-bsp/mbl-boot-scr/mbl-boot-scr.bbappend new file mode 100644 index 0000000..81fe7b7 --- /dev/null +++ b/recipes-bsp/mbl-boot-scr/mbl-boot-scr.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" |