This commit is contained in:
wt
2026-03-05 17:18:16 +07:00
parent ebfecd6f94
commit 81ffa09e4e
30 changed files with 58 additions and 54 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ ko8821au() {
pkgname=8821au
pkgver=20210708
gitsrc=https://github.com/morrownr/8821au-20210708.git
printf "$GREEN** Building and installing $pkgname\n$RESET"
print_info "** Building and installing $pkgname"
[ ! -d $build/$pkgname ] && mkdir $build/$pkgname
cd $build/$pkgname
git clone $gitsrc
+1 -1
View File
@@ -7,7 +7,7 @@
bash() {
pkgname=bash
pkgver=5.2.32
printf "$GREEN** Building and installing bash\n$RESET"
print_info "** Building and installing bash"
mkdir $build/${pkgname}
cd $build/${pkgname}
tar -xf $root/downloads/${pkgname}-${pkgver}.tar.gz
+6 -6
View File
@@ -10,7 +10,7 @@
#----------- Building busybox for rootfs ----------
busybox_rootfs() {
printf "$UGREEN** Building busybox for rootfs\n$RESET"
print_info "** Building busybox for rootfs"
[ -d $build/busybox ] && return 0
mkdir -p $build/busybox
cd $build/busybox
@@ -18,10 +18,10 @@ busybox_rootfs() {
cd busybox-${BUSYBOX_VERSION}
sed -i 's/|| ctx->process_block == sha1_process_block64_shaNI/|| ctx->process_block == sha1_process_block64/' libbb/hash_md5_sha.c
cp $root/board/${BOARD_NAME}/busybox-${BUSYBOX_VERSION}.config .config
printf "$UGREEN** Configuring busybox\n$RESET"
print_info "** Configuring busybox"
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- oldconfig
check $? "Configure busybox all logs in .log"
printf "$UGREEN** Building busybox\n$RESET"
print_info "** Building busybox"
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- $makeflags
check $? "Build busybox all logs in .log"
cp -v busybox $rootfspath/usr/bin
@@ -32,7 +32,7 @@ busybox_rootfs() {
#------------------ Building busybox for initramfs ----------------
busybox_initramfs() {
printf "$UGREEN** Building busybox for initramfs\n$RESET"
print_info "** Building busybox for initramfs"
[ -f $build/initramfs.img ] && return 0
mkdir -p $build/busybox
cd $build/busybox
@@ -40,10 +40,10 @@ busybox_initramfs() {
check $? "Extract busybox"
cd busybox-${BUSYBOX_VERSION}
cp -v $root/board/${BOARD_NAME}/busybox-initrd-${BUSYBOX_VERSION}.config .config
printf "$UGREEN** Configuring busybox\n$RESET"
print_info "** Configuring busybox"
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- oldconfig
check $? "Configure busybox all logs in .log"
printf "$UGREEN** Building busybox\n$RESET"
print_info "** Building busybox"
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- $makeflags
check $? "Build busybox all logs in .log"
}
+1 -1
View File
@@ -11,7 +11,7 @@ curl() {
fi
pkgname=curl
pkgver=8.9.1
printf "$GREEN** Building and installing curl\n$RESET"
print_info "** Building and installing curl"
mkdir $build/${pkgname}
cd $build/${pkgname}
tar -xf $root/downloads/${pkgname}-${pkgver}.tar.xz
+1 -1
View File
@@ -7,7 +7,7 @@
dnsmasq() {
pkgname=dnsmasq
pkgver=2.90
printf "$GREEN** Building and installing $pkgname\n$RESET"
print_info "** Building and installing $pkgname"
[ ! -d $build/$pkgname ] && mkdir $build/$pkgname
cd $build/$pkgname
tar -xf $root/downloads/${pkgname}-${pkgver}.tar.xz
+1 -1
View File
@@ -5,7 +5,7 @@
#------------ Download needed sources from sources.txt ------------------
download_sources() {
printf "$UGREEN** Downloading sources\n$RESET"
print_info "** Downloading sources"
cat $sourcesfilename
if [ ! -d downloads ]; then mkdir downloads; fi
wget --input-file=$sourcesfilename --continue --directory-prefix=$root/downloads
+1 -1
View File
@@ -6,7 +6,7 @@
. ./scripts/zlib.sh
dropbear() {
printf "$GREEN** Building and installing dropbear\n$RESET"
print_info "** Building and installing dropbear"
[ -d $build/dropbear ] && return 0
mkdir $build/dropbear
cd $build/dropbear
+1 -1
View File
@@ -7,7 +7,7 @@
duf_bin() {
pkgname=duf
pkgver=0.9.1
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
print_info "** Building and installing ${pkgname}"
[ -d $build/${pkgname} ] && return 0
mkdir $build/${pkgname}
cd $build/${pkgname}
+1 -1
View File
@@ -5,7 +5,7 @@
. ./scripts/config.sh
finit_init() {
printf "$GREEN** Building and installing finit\n$RESET"
print_info "** Building and installing finit"
[ -d $build/finit ] && return 0
mkdir -pv $build/finit
cd $build/finit
+7 -3
View File
@@ -7,18 +7,22 @@
#------- Check errors func -----------------
check() {
if [ $1 -ne 0 ]; then
printf "$URED** ERROR: $2\n$RESET"
printf "$ON_RED** ERROR: $2\n$RESET"
exit 1
fi
printf "$UGREEN** SUCCESS: $2\n$RESET"
printf "$ON_GREEN** SUCCESS: $2\n$RESET"
}
#-------------------------------------------
#------- Check root func -------------------
check_root() {
if [ $(id -u) -ne 0 ]; then
printf "$URED** You are not root\n$RESET"
printf "$ON_RED** You are not root\n$RESET"
exit 1
fi
}
#-------------------------------------------
print_info() {
printf "$ON_GREEN$1$RESET\n"
}
+2 -2
View File
@@ -11,7 +11,7 @@ git_build() {
fi
pkgname=git
pkgver=2.46.0
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
print_info "** Building and installing ${pkgname}"
mkdir $build/git
cd $build/git
tar -xf $root/downloads/${pkgname}-${pkgver}.tar.xz
@@ -27,5 +27,5 @@ git_build() {
make $makeflags
check $? "Build ${pkgname}"
make DESTDIR=$rootfspath install
printf "$GREEN** SUCCESS: Building and installing ${pkgname}\n$RESET"
print_info "** SUCCESS: Building and installing ${pkgname}"
}
+1 -1
View File
@@ -11,7 +11,7 @@ hostapd() {
[ ! -d $build/openssl ] && openssl
pkgname=hostapd
pkgver=2.11
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
print_info "** Building and installing ${pkgname}"
[ ! -d $build/${pkgname} ] && mkdir $build/${pkgname}
cd $build/${pkgname}
tar -xf $root/downloads/${pkgname}-${pkgver}.tar.gz
+1 -1
View File
@@ -7,7 +7,7 @@
#------------------ Building initramfs.img ------------------------
initramfs() {
printf "$UGREEN** Building initramfs\n$RESET"
print_info "** Building initramfs"
#--------- Creating directories and files -------------------
rm -r $initramfspath # &>> $fulllogfile >> $(tty)
+2 -2
View File
@@ -7,7 +7,7 @@
iptables() {
pkgname=iptables
pkgver=1.8.11
printf "$GREEN** Building and installing $pkgname\n$RESET"
print_info "** Building and installing $pkgname"
[ ! -d $build/$pkgname ] && mkdir $build/$pkgname
cd $build/$pkgname
tar -xf $root/downloads/${pkgname}-${pkgver}.tar.xz
@@ -24,5 +24,5 @@ iptables() {
check $? "Build ${pkgname}"
make install DESTDIR=$rootfspath
check $? "Install to rootfs ${pkgname}"
printf "$GREEN** SUCCESS: Building and installing ${pkgname}\n$RESET"
print_info "** SUCCESS: Building and installing ${pkgname}"
}
+1 -1
View File
@@ -9,7 +9,7 @@ iw() {
[ ! -d $build/libnl ] && libnl
pkgname=iw
pkgver=6.9
printf "$GREEN** Building and installing iw\n$RESET"
print_info "** Building and installing ${pkgname}"
[ ! -d $build/iw ] && mkdir $build/iw
cd $build/iw
tar -xf $root/downloads/${pkgname}-${pkgver}.tar.xz
+9 -9
View File
@@ -6,20 +6,20 @@
#--------------- Building Linux Kernel ---------------------
kernel() {
printf "$UGREEN** Building Linux Kernel\n$RESET"
print_info "** Building Linux Kernel"
[ -d $build/kernel ] && return 0
mkdir -p $build/kernel
cd $build/kernel
printf "$UGREEN** Extracting Linux Kernel\n$RESET"
print_info "** Extracting Linux Kernel"
tar -xf $root/downloads/linux-$KERNEL_VERSION.tar.xz
check $? "Extract Linux Kernel"
cd linux-$KERNEL_VERSION
printf "$UGREEN** Configuring Linux Kernel\n$RESET"
print_info "** Configuring Linux Kernel"
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- mrproper
cp $root/board/${BOARD_NAME}/linux-$KERNEL_VERSION.config .config
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- oldconfig
check $? "Configure Linux Kernel"
printf "$UGREEN** Building Linux Kernel\n$RESET"
print_info "** Building Linux Kernel"
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- $makeflags
check $? "Build Linux Kernel"
KIMAGE=zImage
@@ -30,12 +30,12 @@ kernel() {
#----------- Build and Install kernel modules --------------
kernel_modules() {
printf "$UGREEN** Building Linux Kernel modules\n$RESET"
print_info "** Building Linux Kernel modules"
[ -d $rootfspath/usr/lib/modules ] && return 0
cd $build/kernel/linux-$KERNEL_VERSION
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- modules
check $? "Build Linux Kernel modules"
printf "$UGREEN** Installing Linux Kernel modules into rootfs path\n$RESET"
print_info "** Installing Linux Kernel modules into rootfs path"
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- INSTALL_MOD_PATH=$rootfspath modules_install
for i in $(find $rootfspath | grep .ko); do
gzip -9 $i;
@@ -46,14 +46,14 @@ kernel_modules() {
#--------------- Building Linux Kernel with rootfs ---------
kernel_with_rootfs() {
printf "$UGREEN** Building Linux Kernel with rootfs\n$RESET"
print_info "** Building Linux Kernel with rootfs"
if [ ! -d $out ]; then
mkdir -pv $out
fi
cd $build/kernel/linux-$KERNEL_VERSION
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- CONFIG_INITRAMFS_SOURCE=$rootfspath $makeflags # &>> fulllogfile
check $? "Build Linux Kernel with rootfs"
printf "$UGREEN** Installing Linux Kernel into images path\n$RESET"
print_info "** Installing Linux Kernel into images path"
# 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}
KIMAGE=zImage
@@ -64,7 +64,7 @@ kernel_with_rootfs() {
#-----------------------------------------------------------
kernel_headers() {
printf "$UGREEN** Building Linux Kernel headers\n$RESET"
print_info "** Building Linux Kernel headers"
[ -d $build/kernel-headers ] && return 0
[ ! -d $build/kernel-headers ] && mkdir $build/kernel-headers
cd $build/kernel-headers
+1 -1
View File
@@ -7,7 +7,7 @@
libnl() {
pkgname=libnl
pkgver=3.10.0
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
print_info "** Building and installing ${pkgname}"
[ ! -d $build/${pkgname} ] && mkdir $build/${pkgname}
cd $build/${pkgname}
tar -xf $root/downloads/${pkgname}-${pkgver}.tar.gz
+1 -1
View File
@@ -7,7 +7,7 @@
libsqlite3() {
pkgname=libsqlite3
pkgver=3.10.0
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
print_info "** Building and installing ${pkgname}"
[ ! -d $build/${pkgname} ] && mkdir $build/${pkgname}
cd $build/${pkgname}
git clone https://github.com/LuaDist/libsqlite3.git
+1 -1
View File
@@ -5,7 +5,7 @@
. ./scripts/config.sh
lm_sensors() {
printf "$GREEN** Building and installing lm_sensors\n$RESET"
print_info "** Building and installing lm_sensors"
[ -d $build/lm_sensors ] && return 0
mkdir -pv $build/lm_sensors
cd $build/lm_sensors
+1 -1
View File
@@ -7,7 +7,7 @@
lrzsz-build() {
pkgname=lrzsz
pkgver=0.12.20
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
print_info "** Building and installing ${pkgname}"
[ -d $build/${pkgname} ] && return 0
mkdir $build/${pkgname}
cd $build/${pkgname}
+1 -1
View File
@@ -7,7 +7,7 @@
nginx_build() {
pkgname=nginx
pkgver=1.29.5
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
print_info "** Building and installing ${pkgname}"
[ -d $build/${pkgname} ] && return 0
mkdir $build/${pkgname}
cd $build/${pkgname}
+1 -1
View File
@@ -9,7 +9,7 @@ set -x
openssl() {
pkgname=openssl
pkgver=3.4.1
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
print_info "** Building and installing ${pkgname}"
[ -d $build/${pkgname} ] && return 0
[ ! -d $build/${pkgname} ] && mkdir $build/${pkgname}
cd $build/${pkgname}
+1 -1
View File
@@ -32,7 +32,7 @@
#----------- Building rootfs ----------------------
rootfs() {
printf "$UGREEN** Building rootfs\n$RESET"
print_info "** Building rootfs"
if [ ! -d $rootfspath ]; then
mkdir -pv $rootfspath
cd $rootfspath
+8 -8
View File
@@ -9,21 +9,21 @@
#--- sdroot ---
sdroot() {
printf "$GREEN** Generating sdroot\n$RESET"
print_info "** Generating sdroot"
rm -rv $sdroot
if [ ! -d $sdroot ]; then
mkdir -pv $sdroot
fi
printf "$GREEN** Creating dirs\n$RESET"
print_info "** Creating dirs"
mkdir -pv $sdroot/boot/{dtbs,extlinux}
check $? "Creating dirs"
printf "$GREEN** Copy extlinux.conf\n$RESET"
print_info "** Copy extlinux.conf"
cp -v $root/extlinux/extlinux.conf $sdroot/boot/extlinux
check $? "Copy extlinux.conf"
[ "$ARCH" = "arm64" ] && sed -i "s/zImage/Image/g" $sdroot/boot/extlinux/extlinux.conf
kernel_with_rootfs
uboot
printf "$GREEN** Creating rootfs.ext4\n$RESET"
print_info "** Creating rootfs.ext4"
cd $out
rawsdrootsize=$(du -s $sdroot)
echo $rawsdrootsize
@@ -55,15 +55,15 @@ sdroot() {
#--------------
sdroot_usable() {
printf "$GREEN** Generating sdroot usable\n$RESET"
print_info "** Generating sdroot usable"
rm -rv $sdroot
if [ ! -d $sdroot ]; then
mkdir -pv $sdroot
fi
printf "$GREEN** Creating dirs\n$RESET"
print_info "** Creating dirs"
mkdir -pv $sdroot/boot/{dtbs,extlinux}
check $? "Creating dirs"
printf "$GREEN** Copy extlinux.conf\n$RESET"
print_info "** Copy extlinux.conf"
cp -v $root/extlinux/extlinux_usable.conf $sdroot/boot/extlinux/extlinux.conf
check $? "Copy extlinux.conf"
# kernel_with_rootfs
@@ -79,7 +79,7 @@ sdroot_usable() {
[ "$ARCH" = "arm64" ] && KIMAGE=Image
cp -v $build/kernel/linux-6.13.3/arch/$ARCH/boot/$KIMAGE $sdroot/boot
uboot
printf "$GREEN** Creating rootfs.ext4\n$RESET"
print_info "** Creating rootfs.ext4"
cd $out
rawsdrootsize=$(du -s $sdroot)
echo $rawsdrootsize
+1 -1
View File
@@ -12,7 +12,7 @@ sftp_server() {
if [ ! -d $build/dropbear ]; then
dropbear
fi
printf "$UGREEN** Building sftp-server\n$RESET"
print_info "** Building sftp-server"
[ -d $build/sftp_server ] && return 0
mkdir -p $build/sftp_server
cd $build/sftp_server
+1 -1
View File
@@ -7,7 +7,7 @@
tcc_build() {
pkgname=tcc
pkgver=0.9.27
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
print_info "** Building and installing ${pkgname}"
mkdir $build/${pkgname}
cd $build/${pkgname}
tar -xf $root/downloads/${pkgname}-${pkgver}.tar.bz2
+1 -1
View File
@@ -8,7 +8,7 @@ uboot_version=2025.07
#--- uboot ---
uboot() {
printf "$UGREEN** Building uboot\n$RESET"
print_info "** Building uboot"
mkdir -p $build/uboot
cd $build/uboot
tar -xf $root/downloads/v$uboot_version.tar.gz
+1 -1
View File
@@ -8,7 +8,7 @@
uclibc() {
pkgname=uClibc-ng
pkgver=${UCLIBC_VERSION}
printf "$UGREEN** Building ${pkgname}\n$RESET"
print_info "** Building ${pkgname}"
[ -d $build/${pkgname} ] && return 0
mkdir -p $build/${pkgname}
cd $build/${pkgname}
+1 -1
View File
@@ -11,7 +11,7 @@ build_wpa_supplicant() {
[ ! -d $build/openssl ] && openssl
pkgname=wpa_supplicant
pkgver=2.11
printf "$GREEN** Building and installing iw\n$RESET"
print_info "** Building and installing iw"
[ -d $build/wpa_supplicant ] && return 0
[ ! -d $build/wpa_supplicant ] && mkdir $build/wpa_supplicant
cd $build/wpa_supplicant
+1 -1
View File
@@ -7,7 +7,7 @@
zlib() {
pkgname=zlib
pkgver=1.3.1
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
print_info "** Building and installing ${pkgname}"
[ -d $build/${pkgname} ] && return 0
mkdir $build/${pkgname}
cd $build/${pkgname}