aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAyan Kumar Halder2021-11-05 12:20:16 +0000
committerStefano Stabellini2021-11-05 08:53:12 -0700
commit99d452ee2e3c2f0abebbaaad32aa5ae1a58da0bd (patch)
treec8a8423df05b474d9619f5cca754a2e6fe10e5e5 /scripts
parentd1af839cb8db976827984e2b6aed14681685c638 (diff)
Enable the user to override the bootargs for domU
The user can specify the bootargs for domU in the config file as follows:- DOMU_CMD[x]="<cmd line params>" As an example, DOMU_CMD[0]="console=ttyPS0 earlycon console=ttyPS0,115200 console=ttyAMA0 clk_ignore_unused rdinit=/sbin/init root=/dev/ram0 init=/bin/sh" If the user does not specify this, then the default command line param is:- "console=ttyAMA0" Also, updated the README.md. Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com> [stefano: improve README] Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/uboot-script-gen9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
index e14ee32..6ae767e 100755
--- a/scripts/uboot-script-gen
+++ b/scripts/uboot-script-gen
@@ -85,11 +85,16 @@ function add_device_tree_kernel()
local path=$1
local addr=$2
local size=$3
+ local bootargs=$4
+ if test -z "$bootargs"
+ then
+ bootargs="console=ttyAMA0"
+ fi
dt_mknode "$path" "module$addr"
dt_set "$path/module$addr" "compatible" "str_a" "multiboot,kernel multiboot,module"
dt_set "$path/module$addr" "reg" "hex" "0x0 $addr 0x0 $(printf "0x%x" $size)"
- dt_set "$path/module$addr" "bootargs" "str" "console=ttyAMA0"
+ dt_set "$path/module$addr" "bootargs" "str" "$bootargs"
}
@@ -147,7 +152,7 @@ function xen_device_tree_editing()
dt_set "/chosen/domU$i" "memory" "int" "0 ${DOMU_MEM[$i]}"
dt_set "/chosen/domU$i" "cpus" "int" "${DOMU_VCPUS[$i]}"
dt_set "/chosen/domU$i" "vpl011" "hex" "0x1"
- add_device_tree_kernel "/chosen/domU$i" ${domU_kernel_addr[$i]} ${domU_kernel_size[$i]}
+ add_device_tree_kernel "/chosen/domU$i" ${domU_kernel_addr[$i]} ${domU_kernel_size[$i]} "${DOMU_CMD[$i]}"
if test "${domU_ramdisk_addr[$i]}"
then
add_device_tree_ramdisk "/chosen/domU$i" ${domU_ramdisk_addr[$i]} ${domU_ramdisk_size[$i]}