added sftp-server
This commit is contained in:
1 parent
010d61e828
commit
0ae7099814
4 files changed
+40
-1
No files matched your search
@@ -24,4 +24,5 @@ export sdroot=$out/sdroot
|
|||||||
export ZLIB_ENABLE="true"
|
export ZLIB_ENABLE="true"
|
||||||
export DROPBEAR_ENABLE="true"
|
export DROPBEAR_ENABLE="true"
|
||||||
export image_usable_enable="true"
|
export image_usable_enable="true"
|
||||||
|
export sftp_server_enable="true"
|
||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
. ./scripts/kernel.sh
|
. ./scripts/kernel.sh
|
||||||
. ./scripts/zlib.sh
|
. ./scripts/zlib.sh
|
||||||
. ./scripts/dropbear.sh
|
. ./scripts/dropbear.sh
|
||||||
|
. ./scripts/sftp_server.sh
|
||||||
|
|
||||||
#----------- Building rootfs ----------------------
|
#----------- Building rootfs ----------------------
|
||||||
rootfs() {
|
rootfs() {
|
||||||
@@ -44,6 +45,9 @@ rootfs() {
|
|||||||
if [ "$DROPBEAR_ENABLE" = "true" ]; then
|
if [ "$DROPBEAR_ENABLE" = "true" ]; then
|
||||||
dropbear
|
dropbear
|
||||||
fi
|
fi
|
||||||
|
if [ "$sftp_server_enable" = "true" ]; then
|
||||||
|
sftp_server
|
||||||
|
fi
|
||||||
|
|
||||||
chmod 640 $rootfspath/etc/shadow $rootfspath/etc/inittab
|
chmod 640 $rootfspath/etc/shadow $rootfspath/etc/inittab
|
||||||
chmod 755 $rootfspath/etc/init.d/* $rootfspath/usr/share/udhcpc/default.script $rootfspath/init
|
chmod 755 $rootfspath/etc/init.d/* $rootfspath/usr/share/udhcpc/default.script $rootfspath/init
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ./scripts/colors.sh
|
||||||
|
. ./scripts/funcs.sh
|
||||||
|
. ./scripts/config.sh
|
||||||
|
. ./scripts/dropbear.sh
|
||||||
|
|
||||||
|
sftp_server() {
|
||||||
|
if [ ! -d $build/zlib ]; then
|
||||||
|
zlib
|
||||||
|
fi
|
||||||
|
if [ ! -d $build/dropbear ]; then
|
||||||
|
dropbear
|
||||||
|
fi
|
||||||
|
printf "$UGREEN** Building sftp-server\n$RESET"
|
||||||
|
mkdir -p $build/sftp_server # &>> $fulllogfile
|
||||||
|
cd $build/sftp_server
|
||||||
|
tar -xvf $root/downloads/openssh-9.9p1.tar.gz # &>> $fulllogfile
|
||||||
|
check $? "Extract openssh"
|
||||||
|
cd openssh-9.9p1
|
||||||
|
./configure \
|
||||||
|
--prefix=/usr \
|
||||||
|
--host=arm-buildroot-linux-uclibcgnueabihf \
|
||||||
|
--without-openssl \
|
||||||
|
--with-zlib=$rootfspath
|
||||||
|
check $? "Configure openssh"
|
||||||
|
make sftp-server $makeflags # &>> $fulllogfile
|
||||||
|
check $? "Build sftp-server"
|
||||||
|
cp -v sftp-server $rootfspath/usr/bin/
|
||||||
|
$CROSS_COMPILE-strip $rootfspath/usr/bin/sftp-server
|
||||||
|
check $? "Install sftp-server to rootfs directory"
|
||||||
|
check $? "Build and install sftp-server to rootfs directory"
|
||||||
|
}
|
||||||
+2
-1
@@ -4,4 +4,5 @@ https://downloads.uclibc-ng.org/releases/1.0.50/uClibc-ng-1.0.50.tar.xz
|
|||||||
https://github.com/TolaMironcenko/initscripts/archive/refs/tags/0.0.1-orangepi-pc/initscripts-0.0.1-orangepi-pc.tar.gz
|
https://github.com/TolaMironcenko/initscripts/archive/refs/tags/0.0.1-orangepi-pc/initscripts-0.0.1-orangepi-pc.tar.gz
|
||||||
https://github.com/u-boot/u-boot/archive/refs/tags/v2024.10/u-boot-v2024.10.tar.gz
|
https://github.com/u-boot/u-boot/archive/refs/tags/v2024.10/u-boot-v2024.10.tar.gz
|
||||||
https://www.zlib.net/zlib-1.3.1.tar.gz
|
https://www.zlib.net/zlib-1.3.1.tar.gz
|
||||||
https://github.com/mkj/dropbear/archive/refs/tags/DROPBEAR_2024.86.tar.gz
|
https://github.com/mkj/dropbear/archive/refs/tags/DROPBEAR_2024.86.tar.gz
|
||||||
|
https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.9p1.tar.gz
|
||||||
Reference in new issue
Block a user