Red Bear OS — microkernel OS in Rust, based on Redox
Derivative of Redox OS (https://www.redox-os.org) adding: - AMD GPU driver (amdgpu) via LinuxKPI compat layer - ext4 filesystem support (ext4d scheme daemon) - ACPI fixes for AMD bare metal (x2APIC, DMAR, IVRS, MCFG) - Custom branding (hostname, os-release, boot identity) Build system is full upstream Redox with RBOS overlay in local/. Patches for kernel, base, and relibc are symlinked from local/patches/ and protected from make clean/distclean. Custom recipes live in local/recipes/ with symlinks into the recipes/ search path. Build: make all CONFIG_NAME=redbear-full Sync: ./local/scripts/sync-upstream.sh
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/base.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
|
||||
for package in audiod ipcd ptyd; do
|
||||
"${COOKBOOK_CARGO}" build \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/${package}/Cargo.toml" \
|
||||
${build_flags}
|
||||
cp -v \
|
||||
"target/${TARGET}/${build_type}/${package}" \
|
||||
"${COOKBOOK_STAGE}/usr/bin/${package}"
|
||||
done
|
||||
|
||||
"${COOKBOOK_CARGO}" build \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/netstack/Cargo.toml" \
|
||||
${build_flags}
|
||||
cp -v \
|
||||
"target/${TARGET}/${build_type}/smolnetd" \
|
||||
"${COOKBOOK_STAGE}/usr/bin/smolnetd"
|
||||
|
||||
# Drivers that are built on all architectures, and NOT in drivers-initfs
|
||||
BINS=(
|
||||
e1000d
|
||||
ihdad
|
||||
ihdgd
|
||||
ixgbed
|
||||
pcid
|
||||
pcid-spawner
|
||||
rtl8139d
|
||||
rtl8168d
|
||||
usbctl
|
||||
usbhidd
|
||||
usbhubd
|
||||
usbscsid
|
||||
virtio-netd
|
||||
xhcid
|
||||
inputd
|
||||
redoxerd
|
||||
)
|
||||
|
||||
# Add additional drivers to the list to build, that are not in drivers-initfs
|
||||
# depending on the target architecture
|
||||
case "${TARGET}" in
|
||||
i586-unknown-redox | i686-unknown-redox | x86_64-unknown-redox)
|
||||
BINS+=(ac97d bgad sb16d vboxd)
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
#Build each driver in the list
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/bin" "${COOKBOOK_STAGE}/usr/lib/drivers"
|
||||
export CARGO_PROFILE_RELEASE_OPT_LEVEL=s
|
||||
export CARGO_PROFILE_RELEASE_PANIC=abort
|
||||
"${COOKBOOK_CARGO}" build ${build_flags} \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
|
||||
$(for bin in "${BINS[@]}"; do echo "-p" "${bin}"; done)
|
||||
for bin in "${BINS[@]}"
|
||||
do
|
||||
if [[ "${bin}" == "inputd" || "${bin}" == "pcid" || "${bin}" == "pcid-spawner" || "${bin}" == "redoxerd" ]]; then
|
||||
cp -v "target/${TARGET}/${build_type}/${bin}" "${COOKBOOK_STAGE}/usr/bin"
|
||||
else
|
||||
cp -v "target/${TARGET}/${build_type}/${bin}" "${COOKBOOK_STAGE}/usr/lib/drivers"
|
||||
fi
|
||||
done
|
||||
|
||||
mkdir -pv "${COOKBOOK_STAGE}/lib/pcid.d"
|
||||
${FIND} "${COOKBOOK_SOURCE}/drivers" -maxdepth 3 -type f -name 'config.toml' | while read conf
|
||||
do
|
||||
driver="$(basename "$(dirname "$conf")")"
|
||||
cp -v "$conf" "${COOKBOOK_STAGE}/lib/pcid.d/$driver.toml"
|
||||
done
|
||||
"""
|
||||
Reference in New Issue
Block a user