4e27bee9bf
The 17,046-line redox.patch monolith is no longer referenced in the base recipe. All 27 individual P2 patches are now listed explicitly in recipe.toml with symlinks to local/patches/base/. Coverage gap closed: ixgbed/src/device.rs was the only file not covered by any individual patch. Added P2-ixgbed-error-handling.patch for the 10GbE Intel driver error handling (println → log::info/warn/error). Build verified: CI=1 make r.base completes successfully with the new patch list. The monolith file is preserved as backup but no longer applied.
127 lines
3.7 KiB
TOML
127 lines
3.7 KiB
TOML
[source]
|
|
git = "https://gitlab.redox-os.org/redox-os/base.git"
|
|
rev = "463f76b9608a896e6f6c9f63457f57f6409873c7"
|
|
patches = [
|
|
"P2-ac97d-ihdad-main.patch",
|
|
"P2-acpi-defer-aml.patch",
|
|
"P2-acpi-i2c-resources.patch",
|
|
"P2-acpid-core-refactor.patch",
|
|
"P2-boot-logging.patch",
|
|
"P2-boot-runtime-fixes.patch",
|
|
"P2-daemon-hardening.patch",
|
|
"P2-daemon-ready-graceful.patch",
|
|
"P2-hwd-misc.patch",
|
|
"P2-ihdad-device-refactor.patch",
|
|
"P2-ihdad-hda-stream.patch",
|
|
"P2-init-acpid-wiring.patch",
|
|
"P2-init-subsystems.patch",
|
|
"P2-inputd.patch",
|
|
"P2-ixgbed-error-handling.patch",
|
|
"P2-logd.patch",
|
|
"P2-misc-daemon-fixes.patch",
|
|
"P2-network-driver-mains.patch",
|
|
"P2-network-error-handling.patch",
|
|
"P2-pcid-cfg-access.patch",
|
|
"P2-pcid-driver-interface.patch",
|
|
"P2-ps2d-improvements.patch",
|
|
"P2-storage-driver-mains.patch",
|
|
"P2-storage-error-handling.patch",
|
|
"P2-usb-pm-and-drivers.patch",
|
|
"P2-virtio-core-vbox.patch",
|
|
"P2-xhcid-remaining.patch",
|
|
]
|
|
|
|
[build]
|
|
template = "custom"
|
|
script = """
|
|
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
|
|
for package in audiod ipcd ptyd dhcpd; do
|
|
"${COOKBOOK_CARGO}" build \
|
|
--manifest-path "${COOKBOOK_SOURCE}/${package}/Cargo.toml" \
|
|
--target "${TARGET}" \
|
|
${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" \
|
|
--target "${TARGET}" \
|
|
${build_flags}
|
|
cp -v \
|
|
"target/${TARGET}/${build_type}/netstack" \
|
|
"${COOKBOOK_STAGE}/usr/bin/netstack"
|
|
cp -v \
|
|
"target/${TARGET}/${build_type}/netstack" \
|
|
"${COOKBOOK_STAGE}/usr/bin/smolnetd"
|
|
|
|
# Drivers that are built on all architectures, and NOT in drivers-initfs
|
|
BINS=(
|
|
gpiod
|
|
i2c-gpio-expanderd
|
|
intel-gpiod
|
|
amd-mp2-i2cd
|
|
dw-acpi-i2cd
|
|
e1000d
|
|
ihdad
|
|
ihdgd
|
|
i2c-hidd
|
|
intel-thc-hidd
|
|
intel-lpss-i2cd
|
|
ixgbed
|
|
pcid
|
|
pcid-spawner
|
|
rtl8139d
|
|
rtl8168d
|
|
usbctl
|
|
usbhidd
|
|
usbhubd
|
|
ucsid
|
|
usbscsid
|
|
virtio-gpud
|
|
virtio-netd
|
|
xhcid
|
|
i2cd
|
|
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 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" \
|
|
--target "${TARGET}" \
|
|
$(for bin in "${BINS[@]}"; do echo "-p" "${bin}"; done)
|
|
for bin in "${BINS[@]}"
|
|
do
|
|
if [[ "${bin}" == "gpiod" || "${bin}" == "i2c-gpio-expanderd" || "${bin}" == "intel-gpiod" || "${bin}" == "i2cd" || "${bin}" == "dw-acpi-i2cd" || "${bin}" == "i2c-hidd" || "${bin}" == "inputd" || "${bin}" == "pcid" || "${bin}" == "pcid-spawner" || "${bin}" == "redoxerd" || "${bin}" == "ucsid" ]]; 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
|
|
|
|
mkdir -pv "${COOKBOOK_STAGE}/usr/lib/init.d"
|
|
cp -v "${COOKBOOK_SOURCE}/init.d"/* "${COOKBOOK_STAGE}/usr/lib/init.d/"
|
|
"""
|