RISC-V: copy kernelname from the environment

This is allows kern.bootfile to report the correct value.
This commit is contained in:
Mitchell Horne 2020-08-15 16:15:34 +00:00
parent 3d89a9759f
commit 9ead45af7b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=364256

View file

@ -861,6 +861,7 @@ initriscv(struct riscv_bootparams *rvbp)
phandle_t chosen;
uint32_t hart;
#endif
char *env;
TSRAW(&thread0, TS_ENTER, __func__, NULL);
@ -955,6 +956,10 @@ initriscv(struct riscv_bootparams *rvbp)
init_param2(physmem);
kdb_init();
env = kern_getenv("kernelname");
if (env != NULL)
strlcpy(kernelname, env, sizeof(kernelname));
if (boothowto & RB_VERBOSE)
physmem_print_tables();