#!/bin/bash # QEMU Compatible Test Script for BBeOS # Uses a compatible device tree for better testing echo "Testing BBeOS in QEMU with compatible device tree..." # Check if QEMU is available if ! command -v qemu-system-arm &> /dev/null; then echo "Error: qemu-system-arm not found" echo "Please install QEMU: sudo apt install qemu-system-arm" exit 1 fi # Check if required files exist if [ ! -f "kernel-source/arch/arm/boot/zImage" ]; then echo "Error: Kernel image not found" echo "Please run ./scripts/build-kernel-minimal.sh first" exit 1 fi if [ ! -f "initramfs.img" ]; then echo "Error: Initramfs not found" echo "Please run ./scripts/build-rootfs.sh first" exit 1 fi echo "Starting QEMU with compatible configuration..." echo "Press Ctrl+A, then X to exit QEMU" echo "" # Run QEMU with vexpress-a9 (more compatible with our kernel) qemu-system-arm \ -M vexpress-a9 \ -cpu cortex-a9 \ -m 512M \ -kernel kernel-source/arch/arm/boot/zImage \ -initrd initramfs.img \ -append "console=ttyAMA0,115200 root=/dev/ram0 rw rootwait" \ -nographic \ -serial mon:stdio \ -no-reboot echo "" echo "QEMU test complete"