diff options
author | Ryan Harkin <ryan.harkin@linaro.org> | 2016-01-28 18:03:31 +0000 |
---|---|---|
committer | Ryan Harkin <ryan.harkin@linaro.org> | 2016-01-28 18:03:31 +0000 |
commit | 0f83776a9c6b9db14425bca41938a7dec82007c9 (patch) | |
tree | 591c506b2860f9a623fede342bceff5bbd94a393 | |
parent | 2f1f39fcd5a7cc6984f74217181296e21dc441fa (diff) |
Make kernel/dtb//initrd optionalarmlt-20160212-001
If you are trying to boot the fvp-uefi variant, you don't need a
kernel/dtb/initrd, so make these files optional.
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
-rwxr-xr-x | run_model.sh | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/run_model.sh b/run_model.sh index 6d0712f..00b0c6c 100755 --- a/run_model.sh +++ b/run_model.sh @@ -84,16 +84,19 @@ if [ ! -e "$FIP" ]; then fi if [ ! -e "$IMAGE" ]; then - echo "ERROR: you should set variable IMAGE to point to a valid kernel image, currently it is set to \"$IMAGE\"" - err=1 + echo "WARNING: you should set variable IMAGE to point to a valid kernel image, currently it is set to \"$IMAGE\"" + IMAGE= + warn=1 fi if [ ! -e "$INITRD" ]; then - echo "ERROR: you should set variable INITRD to point to a valid initrd/ramdisk image, currently it is set to \"$INITRD\"" - err=1 + echo "WARNING: you should set variable INITRD to point to a valid initrd/ramdisk image, currently it is set to \"$INITRD\"" + INITRD= + warn=1 fi if [ ! -e "$DTB" ]; then - echo "ERROR: you should set variable DTB to point to a valid device tree binary (.dtb), currently it is set to \"$DTB\"" - err=1 + echo "WARNING: you should set variable DTB to point to a valid device tree binary (.dtb), currently it is set to \"$DTB\"" + DTB= + warn=1 fi # Exit if any obvious errors happened @@ -158,6 +161,16 @@ if [ "$FOUNDATION" == "1" ]; then gic_param=" --no-gicv3" fi + if [ "$IMAGE" != "" ]; then + image_param="--data=${IMAGE}@${kern_addr}" + fi + if [ "$INITRD" != "" ]; then + initrd_param="--data=${INITRD}@${initrd_addr}" + fi + if [ "$DTB" != "" ]; then + dtb_param="--data=${DTB}@${dtb_addr}" + fi + cmd="$MODEL \ --cores=$CLUSTER0_NUM_CORES \ $secure_memory_param \ @@ -165,9 +178,9 @@ if [ "$FOUNDATION" == "1" ]; then $gic_param \ --data=${BL1}@0x0 \ --data=${FIP}@0x8000000 \ - --data=${IMAGE}@${kern_addr} \ - --data=${DTB}@${dtb_addr} \ - --data=${INITRD}@${initrd_addr} \ + $image_param \ + $dtb_param \ + $initrd_param \ $disk_param \ " else @@ -178,6 +191,16 @@ else disk_param=" -C bp.virtioblockdevice.image_path=$DISK " fi + if [ "$IMAGE" != "" ]; then + image_param="--data cluster0.cpu0=${IMAGE}@${kern_addr}" + fi + if [ "$INITRD" != "" ]; then + initrd_param="--data cluster0.cpu0=${INITRD}@${initrd_addr}" + fi + if [ "$DTB" != "" ]; then + dtb_param="--data cluster0.cpu0=${DTB}@${dtb_addr}" + fi + cmd="$MODEL \ -C pctl.startup=0.0.0.0 \ -C bp.secure_memory=$SECURE_MEMORY \ @@ -187,9 +210,9 @@ else -C bp.pl011_uart0.untimed_fifos=1 \ -C bp.secureflashloader.fname=$BL1 \ -C bp.flashloader0.fname=$FIP \ - --data cluster0.cpu0=${IMAGE}@${kern_addr} \ - --data cluster0.cpu0=${DTB}@${dtb_addr} \ - --data cluster0.cpu0=${INITRD}@${initrd_addr} \ + $image_param \ + $dtb_param \ + $initrd_param \ -C bp.ve_sysregs.mmbSiteDefault=0 \ $disk_param \ $VARS \ |