Commit 862baeb8 authored by Charles Jacobsen's avatar Charles Jacobsen Committed by Vikram Narayanan
Browse files

build-refactor-2: Microkernel, kliblcd, and liblcd all build.

In one giant build circus.

Test mods build not re-configured yet. Going to do some
runtime testing and debugging of the new code before I fix
those up.
parent bd5bde51
......@@ -52,8 +52,7 @@ MICROKERNEL_BUILD_DIRS=$(foreach dir,$(MICROKERNEL_DIRS),\
MICROKERNEL_LIBCAP=$(MICROKERNEL_BUILD_DIR)/libcap.install/lib/libcap.a
MICROKERNEL_LIBCAP_CFLAGS= \
-DLCD_DOMAINS \
-I$(LCD_DOMAINS_TOP_SRC_DIR)/config/non_isolated
"-DLCD_DOMAINS -I$(LCD_DOMAINS_TOP_SRC_DIR)/include -I$(LCD_DOMAINS_TOP_SRC_DIR)/config/non_isolated"
microkernel: $(MICROKERNEL_BUILD_DIR)/Kbuild $(MICROKERNEL_LIBCAP) | \
$(MICROKERNEL_BUILD_DIRS)
......@@ -106,17 +105,16 @@ LIBLCD_LIBCAP=$(LIBLCD_BUILD_DIR)/libcap.install/lib/libcap.a
LIBLCD_LIBCAP_CFLAGS= \
"-DLCD_DOMAINS -I$(LCD_DOMAINS_TOP_SRC_DIR)/include -I$(LCD_DOMAINS_TOP_SRC_DIR)/config/isolated"
LIBLCD_AR_SCRIPT= \
"CREATE $(LIBLCD_BUILD_DIR)/liblcd.a\n" \
"ADDLIB $(LIBLCD_BUILD_DIR)/lib.a\n" \
"ADDLIB $(LIBLCD_BUILD_DIR)/libcap.install/lib/libcap.a\n" \
"SAVE\n" \
"END\n"
# There isn't a nice easy way to multiline this, and I want access to the
# LIBLCD_BUILD_DIR variable (so I don't want to create a separate file); so
# I mash this in one line for now.
LIBLCD_AR_SCRIPT="CREATE $(LIBLCD_BUILD_DIR)/liblcd.a\nADDLIB $(LIBLCD_BUILD_DIR)/lib.a\nADDLIB $(LIBLCD_BUILD_DIR)/libcap.install/lib/libcap.a\nSAVE\nEND\n"
liblcd: $(LIBLCD_BUILD_DIR)/liblcd.a
$(LIBLCD_BUILD_DIR)/liblcd.a: $(LIBLCD_BUILD_DIR)/lib.a $(LIBLCD_LIBCAP)
echo $(LIBLCD_AR_SCRIPT) | ar -M
@echo " AR $@"
@echo $(LIBLCD_AR_SCRIPT) | ar -M
$(LIBLCD_BUILD_DIR)/lib.a: $(LIBLCD_BUILD_DIR)/Kbuild | \
$(LIBLCD_BUILD_DIRS)
......
......@@ -69,7 +69,7 @@ hva_t __lcd_memory_object_hva(struct lcd_memory_object *mo)
return pa2hva(__lcd_memory_object_start(mo));
case LCD_MICROKERNEL_TYPE_ID_VMALLOC_MEM:
case LCD_MICROKERNEL_TYPE_ID_VOLUNTEERED_VMALLOC_MEM:
return va2hva(__lcd_memory_object_start(mo));
return __hva(__lcd_memory_object_start(mo));
default:
LCD_ERR("unexpected memory object type %d", mo->sub_type);
BUG();
......
......@@ -54,8 +54,7 @@ lib-y += $(addprefix common/, \
module_create.o \
)
# libcap
lib-y += libcap.install/lib/libcap.a
# libcap is linked in with ar script
# Extra includes
ccflags-y += \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment