The branch main has been updated by kevans:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=78f3c734a5b755ceb47fea220e94755c8e82bd67

commit 78f3c734a5b755ceb47fea220e94755c8e82bd67
Author:     Kyle Evans <[email protected]>
AuthorDate: 2022-09-29 19:33:33 +0000
Commit:     Kyle Evans <[email protected]>
CommitDate: 2022-09-29 19:33:33 +0000

    arm64: fix build without FDT
    
    static_kenv is only used under `FDT`, and `try_load_dtb` is only defined
    with `FDT`.
    
    Reviewed by:    andrew, imp, manu
    Differential Revision:  https://reviews.freebsd.org/D36791
---
 sys/arm64/arm64/machdep.c      | 2 ++
 sys/arm64/arm64/machdep_boot.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c
index be6b289b0489..3f4ebac52cbe 100644
--- a/sys/arm64/arm64/machdep.c
+++ b/sys/arm64/arm64/machdep.c
@@ -768,7 +768,9 @@ initarm(struct arm64_bootparams *abp)
        update_special_regs(0);
 
        link_elf_ireloc(kmdp);
+#ifdef FDT
        try_load_dtb(kmdp);
+#endif
 
        efi_systbl_phys = MD_FETCH(kmdp, MODINFOMD_FW_HANDLE, vm_paddr_t);
 
diff --git a/sys/arm64/arm64/machdep_boot.c b/sys/arm64/arm64/machdep_boot.c
index 9ab4edf616e2..9b519f252369 100644
--- a/sys/arm64/arm64/machdep_boot.c
+++ b/sys/arm64/arm64/machdep_boot.c
@@ -53,9 +53,10 @@ __FBSDID("$FreeBSD$");
 
 extern int *end;
 static char *loader_envp;
-static char static_kenv[4096];
 
 #ifdef FDT
+static char static_kenv[4096];
+
 #define        CMDLINE_GUARD "FreeBSD:"
 #define        LBABI_MAX_COMMAND_LINE 512
 static char linux_command_line[LBABI_MAX_COMMAND_LINE + 1];

Reply via email to