Files
BBeOS/scripts/configure-kernel.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

179 lines
6.3 KiB
Bash
Executable File

#!/bin/bash
# BBeOS Kernel Configuration Script for BlackBerry Classic Q20
# Based on MSM8960 (Snapdragon S4 Plus)
set -e
echo "Configuring kernel for BBeOS (BlackBerry Classic Q20)..."
# Set up environment
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
# Base configuration (already done with qcom_defconfig)
echo "Using qcom_defconfig as base..."
# Essential MSM8960 configurations
echo "Enabling MSM8960 support..."
./scripts/config --enable CONFIG_ARCH_MSM
./scripts/config --enable CONFIG_MSM8960
./scripts/config --enable CONFIG_CPU_32v7
./scripts/config --enable CONFIG_CPU_HAS_ASID
# Serial console and debug
echo "Enabling serial console and debug..."
./scripts/config --enable CONFIG_SERIAL_MSM
./scripts/config --enable CONFIG_SERIAL_MSM_CONSOLE
./scripts/config --enable CONFIG_SERIAL_MSM_HS
./scripts/config --enable CONFIG_SERIAL_MSM_HSL
./scripts/config --enable CONFIG_SERIAL_MSM_HSL_CONSOLE
# Memory and storage
echo "Enabling memory and storage support..."
./scripts/config --enable CONFIG_MMC
./scripts/config --enable CONFIG_MMC_MSM
./scripts/config --enable CONFIG_MMC_MSM_SDC1
./scripts/config --enable CONFIG_MMC_MSM_SDC2
./scripts/config --enable CONFIG_MMC_MSM_SDC3
./scripts/config --enable CONFIG_MMC_MSM_SDC4
# Display and graphics
echo "Enabling display and graphics..."
./scripts/config --enable CONFIG_DRM
./scripts/config --enable CONFIG_DRM_MSM
./scripts/config --enable CONFIG_DRM_MSM_MDP5
./scripts/config --enable CONFIG_DRM_MSM_DSI
./scripts/config --enable CONFIG_DRM_MSM_HDMI
./scripts/config --enable CONFIG_FB_MSM
./scripts/config --enable CONFIG_FB_MSM_MDSS
./scripts/config --enable CONFIG_FB_MSM_MDP
# Audio support
echo "Enabling audio support..."
./scripts/config --enable CONFIG_SOUND
./scripts/config --enable CONFIG_SND
./scripts/config --enable CONFIG_SND_SOC
./scripts/config --enable CONFIG_SND_SOC_MSM8960
./scripts/config --enable CONFIG_SND_SOC_WCD9310
./scripts/config --enable CONFIG_SND_SOC_WCD9330
./scripts/config --enable CONFIG_SND_SOC_WCD9335
# Input devices
echo "Enabling input device support..."
./scripts/config --enable CONFIG_INPUT
./scripts/config --enable CONFIG_INPUT_KEYBOARD
./scripts/config --enable CONFIG_INPUT_MOUSE
./scripts/config --enable CONFIG_INPUT_TOUCHSCREEN
./scripts/config --enable CONFIG_INPUT_JOYSTICK
./scripts/config --enable CONFIG_INPUT_TABLET
./scripts/config --enable CONFIG_INPUT_MISC
# Network support
echo "Enabling network support..."
./scripts/config --enable CONFIG_NET
./scripts/config --enable CONFIG_INET
./scripts/config --enable CONFIG_NETDEVICES
./scripts/config --enable CONFIG_WLAN
./scripts/config --enable CONFIG_WLAN_VENDOR_ATH
./scripts/config --enable CONFIG_ATH6KL
./scripts/config --enable CONFIG_ATH6KL_SDIO
./scripts/config --enable CONFIG_BT
./scripts/config --enable CONFIG_BT_HCIBTUSB
./scripts/config --enable CONFIG_BT_HCIUART
# USB support
echo "Enabling USB support..."
./scripts/config --enable CONFIG_USB
./scripts/config --enable CONFIG_USB_SUPPORT
./scripts/config --enable CONFIG_USB_ARCH_HAS_HCD
./scripts/config --enable CONFIG_USB_ARCH_HAS_EHCI
./scripts/config --enable CONFIG_USB_ARCH_HAS_OHCI
./scripts/config --enable CONFIG_USB_ARCH_HAS_XHCI
# Power management
echo "Enabling power management..."
./scripts/config --enable CONFIG_PM
./scripts/config --enable CONFIG_PM_SLEEP
./scripts/config --enable CONFIG_PM_RUNTIME
./scripts/config --enable CONFIG_PM_GENERIC_DOMAINS
./scripts/config --enable CONFIG_PM_OPP
./scripts/config --enable CONFIG_CPU_FREQ
./scripts/config --enable CONFIG_CPU_FREQ_GOV_POWERSAVE
./scripts/config --enable CONFIG_CPU_FREQ_GOV_USERSPACE
./scripts/config --enable CONFIG_CPU_FREQ_GOV_ONDEMAND
./scripts/config --enable CONFIG_CPU_FREQ_GOV_CONSERVATIVE
./scripts/config --enable CONFIG_CPU_FREQ_GOV_SCHEDUTIL
# GPIO and I2C
echo "Enabling GPIO and I2C support..."
./scripts/config --enable CONFIG_GPIOLIB
./scripts/config --enable CONFIG_GPIO_SYSFS
./scripts/config --enable CONFIG_I2C
./scripts/config --enable CONFIG_I2C_CHARDEV
./scripts/config --enable CONFIG_I2C_HELPER_AUTO
./scripts/config --enable CONFIG_I2C_MSM
# SPI support
echo "Enabling SPI support..."
./scripts/config --enable CONFIG_SPI
./scripts/config --enable CONFIG_SPI_MASTER
./scripts/config --enable CONFIG_SPI_MSM
# Sensors
echo "Enabling sensor support..."
./scripts/config --enable CONFIG_IIO
./scripts/config --enable CONFIG_IIO_BUFFER
./scripts/config --enable CONFIG_IIO_TRIGGER
./scripts/config --enable CONFIG_IIO_KFIFO_BUF
./scripts/config --enable CONFIG_IIO_TRIGGERED_BUFFER
# Filesystem support
echo "Enabling filesystem support..."
./scripts/config --enable CONFIG_EXT4_FS
./scripts/config --enable CONFIG_FAT_FS
./scripts/config --enable CONFIG_VFAT_FS
./scripts/config --enable CONFIG_NTFS_FS
./scripts/config --enable CONFIG_SQUASHFS
./scripts/config --enable CONFIG_CRAMFS
# Debug and development
echo "Enabling debug and development features..."
./scripts/config --enable CONFIG_DEBUG_FS
./scripts/config --enable CONFIG_DEBUG_KERNEL
./scripts/config --enable CONFIG_DEBUG_INFO
./scripts/config --enable CONFIG_DEBUG_INFO_DWARF4
./scripts/config --enable CONFIG_KGDB
./scripts/config --enable CONFIG_KGDB_SERIAL_CONSOLE
./scripts/config --enable CONFIG_KGDB_KDB
./scripts/config --enable CONFIG_KDB_KEYBOARD
# Security
echo "Enabling security features..."
./scripts/config --enable CONFIG_SECURITY
./scripts/config --enable CONFIG_SECURITYFS
./scripts/config --enable CONFIG_DEFAULT_SECURITY_DAC
./scripts/config --set-str CONFIG_DEFAULT_SECURITY ""
# 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
echo "Kernel configuration complete!"
echo "Run 'make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- olddefconfig' to apply changes"