diff options
author | Julien Olivain <ju.o@free.fr> | 2023-03-30 22:09:02 +0200 |
---|---|---|
committer | Julien Olivain <ju.o@free.fr> | 2023-03-30 22:09:02 +0200 |
commit | 04dbf0d5be8b3c23323bab0565bff1d3b0310e9f (patch) | |
tree | 460fe1d5361ae3c53fcfc725cbd81be280642032 /riscv | |
parent | 929ff56a09462978628c59c22fe6cb6895aa136f (diff) | |
download | riscv-isa-sim-04dbf0d5be8b3c23323bab0565bff1d3b0310e9f.zip riscv-isa-sim-04dbf0d5be8b3c23323bab0565bff1d3b0310e9f.tar.gz riscv-isa-sim-04dbf0d5be8b3c23323bab0565bff1d3b0310e9f.tar.bz2 |
Fix --bootargs default value in spike usage help() function
Commit 191634d285 changed the default kernel boot args from
"console=hvc0 earlycon=sbi" to "console=ttyS0 earlycon", but didn't
updated the spike usage help() function.
This commit introduces a new macro DEFAULT_KERNEL_BOOTARGS in order to
have a single definition. This macro is used everywhere in dts.cc and
spike.cc help() function.
Signed-off-by: Julien Olivain <ju.o@free.fr>
Diffstat (limited to 'riscv')
-rw-r--r-- | riscv/dts.cc | 4 | ||||
-rw-r--r-- | riscv/platform.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/riscv/dts.cc b/riscv/dts.cc index acedde8..200288e 100644 --- a/riscv/dts.cc +++ b/riscv/dts.cc @@ -34,10 +34,10 @@ std::string make_dts(size_t insns_per_rtc_tick, size_t cpu_hz, s << " linux,initrd-start = <" << (size_t)initrd_start << ">;\n" " linux,initrd-end = <" << (size_t)initrd_end << ">;\n"; if (!bootargs) - bootargs = "root=/dev/ram console=ttyS0 earlycon"; + bootargs = "root=/dev/ram " DEFAULT_KERNEL_BOOTARGS; } else { if (!bootargs) - bootargs = "console=ttyS0 earlycon"; + bootargs = DEFAULT_KERNEL_BOOTARGS; } s << " bootargs = \""; for (size_t i = 0; i < strlen(bootargs); i++) { diff --git a/riscv/platform.h b/riscv/platform.h index 2bafa68..7fffdc8 100644 --- a/riscv/platform.h +++ b/riscv/platform.h @@ -2,6 +2,7 @@ #ifndef _RISCV_PLATFORM_H #define _RISCV_PLATFORM_H +#define DEFAULT_KERNEL_BOOTARGS "console=ttyS0 earlycon" #define DEFAULT_RSTVEC 0x00001000 #define CLINT_BASE 0x02000000 #define CLINT_SIZE 0x000c0000 |