updated variables and added defconfigs

This commit is contained in:
wt
2025-04-01 12:57:12 +07:00
parent 95e54ff71e
commit 63a7acdfd5
5 changed files with 112 additions and 28 deletions
+42
View File
@@ -0,0 +1,42 @@
#!/bin/bash
#------------ config ------------------
export PATH=$PATH:/opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/bin
export version=0.0.1 # script version
export root=$(pwd) # root build directory
# disk="sdz" # disk to write install image
export distro_name="Simple" # distro name
export distro_desc="Simple linux distro" # distro desctiption
export distro_codename="zero_zero_one" # distro codename
# hyperv_support="false" # hyperv support for kernel image
export out=$root/out # output directory
export build=$root/build # build directory
export sourcesfilename=sources.txt # sources file for downloading
export initramfsfile=$root/initramfs/initramfs.txt # file to created directories for initramfs
export initramfspath=$build/initramfs # initramfs build directory
export rootfsfile=$root/rootfs/rootfs.txt # file to created directories for rootfs
export rootfspath=$build/rootfs # rootfs build directory
export fulllogfile=$root/.log/fulllog.log # file for full build logs
export makeflags=-j$(nproc) # makeflags
export CROSS_COMPILE=arm-buildroot-linux-uclibcgnueabihf
export ARCH=arm
export sdroot=$out/sdroot
export ZLIB_ENABLE="true"
export DROPBEAR_ENABLE="true"
export IMAGE_USABLE_ENABLE="true"
export SFTP_SERVER_ENABLE="true"
export CURL_ENABLE="false"
export BASH_ENABLE="false"
export GIT_ENABLE="false"
export GITEA_ENABLE="false"
export LIBNL_ENABLE="true"
export IW_ENABLE="true"
export WIRELES_TOOLS_ENABLE="true"
export WPA_SUPPLICANT_ENABLE="true"
export HOSTAPD_ENABLE="true"
export OPENSSL_ENABLE="true"
export DNSMASQ_ENABLE="true"
export IPTABLES_ENABLE="true"
export KO8821AU_ENABLE="true"
#--------------------------------------
+42
View File
@@ -0,0 +1,42 @@
#!/bin/bash
#------------ config ------------------
export PATH=$PATH:/opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/bin
export version=0.0.1 # script version
export root=$(pwd) # root build directory
# disk="sdz" # disk to write install image
export distro_name="Simple" # distro name
export distro_desc="Simple linux distro" # distro desctiption
export distro_codename="zero_zero_one" # distro codename
# hyperv_support="false" # hyperv support for kernel image
export out=$root/out # output directory
export build=$root/build # build directory
export sourcesfilename=sources.txt # sources file for downloading
export initramfsfile=$root/initramfs/initramfs.txt # file to created directories for initramfs
export initramfspath=$build/initramfs # initramfs build directory
export rootfsfile=$root/rootfs/rootfs.txt # file to created directories for rootfs
export rootfspath=$build/rootfs # rootfs build directory
export fulllogfile=$root/.log/fulllog.log # file for full build logs
export makeflags=-j$(nproc) # makeflags
export CROSS_COMPILE=arm-buildroot-linux-uclibcgnueabihf
export ARCH=arm
export sdroot=$out/sdroot
export ZLIB_ENABLE="true"
export DROPBEAR_ENABLE="true"
export IMAGE_USABLE_ENABLE="true"
export SFTP_SERVER_ENABLE="true"
export CURL_ENABLE="false"
export BASH_ENABLE="false"
export GIT_ENABLE="false"
export GITEA_ENABLE="false"
export LIBNL_ENABLE="true"
export IW_ENABLE="true"
export WIRELES_TOOLS_ENABLE="true"
export WPA_SUPPLICANT_ENABLE="true"
export HOSTAPD_ENABLE="true"
export OPENSSL_ENABLE="true"
export DNSMASQ_ENABLE="true"
export IPTABLES_ENABLE="true"
export KO8821AU_ENABLE="true"
#--------------------------------------
+1 -1
View File
@@ -23,7 +23,7 @@ case $1 in
download_sources
fi
rootfs
if [ "$image_usable_enable" = "true" ]; then
if [ "$IMAGE_USABLE_ENABLE" = "true" ]; then
sdroot_usable
fi
sdroot
+15 -15
View File
@@ -24,19 +24,19 @@ export sdroot=$out/sdroot
export ZLIB_ENABLE="true"
export DROPBEAR_ENABLE="true"
export image_usable_enable="true"
export sftp_server_enable="true"
export curl_enable="false"
export bash_enable="false"
export git_enable="false"
export gitea_enable="false"
export libnl_enable="true"
export iw_enable="true"
export wireles_tools_enable="true"
export wpa_supplicant_enable="true"
export hostapd_enable="true"
export openssl_enable="true"
export dnsmasq_enable="true"
export iptables_enable="true"
export ko8821au_enable="true"
export IMAGE_USABLE_ENABLE="true"
export SFTP_SERVER_ENABLE="true"
export CURL_ENABLE="false"
export BASH_ENABLE="false"
export GIT_ENABLE="false"
export GITEA_ENABLE="false"
export LIBNL_ENABLE="true"
export IW_ENABLE="true"
export WIRELES_TOOLS_ENABLE="true"
export WPA_SUPPLICANT_ENABLE="true"
export HOSTAPD_ENABLE="true"
export OPENSSL_ENABLE="true"
export DNSMASQ_ENABLE="true"
export IPTABLES_ENABLE="true"
export KO8821AU_ENABLE="true"
#--------------------------------------
+12 -12
View File
@@ -53,19 +53,19 @@ rootfs() {
kernel
kernel_modules
[ "$ZLIB_ENABLE" = "true" ] && zlib
[ "$openssl_enable" = "true" ] && openssl
[ "$dnsmasq_enable" = "true" ] && dnsmasq
[ "$OPENSSL_ENABLE" = "true" ] && openssl
[ "$DNSMASQ_ENABLE" = "true" ] && dnsmasq
[ "$DROPBEAR_ENABLE" = "true" ] && dropbear
[ "$sftp_server_enable" = "true" ] && sftp_server
[ "$curl_enable" = "true" ] && curl
[ "$bash_enable" = "true" ] && bash
[ "$git_enable" = "true" ] && git_build
[ "$gitea_enable" = "true" ] && gitea
[ "$libnl_enable" = "true" ] && libnl
[ "$iw_enable" = "true" ] && iw
[ "$hostapd_enable" = "true" ] && hostapd
[ "$iptables_enable" = "true" ] && iptables
[ "$ko8821au_enable" = "true" ] && ko8821au
[ "$SFTP_SERVER_ENABLE" = "true" ] && sftp_server
[ "$CURL_ENABLE" = "true" ] && curl
[ "$BASH_ENABLE" = "true" ] && bash
[ "$GIT_ENABLE" = "true" ] && git_build
[ "$GITEA_ENABLE" = "true" ] && gitea
[ "$LIBNL_ENABLE" = "true" ] && libnl
[ "$IW_ENABLE" = "true" ] && iw
[ "$HOSTAPD_ENABLE" = "true" ] && hostapd
[ "$IPTABLES_ENABLE" = "true" ] && iptables
[ "$KO8821AU_ENABLE" = "true" ] && ko8821au
chmod 640 $rootfspath/etc/shadow $rootfspath/etc/inittab
chmod 755 $rootfspath/etc/init.d/* $rootfspath/usr/share/udhcpc/default.script $rootfspath/init