Move kernel to cookbook recipe
This commit is contained in:
parent
c475f1a17d
commit
5b0822f893
4
.gitmodules
vendored
4
.gitmodules
vendored
|
@ -14,10 +14,6 @@
|
|||
path = isolinux
|
||||
url = https://gitlab.redox-os.org/redox-os/isolinux.git
|
||||
branch = master
|
||||
[submodule "kernel"]
|
||||
path = kernel
|
||||
url = https://gitlab.redox-os.org/redox-os/kernel.git
|
||||
branch = master
|
||||
[submodule "rust"]
|
||||
path = rust
|
||||
url = https://gitlab.redox-os.org/redox-os/rust.git
|
||||
|
|
8
Makefile
8
Makefile
|
@ -16,8 +16,6 @@ clean:
|
|||
cd cookbook && ./clean.sh
|
||||
cargo clean --manifest-path cookbook/pkgutils/Cargo.toml
|
||||
cargo clean --manifest-path installer/Cargo.toml
|
||||
cargo clean --manifest-path kernel/Cargo.toml
|
||||
cargo clean --manifest-path kernel/syscall/Cargo.toml
|
||||
cargo clean --manifest-path redoxfs/Cargo.toml
|
||||
-$(FUMOUNT) build/filesystem/ || true
|
||||
rm -rf build
|
||||
|
@ -37,7 +35,6 @@ update:
|
|||
"$$(cargo run --manifest-path ../installer/Cargo.toml -- --list-packages -c ../filesystem.toml)"
|
||||
cargo update --manifest-path cookbook/pkgutils/Cargo.toml
|
||||
cargo update --manifest-path installer/Cargo.toml
|
||||
cargo update --manifest-path kernel/Cargo.toml
|
||||
cargo update --manifest-path redoxfs/Cargo.toml
|
||||
|
||||
fetch:
|
||||
|
@ -52,9 +49,6 @@ include mk/prefix.mk
|
|||
# Bootloader recipes
|
||||
include mk/bootloader.mk
|
||||
|
||||
# Kernel recipes
|
||||
include mk/kernel.mk
|
||||
|
||||
# Filesystem recipes
|
||||
include mk/initfs.mk
|
||||
include mk/filesystem.mk
|
||||
|
@ -111,7 +105,7 @@ env: prefix FORCE
|
|||
bash
|
||||
|
||||
gdb: FORCE
|
||||
gdb build/kernel.sym --eval-command="target remote localhost:1234"
|
||||
gdb cookbook/recipes/kernel/build/kernel.sym --eval-command="target remote localhost:1234"
|
||||
|
||||
# An empty target
|
||||
FORCE:
|
||||
|
|
|
@ -11,6 +11,7 @@ acid = {}
|
|||
coreutils = {}
|
||||
ion = {}
|
||||
ipcd = {}
|
||||
kernel = {}
|
||||
ptyd = {}
|
||||
|
||||
# User settings
|
||||
|
|
|
@ -21,6 +21,7 @@ gnu-make = {}
|
|||
installer = {}
|
||||
ion = {}
|
||||
ipcd = {}
|
||||
kernel = {}
|
||||
netdb = {}
|
||||
netstack = {}
|
||||
netsurf = {}
|
||||
|
|
|
@ -54,6 +54,7 @@ ion = {}
|
|||
ipcd = {}
|
||||
jansson = {}
|
||||
jeremy = {}
|
||||
kernel = {}
|
||||
keyboard-sfx = {}
|
||||
lci = {}
|
||||
libc-bench = {}
|
||||
|
|
|
@ -70,6 +70,7 @@ ion = {}
|
|||
ipcd = {}
|
||||
jansson = {}
|
||||
keyboard-sfx = {}
|
||||
kernel = {}
|
||||
lci = {}
|
||||
libc-bench = {}
|
||||
libffi = {}
|
||||
|
|
|
@ -7,9 +7,10 @@ prompt = false
|
|||
|
||||
# Package settings
|
||||
[packages]
|
||||
ipcd = {}
|
||||
ptyd = {}
|
||||
drivers = {}
|
||||
ipcd = {}
|
||||
kernel = {}
|
||||
ptyd = {}
|
||||
|
||||
# User settings
|
||||
[users.root]
|
||||
|
|
|
@ -17,6 +17,7 @@ gcc = {}
|
|||
gnu-binutils = {}
|
||||
gnu-make = {}
|
||||
ipcd = {}
|
||||
kernel = {}
|
||||
netdb = {}
|
||||
netstack = {}
|
||||
netutils = {}
|
||||
|
|
|
@ -21,6 +21,7 @@ gnu-make = {}
|
|||
installer = {}
|
||||
ion = {}
|
||||
ipcd = {}
|
||||
kernel = {}
|
||||
netdb = {}
|
||||
netstack = {}
|
||||
netutils = {}
|
||||
|
|
|
@ -19,6 +19,7 @@ gnu-make = {}
|
|||
installer = {}
|
||||
ion = {}
|
||||
ipcd = {}
|
||||
kernel = {}
|
||||
netdb = {}
|
||||
netstack = {}
|
||||
netutils = {}
|
||||
|
|
2
cookbook
2
cookbook
|
@ -1 +1 @@
|
|||
Subproject commit 17aca2f42e0ea60d72dcc00404376da209d2da5b
|
||||
Subproject commit bce519a90b1e39397d9c5a321fc4dc34a8808083
|
1
kernel
1
kernel
|
@ -1 +0,0 @@
|
|||
Subproject commit b5a930170627e4d33b9a0eac1c61dd1d44a131e4
|
|
@ -30,10 +30,11 @@ build/bootloader-live.efi: bootloader/build/$(EFI_TARGET)/bootloader-live.efi
|
|||
mkdir -p build
|
||||
cp -v $< $@
|
||||
|
||||
bootloader-coreboot/build/bootloader: build/kernel_coreboot
|
||||
env --unset=RUST_TARGET_PATH --unset=RUSTUP_TOOLCHAIN --unset=XARGO_RUST_SRC \
|
||||
$(MAKE) -C bootloader-coreboot clean build/bootloader KERNEL="$(ROOT)/$<"
|
||||
|
||||
build/coreboot.elf: bootloader-coreboot/build/bootloader
|
||||
mkdir -p build
|
||||
cp -v $< $@
|
||||
#TODO: update coreboot bootloader/kernel
|
||||
# bootloader-coreboot/build/bootloader: build/kernel_coreboot
|
||||
# env --unset=RUST_TARGET_PATH --unset=RUSTUP_TOOLCHAIN --unset=XARGO_RUST_SRC \
|
||||
# $(MAKE) -C bootloader-coreboot clean build/bootloader KERNEL="$(ROOT)/$<"
|
||||
#
|
||||
# build/coreboot.elf: bootloader-coreboot/build/bootloader
|
||||
# mkdir -p build
|
||||
# cp -v $< $@
|
||||
|
|
|
@ -42,13 +42,8 @@ endif
|
|||
# Automatic variables
|
||||
ROOT=$(CURDIR)
|
||||
export RUST_COMPILER_RT_ROOT=$(ROOT)/rust/src/llvm-project/compiler-rt
|
||||
export RUST_TARGET_PATH=$(ROOT)/kernel/targets
|
||||
export XARGO_RUST_SRC=$(ROOT)/rust/src
|
||||
|
||||
## Kernel variables
|
||||
KTARGET=$(ARCH)-unknown-kernel
|
||||
KBUILD=build/kernel
|
||||
|
||||
## Userspace variables
|
||||
export TARGET=$(ARCH)-unknown-redox
|
||||
BUILD=build/userspace
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
build/filesystem.bin: prefix filesystem.toml build/bootloader.bin build/kernel build/initfs.img
|
||||
build/filesystem.bin: prefix filesystem.toml build/bootloader.bin build/initfs.img
|
||||
cargo build --manifest-path cookbook/Cargo.toml --release
|
||||
cargo build --manifest-path installer/Cargo.toml --release
|
||||
cargo build --manifest-path redoxfs/Cargo.toml --release
|
||||
|
@ -15,7 +15,6 @@ build/filesystem.bin: prefix filesystem.toml build/bootloader.bin build/kernel b
|
|||
pgrep redoxfs
|
||||
cp -v filesystem.toml build/filesystem/filesystem.toml
|
||||
cp -v build/bootloader.bin build/filesystem/bootloader
|
||||
cp -v build/kernel build/filesystem/kernel
|
||||
mkdir -v build/filesystem/pkg
|
||||
cp -v cookbook/build/id_ed25519.pub.toml build/filesystem/pkg/id_ed25519.pub.toml
|
||||
#TODO cp -r $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/include build/filesystem/include
|
||||
|
|
10
mk/kernel.mk
10
mk/kernel.mk
|
@ -1,10 +0,0 @@
|
|||
build/libkernel.a: kernel/Cargo.lock kernel/Cargo.toml kernel/src/* kernel/src/*/* kernel/src/*/*/* kernel/src/*/*/*/*
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
cd kernel && \
|
||||
cargo rustc --lib --target=$(ROOT)/kernel/targets/$(KTARGET).json --release -- -C soft-float -C debuginfo=2 -C lto --emit link=../$@
|
||||
|
||||
build/kernel: kernel/linkers/$(ARCH).ld mk/kernel_ld.sh build/libkernel.a
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
$(ROOT)/mk/kernel_ld.sh $(LD) --gc-sections -z max-page-size=0x1000 -T $< -o $@.all build/libkernel.a && \
|
||||
$(OBJCOPY) --only-keep-debug $@.all $@.sym && \
|
||||
$(OBJCOPY) --strip-debug $@.all $@
|
|
@ -1,17 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
LD="$1"
|
||||
shift
|
||||
|
||||
if "${LD}" -z use-gs-for-tls 2>&1 |
|
||||
grep "warning: -z use-gs-for-tls ignored" &> /dev/null
|
||||
then
|
||||
echo "Please update your prefix:" >&2
|
||||
echo " rm -rf prefix" >&2
|
||||
echo " make prefix" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec "${LD}" -z use-gs-for-tls "$@"
|
Loading…
Reference in a new issue