- Do not copy relibc before building

- Remove debug section from live kernel as well
This commit is contained in:
Jeremy Soller 2018-09-15 07:25:49 -06:00
parent 74d93bc73c
commit 580287392b
3 changed files with 6 additions and 4 deletions

View file

@ -8,7 +8,9 @@ build/filesystem.bin: filesystem.toml build/bootloader build/kernel prefix
cargo run --manifest-path redoxfs/Cargo.toml --release --bin redoxfs -- $@.partial build/filesystem/
sleep 2
pgrep redoxfs
cp filesystem.toml build/bootloader build/kernel build/filesystem/
cp $< build/filesystem/filesystem.toml
cp build/bootloader build/filesystem/bootloader
cp build/kernel build/filesystem/kernel
export PATH="$(PREFIX_PATH):$$PATH" && \
cargo run --manifest-path installer/Cargo.toml --release -- $(INSTALLER_FLAGS) -c $< build/filesystem/
chown -R 0:0 build/filesystem

View file

@ -16,6 +16,8 @@ build/kernel: kernel/linkers/$(ARCH).ld build/libkernel.a
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
objcopy --strip-debug $@
build/live.o: build/filesystem.bin
#TODO: More general use of $(ARCH)

View file

@ -53,11 +53,9 @@ $(PREFIX)/gcc-freestanding-install: $(PREFIX)/gcc
$(PREFIX)/relibc-install: $(PREFIX)/binutils-install $(PREFIX)/gcc-freestanding-install
rm -rf "$(PREFIX)/relibc-build"
cp -r relibc "$(PREFIX)/relibc-build"
cd $(PREFIX)/relibc-build && \
cd relibc && \
export PATH="$(PREFIX_FREESTANDING_PATH):$$PATH" && \
rustup target add "$(TARGET)" && \
make clean && \
make all && \
make DESTDIR="$@/usr" install
touch "$@"