added hostapd and openssl
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
#--------------------------------------
|
||||
|
||||
@@ -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
@@ -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}"
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user