stand/uboot: Move archsw init to compile time

Sponsored by:		Netflix
This commit is contained in:
Warner Losh
2025-05-25 21:37:16 -06:00
parent 36b05c0588
commit b33f61833b
+9 -8
View File
@@ -40,7 +40,15 @@
#endif
struct uboot_devdesc currdev;
struct arch_switch archsw; /* MI/MD interface boundary */
struct arch_switch archsw = { /* MI/MD interface boundary */
.arch_loadaddr = uboot_loadaddr,
.arch_getdev = uboot_getdev,
.arch_copyin = uboot_copyin,
.arch_copyout = uboot_copyout,
.arch_readin = uboot_readin,
.arch_autoload = uboot_autoload,
};
int devs_no;
uintptr_t uboot_heap_start;
@@ -474,13 +482,6 @@ main(int argc, char **argv)
meminfo();
archsw.arch_loadaddr = uboot_loadaddr;
archsw.arch_getdev = uboot_getdev;
archsw.arch_copyin = uboot_copyin;
archsw.arch_copyout = uboot_copyout;
archsw.arch_readin = uboot_readin;
archsw.arch_autoload = uboot_autoload;
/* Set up currdev variable to have hooks in place. */
env_setenv("currdev", EV_VOLATILE, "", uboot_setcurrdev, env_nounset);