orangepi-pc #3

Merged
wt merged 41 commits from orangepi-pc into main 2025-08-17 14:25:32 +07:00
11 changed files with 458 additions and 6560 deletions
Showing only changes of commit 641ab89367 - Show all commits
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,7 +1,7 @@
#!/bin/bash
#------------ config ------------------
export PATH=$PATH:/opt/toolchains/aarch64-buildroot-linux-uclibc_sdk-buildroot/bin
export PATH=$PATH:/opt/toolchains/aarch64-buildroot-linux-uclibc/bin
export version=0.0.1 # script version
export root=$(pwd) # root build directory
# disk="sdz" # disk to write install image
+1 -1
View File
@@ -1,7 +1,7 @@
#!/bin/bash
#------------ config ------------------
export PATH=$PATH:/opt/toolchains/aarch64-buildroot-linux-uclibc_sdk-buildroot/bin
export PATH=$PATH:/opt/toolchains/aarch64-buildroot-linux-uclibc/bin
export version=0.0.1 # script version
export root=$(pwd) # root build directory
# disk="sdz" # disk to write install image
+2 -2
View File
@@ -18,14 +18,14 @@ dropbear() {
./configure \
--prefix=/usr \
--host=$CROSS_COMPILE \
--with-zlib=$build/rootfs
--with-zlib=$build/rootfs/usr
# CC=${CROSS_COMPILE}gcc ./configure --prefix=/usr --shared
check $? "Configure dropbear"
make $makeflags
check $? "Build dropbear"
make DESTDIR=$rootfspath install
check $? "Installing to rootfs dropbear"
rm -rv $rootfspath/usr/include $rootfspath/usr/share/man $rootfspath/usr/lib/{pkgconfig,libz.a}
[ "$SFTP_SERVER_ENABLE" = "n" ] && rm -rv $rootfspath/usr/include $rootfspath/usr/share/man $rootfspath/usr/lib/{pkgconfig,libz.a}
${CROSS_COMPILE}-strip --strip-unneeded $rootfspath/usr/bin/*
mkdir -pv $build/rootfs/etc/dropbear
# check $? "Installing to rootfs zlib"
+2 -2
View File
@@ -19,13 +19,13 @@ hostapd() {
sed -i "/CONFIG_EAP_TLS=y/s//#CONFIG_EAP_TLS=y/" defconfig
cp -v defconfig .config
CC=${CROSS_COMPILE}-gcc \
PKG_CONFIG_PATH=/opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/pkgconfig \
PKG_CONFIG_PATH=/opt/toolchains/$CROSS_COMPILE/$CROSS_COMPILE/sysroot/usr/lib/pkgconfig \
make ${makeflags}
check $? "Build ${pkgname}"
${CROSS_COMPILE}-strip hostapd hostapd_cli
check $? "Stripping ${pkgname} binary"
cp -v hostapd hostapd_cli $rootfspath/usr/bin/
cp -v /opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/arm-buildroot-linux-uclibcgnueabihf/sysroot/lib/libatomic.so.1.2.0 \
cp -v /opt/toolchains/$CROSS_COMPILE/$CROSS_COMPILE/sysroot/lib/libatomic.so.1.2.0 \
$rootfspath/usr/lib
ln -sv libatomic.so.1.2.0 $rootfspath/usr/lib/libatomic.so.1
check $? "Install to rootfs ${pkgname}"
+1 -1
View File
@@ -15,7 +15,7 @@ iw() {
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.xz
cd ${pkgname}-${pkgver}
CC=${CROSS_COMPILE}-gcc \
PKG_CONFIG_PATH=/opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/pkgconfig \
PKG_CONFIG_PATH=/opt/toolchains/$CROSS_COMPILE/$CROSS_COMPILE/sysroot/usr/lib/pkgconfig \
make ${makeflags}
check $? "Build ${pkgname}"
${CROSS_COMPILE}-strip iw
+1 -1
View File
@@ -16,7 +16,7 @@ kernel() {
cd linux-$KERNEL_VERSION
printf "$UGREEN** Configuring Linux Kernel\n$RESET"
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- mrproper # &>> $fulllogfile
cp -v $root/kernel/config-$KERNEL_VERSION .config # &>> $fulllogfile
cp -v $root/board/${BOARD_NAME}/linux-$KERNEL_VERSION.config .config # &>> $fulllogfile
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- oldconfig # &>> $fulllogfile
check $? "Configure Linux Kernel"
printf "$UGREEN** Building Linux Kernel\n$RESET"
+4 -4
View File
@@ -19,14 +19,14 @@ libnl() {
--disable-static \
--disable-cli \
--build=x86_64-pc-linux-gnu \
--prefix=/opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr
--prefix=/opt/toolchains/$CROSS_COMPILE/$CROSS_COMPILE/sysroot/usr
check $? "Configure ${pkgname}"
make $makeflags
check $? "Build ${pkgname}"
make DESTDIR=$(pwd)/bin install
rm -rv $(pwd)/bin/opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/{pkgconfig,*.la}
${CROSS_COMPILE}-strip $(pwd)/bin/opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/*
cd $(pwd)/bin/opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib
rm -rv $(pwd)/bin/opt/toolchains/$CROSS_COMPILE/$CROSS_COMPILE/sysroot/usr/lib/{pkgconfig,*.la}
${CROSS_COMPILE}-strip $(pwd)/bin/opt/toolchains/$CROSS_COMPILE/$CROSS_COMPILE/sysroot/usr/lib/*
cd $(pwd)/bin/opt/toolchains/$CROSS_COMPILE/$CROSS_COMPILE/sysroot/usr/lib
tar -czvf /tmp/${pkgname}.tar.gz .
check $? "Archived libs"
cd -
+4 -2
View File
@@ -29,13 +29,15 @@ rootfs() {
cd $rootfspath
mkdir -pv $(cat $rootfsfile) # &>> $fulllogfile
ln -sv usr/lib lib # &>> $fulllogfile
ln -sv usr/lib lib32 # &>> $fulllogfile
[ "$ARCH" = "arm" ] && ln -sv usr/lib lib32 # &>> $fulllogfile
[ "$ARCH" = "arm64" ] && ln -sv usr/lib lib64
ln -sv usr/bin bin # &>> $fulllogfile
ln -sv usr/bin sbin # &>> $fulllogfile
ln -sv var/run run
cd usr
ln -sv bin sbin # &>> $fulllogfile
ln -sv lib lib32 # &>> $fulllogfile
[ "$ARCH" = "arm" ] && ln -sv lib lib32 # &>> $fulllogfile
[ "$ARCH" = "arm64" ] && ln -sv lib lib64
ln -sv bin libexec
cd ..
tar -xvf $root/downloads/20250110-1.tar.gz
+2 -2
View File
@@ -20,9 +20,9 @@ sftp_server() {
cd openssh-9.9p1
./configure \
--prefix=/usr \
--host=arm-buildroot-linux-uclibcgnueabihf \
--host=$CROSS_COMPILE \
--without-openssl \
--with-zlib=$rootfspath
--with-zlib=$rootfspath/usr
check $? "Configure openssh"
make sftp-server $makeflags # &>> $fulllogfile
check $? "Build sftp-server"
+1 -1
View File
@@ -18,7 +18,7 @@ zlib() {
make $makeflags
check $? "Build ${pkgname}"
make DESTDIR=$rootfspath install
rm -rv $rootfspath/usr/include $rootfspath/usr/share/man $rootfspath/usr/lib/{pkgconfig,libz.a}
# rm -rv $rootfspath/usr/include $rootfspath/usr/share/man $rootfspath/usr/lib/{pkgconfig,libz.a}
${CROSS_COMPILE}-strip --strip-unneeded $rootfspath/usr/lib/libz.so.${pkgver}
check $? "Installing to rootfs ${pkgname}"
}