diff --git a/recipes/bootloader/recipe.sh b/recipes/bootloader/recipe.sh new file mode 100644 index 0000000000000000000000000000000000000000..510b0d8095a6040cb83c53fc984fedd0e31bd661 --- /dev/null +++ b/recipes/bootloader/recipe.sh @@ -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 +} diff --git a/recipes/kernel/init.rc b/recipes/kernel/init.rc new file mode 100644 index 0000000000000000000000000000000000000000..db322fcd209684de1ca0480422146450f0cbc57a --- /dev/null +++ b/recipes/kernel/init.rc @@ -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 diff --git a/recipes/kernel/recipe.sh b/recipes/kernel/recipe.sh new file mode 100644 index 0000000000000000000000000000000000000000..469d6706b43380bc7dac90b4d0cf81a8ba7dfe69 --- /dev/null +++ b/recipes/kernel/recipe.sh @@ -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 +}