updated rootfs_overlay for orangepi_pc
This commit is contained in:
+2
-2
@@ -11,7 +11,7 @@
|
||||
#----------- Building busybox for rootfs ----------
|
||||
busybox_rootfs() {
|
||||
printf "$UGREEN** Building busybox for rootfs\n$RESET"
|
||||
rm -r $build/busybox # &>> $fulllogfile
|
||||
[ -d $build/busybox ] && return 0
|
||||
mkdir -p $build/busybox # &>> $fulllogfile
|
||||
cd $build/busybox
|
||||
tar -xjf $root/downloads/busybox-${BUSYBOX_VERSION}.tar.bz2 # &>> $fulllogfile
|
||||
@@ -30,7 +30,7 @@ busybox_rootfs() {
|
||||
#------------------ Building busybox for initramfs ----------------
|
||||
busybox_initramfs() {
|
||||
printf "$UGREEN** Building busybox for initramfs\n$RESET"
|
||||
rm -r $build/busybox # &>> $fulllogfile
|
||||
[ -d $build/busybox ] && return 0
|
||||
mkdir -p $build/busybox
|
||||
cd $build/busybox
|
||||
tar -xjf $root/downloads/busybox-${BUSYBOX_VERSION}.tar.bz2
|
||||
|
||||
@@ -10,6 +10,7 @@ dropbear() {
|
||||
zlib
|
||||
fi
|
||||
printf "$GREEN** Building and installing dropbear\n$RESET"
|
||||
[ -d $build/dropbear ] && return 0
|
||||
mkdir $build/dropbear
|
||||
cd $build/dropbear
|
||||
tar -xvf $root/downloads/DROPBEAR_2024.86.tar.gz
|
||||
|
||||
+18
-7
@@ -6,17 +6,18 @@
|
||||
|
||||
finit_init() {
|
||||
printf "$GREEN** Building and installing finit\n$RESET"
|
||||
[ -d $build/finit ] && return 0
|
||||
mkdir -pv $build/finit
|
||||
cd $build/finit
|
||||
if [ ! -d libite ]; then
|
||||
if [ ! -d libite ]; then
|
||||
git clone https://gitea.home.com:3000/TolaMironcenko/libite.git
|
||||
check $? "Download libite"
|
||||
fi
|
||||
if [ ! -d libuev ]; then
|
||||
if [ ! -d libuev ]; then
|
||||
git clone https://gitea.home.com:3000/TolaMironcenko/libuev.git
|
||||
check $? "Download libuev"
|
||||
fi
|
||||
if [ ! -d finit ]; then
|
||||
if [ ! -d finit ]; then
|
||||
git clone https://gitea.home.com:3000/TolaMironcenko/finit.git
|
||||
check $? "Download finit"
|
||||
fi
|
||||
@@ -24,7 +25,10 @@ finit_init() {
|
||||
cd libite
|
||||
./autogen.sh
|
||||
check $? "Autogen libite"
|
||||
./configure --host=$CROSS_COMPILE --prefix=/usr
|
||||
./configure \
|
||||
--host=$CROSS_COMPILE \
|
||||
--prefix=/usr \
|
||||
--with-sysroot=$rootfspath
|
||||
check $? "Configure libite"
|
||||
make $makeflags
|
||||
check $? "Build libite"
|
||||
@@ -34,7 +38,10 @@ finit_init() {
|
||||
cd ../libuev
|
||||
./autogen.sh
|
||||
check $? "Autogen libuev"
|
||||
./configure --host=$CROSS_COMPILE --prefix=/usr
|
||||
./configure \
|
||||
--host=$CROSS_COMPILE \
|
||||
--prefix=/usr \
|
||||
--with-sysroot=$rootfspath
|
||||
check $? "Configure libuev"
|
||||
make $makeflags
|
||||
check $? "Build libuev"
|
||||
@@ -44,7 +51,7 @@ finit_init() {
|
||||
cd ../finit
|
||||
./autogen.sh
|
||||
check $? "Autogen finit"
|
||||
./configure \
|
||||
PKG_CONFIG_PATH=$rootfspath/usr/lib/pkgconfig ./configure \
|
||||
--host=$CROSS_COMPILE \
|
||||
--prefix=/usr \
|
||||
--exec-prefix= \
|
||||
@@ -52,7 +59,11 @@ finit_init() {
|
||||
--localstatedir=/var \
|
||||
--with-watchdog \
|
||||
--with-keventd \
|
||||
--with-sulogin
|
||||
--with-sulogin \
|
||||
--with-sysroot=$rootfspath \
|
||||
--enable-resolvconf-plugin \
|
||||
--enable-modprobe-plugin \
|
||||
--enable-modules-load-plugin
|
||||
check $? "Configure finit"
|
||||
make $makeflags
|
||||
check $? "Build finit"
|
||||
|
||||
+2
-1
@@ -7,7 +7,7 @@
|
||||
#--------------- Building Linux Kernel ---------------------
|
||||
kernel() {
|
||||
printf "$UGREEN** Building Linux Kernel\n$RESET"
|
||||
rm -r $build/kernel # &>> $fulllogfile
|
||||
[ -d $build/kernel ] && return 0
|
||||
mkdir -p $build/kernel # &>> $fulllogfile
|
||||
cd $build/kernel
|
||||
printf "$UGREEN** Extracting Linux Kernel\n$RESET"
|
||||
@@ -65,6 +65,7 @@ kernel_with_rootfs() {
|
||||
|
||||
kernel_headers() {
|
||||
printf "$UGREEN** Building Linux Kernel headers\n$RESET"
|
||||
[ -d $build/kernel-headers ] && return 0
|
||||
[ ! -d $build/kernel-headers ] && mkdir $build/kernel-headers
|
||||
cd $build/kernel-headers
|
||||
tar -xf $root/downloads/linux-$KERNEL_VERSION.tar.xz
|
||||
|
||||
+12
-9
@@ -30,7 +30,7 @@
|
||||
#----------- Building rootfs ----------------------
|
||||
rootfs() {
|
||||
printf "$UGREEN** Building rootfs\n$RESET"
|
||||
rm -rv $rootfspath # &>> $fulllogfile
|
||||
# rm -rv $rootfspath # &>> $fulllogfile
|
||||
mkdir -pv $rootfspath # &>> $fulllogfile
|
||||
cd $rootfspath
|
||||
mkdir -pv $(cat $rootfsfile) # &>> $fulllogfile
|
||||
@@ -46,9 +46,9 @@ rootfs() {
|
||||
[ "$ARCH" = "arm64" ] && ln -sv lib lib64
|
||||
ln -sv bin libexec
|
||||
cd ..
|
||||
tar -xvf $root/downloads/20250110-1.tar.gz
|
||||
cp -rv initscripts/* .
|
||||
rm -rv initscripts
|
||||
# tar -xvf $root/downloads/20250110-1.tar.gz
|
||||
# cp -rv initscripts/* .
|
||||
# rm -rv initscripts
|
||||
ln -sv /proc/mounts etc/mtab # &>> $fulllogfile
|
||||
|
||||
cat <<EOF > $rootfspath/etc/os-release
|
||||
@@ -62,15 +62,15 @@ EOF
|
||||
cp -v $build/busybox/busybox-${BUSYBOX_VERSION}/busybox $rootfspath/usr/bin # &>> $fulllogfile
|
||||
cd $rootfspath/usr/bin
|
||||
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
|
||||
uclibc
|
||||
kernel
|
||||
kernel_modules
|
||||
if [ "$FINIT_INIT_ENABLE" = "y" ]; then
|
||||
finit_init
|
||||
cp -rv $root/rootfs/overlay/* $rootfspath
|
||||
rm $rootfspath/init
|
||||
# cp -rv $root/rootfs/overlay/* $rootfspath
|
||||
# rm $rootfspath/init
|
||||
ln -sv usr/bin/finit $rootfspath/init
|
||||
fi
|
||||
[ "$ZLIB_ENABLE" = "y" ] && zlib
|
||||
@@ -99,13 +99,16 @@ EOF
|
||||
127.0.0.1 localhost
|
||||
::1 localhost
|
||||
127.0.1.1 $DEFAULT_HOSTNAME.localdomain $DEFAULT_HOSTNAME
|
||||
EOF
|
||||
cat << EOF > $rootfspath/etc/issue
|
||||
$DEFAULT_HOSTNAME $KERNEL_VERSION (\l)
|
||||
EOF
|
||||
fi
|
||||
|
||||
[ ! -z "$ROOTFS_OVERLAY" ] && cp -rv $ROOTFS_OVERLAY/* $rootfspath
|
||||
|
||||
chmod 640 $rootfspath/etc/shadow $rootfspath/etc/inittab
|
||||
chmod 755 $rootfspath/etc/init.d/* $rootfspath/usr/share/udhcpc/default.script $rootfspath/init
|
||||
chmod 640 $rootfspath/etc/shadow #$rootfspath/etc/inittab
|
||||
chmod 755 $rootfspath/usr/share/udhcpc/default.script
|
||||
chmod 644 $rootfspath/etc/{passwd,group,hostname,hosts,fstab,shells,issue} $rootfspath/etc/network/interfaces
|
||||
|
||||
check $? "Build rootfs"
|
||||
|
||||
@@ -13,6 +13,7 @@ sftp_server() {
|
||||
dropbear
|
||||
fi
|
||||
printf "$UGREEN** Building sftp-server\n$RESET"
|
||||
[ -d $build/sftp_server ] && return 0
|
||||
mkdir -p $build/sftp_server # &>> $fulllogfile
|
||||
cd $build/sftp_server
|
||||
tar -xvf $root/downloads/openssh-9.9p1.tar.gz # &>> $fulllogfile
|
||||
|
||||
@@ -9,6 +9,7 @@ uclibc() {
|
||||
pkgname=uClibc-ng
|
||||
pkgver=${UCLIBC_VERSION}
|
||||
printf "$UGREEN** Building ${pkgname}\n$RESET"
|
||||
[ -d $build/${pkgname} ] && return 0
|
||||
mkdir -p $build/${pkgname} # &>> $fulllogfile
|
||||
cd $build/${pkgname}
|
||||
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.xz # &>> $fulllogfile
|
||||
|
||||
Reference in New Issue
Block a user