This commit is contained in:
wt
2025-02-21 14:11:08 +07:00
parent 3e497612fe
commit 7a8a4fc984
8 changed files with 5606 additions and 20 deletions
+5581
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -21,12 +21,12 @@ export makeflags=-j$(nproc) # makeflags
export CROSS_COMPILE=arm-buildroot-linux-uclibcgnueabihf export CROSS_COMPILE=arm-buildroot-linux-uclibcgnueabihf
export ARCH=arm export ARCH=arm
export sdroot=$out/sdroot export sdroot=$out/sdroot
export ZLIB_ENABLE="false" export ZLIB_ENABLE="true"
export DROPBEAR_ENABLE="false" export DROPBEAR_ENABLE="true"
export image_usable_enable="true" export image_usable_enable="true"
export sftp_server_enable="false" export sftp_server_enable="true"
export curl_enable="false" export curl_enable="false"
export bash_enable="false" export bash_enable="false"
export git_enable="false" export git_enable="false"
export gitea_enable="true" export gitea_enable="false"
#-------------------------------------- #--------------------------------------
+8 -6
View File
@@ -4,6 +4,8 @@
. ./scripts/funcs.sh . ./scripts/funcs.sh
. ./scripts/config.sh . ./scripts/config.sh
kernel_version=6.13.3
#--------------- Building Linux Kernel --------------------- #--------------- Building Linux Kernel ---------------------
kernel() { kernel() {
printf "$UGREEN** Building Linux Kernel\n$RESET" printf "$UGREEN** Building Linux Kernel\n$RESET"
@@ -11,12 +13,12 @@ kernel() {
mkdir -p $build/kernel # &>> $fulllogfile mkdir -p $build/kernel # &>> $fulllogfile
cd $build/kernel cd $build/kernel
printf "$UGREEN** Extracting Linux Kernel\n$RESET" printf "$UGREEN** Extracting Linux Kernel\n$RESET"
tar -xvf $root/downloads/linux-6.1.91.tar.xz # &>> $fulllogfile tar -xvf $root/downloads/linux-$kernel_version.tar.xz # &>> $fulllogfile
check $? "Extract Linux Kernel" check $? "Extract Linux Kernel"
cd linux-6.1.91 cd linux-$kernel_version
printf "$UGREEN** Configuring Linux Kernel\n$RESET" printf "$UGREEN** Configuring Linux Kernel\n$RESET"
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- mrproper # &>> $fulllogfile make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- mrproper # &>> $fulllogfile
cp -v $root/kernel/config-6.1.91 .config # &>> $fulllogfile cp -v $root/kernel/config-$kernel_version .config # &>> $fulllogfile
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- oldconfig # &>> $fulllogfile make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- oldconfig # &>> $fulllogfile
check $? "Configure Linux Kernel" check $? "Configure Linux Kernel"
printf "$UGREEN** Building Linux Kernel\n$RESET" printf "$UGREEN** Building Linux Kernel\n$RESET"
@@ -29,13 +31,13 @@ kernel() {
#----------- Build and Install kernel modules -------------- #----------- Build and Install kernel modules --------------
kernel_modules() { kernel_modules() {
printf "$UGREEN** Building Linux Kernel modules\n$RESET" printf "$UGREEN** Building Linux Kernel modules\n$RESET"
cd $build/kernel/linux-6.1.91 cd $build/kernel/linux-$kernel_version
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- modules # &>> fulllogfile make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- modules # &>> fulllogfile
check $? "Build Linux Kernel modules" check $? "Build Linux Kernel modules"
printf "$UGREEN** Installing Linux Kernel modules into rootfs path\n$RESET" printf "$UGREEN** Installing Linux Kernel modules into rootfs path\n$RESET"
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- INSTALL_MOD_PATH=$rootfspath modules_install # &>> $fulllogfile make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- INSTALL_MOD_PATH=$rootfspath modules_install # &>> $fulllogfile
rm -v $rootfspath/usr/lib/modules/6.1.91/{source,build}
check $? "Install Linux Kernel modules" check $? "Install Linux Kernel modules"
rm -v $rootfspath/usr/lib/modules/$kernel_version/{source,build}
} # kernel_modules } # kernel_modules
#----------------------------------------------------------- #-----------------------------------------------------------
@@ -45,7 +47,7 @@ kernel_with_rootfs() {
if [ ! -d $out ]; then if [ ! -d $out ]; then
mkdir -pv $out mkdir -pv $out
fi fi
cd $build/kernel/linux-6.1.91 cd $build/kernel/linux-$kernel_version
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- CONFIG_INITRAMFS_SOURCE=$rootfspath $makeflags # &>> fulllogfile make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- CONFIG_INITRAMFS_SOURCE=$rootfspath $makeflags # &>> fulllogfile
check $? "Build Linux Kernel with rootfs" check $? "Build Linux Kernel with rootfs"
printf "$UGREEN** Installing Linux Kernel into images path\n$RESET" printf "$UGREEN** Installing Linux Kernel into images path\n$RESET"
+3 -3
View File
@@ -31,9 +31,9 @@ rootfs() {
ln -sv lib lib32 # &>> $fulllogfile ln -sv lib lib32 # &>> $fulllogfile
ln -sv bin libexec ln -sv bin libexec
cd .. cd ..
tar -xvf $root/downloads/initscripts-0.0.1-orangepi-pc.tar.gz tar -xvf $root/downloads/20250110-1.tar.gz
cp -rv initscripts-0.0.1-orangepi-pc/* . cp -rv initscripts/* .
rm -rv initscripts-0.0.1-orangepi-pc rm -rv initscripts
ln -sv /proc/mounts etc/mtab # &>> $fulllogfile ln -sv /proc/mounts etc/mtab # &>> $fulllogfile
busybox_rootfs busybox_rootfs
+1 -1
View File
@@ -74,7 +74,7 @@ sdroot_usable() {
initramfs initramfs
cp -v $build/initramfs.img $sdroot/boot cp -v $build/initramfs.img $sdroot/boot
cp -v $build/kernel/linux-6.1.91/arch/$ARCH/boot/zImage $sdroot/boot cp -v $build/kernel/linux-6.13.3/arch/$ARCH/boot/zImage $sdroot/boot
uboot uboot
printf "$GREEN** Creating rootfs.ext4\n$RESET" printf "$GREEN** Creating rootfs.ext4\n$RESET"
cd $out cd $out
+4 -2
View File
@@ -4,14 +4,16 @@
. ./scripts/funcs.sh . ./scripts/funcs.sh
. ./scripts/config.sh . ./scripts/config.sh
uboot_version=2025.01
#--- uboot --- #--- uboot ---
uboot() { uboot() {
printf "$UGREEN** Building uboot\n$RESET" printf "$UGREEN** Building uboot\n$RESET"
mkdir -p $build/uboot # &>> $fulllogfile mkdir -p $build/uboot # &>> $fulllogfile
cd $build/uboot cd $build/uboot
tar -xvf $root/downloads/u-boot-v2024.10.tar.gz # &>> $fulllogfile tar -xvf $root/downloads/v$uboot_version.tar.gz # &>> $fulllogfile
check $? "Extract uboot" check $? "Extract uboot"
cd u-boot-2024.10 cd u-boot-$uboot_version
# cp -rv $root/uclibc/config-1.0.50 .config # cp -rv $root/uclibc/config-1.0.50 .config
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- orangepi_pc_defconfig make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- orangepi_pc_defconfig
check $? "Configure uboot" check $? "Configure uboot"
+4 -3
View File
@@ -1,8 +1,9 @@
https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.91.tar.xz https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.13.3.tar.xz
# https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.91.tar.xz
https://busybox.net/downloads/busybox-1.36.1.tar.bz2 https://busybox.net/downloads/busybox-1.36.1.tar.bz2
https://downloads.uclibc-ng.org/releases/1.0.50/uClibc-ng-1.0.50.tar.xz https://downloads.uclibc-ng.org/releases/1.0.50/uClibc-ng-1.0.50.tar.xz
https://github.com/TolaMironcenko/initscripts/archive/refs/tags/0.0.1-orangepi-pc/initscripts-0.0.1-orangepi-pc.tar.gz http://gitea.home.com:3000/TolaMironcenko/initscripts/archive/0.0.1-x86_64.tar.gz
https://github.com/u-boot/u-boot/archive/refs/tags/v2024.10/u-boot-v2024.10.tar.gz https://github.com/u-boot/u-boot/archive/refs/tags/v2025.01.tar.gz
https://www.zlib.net/zlib-1.3.1.tar.gz https://www.zlib.net/zlib-1.3.1.tar.gz
https://github.com/mkj/dropbear/archive/refs/tags/DROPBEAR_2024.86.tar.gz https://github.com/mkj/dropbear/archive/refs/tags/DROPBEAR_2024.86.tar.gz
https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.9p1.tar.gz https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.9p1.tar.gz
+1 -1
View File
@@ -60,7 +60,7 @@ UCLIBC_HAS_FPU=y
DO_C99_MATH=y DO_C99_MATH=y
DO_XSI_MATH=y DO_XSI_MATH=y
UCLIBC_HAS_LONG_DOUBLE_MATH=y UCLIBC_HAS_LONG_DOUBLE_MATH=y
KERNEL_HEADERS="/home/tola/Documents/linux/orangepipc/buildroot-2024.08.2/output/build/linux-headers-6.1.91/usr/include" KERNEL_HEADERS="/home/tola/Documents/linux/SimpleLinux/downloads/linux-6.13.3/usr/include"
HAVE_DOT_CONFIG=y HAVE_DOT_CONFIG=y
# #