orangepi-pc #3

Merged
wt merged 41 commits from orangepi-pc into main 2025-08-17 07:25:32 +00:00
12 changed files with 107 additions and 29 deletions
Showing only changes of commit 98836f9b99 - Show all commits

No files matched your search

+6
View File
@@ -27,5 +27,11 @@ libnl:
iw:
./scripts/build_image.sh iw
hostapd:
./scripts/build_image.sh hostapd
openssl:
./scripts/build_image.sh openssl
sdroot_usable:
./scripts/build_image.sh sdroot_usable
+3 -3
View File
@@ -11,8 +11,8 @@ CONFIG_AS_VERSION=24100
CONFIG_LD_IS_BFD=y
CONFIG_LD_VERSION=24100
CONFIG_LLD_VERSION=0
CONFIG_RUSTC_VERSION=108500
CONFIG_RUSTC_LLVM_VERSION=190107
CONFIG_RUSTC_VERSION=108200
CONFIG_RUSTC_LLVM_VERSION=190101
CONFIG_CC_CAN_LINK=y
CONFIG_CC_CAN_LINK_STATIC=y
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
@@ -1593,7 +1593,7 @@ CONFIG_WLAN_VENDOR_MARVELL=y
# CONFIG_LIBERTAS_THINFIRM is not set
# CONFIG_MWIFIEX is not set
CONFIG_WLAN_VENDOR_MEDIATEK=y
# CONFIG_MT7601U is not set
CONFIG_MT7601U=y
# CONFIG_MT76x0U is not set
# CONFIG_MT76x2U is not set
# CONFIG_MT7663U is not set
+8
View File
@@ -12,6 +12,8 @@
. ./scripts/dropbear.sh
. ./scripts/libnl.sh
. ./scripts/iw.sh
. ./scripts/hostapd.sh
. ./scripts/openssl.sh
case $1 in
build)
@@ -40,6 +42,12 @@ case $1 in
iw)
iw
;;
hostapd)
hostapd
;;
openssl)
openssl
;;
sdroot_usable)
if [ ! -d downloads ]; then
download_sources
+2
View File
@@ -33,4 +33,6 @@ export libnl_enable="false"
export iw_enable="true"
export wireles_tools_enable="false"
export wpa_supplicant_enable="false"
export hostapd_enable="true"
export openssl_enable="false"
#--------------------------------------
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
. ./scripts/colors.sh
. ./scripts/funcs.sh
. ./scripts/config.sh
. ./scripts/libnl.sh
. ./scripts/openssl.sh
hostapd() {
[ ! -d $build/libnl ] && libnl
[ ! -d $build/openssl ] && openssl
pkgname=hostapd
pkgver=2.11
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
[ ! -d $build/${pkgname} ] && mkdir $build/${pkgname}
cd $build/${pkgname}
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.gz
cd ${pkgname}-${pkgver}/${pkgname}
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 \
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 \
$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
@@ -14,7 +14,7 @@ iw() {
cd $build/iw
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.xz
cd ${pkgname}-${pkgver}
CC=arm-buildroot-linux-uclibcgnueabihf-gcc \
CC=${CROSS_COMPILE}-gcc \
PKG_CONFIG_PATH=/opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/pkgconfig \
make ${makeflags}
check $? "Build ${pkgname}"
+11
View File
@@ -57,3 +57,14 @@ kernel_with_rootfs() {
check $? "Install Linux Kernel into images path"
}
#-----------------------------------------------------------
kernel_headers() {
printf "$UGREEN** Building Linux Kernel headers\n$RESET"
[ ! -d $build/kernel-headers ] && mkdir $build/kernel-headers
cd $build/kernel-headers
tar -xvf $root/downloads/linux-$kernel_version.tar.xz
check $? "Extract Linux Kernel"
cd linux-$kernel_version
make ARCH=$ARCH headers
check $? "Build kernel headers"
}
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
. ./scripts/colors.sh
. ./scripts/funcs.sh
. ./scripts/config.sh
set -x
openssl() {
pkgname=openssl
pkgver=3.4.1
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
[ ! -d $build/${pkgname} ] && mkdir $build/${pkgname}
cd $build/${pkgname}
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.gz
cd ${pkgname}-${pkgver}/
./config linux-armv4 CROSS_COMPILE=${CROSS_COMPILE}-
check $? "Configure ${pkgname}"
make ${makeflags}
check $? "Build ${pkgname}"
${CROSS_COMPILE}-strip libcrypto.so.3 libssl.so.3
check $? "Stripping ${pkgname} binary"
cp -v libcrypto.so.3 libssl.so.3 $rootfspath/usr/lib/
ln -sv libcrypto.so.3 $rootfspath/usr/lib/libcrypto.so
ln -sv libssl.so.3 $rootfspath/usr/lib/libssl.so
check $? "Install to rootfs ${pkgname}"
}
+13 -24
View File
@@ -15,6 +15,8 @@
. ./scripts/gitea.sh
. ./scripts/libnl.sh
. ./scripts/iw.sh
. ./scripts/openssl.sh
. ./scripts/hostapd.sh
#----------- Building rootfs ----------------------
rootfs() {
@@ -43,34 +45,21 @@ rootfs() {
cd $rootfspath/usr/bin
for i in $(cat $root/busybox/busybox_list); do ln -sv busybox $i; done
cp -v $root/rootfs/init.in $rootfspath/init
kernel_headers
uclibc
kernel
kernel_modules
if [ "$ZLIB_ENABLE" = "true" ]; then
zlib
fi
if [ "$DROPBEAR_ENABLE" = "true" ]; then
dropbear
fi
if [ "$sftp_server_enable" = "true" ]; then
sftp_server
fi
if [ "$curl_enable" = "true" ]; then
curl
fi
if [ "$bash_enable" = "true" ]; then
bash
fi
if [ "$git_enable" = "true" ]; then
git
fi
if [ "$gitea_enable" = "true" ]; then
gitea
fi
if [ "$libnl_enable" = "true" ]; then
libnl
fi
[ "$ZLIB_ENABLE" = "true" ] && zlib
[ "$DROPBEAR_ENABLE" = "true" ] && dropbear
[ "$sftp_server_enable" = "true" ] && sftp_server
[ "$curl_enable" = "true" ] && curl
[ "$bash_enable" = "true" ] && bash
[ "$git_enable" = "true" ] && git
[ "$gitea_enable" = "true" ] && gitea
[ "$libnl_enable" = "true" ] && libnl
[ "$iw_enable" = "true" ] && iw
[ "$openssl_enable" = "true" ] && openssl
[ "$hostapd_enable" = "true" ] && hostapd
chmod 640 $rootfspath/etc/shadow $rootfspath/etc/inittab
chmod 755 $rootfspath/etc/init.d/* $rootfspath/usr/share/udhcpc/default.script $rootfspath/init
+1
View File
@@ -15,6 +15,7 @@ uclibc() {
check $? "Extract ${pkgname}"
cd ${pkgname}-${pkgver}
cp -rv $root/uclibc/config-${pkgver} .config
sed -i -e "s/KERNEL_HEADERS=/KERNEL_HEADERS=\"..\/..\/kernel-headers\/linux-$kernel_version\/usr\/include\"/g" .config
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- oldconfig
check $? "Configure ${pkgname}"
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- $makeflags # &>> $fulllogfile
+2
View File
@@ -13,3 +13,5 @@ https://www.kernel.org/pub/software/scm/git/git-2.46.0.tar.xz
https://dl.gitea.com/gitea/1.22.4/gitea-1.22.4-linux-arm-5
# https://www.kernel.org/pub/software/network/iw/iw-6.9.tar.xz
# https://github.com/thom311/libnl/releases/download/libnl3_10_0/libnl-3.10.0.tar.gz
# https://w1.fi/releases/hostapd-2.11.tar.gz
# https://github.com/openssl/openssl/releases/download/openssl-3.4.1/openssl-3.4.1.tar.gz
+1 -1
View File
@@ -60,7 +60,7 @@ UCLIBC_HAS_FPU=y
DO_C99_MATH=y
DO_XSI_MATH=y
UCLIBC_HAS_LONG_DOUBLE_MATH=y
KERNEL_HEADERS="/home/tola/Documents/linux/SimpleLinux/downloads/linux-6.13.3/usr/include"
KERNEL_HEADERS=
HAVE_DOT_CONFIG=y
#