mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-24 05:44:17 +08:00
Update kernel recipe for new initfs format
This commit is contained in:
parent
17aca2f42e
commit
bce519a90b
@ -1,16 +0,0 @@
|
||||
export PATH /bin
|
||||
export TMPDIR /tmp
|
||||
nulld
|
||||
zerod
|
||||
randd
|
||||
vesad T T G
|
||||
logd debug: display:1
|
||||
stdio log:
|
||||
ps2d us
|
||||
ramfs logging
|
||||
acpid
|
||||
pcid /etc/pcid/initfs.toml
|
||||
redoxfs --uuid $REDOXFS_UUID file $REDOXFS_BLOCK
|
||||
cd file:
|
||||
export PATH file:/bin
|
||||
run.d /etc/init.d
|
||||
@ -1,57 +0,0 @@
|
||||
GIT=https://gitlab.redox-os.org/redox-os/kernel.git
|
||||
BUILD_DEPENDS=(
|
||||
drivers
|
||||
init
|
||||
logd
|
||||
nulld
|
||||
ramfs
|
||||
randd
|
||||
redoxfs
|
||||
zerod
|
||||
)
|
||||
|
||||
function recipe_build {
|
||||
export INITFS_FOLDER="$(realpath ../sysroot)"
|
||||
mkdir -pv "$INITFS_FOLDER/etc"
|
||||
cp -v "$(realpath ../init.rc)" "$INITFS_FOLDER/etc/init.rc"
|
||||
cargo rustc \
|
||||
--lib \
|
||||
--target "${ARCH}-unknown-kernel" \
|
||||
--release \
|
||||
-Z build-std=core,alloc \
|
||||
-- \
|
||||
-C soft-float \
|
||||
-C debuginfo=2 \
|
||||
-C lto \
|
||||
--emit link=libkernel.a
|
||||
../kernel_ld.sh "${LD}" \
|
||||
--gc-sections \
|
||||
-z max-page-size=0x1000 \
|
||||
-T "linkers/${ARCH}.ld" \
|
||||
-o kernel \
|
||||
libkernel.a
|
||||
"${OBJCOPY}" \
|
||||
--only-keep-debug \
|
||||
kernel \
|
||||
kernel.sym
|
||||
"${OBJCOPY}" \
|
||||
--strip-debug \
|
||||
kernel
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_test {
|
||||
echo "skipping test"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_clean {
|
||||
"$REDOX_MAKE" clean
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
cp -v kernel "$dest"
|
||||
skip=1
|
||||
}
|
||||
35
recipes/kernel/recipe.toml
Normal file
35
recipes/kernel/recipe.toml
Normal file
@ -0,0 +1,35 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/kernel.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
export RUST_TARGET_PATH="${COOKBOOK_SOURCE}/targets"
|
||||
ARCH="$(echo "${TARGET}" | cut -d - -f1)"
|
||||
cargo rustc \
|
||||
--lib \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
|
||||
--target "${COOKBOOK_SOURCE}/targets/${ARCH}-unknown-kernel.json" \
|
||||
--release \
|
||||
-Z build-std=core,alloc \
|
||||
-- \
|
||||
-C soft-float \
|
||||
-C debuginfo=2 \
|
||||
-C lto \
|
||||
--emit link="${PWD}/libkernel.a"
|
||||
"${COOKBOOK_RECIPE}/kernel_ld.sh" "${TARGET}-ld" \
|
||||
--gc-sections \
|
||||
-z max-page-size=0x1000 \
|
||||
-T "${COOKBOOK_SOURCE}/linkers/${ARCH}.ld" \
|
||||
-o kernel.all \
|
||||
libkernel.a
|
||||
"${TARGET}-objcopy" \
|
||||
--only-keep-debug \
|
||||
kernel.all \
|
||||
kernel.sym
|
||||
"${TARGET}-objcopy" \
|
||||
--strip-debug \
|
||||
kernel.all \
|
||||
kernel
|
||||
cp -v kernel "${COOKBOOK_STAGE}"
|
||||
"""
|
||||
Loading…
Reference in New Issue
Block a user