diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-07-10 11:24:56 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-07-10 11:24:56 +0800 |
| commit | 1767d390fbf3d0c65389de46caf0b6d43ef3b6ad (patch) | |
| tree | 0f5e01cd7c7a05abb6b1c7472d7f00f49caf02cc /na/lib/module.mk | |
| parent | 63dc025705f6533b91fb1a7d26e6ed864efd9900 (diff) | |
| download | lume-1767d390fbf3d0c65389de46caf0b6d43ef3b6ad.tar.gz lume-1767d390fbf3d0c65389de46caf0b6d43ef3b6ad.tar.xz | |
feat: establish bootable new architecture checkpoint
Replace the compressed boot path with a relocatable higher-half RISC-V entry, expand memory and SMP support, and add the driver, TTY, VFS, exec, signal, syscall, initramfs, and self-test infrastructure needed for a bootable kernel checkpoint.
Diffstat (limited to 'na/lib/module.mk')
| -rw-r--r-- | na/lib/module.mk | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/na/lib/module.mk b/na/lib/module.mk index 2cfadf7..0b178f8 100644 --- a/na/lib/module.mk +++ b/na/lib/module.mk @@ -1,10 +1,10 @@ # lib/module.mk SRCS_CC += lib/cxx_abi.cc SRCS_CC += lib/rbtree.cc +SRCS_CC += lib/kobject.cc SRCS_CC += lib/kprintf.cc SRCS_CC += lib/klog.cc SRCS_CC += lib/random.cc -SRCS_CC += lib/decompress_lz4.cc SRCS_C += lib/printf.c # ============================================================ @@ -39,3 +39,28 @@ MUSL_C_SRCS := $(filter-out $(MUSL_EXCLUDED_C),$(MUSL_ALL_C)) SRCS_C += $(MUSL_C_SRCS) SRCS_S += $(filter %.S,$(MUSL_ASM_SRCS)) SRCS_s += $(filter %.s,$(MUSL_ASM_SRCS)) + +# ============================================================ +# libfdt — kernel adapter shims around scripts/dtc/libfdt/. +# +# Each shim is two lines: +# #include <linux/libfdt_env.h> +# #include "../scripts/dtc/libfdt/fdt*.c" +# matching Linux lib/fdt*.c verbatim. The compile recipe needs: +# - <linux/libfdt_env.h> reachable via the default -Iinclude path +# - -I scripts/dtc/libfdt so the upstream source's #include <libfdt.h> +# and friends resolve to scripts/dtc/libfdt/libfdt.h +# Overriding CFLAGS_LIBC (which the %.o: %.c rule uses) avoids dragging +# in libc-shim headers — libfdt is freestanding-compatible and uses +# only the string functions forward-declared in <linux/libfdt_env.h>. +# ============================================================ +LIBFDT_FILES := fdt.c fdt_ro.c fdt_wip.c fdt_rw.c fdt_sw.c \ + fdt_strerror.c fdt_empty_tree.c fdt_addresses.c +SRCS_C += $(addprefix lib/,$(LIBFDT_FILES)) + +# Per-target CFLAGS override: plain CFLAGS plus the upstream include dir. +# Use `=` (recursive) not `:=` because $(CFLAGS) is defined in the top +# Makefile AFTER this file is included — `:=` would expand it now (empty) +# and lose -Iinclude, breaking <linux/libfdt_env.h>. +$(addprefix $(BUILD)/lib/,$(LIBFDT_FILES:.c=.o)): CFLAGS_LIBC = \ + $(CFLAGS) -I scripts/dtc/libfdt |
