blob: 048c9415ac8d785a0c30d4e120a41e310686cae1 [file] [log] [blame]
ifeq ($(KBUILD_VERBOSE),1)
GENGDT_EXTRA_ARGS := --verbose
else
GENGDT_EXTRA_ARGS :=
endif
GENGDT := $(srctree)/scripts/gen_gdt.py
OUTPUT_FORMAT ?= elf32-i386
OUTPUT_ARCH ?= i386
quiet_cmd_gen_gdt = GDT $@
cmd_gen_gdt = \
( \
$(GENGDT) --kernel $(PREBUILT_KERNEL) \
--output-gdt gdt.bin \
$(GENGDT_EXTRA_ARGS) && \
$(OBJCOPY) -I binary -B $(OUTPUT_ARCH) -O $(OUTPUT_FORMAT) \
--rename-section .data=gdt_ram_data gdt.bin $@ \
)
gdt.o: $(PREBUILT_KERNEL) $(GENGDT)
$(call cmd,gen_gdt)
GENERATED_KERNEL_OBJECT_FILES += gdt.o