mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-25 06:14:18 +08:00
Add bootloader and kernel recipes
This commit is contained in:
parent
2f119f29e3
commit
463aeef9ee
32
recipes/bootloader/recipe.sh
Normal file
32
recipes/bootloader/recipe.sh
Normal file
@ -0,0 +1,32 @@
|
||||
GIT=https://gitlab.redox-os.org/redox-os/bootloader.git
|
||||
|
||||
function recipe_version {
|
||||
echo "0.1.0"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_update {
|
||||
echo "skipping update"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
nasm -f bin -o bootloader -D "ARCH_${ARCH}" -i"${ARCH}/" "${ARCH}/disk.asm"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_test {
|
||||
echo "skipping test"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_clean {
|
||||
make clean
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
cp -v bootloader "$dest"
|
||||
skip=1
|
||||
}
|
||||
10
recipes/kernel/init.rc
Normal file
10
recipes/kernel/init.rc
Normal file
@ -0,0 +1,10 @@
|
||||
export PATH /bin
|
||||
export TMPDIR /tmp
|
||||
vesad T T G
|
||||
stdio display:1
|
||||
ps2d us
|
||||
pcid /etc/pcid/initfs.toml
|
||||
redoxfs --uuid $REDOXFS_UUID file
|
||||
cd file:
|
||||
export PATH file:/bin
|
||||
run.d /etc/init.d
|
||||
46
recipes/kernel/recipe.sh
Normal file
46
recipes/kernel/recipe.sh
Normal file
@ -0,0 +1,46 @@
|
||||
GIT=https://gitlab.redox-os.org/redox-os/kernel.git
|
||||
BUILD_DEPENDS=(drivers init redoxfs)
|
||||
|
||||
function recipe_build {
|
||||
export INITFS_FOLDER="$(realpath ../sysroot)"
|
||||
mkdir -pv "$INITFS_FOLDER/etc"
|
||||
cp -v "$(realpath ../init.rc)" "$INITFS_FOLDER/etc/init.rc"
|
||||
xargo rustc \
|
||||
--lib \
|
||||
--target "${ARCH}-unknown-none" \
|
||||
--release \
|
||||
-- \
|
||||
-C soft-float \
|
||||
-C debuginfo=2 \
|
||||
--emit link=libkernel.a
|
||||
"${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 {
|
||||
make clean
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
cp -v kernel "$dest"
|
||||
skip=1
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user