rt build support

This commit is contained in:
uziel 2024-11-27 11:30:36 +08:00
parent 3e24e11a48
commit d22f638324
7 changed files with 10724 additions and 3 deletions

3
.gitignore vendored
View File

@ -4,3 +4,6 @@ images/initrd.img
images/Image
images/uImage_*
images/system-top.dtb
tmp_kernel_5.15_rt/
build_*/
linux-*

View File

@ -1,6 +1,7 @@
#!/bin/bash
source ./package.config
PACKAGE_CONFIG=${PACKAGE_CONFIG:-package.config}
. ${PACKAGE_CONFIG}
FOLDER="`pwd`/${FOLDER_NAME}/"

View File

@ -1,10 +1,12 @@
#!/bin/bash
. package.config
PACKAGE_CONFIG=${PACKAGE_CONFIG:-package.config}
. ${PACKAGE_CONFIG}
CUR_DIR=`dirname $(realpath $0)`
CROSS_COMPILE=${CROSS_COMPILE:-aarch64-linux-gnu-}
if [ ! -e "${CROSS_COMPILE}gcc" ]; then
CROSS_COMPILE=aarch64-linux-gnu-
fi

28
build_kernel_rt.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
. package_rt.config
WORK=`pwd`
echo "prepare rt source"
if [ ! -e "${SRC}" ]; then
mkdir -p ${SRC}
cp -ar ${ORIGIN_SRC}/* ${SRC}/
cp -ar ${ORIGIN_SRC}/.gitignore ${SRC}/
echo "apply rt patches"
cd ${SRC}/
QUILT_PATCHES="${PATCHES_DIR}" QUILT_PC=.pc quilt push --quiltrc - -a --fuzz=0
RET=$?
if [ ${RET} -ne 0 ]; then
exit $RET
fi
git init
git add .
git commit -m "init rt"
cd ${WORK}
fi
export PACKAGE_CONFIG=package_rt.config
./build_kernel.sh $1

10667
conf/rt_config Normal file

File diff suppressed because it is too large Load Diff

View File

@ -220,6 +220,7 @@ CONFIG_MULTIUSER=y
CONFIG_FHANDLE=y
CONFIG_POSIX_TIMERS=y
CONFIG_PRINTK=y
CONFIG_PRINTK_HOOK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y

19
package_rt.config Normal file
View File

@ -0,0 +1,19 @@
CROSS_COMPILE=/opt/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
FOLDER_NAME=build_none_rt
CONFIG_NAME=rt_config
CORES=8
SRC=./tmp_kernel_5.15_rt/
ORIGIN_SRC=../tmp_kernel_5.15/
PATCHES_DIR=/data/kernel_build_uzi/kernel_obs_tool/debian/patches-rt
RAM_ROOTFS=rootfs.tar.gz
# RAM_ROOTFS=rootfs_tmp.tgz
# D2000 dev board
DTS_FOLDER=images/dts/d2000/
DTB_TARGET=d2000-devboard-dsk.dtb
KERNEL_ADDRESS=0x90200000
ENTRY_POINT=0x90200000
UIMAGE_NAME=uImage_bpo7_D2000
UIMAGE_DESC="D2000 Kernel"