updated for build orangepi_zero_2w
This commit is contained in:
1 parent
0210af212d
commit
641ab89367
11 files changed
+458
-6560
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#------------ config ------------------
|
#------------ 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 version=0.0.1 # script version
|
||||||
export root=$(pwd) # root build directory
|
export root=$(pwd) # root build directory
|
||||||
# disk="sdz" # disk to write install image
|
# disk="sdz" # disk to write install image
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#------------ config ------------------
|
#------------ 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 version=0.0.1 # script version
|
||||||
export root=$(pwd) # root build directory
|
export root=$(pwd) # root build directory
|
||||||
# disk="sdz" # disk to write install image
|
# disk="sdz" # disk to write install image
|
||||||
|
|||||||
+2
-2
@@ -18,14 +18,14 @@ dropbear() {
|
|||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--host=$CROSS_COMPILE \
|
--host=$CROSS_COMPILE \
|
||||||
--with-zlib=$build/rootfs
|
--with-zlib=$build/rootfs/usr
|
||||||
# CC=${CROSS_COMPILE}gcc ./configure --prefix=/usr --shared
|
# CC=${CROSS_COMPILE}gcc ./configure --prefix=/usr --shared
|
||||||
check $? "Configure dropbear"
|
check $? "Configure dropbear"
|
||||||
make $makeflags
|
make $makeflags
|
||||||
check $? "Build dropbear"
|
check $? "Build dropbear"
|
||||||
make DESTDIR=$rootfspath install
|
make DESTDIR=$rootfspath install
|
||||||
check $? "Installing to rootfs dropbear"
|
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/*
|
${CROSS_COMPILE}-strip --strip-unneeded $rootfspath/usr/bin/*
|
||||||
mkdir -pv $build/rootfs/etc/dropbear
|
mkdir -pv $build/rootfs/etc/dropbear
|
||||||
# check $? "Installing to rootfs zlib"
|
# check $? "Installing to rootfs zlib"
|
||||||
|
|||||||
+2
-2
@@ -19,13 +19,13 @@ hostapd() {
|
|||||||
sed -i "/CONFIG_EAP_TLS=y/s//#CONFIG_EAP_TLS=y/" defconfig
|
sed -i "/CONFIG_EAP_TLS=y/s//#CONFIG_EAP_TLS=y/" defconfig
|
||||||
cp -v defconfig .config
|
cp -v defconfig .config
|
||||||
CC=${CROSS_COMPILE}-gcc \
|
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}
|
make ${makeflags}
|
||||||
check $? "Build ${pkgname}"
|
check $? "Build ${pkgname}"
|
||||||
${CROSS_COMPILE}-strip hostapd hostapd_cli
|
${CROSS_COMPILE}-strip hostapd hostapd_cli
|
||||||
check $? "Stripping ${pkgname} binary"
|
check $? "Stripping ${pkgname} binary"
|
||||||
cp -v hostapd hostapd_cli $rootfspath/usr/bin/
|
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
|
$rootfspath/usr/lib
|
||||||
ln -sv libatomic.so.1.2.0 $rootfspath/usr/lib/libatomic.so.1
|
ln -sv libatomic.so.1.2.0 $rootfspath/usr/lib/libatomic.so.1
|
||||||
check $? "Install to rootfs ${pkgname}"
|
check $? "Install to rootfs ${pkgname}"
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ iw() {
|
|||||||
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.xz
|
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.xz
|
||||||
cd ${pkgname}-${pkgver}
|
cd ${pkgname}-${pkgver}
|
||||||
CC=${CROSS_COMPILE}-gcc \
|
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}
|
make ${makeflags}
|
||||||
check $? "Build ${pkgname}"
|
check $? "Build ${pkgname}"
|
||||||
${CROSS_COMPILE}-strip iw
|
${CROSS_COMPILE}-strip iw
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ kernel() {
|
|||||||
cd linux-$KERNEL_VERSION
|
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-$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
|
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"
|
||||||
|
|||||||
+4
-4
@@ -19,14 +19,14 @@ libnl() {
|
|||||||
--disable-static \
|
--disable-static \
|
||||||
--disable-cli \
|
--disable-cli \
|
||||||
--build=x86_64-pc-linux-gnu \
|
--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}"
|
check $? "Configure ${pkgname}"
|
||||||
make $makeflags
|
make $makeflags
|
||||||
check $? "Build ${pkgname}"
|
check $? "Build ${pkgname}"
|
||||||
make DESTDIR=$(pwd)/bin install
|
make DESTDIR=$(pwd)/bin install
|
||||||
rm -rv $(pwd)/bin/opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/{pkgconfig,*.la}
|
rm -rv $(pwd)/bin/opt/toolchains/$CROSS_COMPILE/$CROSS_COMPILE/sysroot/usr/lib/{pkgconfig,*.la}
|
||||||
${CROSS_COMPILE}-strip $(pwd)/bin/opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/*
|
${CROSS_COMPILE}-strip $(pwd)/bin/opt/toolchains/$CROSS_COMPILE/$CROSS_COMPILE/sysroot/usr/lib/*
|
||||||
cd $(pwd)/bin/opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib
|
cd $(pwd)/bin/opt/toolchains/$CROSS_COMPILE/$CROSS_COMPILE/sysroot/usr/lib
|
||||||
tar -czvf /tmp/${pkgname}.tar.gz .
|
tar -czvf /tmp/${pkgname}.tar.gz .
|
||||||
check $? "Archived libs"
|
check $? "Archived libs"
|
||||||
cd -
|
cd -
|
||||||
|
|||||||
+4
-2
@@ -29,13 +29,15 @@ rootfs() {
|
|||||||
cd $rootfspath
|
cd $rootfspath
|
||||||
mkdir -pv $(cat $rootfsfile) # &>> $fulllogfile
|
mkdir -pv $(cat $rootfsfile) # &>> $fulllogfile
|
||||||
ln -sv usr/lib lib # &>> $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 bin # &>> $fulllogfile
|
||||||
ln -sv usr/bin sbin # &>> $fulllogfile
|
ln -sv usr/bin sbin # &>> $fulllogfile
|
||||||
ln -sv var/run run
|
ln -sv var/run run
|
||||||
cd usr
|
cd usr
|
||||||
ln -sv bin sbin # &>> $fulllogfile
|
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
|
ln -sv bin libexec
|
||||||
cd ..
|
cd ..
|
||||||
tar -xvf $root/downloads/20250110-1.tar.gz
|
tar -xvf $root/downloads/20250110-1.tar.gz
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ sftp_server() {
|
|||||||
cd openssh-9.9p1
|
cd openssh-9.9p1
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--host=arm-buildroot-linux-uclibcgnueabihf \
|
--host=$CROSS_COMPILE \
|
||||||
--without-openssl \
|
--without-openssl \
|
||||||
--with-zlib=$rootfspath
|
--with-zlib=$rootfspath/usr
|
||||||
check $? "Configure openssh"
|
check $? "Configure openssh"
|
||||||
make sftp-server $makeflags # &>> $fulllogfile
|
make sftp-server $makeflags # &>> $fulllogfile
|
||||||
check $? "Build sftp-server"
|
check $? "Build sftp-server"
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ zlib() {
|
|||||||
make $makeflags
|
make $makeflags
|
||||||
check $? "Build ${pkgname}"
|
check $? "Build ${pkgname}"
|
||||||
make DESTDIR=$rootfspath install
|
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}
|
${CROSS_COMPILE}-strip --strip-unneeded $rootfspath/usr/lib/libz.so.${pkgver}
|
||||||
check $? "Installing to rootfs ${pkgname}"
|
check $? "Installing to rootfs ${pkgname}"
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user