mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-19 17:35:21 +00:00
This is one less host tool we have to compile for every build, and makes the build tools more portable across host OSes. The code is also much simpler to maintain. Issue: ZEP-2063 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
34 lines
927 B
Makefile
34 lines
927 B
Makefile
ifeq ($(KBUILD_VERBOSE),1)
|
|
GENIDT_EXTRA_ARGS := --verbose
|
|
else
|
|
GENIDT_EXTRA_ARGS :=
|
|
endif
|
|
|
|
GENIDT := $(srctree)/scripts/gen_idt.py
|
|
|
|
OUTPUT_FORMAT ?= elf32-i386
|
|
OUTPUT_ARCH ?= i386
|
|
|
|
quiet_cmd_gen_idt = SIDT $@
|
|
cmd_gen_idt = \
|
|
( \
|
|
$(GENIDT) --kernel $(PREBUILT_KERNEL) \
|
|
--output-idt staticIdt.bin \
|
|
--vector-map irq_int_vector_map.bin \
|
|
$(GENIDT_EXTRA_ARGS) && \
|
|
$(OBJCOPY) -I binary -B $(OUTPUT_ARCH) -O $(OUTPUT_FORMAT) \
|
|
--rename-section .data=staticIdt staticIdt.bin staticIdt.o && \
|
|
$(OBJCOPY) -I binary -B $(OUTPUT_ARCH) -O $(OUTPUT_FORMAT) \
|
|
--rename-section .data=irq_int_vector_map irq_int_vector_map.bin \
|
|
irq_int_vector_map.o && \
|
|
rm staticIdt.bin irq_int_vector_map.bin \
|
|
)
|
|
|
|
staticIdt.o: $(PREBUILT_KERNEL) $(GENIDT)
|
|
$(call cmd,gen_idt)
|
|
|
|
irq_int_vector_map.o: staticIdt.o
|
|
|
|
GENERATED_KERNEL_OBJECT_FILES += staticIdt.o irq_int_vector_map.o
|
|
|