d5636ae1de
context.rs: proper LRC image population Removed context restore inhibit — GPU now saves/restores state on preempt Added PDP register initialization in LRC image (4 PDP entries) Added FAULT_AND_STREAM_CTL, BB_STATE initialization set_pdp_registers() for per-context PPGTT configuration ring.rs: MI command emission helpers emit_bb_start/emit_bb_end: batch buffer chaining emit_load_register_imm: LRI for workaround application emit_store_data_imm: store-to-memory for fence signaling emit_arb_check: preemption point insertion emit_semaphore_wait: inter-engine synchronization emit_user_interrupt: explicit interrupt generation display.rs: DDI pre-enable/post-disable sequences ddi_pre_enable: DP link retrain + DDI_BUF_CTL enable with pipe routing ddi_post_disable: DDI_BUF_CTL, PIPECONF, DSPCNTR disable + pipe update Pipe scaler PS_CTRL/PS_WIN_POS/PS_WIN_SIZE programming in set_mode regs.rs + regs_gen9/gen12/xe2: scaler register trait methods ps_ctrl, ps_win_pos, ps_win_size at 0x68180/0x68170/0x68174 per pipe
48 lines
1.7 KiB
TOML
48 lines
1.7 KiB
TOML
[source]
|
|
path = "../../../local/sources/bootloader"
|
|
|
|
[build]
|
|
template = "custom"
|
|
script = """
|
|
OUTDIR="${COOKBOOK_BUILD}"
|
|
mkdir -pv "${COOKBOOK_STAGE}/usr/lib/boot"
|
|
|
|
function bootloader {
|
|
src="$2"
|
|
dst="$3"
|
|
RUSTFLAGS="--cfg aes_force_soft" rustup run nightly cargo rustc \
|
|
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
|
|
-Z build-std=core,alloc -Z build-std-features=compiler-builtins-mem \
|
|
--target "$1" --bin bootloader --release -- \
|
|
--emit link="${OUTDIR}/${src}"
|
|
cp -v "${OUTDIR}/${src}" "${COOKBOOK_STAGE}/usr/lib/boot/${dst}"
|
|
}
|
|
|
|
function bootloader_bios {
|
|
src="$2"
|
|
dst="$3"
|
|
RUST_TARGET_PATH="${COOKBOOK_SOURCE}/targets" RUSTFLAGS="--cfg aes_force_soft" rustup run nightly cargo -Zunstable-options rustc \
|
|
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
|
|
-Z build-std=core,alloc -Z build-std-features=compiler-builtins-mem \
|
|
--target "$1" --bin bootloader --release -- \
|
|
--emit link="${OUTDIR}/${src}"
|
|
cp -v "${OUTDIR}/${src}" "${COOKBOOK_STAGE}/usr/lib/boot/${dst}"
|
|
}
|
|
|
|
ARCH="$(echo "${TARGET}" | cut -d - -f1)"
|
|
|
|
# Build BIOS bootloader for supported architectures
|
|
if false && [ "${ARCH}" == "i586" -o "${ARCH}" == "i686" -o "${ARCH}" == "x86_64" ]
|
|
then
|
|
bootloader_bios "x86-unknown-none" bootloader.bin bootloader.bios
|
|
bootloader_bios "x86-unknown-none" bootloader-live.bin bootloader-live.bios
|
|
fi
|
|
|
|
# Build UEFI bootloader for supported architectures
|
|
if [ "${ARCH}" == "aarch64" -o "${ARCH}" == "x86_64" -o "${ARCH}" == "riscv64gc" ]
|
|
then
|
|
bootloader "${ARCH}-unknown-uefi" bootloader.efi bootloader.efi
|
|
bootloader "${ARCH}-unknown-uefi" bootloader-live.efi bootloader-live.efi
|
|
fi
|
|
"""
|