updated rootfs_overlay for orangepi_pc
This commit is contained in:
1 parent
fba6a776ac
commit
0d7b9901b8
31 files changed
+283
-20
No files matched your search
@@ -0,0 +1,3 @@
|
|||||||
|
DROPBEAR_PORT=22
|
||||||
|
DROPBEAR_EXTRA_ARGS="-E -R -B -m -F"
|
||||||
|
ENABLE_ROOT_LOGIN="yes"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
service [2345] env:/etc/default/dropbear dropbear $DROPBEAR_EXTRA_ARGS -p$DROPBEAR_PORT -- Dropbear SSH daemon
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
task [S] hostname -F /etc/hostname
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
service [2345] inetd -f -- Internet super server
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# cat syslogd.conf
|
||||||
|
# BusyBox syslogd + klogd
|
||||||
|
# Use <pid/syslogd> as barrier for other system tasks and service that
|
||||||
|
# rely on modules, firmware, and device nodes to be ready.
|
||||||
|
|
||||||
|
# We want syslogd to always run, never be stopped, regardless of runlevel
|
||||||
|
# so it can send to any remote syslog server the user has set up.
|
||||||
|
service if:udevd nowarn env:-/etc/default/syslogd <!run/udevadm:5/success> \
|
||||||
|
[S0123456789] syslogd -n $SYSLOGD_ARGS -- System log daemon
|
||||||
|
service if:mdev nowarn env:-/etc/default/syslogd <!run/coldplug/success> \
|
||||||
|
[S0123456789] syslogd -n $SYSLOGD_ARGS -- System log daemon
|
||||||
|
service if:mdevd nowarn env:-/etc/default/syslogd <!run/coldplug/success> \
|
||||||
|
[S0123456789] syslogd -n $SYSLOGD_ARGS -- System log daemon
|
||||||
|
|
||||||
|
# klogd depends on syslogd, but BusyBox syslogd doesn't create a PID file to sync with
|
||||||
|
service [S0123456789] <!pid/syslogd> klogd -n -- Kernel log daemon
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# cat telnetd.conf
|
||||||
|
# Note: telnetd also runs from inetd, see /etc/inetd.conf
|
||||||
|
#service [2345] <!> :23 telnetd -F -p 23 -- Telnet daemon on port 23
|
||||||
|
#service [2345] <!> :2323 telnetd -F -p 2323 -- Telnet daemon on port 2323
|
||||||
|
service [2345] <!> telnetd -F -- Telnet daemon
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../available/dropbear.conf
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../available/hostname.conf
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../available/inetd.conf
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../available/syslogd.conf
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../available/telnetd.conf
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/dev/mmcblk0p1 / ext4 rw,relatime 0 1
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
root:x:0:root
|
||||||
|
tty:x:5:
|
||||||
|
disk:x:6:root
|
||||||
|
kmem:x:9:
|
||||||
|
floppy:x:11:root
|
||||||
|
audio:x:18:
|
||||||
|
cdrom:x:19:
|
||||||
|
dialout:x:20:root
|
||||||
|
input:x:23:
|
||||||
|
tape:x:26:root
|
||||||
|
video:x:27:root
|
||||||
|
netdev:x:28:
|
||||||
|
dnsmasq:x:963:dnsmasq
|
||||||
|
sshd:x:33:sshd
|
||||||
|
kvm:x:34:kvm
|
||||||
|
nobody:x:65534:
|
||||||
|
gitea:x:1000:
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
orangepi_pc
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
21 stream tcp nowait root /sbin/ftpd /sbin/ftpd -S -A -w /srv/ftp
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Welcome to Simple Linux!
|
||||||
|
|
||||||
|
You may change this message by editing /etc/motd.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
auto lo
|
||||||
|
iface lo inet loopback
|
||||||
|
|
||||||
|
auto eth0
|
||||||
|
iface eth0 inet dhcp
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
root:x:0:0:root:/root:/bin/sh
|
||||||
|
dnsmasq:x:963:963:dnsmasq daemon:/:/usr/bin/nologin
|
||||||
|
sshd:x:33:33:SSH daemon:/var/lib/sshd:/bin/sh
|
||||||
|
nobody:x:65534:65534:Kernel Oerflow User:/:/usr/bin/nologin
|
||||||
|
gitea:x:1000:1000:Gitea daemon user:/home/gitea:/bin/sh
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#--- import colors ---
|
||||||
|
. /usr/lib/init/colors.sh
|
||||||
|
#---------------------
|
||||||
|
|
||||||
|
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/.local/bin
|
||||||
|
|
||||||
|
export PS1="$BGREEN** \u@\h: \$(date +%d.%m.%Y) \t\n\w \\\$ $RESET"
|
||||||
|
[ $(id -u) -eq 0 ] && export PS1="$BRED** \u@\h: \$(date +%d.%m.%Y) \t\n\w \\\$ $RESET"
|
||||||
|
|
||||||
|
#--- sys ---
|
||||||
|
alias psa='busybox ps' # show all processes
|
||||||
|
alias c='clear' # clear terminal screen
|
||||||
|
alias e='echo' # print in terminal
|
||||||
|
alias s='source' # source
|
||||||
|
alias una='uname -a' # system name
|
||||||
|
alias ifcnf='ifconfig' # ifconfig
|
||||||
|
alias ipr='ip route' # show routes
|
||||||
|
alias ipa='ip addr' # show addresses
|
||||||
|
alias ipl='ip link' # show links
|
||||||
|
alias ll='ls -lh' # show list files with information
|
||||||
|
alias la='ls -a'
|
||||||
|
alias l='ls -alh'
|
||||||
|
alias df='df -h'
|
||||||
|
alias free='free -h'
|
||||||
|
#-----------
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
root:F.fHA5x2Q.xNY:19797::::::
|
||||||
|
dnsmasq:!*:19889::::::
|
||||||
|
sshd:!:19906:0:99999:7:::
|
||||||
|
nobody:!*:19889::::::
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
/bin/sh
|
||||||
|
/bin/ash
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#--- reset colors ---
|
||||||
|
RESET="\033[0m"
|
||||||
|
#--------------------
|
||||||
|
|
||||||
|
#--------- regularcolrs ---------
|
||||||
|
GREEN="\033[0;32m" #GREEN
|
||||||
|
BLUE="\033[0;34m" #BLUE
|
||||||
|
YELLOW="\033[1;33m" #YELLOW
|
||||||
|
RED="\033[0;31m" #RED
|
||||||
|
BLACK="\033[0;30m" #BLACK
|
||||||
|
PURPLE="\033[0;35m" #PURPLE
|
||||||
|
CYAN="\033[0;36m" #CYAN
|
||||||
|
WHITE="\033[0;37m" #WHITE
|
||||||
|
#--------------------------------
|
||||||
|
|
||||||
|
#-------- bold ------------------
|
||||||
|
BBLACK="\033[1;30m" #BLACK
|
||||||
|
BRED="\033[1;31m" #RED
|
||||||
|
BGREEN="\033[1;32m" #GREEN
|
||||||
|
BYELLOW="\033[1;33m" #YELLOW
|
||||||
|
BBLUE="\033[1;34m" #BLUE
|
||||||
|
BPURPLE="\033[1;35m" #PURPLE
|
||||||
|
BCYAN="\033[1;36m" #CYAN
|
||||||
|
BWHITE="\033[1;37m" #WHITE
|
||||||
|
#--------------------------------
|
||||||
|
|
||||||
|
#-------- Underline -------------
|
||||||
|
UBLACK="\033[4;30m" #BLACK
|
||||||
|
URED="\033[4;31m" #RED
|
||||||
|
UGREEN="\033[4;32m" #GREEN
|
||||||
|
UYELLOW="\033[4;33m" #YELLOW
|
||||||
|
UBLUE="\033[4;34m" #BLUE
|
||||||
|
UPURPLE="\033[4;35m" #PURPLE
|
||||||
|
UCYAN="\033[4;36m" #CYAN
|
||||||
|
UWHITE="\033[4;37m" #WHITE
|
||||||
|
#--------------------------------
|
||||||
|
|
||||||
|
#--------- Background -----------
|
||||||
|
ON_BLACK="\033[40m" #BLACK
|
||||||
|
ON_RED="\033[41m" #RED
|
||||||
|
ON_GREEN="\033[42m" #GREEN
|
||||||
|
ON_YELLOW="\033[43m" #YELLOW
|
||||||
|
ON_BLUE="\033[44m" #BLUE
|
||||||
|
ON_PURPLE="\033[45m" #PURPLE
|
||||||
|
ON_CYAN="\033[46m" #CYAN
|
||||||
|
ON_WHITE="\033[47m" #WHITE
|
||||||
|
#--------------------------------
|
||||||
|
|
||||||
|
#------ HighIntensity -----------
|
||||||
|
IBLACK="\033[0;90m" #BLACK
|
||||||
|
IRED="\033[0;91m" #RED
|
||||||
|
IGREEN="\033[0;92m" #GREEN
|
||||||
|
IYELLOW="\033[0;93m" #YELLOW
|
||||||
|
IBLUE="\033[0;94m" #BLUE
|
||||||
|
IPURPLE="\033[0;95m" #PURPLE
|
||||||
|
ICYAN="\033[0;96m" #CYAN
|
||||||
|
IWHITE="\033[0;97m" #WHITE
|
||||||
|
#--------------------------------
|
||||||
|
|
||||||
|
#------ BoldHighIntensity -------
|
||||||
|
BIBLACK="\033[1;90m" #BLACK
|
||||||
|
BIRED="\033[1;91m" #RED
|
||||||
|
BIGREEN="\033[1;92m" #GREEN
|
||||||
|
BIYELLOW="\033[1;93m" #YELLOW
|
||||||
|
BIBLUE="\033[1;94m" #BLUE
|
||||||
|
BIPURPLE="\033[1;95m" #PURPLE
|
||||||
|
BICYAN="\033[1;96m" #CYAN
|
||||||
|
BIWHITE="\033[1;97m" #WHITE
|
||||||
|
#--------------------------------
|
||||||
|
|
||||||
|
#--- HighIntensitybackgrounds ---
|
||||||
|
ON_IBLACK="\033[0;100m" #BLACK
|
||||||
|
ON_IRED="\033[0;101m" #RED
|
||||||
|
ON_IGREEN="\033[0;102m" #GREEN
|
||||||
|
ON_IYELLOW="\033[0;103m" #YELLOW
|
||||||
|
ON_IBLUE="\033[0;104m" #BLUE
|
||||||
|
ON_IPURPLE="\033[0;105m" #PURPLE
|
||||||
|
ON_ICYAN="\033[0;106m" #CYAN
|
||||||
|
ON_IWHITE="\033[0;107m" #WHITE
|
||||||
|
#--------------------------------
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
|
||||||
|
RESOLV_CONF="/etc/resolv.conf"
|
||||||
|
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
|
||||||
|
[ -n "$subnet" ] && NETMASK="netmask $subnet"
|
||||||
|
|
||||||
|
# return 0 if root is mounted on a network filesystem
|
||||||
|
root_is_nfs() {
|
||||||
|
grep -qe '^/dev/root.*\(nfs\|smbfs\|ncp\|coda\) .*' /proc/mounts
|
||||||
|
}
|
||||||
|
|
||||||
|
have_bin_ip=0
|
||||||
|
if [ -x /usr/bin/ip ]; then
|
||||||
|
have_bin_ip=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
deconfig)
|
||||||
|
if ! root_is_nfs ; then
|
||||||
|
if [ $have_bin_ip -eq 1 ]; then
|
||||||
|
ip addr flush dev $interface
|
||||||
|
ip link set dev $interface up
|
||||||
|
else
|
||||||
|
/usr/bin/ifconfig $interface 0.0.0.0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
renew|bound)
|
||||||
|
if [ $have_bin_ip -eq 1 ]; then
|
||||||
|
ip addr add dev $interface local $ip/$mask $BROADCAST
|
||||||
|
else
|
||||||
|
/usr/bin/ifconfig $interface $ip $BROADCAST $NETMASK
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$router" ] ; then
|
||||||
|
if ! root_is_nfs ; then
|
||||||
|
if [ $have_bin_ip -eq 1 ]; then
|
||||||
|
while ip route del default 2>/dev/null ; do
|
||||||
|
:
|
||||||
|
done
|
||||||
|
else
|
||||||
|
while route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do
|
||||||
|
:
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
metric=0
|
||||||
|
for i in $router ; do
|
||||||
|
if [ $have_bin_ip -eq 1 ]; then
|
||||||
|
ip route add default via $i metric $((metric++))
|
||||||
|
else
|
||||||
|
route add default gw $i dev $interface metric $((metric++)) 2>/dev/null
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
echo -n > $RESOLV_CONF
|
||||||
|
[ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
|
||||||
|
for i in $dns ; do
|
||||||
|
echo adding dns $i
|
||||||
|
echo nameserver $i >> $RESOLV_CONF
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
exit 0
|
||||||
@@ -45,7 +45,7 @@ export ROOTFS_OVERLAY=$root/board/${BOARD_NAME}/rootfs_overlay
|
|||||||
export ZLIB_ENABLE=y
|
export ZLIB_ENABLE=y
|
||||||
export DROPBEAR_ENABLE=y
|
export DROPBEAR_ENABLE=y
|
||||||
export IMAGE_USABLE_ENABLE=y
|
export IMAGE_USABLE_ENABLE=y
|
||||||
export IMAGE_ENABLE=y
|
export IMAGE_ENABLE=n
|
||||||
export SFTP_SERVER_ENABLE=y
|
export SFTP_SERVER_ENABLE=y
|
||||||
export CURL_ENABLE=n
|
export CURL_ENABLE=n
|
||||||
export BASH_ENABLE=n
|
export BASH_ENABLE=n
|
||||||
|
|||||||
+2
-2
@@ -11,7 +11,7 @@
|
|||||||
#----------- Building busybox for rootfs ----------
|
#----------- Building busybox for rootfs ----------
|
||||||
busybox_rootfs() {
|
busybox_rootfs() {
|
||||||
printf "$UGREEN** Building busybox for rootfs\n$RESET"
|
printf "$UGREEN** Building busybox for rootfs\n$RESET"
|
||||||
rm -r $build/busybox # &>> $fulllogfile
|
[ -d $build/busybox ] && return 0
|
||||||
mkdir -p $build/busybox # &>> $fulllogfile
|
mkdir -p $build/busybox # &>> $fulllogfile
|
||||||
cd $build/busybox
|
cd $build/busybox
|
||||||
tar -xjf $root/downloads/busybox-${BUSYBOX_VERSION}.tar.bz2 # &>> $fulllogfile
|
tar -xjf $root/downloads/busybox-${BUSYBOX_VERSION}.tar.bz2 # &>> $fulllogfile
|
||||||
@@ -30,7 +30,7 @@ busybox_rootfs() {
|
|||||||
#------------------ Building busybox for initramfs ----------------
|
#------------------ Building busybox for initramfs ----------------
|
||||||
busybox_initramfs() {
|
busybox_initramfs() {
|
||||||
printf "$UGREEN** Building busybox for initramfs\n$RESET"
|
printf "$UGREEN** Building busybox for initramfs\n$RESET"
|
||||||
rm -r $build/busybox # &>> $fulllogfile
|
[ -d $build/busybox ] && return 0
|
||||||
mkdir -p $build/busybox
|
mkdir -p $build/busybox
|
||||||
cd $build/busybox
|
cd $build/busybox
|
||||||
tar -xjf $root/downloads/busybox-${BUSYBOX_VERSION}.tar.bz2
|
tar -xjf $root/downloads/busybox-${BUSYBOX_VERSION}.tar.bz2
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ dropbear() {
|
|||||||
zlib
|
zlib
|
||||||
fi
|
fi
|
||||||
printf "$GREEN** Building and installing dropbear\n$RESET"
|
printf "$GREEN** Building and installing dropbear\n$RESET"
|
||||||
|
[ -d $build/dropbear ] && return 0
|
||||||
mkdir $build/dropbear
|
mkdir $build/dropbear
|
||||||
cd $build/dropbear
|
cd $build/dropbear
|
||||||
tar -xvf $root/downloads/DROPBEAR_2024.86.tar.gz
|
tar -xvf $root/downloads/DROPBEAR_2024.86.tar.gz
|
||||||
|
|||||||
+18
-7
@@ -6,17 +6,18 @@
|
|||||||
|
|
||||||
finit_init() {
|
finit_init() {
|
||||||
printf "$GREEN** Building and installing finit\n$RESET"
|
printf "$GREEN** Building and installing finit\n$RESET"
|
||||||
|
[ -d $build/finit ] && return 0
|
||||||
mkdir -pv $build/finit
|
mkdir -pv $build/finit
|
||||||
cd $build/finit
|
cd $build/finit
|
||||||
if [ ! -d libite ]; then
|
if [ ! -d libite ]; then
|
||||||
git clone https://gitea.home.com:3000/TolaMironcenko/libite.git
|
git clone https://gitea.home.com:3000/TolaMironcenko/libite.git
|
||||||
check $? "Download libite"
|
check $? "Download libite"
|
||||||
fi
|
fi
|
||||||
if [ ! -d libuev ]; then
|
if [ ! -d libuev ]; then
|
||||||
git clone https://gitea.home.com:3000/TolaMironcenko/libuev.git
|
git clone https://gitea.home.com:3000/TolaMironcenko/libuev.git
|
||||||
check $? "Download libuev"
|
check $? "Download libuev"
|
||||||
fi
|
fi
|
||||||
if [ ! -d finit ]; then
|
if [ ! -d finit ]; then
|
||||||
git clone https://gitea.home.com:3000/TolaMironcenko/finit.git
|
git clone https://gitea.home.com:3000/TolaMironcenko/finit.git
|
||||||
check $? "Download finit"
|
check $? "Download finit"
|
||||||
fi
|
fi
|
||||||
@@ -24,7 +25,10 @@ finit_init() {
|
|||||||
cd libite
|
cd libite
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
check $? "Autogen libite"
|
check $? "Autogen libite"
|
||||||
./configure --host=$CROSS_COMPILE --prefix=/usr
|
./configure \
|
||||||
|
--host=$CROSS_COMPILE \
|
||||||
|
--prefix=/usr \
|
||||||
|
--with-sysroot=$rootfspath
|
||||||
check $? "Configure libite"
|
check $? "Configure libite"
|
||||||
make $makeflags
|
make $makeflags
|
||||||
check $? "Build libite"
|
check $? "Build libite"
|
||||||
@@ -34,7 +38,10 @@ finit_init() {
|
|||||||
cd ../libuev
|
cd ../libuev
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
check $? "Autogen libuev"
|
check $? "Autogen libuev"
|
||||||
./configure --host=$CROSS_COMPILE --prefix=/usr
|
./configure \
|
||||||
|
--host=$CROSS_COMPILE \
|
||||||
|
--prefix=/usr \
|
||||||
|
--with-sysroot=$rootfspath
|
||||||
check $? "Configure libuev"
|
check $? "Configure libuev"
|
||||||
make $makeflags
|
make $makeflags
|
||||||
check $? "Build libuev"
|
check $? "Build libuev"
|
||||||
@@ -44,7 +51,7 @@ finit_init() {
|
|||||||
cd ../finit
|
cd ../finit
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
check $? "Autogen finit"
|
check $? "Autogen finit"
|
||||||
./configure \
|
PKG_CONFIG_PATH=$rootfspath/usr/lib/pkgconfig ./configure \
|
||||||
--host=$CROSS_COMPILE \
|
--host=$CROSS_COMPILE \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--exec-prefix= \
|
--exec-prefix= \
|
||||||
@@ -52,7 +59,11 @@ finit_init() {
|
|||||||
--localstatedir=/var \
|
--localstatedir=/var \
|
||||||
--with-watchdog \
|
--with-watchdog \
|
||||||
--with-keventd \
|
--with-keventd \
|
||||||
--with-sulogin
|
--with-sulogin \
|
||||||
|
--with-sysroot=$rootfspath \
|
||||||
|
--enable-resolvconf-plugin \
|
||||||
|
--enable-modprobe-plugin \
|
||||||
|
--enable-modules-load-plugin
|
||||||
check $? "Configure finit"
|
check $? "Configure finit"
|
||||||
make $makeflags
|
make $makeflags
|
||||||
check $? "Build finit"
|
check $? "Build finit"
|
||||||
|
|||||||
+2
-1
@@ -7,7 +7,7 @@
|
|||||||
#--------------- Building Linux Kernel ---------------------
|
#--------------- Building Linux Kernel ---------------------
|
||||||
kernel() {
|
kernel() {
|
||||||
printf "$UGREEN** Building Linux Kernel\n$RESET"
|
printf "$UGREEN** Building Linux Kernel\n$RESET"
|
||||||
rm -r $build/kernel # &>> $fulllogfile
|
[ -d $build/kernel ] && return 0
|
||||||
mkdir -p $build/kernel # &>> $fulllogfile
|
mkdir -p $build/kernel # &>> $fulllogfile
|
||||||
cd $build/kernel
|
cd $build/kernel
|
||||||
printf "$UGREEN** Extracting Linux Kernel\n$RESET"
|
printf "$UGREEN** Extracting Linux Kernel\n$RESET"
|
||||||
@@ -65,6 +65,7 @@ kernel_with_rootfs() {
|
|||||||
|
|
||||||
kernel_headers() {
|
kernel_headers() {
|
||||||
printf "$UGREEN** Building Linux Kernel headers\n$RESET"
|
printf "$UGREEN** Building Linux Kernel headers\n$RESET"
|
||||||
|
[ -d $build/kernel-headers ] && return 0
|
||||||
[ ! -d $build/kernel-headers ] && mkdir $build/kernel-headers
|
[ ! -d $build/kernel-headers ] && mkdir $build/kernel-headers
|
||||||
cd $build/kernel-headers
|
cd $build/kernel-headers
|
||||||
tar -xf $root/downloads/linux-$KERNEL_VERSION.tar.xz
|
tar -xf $root/downloads/linux-$KERNEL_VERSION.tar.xz
|
||||||
|
|||||||
+12
-9
@@ -30,7 +30,7 @@
|
|||||||
#----------- Building rootfs ----------------------
|
#----------- Building rootfs ----------------------
|
||||||
rootfs() {
|
rootfs() {
|
||||||
printf "$UGREEN** Building rootfs\n$RESET"
|
printf "$UGREEN** Building rootfs\n$RESET"
|
||||||
rm -rv $rootfspath # &>> $fulllogfile
|
# rm -rv $rootfspath # &>> $fulllogfile
|
||||||
mkdir -pv $rootfspath # &>> $fulllogfile
|
mkdir -pv $rootfspath # &>> $fulllogfile
|
||||||
cd $rootfspath
|
cd $rootfspath
|
||||||
mkdir -pv $(cat $rootfsfile) # &>> $fulllogfile
|
mkdir -pv $(cat $rootfsfile) # &>> $fulllogfile
|
||||||
@@ -46,9 +46,9 @@ rootfs() {
|
|||||||
[ "$ARCH" = "arm64" ] && ln -sv lib lib64
|
[ "$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
|
||||||
cp -rv initscripts/* .
|
# cp -rv initscripts/* .
|
||||||
rm -rv initscripts
|
# rm -rv initscripts
|
||||||
ln -sv /proc/mounts etc/mtab # &>> $fulllogfile
|
ln -sv /proc/mounts etc/mtab # &>> $fulllogfile
|
||||||
|
|
||||||
cat <<EOF > $rootfspath/etc/os-release
|
cat <<EOF > $rootfspath/etc/os-release
|
||||||
@@ -62,15 +62,15 @@ EOF
|
|||||||
cp -v $build/busybox/busybox-${BUSYBOX_VERSION}/busybox $rootfspath/usr/bin # &>> $fulllogfile
|
cp -v $build/busybox/busybox-${BUSYBOX_VERSION}/busybox $rootfspath/usr/bin # &>> $fulllogfile
|
||||||
cd $rootfspath/usr/bin
|
cd $rootfspath/usr/bin
|
||||||
for i in $(cat $BUSYBOX_LIST_FILE); do ln -sv busybox $i; done
|
for i in $(cat $BUSYBOX_LIST_FILE); do ln -sv busybox $i; done
|
||||||
cp -v $root/rootfs/init.in $rootfspath/init
|
# cp -v $root/rootfs/init.in $rootfspath/init
|
||||||
kernel_headers
|
kernel_headers
|
||||||
uclibc
|
uclibc
|
||||||
kernel
|
kernel
|
||||||
kernel_modules
|
kernel_modules
|
||||||
if [ "$FINIT_INIT_ENABLE" = "y" ]; then
|
if [ "$FINIT_INIT_ENABLE" = "y" ]; then
|
||||||
finit_init
|
finit_init
|
||||||
cp -rv $root/rootfs/overlay/* $rootfspath
|
# cp -rv $root/rootfs/overlay/* $rootfspath
|
||||||
rm $rootfspath/init
|
# rm $rootfspath/init
|
||||||
ln -sv usr/bin/finit $rootfspath/init
|
ln -sv usr/bin/finit $rootfspath/init
|
||||||
fi
|
fi
|
||||||
[ "$ZLIB_ENABLE" = "y" ] && zlib
|
[ "$ZLIB_ENABLE" = "y" ] && zlib
|
||||||
@@ -99,13 +99,16 @@ EOF
|
|||||||
127.0.0.1 localhost
|
127.0.0.1 localhost
|
||||||
::1 localhost
|
::1 localhost
|
||||||
127.0.1.1 $DEFAULT_HOSTNAME.localdomain $DEFAULT_HOSTNAME
|
127.0.1.1 $DEFAULT_HOSTNAME.localdomain $DEFAULT_HOSTNAME
|
||||||
|
EOF
|
||||||
|
cat << EOF > $rootfspath/etc/issue
|
||||||
|
$DEFAULT_HOSTNAME $KERNEL_VERSION (\l)
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ ! -z "$ROOTFS_OVERLAY" ] && cp -rv $ROOTFS_OVERLAY/* $rootfspath
|
[ ! -z "$ROOTFS_OVERLAY" ] && cp -rv $ROOTFS_OVERLAY/* $rootfspath
|
||||||
|
|
||||||
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/usr/share/udhcpc/default.script
|
||||||
chmod 644 $rootfspath/etc/{passwd,group,hostname,hosts,fstab,shells,issue} $rootfspath/etc/network/interfaces
|
chmod 644 $rootfspath/etc/{passwd,group,hostname,hosts,fstab,shells,issue} $rootfspath/etc/network/interfaces
|
||||||
|
|
||||||
check $? "Build rootfs"
|
check $? "Build rootfs"
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ sftp_server() {
|
|||||||
dropbear
|
dropbear
|
||||||
fi
|
fi
|
||||||
printf "$UGREEN** Building sftp-server\n$RESET"
|
printf "$UGREEN** Building sftp-server\n$RESET"
|
||||||
|
[ -d $build/sftp_server ] && return 0
|
||||||
mkdir -p $build/sftp_server # &>> $fulllogfile
|
mkdir -p $build/sftp_server # &>> $fulllogfile
|
||||||
cd $build/sftp_server
|
cd $build/sftp_server
|
||||||
tar -xvf $root/downloads/openssh-9.9p1.tar.gz # &>> $fulllogfile
|
tar -xvf $root/downloads/openssh-9.9p1.tar.gz # &>> $fulllogfile
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ uclibc() {
|
|||||||
pkgname=uClibc-ng
|
pkgname=uClibc-ng
|
||||||
pkgver=${UCLIBC_VERSION}
|
pkgver=${UCLIBC_VERSION}
|
||||||
printf "$UGREEN** Building ${pkgname}\n$RESET"
|
printf "$UGREEN** Building ${pkgname}\n$RESET"
|
||||||
|
[ -d $build/${pkgname} ] && return 0
|
||||||
mkdir -p $build/${pkgname} # &>> $fulllogfile
|
mkdir -p $build/${pkgname} # &>> $fulllogfile
|
||||||
cd $build/${pkgname}
|
cd $build/${pkgname}
|
||||||
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.xz # &>> $fulllogfile
|
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.xz # &>> $fulllogfile
|
||||||
|
|||||||
Reference in new issue
Block a user