Set path where required
This commit is contained in:
parent
373566aee5
commit
7b461bd7e0
1
Makefile
1
Makefile
|
@ -86,6 +86,7 @@ FORCE:
|
|||
|
||||
# A method of creating a listing for any binary
|
||||
%.list: %
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
$(OBJDUMP) -C -M intel -D $< > $@
|
||||
|
||||
# Wireshark
|
||||
|
|
21
mk/kernel.mk
21
mk/kernel.mk
|
@ -1,21 +1,30 @@
|
|||
build/libkernel.a: kernel/Cargo.lock kernel/Cargo.toml kernel/src/* kernel/src/*/* kernel/src/*/*/* kernel/src/*/*/*/* build/initfs.tag
|
||||
cd kernel && INITFS_FOLDER=$(ROOT)/build/initfs xargo rustc --lib --target $(KTARGET) --release -- -C soft-float -C debuginfo=2 --emit link=../$@
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export INITFS_FOLDER=$(ROOT)/build/initfs && \
|
||||
cd kernel && \
|
||||
xargo rustc --lib --target $(KTARGET) --release -- -C soft-float -C debuginfo=2 --emit link=../$@
|
||||
|
||||
build/libkernel_live.a: kernel/Cargo.toml kernel/src/* kernel/src/*/* kernel/src/*/*/* kernel/src/*/*/*/* build/initfs_live.tag
|
||||
cd kernel && INITFS_FOLDER=$(ROOT)/build/initfs_live xargo rustc --lib --features live --target $(KTARGET) --release -- -C soft-float -C debuginfo=2 --emit link=../$@
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export INITFS_FOLDER=$(ROOT)/build/initfs_live && \
|
||||
cd kernel && \
|
||||
xargo rustc --lib --target $(KTARGET) --release --features live -- -C soft-float -C debuginfo=2 --emit link=../$@
|
||||
|
||||
build/kernel: kernel/linkers/$(ARCH).ld build/libkernel.a
|
||||
$(LD) --gc-sections -z max-page-size=0x1000 -T $< -o $@ build/libkernel.a
|
||||
$(OBJCOPY) --only-keep-debug $@ $@.sym
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
$(LD) --gc-sections -z max-page-size=0x1000 -T $< -o $@ build/libkernel.a && \
|
||||
$(OBJCOPY) --only-keep-debug $@ $@.sym && \
|
||||
$(OBJCOPY) --strip-debug $@
|
||||
|
||||
build/kernel_live: kernel/linkers/$(ARCH).ld build/libkernel_live.a build/live.o
|
||||
$(LD) --gc-sections -z max-page-size=0x1000 -T $< -o $@ build/libkernel_live.a build/live.o
|
||||
$(OBJCOPY) --only-keep-debug $@ $@.sym
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
$(LD) --gc-sections -z max-page-size=0x1000 -T $< -o $@ build/libkernel_live.a build/live.o && \
|
||||
$(OBJCOPY) --only-keep-debug $@ $@.sym && \
|
||||
$(OBJCOPY) --strip-debug $@
|
||||
|
||||
build/live.o: build/filesystem.bin
|
||||
#TODO: More general use of $(ARCH)
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
$(OBJCOPY) -I binary -O elf64-x86-64 -B i386:x86-64 $< $@ \
|
||||
--redefine-sym _binary_build_filesystem_bin_start=__live_start \
|
||||
--redefine-sym _binary_build_filesystem_bin_end=__live_end \
|
||||
|
|
Loading…
Reference in a new issue