Files
BBeOS/scripts/build-kernel-minimal.sh
Eliott 71941f0584
Some checks failed
CI / markdown-lint (push) Failing after 15s
Phase 1: Initial kernel development setup
- Added comprehensive hardware research documentation
- Created bootloader analysis and driver compatibility research
- Set up development environment with cross-compilation tools
- Created Q20-specific device tree (simplified version)
- Added kernel build scripts and configuration
- Set up CI/CD pipeline with Gitea Actions
- Added .gitignore for build artifacts
2025-07-31 17:43:09 +02:00

81 lines
2.4 KiB
Bash
Executable File

#!/bin/bash
# BBeOS Minimal Kernel Build Script
# Builds a basic kernel for BlackBerry Classic Q20
set -e
echo "Building minimal kernel for BBeOS..."
# Set up environment
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
# Go to kernel source directory
cd kernel-source
# Clean previous build
echo "Cleaning previous build..."
make clean
# Configure kernel
echo "Configuring kernel..."
make qcom_defconfig
# Enable essential features
echo "Enabling essential features..."
./scripts/config --enable CONFIG_SERIAL_MSM_CONSOLE
./scripts/config --enable CONFIG_MMC_MSM
./scripts/config --enable CONFIG_DRM_MSM
./scripts/config --enable CONFIG_SOUND_MSM
./scripts/config --enable CONFIG_INPUT
./scripts/config --enable CONFIG_GPIO_MSM_V3
./scripts/config --enable CONFIG_I2C_MSM
./scripts/config --enable CONFIG_SPI_MSM
./scripts/config --enable CONFIG_USB_MSM_OTG
./scripts/config --enable CONFIG_WLAN_VENDOR_ATH
./scripts/config --enable CONFIG_BT
./scripts/config --enable CONFIG_EXT4_FS
./scripts/config --enable CONFIG_FAT_FS
./scripts/config --enable CONFIG_VFAT_FS
./scripts/config --enable CONFIG_DEBUG_FS
./scripts/config --enable CONFIG_DEBUG_KERNEL
./scripts/config --enable CONFIG_KGDB
./scripts/config --enable CONFIG_KGDB_SERIAL_CONSOLE
# Disable unnecessary features
echo "Disabling unnecessary features..."
./scripts/config --disable CONFIG_MODULES
./scripts/config --disable CONFIG_MODULE_UNLOAD
./scripts/config --disable CONFIG_MODVERSIONS
./scripts/config --disable CONFIG_MODULE_SRCVERSION_ALL
# Set essential options
echo "Setting essential options..."
./scripts/config --set-str CONFIG_CMDLINE "console=ttyMSM0,115200 root=/dev/mmcblk0p1 rw rootwait"
./scripts/config --set-str CONFIG_CMDLINE_FROM_BOOTLOADER "y"
./scripts/config --set-str CONFIG_CMDLINE_EXTEND "y"
# Enable initramfs support
echo "Enabling initramfs support..."
./scripts/config --enable CONFIG_BLK_DEV_INITRD
./scripts/config --enable CONFIG_INITRAMFS_SOURCE ""
./scripts/config --enable CONFIG_INITRAMFS_ROOT_UID 0
./scripts/config --enable CONFIG_INITRAMFS_ROOT_GID 0
# Apply configuration
echo "Applying configuration..."
make olddefconfig
# Build kernel
echo "Building kernel..."
make -j$(nproc) zImage
# Build device tree
echo "Building device tree..."
make dtbs
echo "Kernel build complete!"
echo "Files created:"
echo " - arch/arm/boot/zImage (kernel image)"
echo " - arch/arm/boot/dts/qcom/qcom-msm8960-blackberry-q20-simple.dtb (device tree)"