mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
VENDOR, rock-pi-n10, RM_LIST for armbian-config/zsh, Static MAC for networkd (#2789)
* VENDOR, rock-pi-n10, RM_LIST for armbian-config/zsh VENDOR parameter in configuration zsh is the best of course... Static MAC for networkd ROCK Pi N10 (Radxa) - Initial support, knwon bugs: - Problem with poweroff (kernel panic). - DeviceTree is not fully verified, I suspect missing and unnecessary entries. - No support for NPU - u-boot without NVME support - I have doubts if I chose the right preboot loader for RK3399Pro, NPU and installed DDR memory. * New RK3399Pro boot preloaders. * rootfs checksum, DEBOOTSTRAP_LIST fix, output.log fix Repaired checksum for rootfs Added use PACKAGE_LIST_RM to purge DEBOOTSTRAP_LIST Better logging to output.log Fix for new host distribution detection (ie Debian Bullseye). ubootdebs as new cleaning option
This commit is contained in:
committed by
GitHub
parent
1688bf83b0
commit
486a821a55
8
config/boards/rockpi-n10.csc
Normal file
8
config/boards/rockpi-n10.csc
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Rockchip RK3399Pro hexa core NPU 4-8GB SoC GBe eMMC USB3 PCIe
|
||||||
|
BOARD_NAME="Rockpi N10"
|
||||||
|
BOARDFAMILY="rockchip64"
|
||||||
|
BOOTCONFIG="rock-pi-n10-rk3399pro_defconfig"
|
||||||
|
KERNEL_TARGET="current,edge"
|
||||||
|
FULL_DESKTOP="yes"
|
||||||
|
BOOT_LOGO="desktop"
|
||||||
|
BOOT_FDT_FILE="rockchip/rk3399pro-rock-pi-n10.dtb"
|
||||||
@@ -66,6 +66,15 @@ elif [[ $BOARD == station-p1 ]]; then
|
|||||||
MINILOADER_BLOB='rk33/rk3399_miniloader_v1.19.bin'
|
MINILOADER_BLOB='rk33/rk3399_miniloader_v1.19.bin'
|
||||||
BL31_BLOB='rk33/rk3399_bl31_v1.30.elf'
|
BL31_BLOB='rk33/rk3399_bl31_v1.30.elf'
|
||||||
|
|
||||||
|
elif [[ $BOARD == rockpi-n10* ]]; then
|
||||||
|
|
||||||
|
BOOT_USE_BLOBS=yes
|
||||||
|
BOOT_SUPPORT_SPI=yes
|
||||||
|
BOOT_SOC=rk3399pro
|
||||||
|
DDR_BLOB='rk33/rk3399pro_npu_ddr_933MHz_v1.02.bin'
|
||||||
|
MINILOADER_BLOB='rk33/rk3399pro_miniloader_v1.26.bin'
|
||||||
|
BL31_BLOB='rk33/rk3399pro_bl31_v1.35.elf'
|
||||||
|
|
||||||
elif [[ $BOARD == rockpro64 ]]; then
|
elif [[ $BOARD == rockpro64 ]]; then
|
||||||
|
|
||||||
BOOT_USE_TPL_SPL_BLOB=yes
|
BOOT_USE_TPL_SPL_BLOB=yes
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if [[ -z $VENDOR ]]; then VENDOR="Armbian"; fi
|
||||||
if [[ $BETA == "yes" ]]; then STABILITY="beta"; else STABILITY="stable"; fi
|
if [[ $BETA == "yes" ]]; then STABILITY="beta"; else STABILITY="stable"; fi
|
||||||
if [[ $BETA == "yes" ]]; then upload_subdir=nightly; else upload_subdir="archive"; fi
|
if [[ $BETA == "yes" ]]; then upload_subdir=nightly; else upload_subdir="archive"; fi
|
||||||
if [[ $MAKE_ALL_BETA == "yes" ]]; then STABILITY="stable"; fi
|
if [[ $MAKE_ALL_BETA == "yes" ]]; then STABILITY="stable"; fi
|
||||||
@@ -64,7 +64,8 @@ unset LINUXFAMILY LINUXCONFIG KERNELDIR KERNELSOURCE KERNELBRANCH BOOTDIR BOOTSO
|
|||||||
PACKAGE_LIST_BOARD_REMOVE PACKAGE_LIST_FAMILY_REMOVE PACKAGE_LIST_DESKTOP_BOARD_REMOVE PACKAGE_LIST_DESKTOP_FAMILY_REMOVE BOOTCONFIG_EDGE \
|
PACKAGE_LIST_BOARD_REMOVE PACKAGE_LIST_FAMILY_REMOVE PACKAGE_LIST_DESKTOP_BOARD_REMOVE PACKAGE_LIST_DESKTOP_FAMILY_REMOVE BOOTCONFIG_EDGE \
|
||||||
DESKTOP_ENVIRONMENT DESKTOP_ENVIRONMENT_CONFIG_NAME DESKTOP_APPGROUPS_SELECTED DESKTOP_APT_FLAGS_SELECTED \
|
DESKTOP_ENVIRONMENT DESKTOP_ENVIRONMENT_CONFIG_NAME DESKTOP_APPGROUPS_SELECTED DESKTOP_APT_FLAGS_SELECTED \
|
||||||
DESKTOP_ENVIRONMENT_DIRPATH DESKTOP_ENVIRONMENT_PACKAGE_LIST_DIRPATH DESKTOP_ENVIRONMENT_DIRPATH DESKTOP_ENVIRONMENT_PACKAGE_LIST_DIRPATH \
|
DESKTOP_ENVIRONMENT_DIRPATH DESKTOP_ENVIRONMENT_PACKAGE_LIST_DIRPATH DESKTOP_ENVIRONMENT_DIRPATH DESKTOP_ENVIRONMENT_PACKAGE_LIST_DIRPATH \
|
||||||
DESKTOP_CONFIG_PREFIX DESKTOP_CONFIGS_DIR DESKTOP_APPGROUPS_DIR DEBIAN_RECOMMENDS USE_OVERLAYFS aggregated_content DEBOOTSTRAP_COMPONENTS
|
DESKTOP_CONFIG_PREFIX DESKTOP_CONFIGS_DIR DESKTOP_APPGROUPS_DIR DEBIAN_RECOMMENDS USE_OVERLAYFS aggregated_content DEBOOTSTRAP_COMPONENTS \
|
||||||
|
DEBOOTSTRAP_OPTION MAINTAINER MAINTAINERMAIL
|
||||||
}
|
}
|
||||||
|
|
||||||
pack_upload ()
|
pack_upload ()
|
||||||
@@ -73,7 +74,7 @@ pack_upload ()
|
|||||||
# pack and upload to server or just pack
|
# pack and upload to server or just pack
|
||||||
|
|
||||||
display_alert "Signing" "Please wait!" "info"
|
display_alert "Signing" "Please wait!" "info"
|
||||||
local version="Armbian_${REVISION}_${BOARD^}_${RELEASE}_${BRANCH}_${VER/-$LINUXFAMILY/}${DESKTOP_ENVIRONMENT:+_$DESKTOP_ENVIRONMENT}"
|
local version="${VENDOR}_${REVISION}_${BOARD^}_${RELEASE}_${BRANCH}_${VER/-$LINUXFAMILY/}${DESKTOP_ENVIRONMENT:+_$DESKTOP_ENVIRONMENT}"
|
||||||
compression_type=""
|
compression_type=""
|
||||||
|
|
||||||
[[ $BUILD_DESKTOP == yes ]] && version=${version}_desktop
|
[[ $BUILD_DESKTOP == yes ]] && version=${version}_desktop
|
||||||
@@ -141,12 +142,12 @@ build_main ()
|
|||||||
source "$USERPATCHES_PATH"/lib.config
|
source "$USERPATCHES_PATH"/lib.config
|
||||||
# build images which we do pack or kernel
|
# build images which we do pack or kernel
|
||||||
local upload_image
|
local upload_image
|
||||||
upload_image="Armbian_$(cat "${SRC}"/VERSION)_${BOARD^}_${RELEASE}_${BRANCH}_*${VER/-$LINUXFAMILY/}"
|
upload_image="${VENDOR}_$(cat "${SRC}"/VERSION)_${BOARD^}_${RELEASE}_${BRANCH}_*${VER/-$LINUXFAMILY/}"
|
||||||
|
|
||||||
[[ $BUILD_DESKTOP == yes ]] && upload_image=${upload_image}_desktop
|
[[ $BUILD_DESKTOP == yes ]] && upload_image=${upload_image}_desktop
|
||||||
[[ $BUILD_MINIMAL == yes ]] && upload_image=${upload_image}_minimal
|
[[ $BUILD_MINIMAL == yes ]] && upload_image=${upload_image}_minimal
|
||||||
|
|
||||||
touch "/run/armbian/Armbian_${BOARD^}_${BRANCH}_${RELEASE}_${DESKTOP_ENVIRONMENT}_${BUILD_DESKTOP}_${BUILD_MINIMAL}.pid";
|
touch "/run/armbian/${VENDOR}_${BOARD^}_${BRANCH}_${RELEASE}_${DESKTOP_ENVIRONMENT}_${BUILD_DESKTOP}_${BUILD_MINIMAL}.pid";
|
||||||
|
|
||||||
if [[ $KERNEL_ONLY != yes ]]; then
|
if [[ $KERNEL_ONLY != yes ]]; then
|
||||||
#if ssh ${SEND_TO_SERVER} stat ${SEND_TO_LOCATION}${BOARD}/${upload_subdir}/${upload_image}* \> /dev/null 2\>\&1; then
|
#if ssh ${SEND_TO_SERVER} stat ${SEND_TO_LOCATION}${BOARD}/${upload_subdir}/${upload_image}* \> /dev/null 2\>\&1; then
|
||||||
@@ -164,7 +165,7 @@ build_main ()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cd "${SRC}"
|
cd "${SRC}"
|
||||||
rm "/run/armbian/Armbian_${BOARD^}_${BRANCH}_${RELEASE}_${DESKTOP_ENVIRONMENT}_${BUILD_DESKTOP}_${BUILD_MINIMAL}.pid"
|
rm "/run/armbian/${VENDOR}_${BOARD^}_${BRANCH}_${RELEASE}_${DESKTOP_ENVIRONMENT}_${BUILD_DESKTOP}_${BUILD_MINIMAL}.pid"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -239,10 +239,10 @@ chroot_build_packages()
|
|||||||
# set upstream version
|
# set upstream version
|
||||||
[[ -n "${package_upstream_version}" ]] && debchange --preserve --newversion "${package_upstream_version}" "Import from upstream"
|
[[ -n "${package_upstream_version}" ]] && debchange --preserve --newversion "${package_upstream_version}" "Import from upstream"
|
||||||
# set local version
|
# set local version
|
||||||
# debchange -l~armbian${REVISION}-${builddate}+ "New Armbian release"
|
# debchange -l~armbian${REVISION}-${builddate}+ "Custom $VENDOR release"
|
||||||
debchange -l~armbian"${REVISION}"+ "New Armbian release"
|
debchange -l~armbian"${REVISION}"+ "Custom $VENDOR release"
|
||||||
display_alert "Building package"
|
display_alert "Building package"
|
||||||
dpkg-buildpackage -b -uc -us -j2
|
dpkg-buildpackage -b -us -j2
|
||||||
if [[ \$? -eq 0 ]]; then
|
if [[ \$? -eq 0 ]]; then
|
||||||
cd /root/build
|
cd /root/build
|
||||||
# install in chroot if other libraries depend on them
|
# install in chroot if other libraries depend on them
|
||||||
|
|||||||
@@ -12,13 +12,19 @@
|
|||||||
# common options
|
# common options
|
||||||
# daily beta build contains date in subrevision
|
# daily beta build contains date in subrevision
|
||||||
#if [[ $BETA == yes && -z $SUBREVISION ]]; then SUBREVISION="."$(date --date="tomorrow" +"%j"); fi
|
#if [[ $BETA == yes && -z $SUBREVISION ]]; then SUBREVISION="."$(date --date="tomorrow" +"%j"); fi
|
||||||
REVISION=$(cat "${SRC}"/VERSION)"$SUBREVISION" # all boards have same revision
|
if [ -f $USERPATCHES_PATH/VERSION ]; then
|
||||||
|
REVISION=$(cat "${USERPATCHES_PATH}"/VERSION)"$SUBREVISION" # all boards have same revision
|
||||||
|
else
|
||||||
|
REVISION=$(cat "${SRC}"/VERSION)"$SUBREVISION" # all boards have same revision
|
||||||
|
fi
|
||||||
|
[[ -z $VENDOR ]] && VENDOR="Armbian"
|
||||||
[[ -z $ROOTPWD ]] && ROOTPWD="1234" # Must be changed @first login
|
[[ -z $ROOTPWD ]] && ROOTPWD="1234" # Must be changed @first login
|
||||||
[[ -z $MAINTAINER ]] && MAINTAINER="Igor Pecovnik" # deb signature
|
[[ -z $MAINTAINER ]] && MAINTAINER="Igor Pecovnik" # deb signature
|
||||||
[[ -z $MAINTAINERMAIL ]] && MAINTAINERMAIL="igor.pecovnik@****l.com" # deb signature
|
[[ -z $MAINTAINERMAIL ]] && MAINTAINERMAIL="igor.pecovnik@****l.com" # deb signature
|
||||||
TZDATA=$(cat /etc/timezone) # Timezone for target is taken from host or defined here.
|
TZDATA=$(cat /etc/timezone) # Timezone for target is taken from host or defined here.
|
||||||
USEALLCORES=yes # Use all CPU cores for compiling
|
USEALLCORES=yes # Use all CPU cores for compiling
|
||||||
HOSTRELEASE=$(cat /etc/os-release | grep VERSION_CODENAME | cut -d"=" -f2)
|
HOSTRELEASE=$(cat /etc/os-release | grep VERSION_CODENAME | cut -d"=" -f2)
|
||||||
|
[[ -z $HOSTRELEASE ]] && HOSTRELEASE=$(cut -d'/' -f1 /etc/debian_version)
|
||||||
[[ -z $EXIT_PATCHING_ERROR ]] && EXIT_PATCHING_ERROR="" # exit patching if failed
|
[[ -z $EXIT_PATCHING_ERROR ]] && EXIT_PATCHING_ERROR="" # exit patching if failed
|
||||||
[[ -z $HOST ]] && HOST="$BOARD" # set hostname to the board
|
[[ -z $HOST ]] && HOST="$BOARD" # set hostname to the board
|
||||||
cd "${SRC}" || exit
|
cd "${SRC}" || exit
|
||||||
@@ -486,10 +492,11 @@ DEBOOTSTRAP_COMPONENTS="${DEBOOTSTRAP_COMPONENTS// /,}"
|
|||||||
PACKAGE_LIST="$(one_line aggregate_all_cli "packages" " ")"
|
PACKAGE_LIST="$(one_line aggregate_all_cli "packages" " ")"
|
||||||
PACKAGE_LIST_ADDITIONAL="$(one_line aggregate_all_cli "packages.additional" " ")"
|
PACKAGE_LIST_ADDITIONAL="$(one_line aggregate_all_cli "packages.additional" " ")"
|
||||||
|
|
||||||
echo "DEBOOTSTRAP LIST : ${DEBOOTSTRAP_LIST}" >> "${DEST}"/debug/output.log
|
echo "DEBOOTSTRAP_LIST : ${DEBOOTSTRAP_LIST}" >> "${DEST}"/debug/output.log
|
||||||
echo "DEBOOTSTRAP_COMPONENTS : ${DEBOOTSTRAP_COMPONENTS}" >> "${DEST}"/debug/output.log
|
echo "DEBOOTSTRAP_COMPONENTS : ${DEBOOTSTRAP_COMPONENTS}" >> "${DEST}"/debug/output.log
|
||||||
echo "CLI PACKAGE_LIST : ${PACKAGE_LIST}" >> "${DEST}"/debug/output.log
|
echo "PACKAGE_LIST : ${PACKAGE_LIST}" >> "${DEST}"/debug/output.log
|
||||||
echo "CLI PACKAGE_LIST_ADDITIONAL : ${PACKAGE_LIST_ADDITIONAL}" >> "${DEST}"/debug/output.log
|
echo "PACKAGE_LIST_ADDITIONAL : ${PACKAGE_LIST_ADDITIONAL}" >> "${DEST}"/debug/output.log
|
||||||
|
echo "PACKAGE_LIST_UNINSTALL : ${PACKAGE_LIST_UNINSTALL}" >> "${DEST}"/debug/output.log
|
||||||
|
|
||||||
# Dependent desktop packages
|
# Dependent desktop packages
|
||||||
# Myy : Sources packages from file here
|
# Myy : Sources packages from file here
|
||||||
@@ -500,14 +507,6 @@ if [[ $BUILD_DESKTOP == "yes" ]]; then
|
|||||||
echo "Groups selected ${DESKTOP_APPGROUPS_SELECTED} -> PACKAGES : ${PACKAGE_LIST_DESKTOP}" >> "${DEST}"/debug/output.log
|
echo "Groups selected ${DESKTOP_APPGROUPS_SELECTED} -> PACKAGES : ${PACKAGE_LIST_DESKTOP}" >> "${DEST}"/debug/output.log
|
||||||
fi
|
fi
|
||||||
|
|
||||||
display_alert "Deboostrap" >> "${DEST}"/debug/output.log
|
|
||||||
display_alert "Components ${DEBOOTSTRAP_COMPONENTS}" >> "${DEST}"/debug/output.log
|
|
||||||
display_alert "Packages ${DEBOOTSTRAP_LIST}" >> "${DEST}"/debug/output.log
|
|
||||||
display_alert "----" >> "${DEST}"/debug/output.log
|
|
||||||
display_alert "CLI packages" >> "${DEST}"/debug/output.log
|
|
||||||
display_alert "Standard : ${PACKAGE_LIST}" >> "${DEST}"/debug/output.log
|
|
||||||
display_alert "Additional : ${PACKAGE_LIST_ADDITIONAL}" >> "${DEST}"/debug/output.log
|
|
||||||
|
|
||||||
DEBIAN_MIRROR='deb.debian.org/debian'
|
DEBIAN_MIRROR='deb.debian.org/debian'
|
||||||
DEBIAN_SECURTY='security.debian.org/'
|
DEBIAN_SECURTY='security.debian.org/'
|
||||||
UBUNTU_MIRROR='ports.ubuntu.com/'
|
UBUNTU_MIRROR='ports.ubuntu.com/'
|
||||||
@@ -574,19 +573,16 @@ aggregate_all_desktop "packages.uninstall" " "
|
|||||||
PACKAGE_LIST_UNINSTALL="$(cleanup_list aggregated_content)"
|
PACKAGE_LIST_UNINSTALL="$(cleanup_list aggregated_content)"
|
||||||
unset aggregated_content
|
unset aggregated_content
|
||||||
|
|
||||||
display_alert "PACKAGE_MAIN_LIST : ${PACKAGE_MAIN_LIST}" >> "${DEST}"/debug/output.log
|
|
||||||
display_alert "PACKAGE_LIST : ${PACKAGE_LIST}" >> "${DEST}"/debug/output.log
|
|
||||||
display_alert "PACKAGE_LIST_RM : ${PACKAGE_LIST_RM}" >> "${DEST}"/debug/output.log
|
|
||||||
display_alert "PACKAGE_LIST_UNINSTALL : ${PACKAGE_LIST_UNINSTALL}" >> "${DEST}"/debug/output.log
|
|
||||||
|
|
||||||
if [[ -n $PACKAGE_LIST_RM ]]; then
|
if [[ -n $PACKAGE_LIST_RM ]]; then
|
||||||
display_alert "Remove filter : $(tr ' ' '|' <<< ${PACKAGE_LIST_RM})"
|
display_alert "Package remove list ${PACKAGE_LIST_RM}"
|
||||||
# Turns out that \b can be tricked by dashes.
|
# Turns out that \b can be tricked by dashes.
|
||||||
# So if you remove mesa-utils but still want to install "mesa-utils-extra"
|
# So if you remove mesa-utils but still want to install "mesa-utils-extra"
|
||||||
# a "\b(mesa-utils)\b" filter will convert "mesa-utils-extra" to "-extra".
|
# a "\b(mesa-utils)\b" filter will convert "mesa-utils-extra" to "-extra".
|
||||||
# \W is not tricked by this but consumes the surrounding spaces, so we
|
# \W is not tricked by this but consumes the surrounding spaces, so we
|
||||||
# replace the occurence by one space, to avoid sticking the next word to
|
# replace the occurence by one space, to avoid sticking the next word to
|
||||||
# the previous one after consuming the spaces.
|
# the previous one after consuming the spaces.
|
||||||
|
DEBOOTSTRAP_LIST=$(sed -r "s/\W($(tr ' ' '|' <<< ${PACKAGE_LIST_RM}))\W/ /g" <<< " ${DEBOOTSTRAP_LIST} ")
|
||||||
PACKAGE_LIST=$(sed -r "s/\W($(tr ' ' '|' <<< ${PACKAGE_LIST_RM}))\W/ /g" <<< " ${PACKAGE_LIST} ")
|
PACKAGE_LIST=$(sed -r "s/\W($(tr ' ' '|' <<< ${PACKAGE_LIST_RM}))\W/ /g" <<< " ${PACKAGE_LIST} ")
|
||||||
PACKAGE_MAIN_LIST=$(sed -r "s/\W($(tr ' ' '|' <<< ${PACKAGE_LIST_RM}))\W/ /g" <<< " ${PACKAGE_MAIN_LIST} ")
|
PACKAGE_MAIN_LIST=$(sed -r "s/\W($(tr ' ' '|' <<< ${PACKAGE_LIST_RM}))\W/ /g" <<< " ${PACKAGE_MAIN_LIST} ")
|
||||||
if [[ $BUILD_DESKTOP == "yes" ]]; then
|
if [[ $BUILD_DESKTOP == "yes" ]]; then
|
||||||
@@ -598,13 +594,16 @@ if [[ -n $PACKAGE_LIST_RM ]]; then
|
|||||||
|
|
||||||
# Removing double spaces... AGAIN, since we might have used a sed on them
|
# Removing double spaces... AGAIN, since we might have used a sed on them
|
||||||
# Do not quote the variables. This would defeat the trick.
|
# Do not quote the variables. This would defeat the trick.
|
||||||
|
DEBOOTSTRAP_LIST="$(echo ${DEBOOTSTRAP_LIST})"
|
||||||
PACKAGE_LIST="$(echo ${PACKAGE_LIST})"
|
PACKAGE_LIST="$(echo ${PACKAGE_LIST})"
|
||||||
PACKAGE_MAIN_LIST="$(echo ${PACKAGE_MAIN_LIST})"
|
PACKAGE_MAIN_LIST="$(echo ${PACKAGE_MAIN_LIST})"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
display_alert "After removal of packages.remove packages" >> "${DEST}"/debug/output.log
|
display_alert "Deboostrap components ${DEBOOTSTRAP_COMPONENTS}"
|
||||||
display_alert "PACKAGE_MAIN_LIST : \"${PACKAGE_MAIN_LIST}\"" >> "${DEST}"/debug/output.log
|
display_alert "Deboostrap packages ${DEBOOTSTRAP_LIST}"
|
||||||
display_alert "PACKAGE_LIST : \"${PACKAGE_LIST}\"" >> "${DEST}"/debug/output.log
|
display_alert "Packages ${PACKAGE_LIST}"
|
||||||
|
|
||||||
|
echo "PACKAGE_MAIN_LIST : ${PACKAGE_MAIN_LIST}" >> "${DEST}"/debug/output.log
|
||||||
|
|
||||||
# Give the option to configure DNS server used in the chroot during the build process
|
# Give the option to configure DNS server used in the chroot during the build process
|
||||||
[[ -z $NAMESERVER ]] && NAMESERVER="1.0.0.1" # default is cloudflare alternate
|
[[ -z $NAMESERVER ]] && NAMESERVER="1.0.0.1" # default is cloudflare alternate
|
||||||
@@ -652,12 +651,9 @@ Repository: $BOOTSOURCE
|
|||||||
Branch: $BOOTBRANCH
|
Branch: $BOOTBRANCH
|
||||||
Config file: $BOOTCONFIG
|
Config file: $BOOTCONFIG
|
||||||
|
|
||||||
Partitioning configuration:
|
Partitioning configuration: $IMAGE_PARTITION_TABLE offset: $OFFSET
|
||||||
Root partition type: $ROOTFS_TYPE
|
Boot partition type: ${BOOTFS_TYPE:-(none)} ${BOOTSIZE:+"(${BOOTSIZE} MB)"}
|
||||||
Boot partition type: ${BOOTFS_TYPE:-(none)}
|
Root partition type: $ROOTFS_TYPE ${FIXED_IMAGE_SIZE:+"(${FIXED_IMAGE_SIZE} MB)"}
|
||||||
User provided boot partition size: ${BOOTSIZE:-0}
|
|
||||||
Offset: $OFFSET
|
|
||||||
|
|
||||||
CPU configuration:
|
CPU configuration: $CPUMIN - $CPUMAX with $GOVERNOR
|
||||||
$CPUMIN - $CPUMAX with $GOVERNOR
|
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -108,7 +108,6 @@ create_rootfs_cache()
|
|||||||
# seek last cache, proceed to previous otherwise build it
|
# seek last cache, proceed to previous otherwise build it
|
||||||
for ((n=0;n<${cycles};n++)); do
|
for ((n=0;n<${cycles};n++)); do
|
||||||
|
|
||||||
local packages_hash=$(get_package_list_hash "$(($ROOTFSCACHE_VERSION - $n))")
|
|
||||||
[[ -z ${FORCED_MONTH_OFFSET} ]] && FORCED_MONTH_OFFSET=${n}
|
[[ -z ${FORCED_MONTH_OFFSET} ]] && FORCED_MONTH_OFFSET=${n}
|
||||||
local packages_hash=$(get_package_list_hash "$(date -d "$D +${FORCED_MONTH_OFFSET} month" +"%Y-%m-module$ROOTFSCACHE_VERSION" | sed 's/^0*//')")
|
local packages_hash=$(get_package_list_hash "$(date -d "$D +${FORCED_MONTH_OFFSET} month" +"%Y-%m-module$ROOTFSCACHE_VERSION" | sed 's/^0*//')")
|
||||||
local cache_type="cli"
|
local cache_type="cli"
|
||||||
@@ -682,7 +681,7 @@ update_initramfs()
|
|||||||
create_image()
|
create_image()
|
||||||
{
|
{
|
||||||
# stage: create file name
|
# stage: create file name
|
||||||
local version="Armbian_${REVISION}_${BOARD^}_${RELEASE}_${BRANCH}_${VER/-$LINUXFAMILY/}${DESKTOP_ENVIRONMENT:+_$DESKTOP_ENVIRONMENT}"
|
local version="${VENDOR}_${REVISION}_${BOARD^}_${RELEASE}_${BRANCH}_${VER/-$LINUXFAMILY/}${DESKTOP_ENVIRONMENT:+_$DESKTOP_ENVIRONMENT}"
|
||||||
[[ $BUILD_DESKTOP == yes ]] && version=${version}_desktop
|
[[ $BUILD_DESKTOP == yes ]] && version=${version}_desktop
|
||||||
[[ $BUILD_MINIMAL == yes ]] && version=${version}_minimal
|
[[ $BUILD_MINIMAL == yes ]] && version=${version}_minimal
|
||||||
[[ $ROOTFS_TYPE == nfs ]] && version=${version}_nfsboot
|
[[ $ROOTFS_TYPE == nfs ]] && version=${version}_nfsboot
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ install_common()
|
|||||||
# /usr/share/initramfs-tools/hooks/dropbear will automatically add 'id_ecdsa.pub' to authorized_keys file
|
# /usr/share/initramfs-tools/hooks/dropbear will automatically add 'id_ecdsa.pub' to authorized_keys file
|
||||||
# during mkinitramfs of update-initramfs
|
# during mkinitramfs of update-initramfs
|
||||||
#cat "${SDCARD}"/etc/dropbear-initramfs/id_ecdsa.pub > "${SDCARD}"/etc/dropbear-initramfs/authorized_keys
|
#cat "${SDCARD}"/etc/dropbear-initramfs/id_ecdsa.pub > "${SDCARD}"/etc/dropbear-initramfs/authorized_keys
|
||||||
CRYPTROOT_SSH_UNLOCK_KEY_NAME="Armbian_${REVISION}_${BOARD^}_${RELEASE}_${BRANCH}_${VER/-$LINUXFAMILY/}_${DESKTOP_ENVIRONMENT}".key
|
CRYPTROOT_SSH_UNLOCK_KEY_NAME="${VENDOR}_${REVISION}_${BOARD^}_${RELEASE}_${BRANCH}_${VER/-$LINUXFAMILY/}_${DESKTOP_ENVIRONMENT}".key
|
||||||
# copy dropbear ssh key to image output dir for convenience
|
# copy dropbear ssh key to image output dir for convenience
|
||||||
cp "${SDCARD}"/etc/dropbear-initramfs/id_ecdsa "${DEST}/images/${CRYPTROOT_SSH_UNLOCK_KEY_NAME}"
|
cp "${SDCARD}"/etc/dropbear-initramfs/id_ecdsa "${DEST}/images/${CRYPTROOT_SSH_UNLOCK_KEY_NAME}"
|
||||||
display_alert "SSH private key for dropbear (initramfs) has been copied to:" \
|
display_alert "SSH private key for dropbear (initramfs) has been copied to:" \
|
||||||
@@ -142,9 +142,9 @@ install_common()
|
|||||||
#chroot "${SDCARD}" /bin/bash -c "chage -d 0 root"
|
#chroot "${SDCARD}" /bin/bash -c "chage -d 0 root"
|
||||||
|
|
||||||
# change console welcome text
|
# change console welcome text
|
||||||
echo -e "Armbian ${REVISION} ${RELEASE^} \\l \n" > "${SDCARD}"/etc/issue
|
echo -e "${VENDOR} ${REVISION} ${RELEASE^} \\l \n" > "${SDCARD}"/etc/issue
|
||||||
echo "Armbian ${REVISION} ${RELEASE^}" > "${SDCARD}"/etc/issue.net
|
echo "${VENDOR} ${REVISION} ${RELEASE^}" > "${SDCARD}"/etc/issue.net
|
||||||
sed -i "s/^PRETTY_NAME=.*/PRETTY_NAME=\"Armbian $REVISION "${RELEASE^}"\"/" "${SDCARD}"/etc/os-release
|
sed -i "s/^PRETTY_NAME=.*/PRETTY_NAME=\"${VENDOR} $REVISION "${RELEASE^}"\"/" "${SDCARD}"/etc/os-release
|
||||||
|
|
||||||
# enable few bash aliases enabled in Ubuntu by default to make it even
|
# enable few bash aliases enabled in Ubuntu by default to make it even
|
||||||
sed "s/#alias ll='ls -l'/alias ll='ls -l'/" -i "${SDCARD}"/etc/skel/.bashrc
|
sed "s/#alias ll='ls -l'/alias ll='ls -l'/" -i "${SDCARD}"/etc/skel/.bashrc
|
||||||
@@ -170,7 +170,7 @@ install_common()
|
|||||||
|
|
||||||
mkdir -p $SDCARD/boot/extlinux
|
mkdir -p $SDCARD/boot/extlinux
|
||||||
cat <<-EOF > "$SDCARD/boot/extlinux/extlinux.conf"
|
cat <<-EOF > "$SDCARD/boot/extlinux/extlinux.conf"
|
||||||
LABEL Armbian
|
LABEL ${VENDOR}
|
||||||
LINUX /boot/$NAME_KERNEL
|
LINUX /boot/$NAME_KERNEL
|
||||||
INITRD /boot/$NAME_INITRD
|
INITRD /boot/$NAME_INITRD
|
||||||
EOF
|
EOF
|
||||||
@@ -322,24 +322,28 @@ install_common()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# install armbian-config
|
# install armbian-config
|
||||||
if [[ "${REPOSITORY_INSTALL}" != *armbian-config* ]]; then
|
if [[ "${PACKAGE_LIST_RM}" != *armbian-config* ]]; then
|
||||||
if [[ $BUILD_MINIMAL != yes ]]; then
|
if [[ "${REPOSITORY_INSTALL}" != *armbian-config* ]]; then
|
||||||
install_deb_chroot "${DEB_STORAGE}/armbian-config_${REVISION}_all.deb"
|
if [[ $BUILD_MINIMAL != yes ]]; then
|
||||||
fi
|
install_deb_chroot "${DEB_STORAGE}/armbian-config_${REVISION}_all.deb"
|
||||||
else
|
fi
|
||||||
if [[ $BUILD_MINIMAL != yes ]]; then
|
else
|
||||||
install_deb_chroot "armbian-config" "remote"
|
if [[ $BUILD_MINIMAL != yes ]]; then
|
||||||
|
install_deb_chroot "armbian-config" "remote"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# install armbian-zsh
|
# install armbian-zsh
|
||||||
if [[ "${REPOSITORY_INSTALL}" != *armbian-zsh* ]]; then
|
if [[ "${PACKAGE_LIST_RM}" != *armbian-zsh* ]]; then
|
||||||
if [[ $BUILD_MINIMAL != yes ]]; then
|
if [[ "${REPOSITORY_INSTALL}" != *armbian-zsh* ]]; then
|
||||||
install_deb_chroot "${DEB_STORAGE}/armbian-zsh_${REVISION}_all.deb"
|
if [[ $BUILD_MINIMAL != yes ]]; then
|
||||||
fi
|
install_deb_chroot "${DEB_STORAGE}/armbian-zsh_${REVISION}_all.deb"
|
||||||
else
|
fi
|
||||||
if [[ $BUILD_MINIMAL != yes ]]; then
|
else
|
||||||
install_deb_chroot "armbian-zsh" "remote"
|
if [[ $BUILD_MINIMAL != yes ]]; then
|
||||||
|
install_deb_chroot "armbian-zsh" "remote"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -505,6 +509,7 @@ install_common()
|
|||||||
Name=eth0
|
Name=eth0
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
|
#MACAddress=
|
||||||
DHCP=ipv4
|
DHCP=ipv4
|
||||||
LinkLocalAddressing=ipv4
|
LinkLocalAddressing=ipv4
|
||||||
#Address=192.168.1.100/24
|
#Address=192.168.1.100/24
|
||||||
|
|||||||
@@ -31,7 +31,9 @@
|
|||||||
#
|
#
|
||||||
# target: what to clean
|
# target: what to clean
|
||||||
# "make" - "make clean" for selected kernel and u-boot
|
# "make" - "make clean" for selected kernel and u-boot
|
||||||
# "debs" - delete output/debs
|
# "debs" - delete output/debs for board&branch
|
||||||
|
# "ubootdebs" - delete output/debs for uboot&board&branch
|
||||||
|
# "alldebs" - delete output/debs
|
||||||
# "cache" - delete output/cache
|
# "cache" - delete output/cache
|
||||||
# "oldcache" - remove old output/cache
|
# "oldcache" - remove old output/cache
|
||||||
# "images" - delete output/images
|
# "images" - delete output/images
|
||||||
@@ -56,6 +58,14 @@ cleaning()
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
ubootdebs) # delete ${DEB_STORAGE} for uboot, current branch and family
|
||||||
|
if [[ -d "${DEB_STORAGE}" ]]; then
|
||||||
|
display_alert "Cleaning ${DEB_STORAGE} for u-boot" "$BOARD $BRANCH" "info"
|
||||||
|
# easier than dealing with variable expansion and escaping dashes in file names
|
||||||
|
find "${DEB_STORAGE}" -name "${CHOSEN_UBOOT}_*.deb" -delete
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
extras) # delete ${DEB_STORAGE}/extra/$RELEASE for all architectures
|
extras) # delete ${DEB_STORAGE}/extra/$RELEASE for all architectures
|
||||||
if [[ -n $RELEASE && -d ${DEB_STORAGE}/extra/$RELEASE ]]; then
|
if [[ -n $RELEASE && -d ${DEB_STORAGE}/extra/$RELEASE ]]; then
|
||||||
display_alert "Cleaning ${DEB_STORAGE}/extra for" "$RELEASE" "info"
|
display_alert "Cleaning ${DEB_STORAGE}/extra for" "$RELEASE" "info"
|
||||||
@@ -123,7 +133,11 @@ exit_with_error()
|
|||||||
|
|
||||||
get_package_list_hash()
|
get_package_list_hash()
|
||||||
{
|
{
|
||||||
( printf '%s\n' "${PACKAGE_LIST}" | sort -u; printf '%s\n' "${PACKAGE_LIST_EXCLUDE}" | sort -u; echo "${1}" ) \
|
local package_arr exclude_arr
|
||||||
|
local list_content
|
||||||
|
read -ra package_arr <<< "${DEBOOTSTRAP_LIST} ${PACKAGE_LIST}"
|
||||||
|
read -ra exclude_arr <<< "${PACKAGE_LIST_EXCLUDE}"
|
||||||
|
( ( printf "%s\n" "${package_arr[@]}"; printf -- "-%s\n" "${exclude_arr[@]}" ) | sort -u; echo "${1}" ) \
|
||||||
| md5sum | cut -d' ' -f 1
|
| md5sum | cut -d' ' -f 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -435,7 +449,7 @@ fingerprint_image()
|
|||||||
display_alert "Fingerprinting"
|
display_alert "Fingerprinting"
|
||||||
cat <<-EOF > "${1}"
|
cat <<-EOF > "${1}"
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Title: Armbian $REVISION ${BOARD^} $DISTRIBUTION $RELEASE $BRANCH
|
Title: ${VENDOR} $REVISION ${BOARD^} $DISTRIBUTION $RELEASE $BRANCH
|
||||||
Kernel: Linux $VER
|
Kernel: Linux $VER
|
||||||
Build date: $(date +'%d.%m.%Y')
|
Build date: $(date +'%d.%m.%Y')
|
||||||
Maintainer: $MAINTAINER <$MAINTAINERMAIL>
|
Maintainer: $MAINTAINER <$MAINTAINERMAIL>
|
||||||
@@ -447,28 +461,27 @@ fingerprint_image()
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ -n "$2" ]; then
|
if [ -n "$2" ]; then
|
||||||
cat <<-EOF >> "${1}"
|
cat <<-EOF >> "${1}"
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Partitioning configuration:
|
Partitioning configuration: $IMAGE_PARTITION_TABLE offset: $OFFSET
|
||||||
Root partition type: $ROOTFS_TYPE
|
Boot partition type: ${BOOTFS_TYPE:-(none)} ${BOOTSIZE:+"(${BOOTSIZE} MB)"}
|
||||||
Boot partition type: ${BOOTFS_TYPE:-(none)}
|
Root partition type: $ROOTFS_TYPE ${FIXED_IMAGE_SIZE:+"(${FIXED_IMAGE_SIZE} MB)"}
|
||||||
User provided boot partition size: ${BOOTSIZE:-0}
|
|
||||||
Offset: $OFFSET
|
|
||||||
CPU configuration: $CPUMIN - $CPUMAX with $GOVERNOR
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
Verify GPG signature:
|
|
||||||
gpg --verify $2.img.asc
|
|
||||||
|
|
||||||
Verify image file integrity:
|
CPU configuration: $CPUMIN - $CPUMAX with $GOVERNOR
|
||||||
sha256sum --check $2.img.sha
|
--------------------------------------------------------------------------------
|
||||||
|
Verify GPG signature:
|
||||||
|
gpg --verify $2.img.asc
|
||||||
|
|
||||||
Prepare SD card (four methodes):
|
Verify image file integrity:
|
||||||
zcat $2.img.gz | pv | dd of=/dev/mmcblkX bs=1M
|
sha256sum --check $2.img.sha
|
||||||
dd if=$2.img of=/dev/mmcblkX bs=1M
|
|
||||||
balena-etcher $2.img.gz -d /dev/mmcblkX
|
Prepare SD card (four methodes):
|
||||||
balena-etcher $2.img -d /dev/mmcblkX
|
zcat $2.img.gz | pv | dd of=/dev/mmcblkX bs=1M
|
||||||
EOF
|
dd if=$2.img of=/dev/mmcblkX bs=1M
|
||||||
fi
|
balena-etcher $2.img.gz -d /dev/mmcblkX
|
||||||
|
balena-etcher $2.img -d /dev/mmcblkX
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
cat <<-EOF >> "${1}"
|
cat <<-EOF >> "${1}"
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
@@ -1279,7 +1292,7 @@ download_and_verify()
|
|||||||
if [[ $? -ne 7 && $? -ne 22 && $? -ne 0 ]]; then
|
if [[ $? -ne 7 && $? -ne 22 && $? -ne 0 ]]; then
|
||||||
display_alert "Timeout from $server" "retrying" "info"
|
display_alert "Timeout from $server" "retrying" "info"
|
||||||
server="https://mirrors.tuna.tsinghua.edu.cn/armbian-releases/"
|
server="https://mirrors.tuna.tsinghua.edu.cn/armbian-releases/"
|
||||||
|
|
||||||
# switch to another china mirror if tuna timeouts
|
# switch to another china mirror if tuna timeouts
|
||||||
timeout 10 curl --head --fail --silent ${server}${remotedir}/${filename} 2>&1 >/dev/null
|
timeout 10 curl --head --fail --silent ${server}${remotedir}/${filename} 2>&1 >/dev/null
|
||||||
if [[ $? -ne 7 && $? -ne 22 && $? -ne 0 ]]; then
|
if [[ $? -ne 7 && $? -ne 22 && $? -ne 0 ]]; then
|
||||||
@@ -1287,7 +1300,7 @@ download_and_verify()
|
|||||||
server="https://mirrors.bfsu.edu.cn/armbian-releases/"
|
server="https://mirrors.bfsu.edu.cn/armbian-releases/"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# check if file exists on remote server before running aria2 downloader
|
# check if file exists on remote server before running aria2 downloader
|
||||||
[[ ! `timeout 10 curl --head --fail --silent ${server}${remotedir}/${filename}` ]] && return
|
[[ ! `timeout 10 curl --head --fail --silent ${server}${remotedir}/${filename}` ]] && return
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ LINUXSOURCEDIR="${KERNELDIR}/$(branch2dir "${KERNELBRANCH}")"
|
|||||||
BSP_CLI_PACKAGE_NAME="armbian-bsp-cli-${BOARD}"
|
BSP_CLI_PACKAGE_NAME="armbian-bsp-cli-${BOARD}"
|
||||||
BSP_CLI_PACKAGE_FULLNAME="${BSP_CLI_PACKAGE_NAME}_${REVISION}_${ARCH}"
|
BSP_CLI_PACKAGE_FULLNAME="${BSP_CLI_PACKAGE_NAME}_${REVISION}_${ARCH}"
|
||||||
|
|
||||||
CHOSEN_UBOOT=linux-u-boot-${BRANCH}-${BOARD}
|
CHOSEN_UBOOT=linux-u-boot-${BOARD}-${BRANCH}
|
||||||
CHOSEN_KERNEL=linux-image-${BRANCH}-${LINUXFAMILY}
|
CHOSEN_KERNEL=linux-image-${BRANCH}-${LINUXFAMILY}
|
||||||
CHOSEN_ROOTFS=${BSP_CLI_PACKAGE_NAME}
|
CHOSEN_ROOTFS=${BSP_CLI_PACKAGE_NAME}
|
||||||
CHOSEN_DESKTOP=armbian-${RELEASE}-desktop-${DESKTOP_ENVIRONMENT}
|
CHOSEN_DESKTOP=armbian-${RELEASE}-desktop-${DESKTOP_ENVIRONMENT}
|
||||||
|
|||||||
@@ -244,9 +244,9 @@ fi
|
|||||||
mv /usr/lib/chromium-browser/master_preferences.dpkg-dist /usr/lib/chromium-browser/master_preferences
|
mv /usr/lib/chromium-browser/master_preferences.dpkg-dist /usr/lib/chromium-browser/master_preferences
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed -i "s/^PRETTY_NAME=.*/PRETTY_NAME=\"Armbian $REVISION "${RELEASE^}"\"/" /etc/os-release
|
sed -i "s/^PRETTY_NAME=.*/PRETTY_NAME=\"${VENDOR} $REVISION "${RELEASE^}"\"/" /etc/os-release
|
||||||
echo "Armbian ${REVISION} ${RELEASE^} \\l \n" > /etc/issue
|
echo "${VENDOR} ${REVISION} ${RELEASE^} \\l \n" > /etc/issue
|
||||||
echo "Armbian ${REVISION} ${RELEASE^}" > /etc/issue.net
|
echo "${VENDOR} ${REVISION} ${RELEASE^}" > /etc/issue.net
|
||||||
|
|
||||||
systemctl --no-reload enable armbian-hardware-monitor.service armbian-hardware-optimize.service armbian-zram-config.service >/dev/null 2>&1
|
systemctl --no-reload enable armbian-hardware-monitor.service armbian-hardware-optimize.service armbian-zram-config.service >/dev/null 2>&1
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -34,19 +34,27 @@ MACADDR=$(printf ${prefixes[$random]}':%02X:%02X:%02X:%02X:%02X\n' $[RANDOM%256]
|
|||||||
# set fixed IP address from first randomly assigned one. If nothing is deteceted, generate one.
|
# set fixed IP address from first randomly assigned one. If nothing is deteceted, generate one.
|
||||||
set_fixed_mac ()
|
set_fixed_mac ()
|
||||||
{
|
{
|
||||||
|
if [ -n "$(command -v nmcli)" ]; then
|
||||||
|
CONNECTION="$(nmcli -f UUID,ACTIVE,DEVICE,TYPE connection show --active | tail -n1)"
|
||||||
|
UUID=$(awk -F" " '/ethernet/ {print $1}' <<< "${CONNECTION}")
|
||||||
|
DEVNAME=$(awk -F" " '/ethernet/ {print $3}' <<< "${CONNECTION}")
|
||||||
|
else
|
||||||
|
DEVNAME=eth0
|
||||||
|
fi
|
||||||
|
|
||||||
CONNECTION="$(nmcli -f UUID,ACTIVE,DEVICE,TYPE connection show --active | tail -n1)"
|
MACADDR=$(/sbin/ip link | grep -A1 ${DEVNAME} | awk -F" " '/ether / {print $2}')
|
||||||
UUID=$(awk -F" " '/ethernet/ {print $1}' <<< "${CONNECTION}")
|
|
||||||
DEVNAME=$(awk -F" " '/ethernet/ {print $3}' <<< "${CONNECTION}")
|
|
||||||
MACADDR=$(/sbin/ip link | grep -A1 ${DEVNAME} | awk -F" " '/ether / {print $2}')
|
|
||||||
|
|
||||||
[[ -z $MACADDR ]] && get_random_mac
|
[[ -z $MACADDR ]] && get_random_mac
|
||||||
|
|
||||||
if [[ -n $UUID ]]; then
|
if [[ -n "$(command -v nmcli)" && -n $UUID ]]; then
|
||||||
nmcli connection modify $UUID ethernet.cloned-mac-address $MACADDR
|
nmcli connection modify $UUID ethernet.cloned-mac-address $MACADDR
|
||||||
nmcli connection modify $UUID -ethernet.mac-address ""
|
nmcli connection modify $UUID -ethernet.mac-address ""
|
||||||
nmcli connection down $UUID >/dev/null 2>&1
|
nmcli connection down $UUID >/dev/null 2>&1
|
||||||
nmcli connection up $UUID >/dev/null 2>&1
|
nmcli connection up $UUID >/dev/null 2>&1
|
||||||
|
elif [[ -f /etc/systemd/network/$DEVNAME.network ]]; then
|
||||||
|
if ! grep '^ *MACAddress=' /etc/systemd/network/$DEVNAME.network > /dev/null; then
|
||||||
|
sed -i "s/#MACAddress=/MACAddress=$MACADDR/g" /etc/systemd/network/$DEVNAME.network
|
||||||
|
fi
|
||||||
|
fi
|
||||||
return 0
|
return 0
|
||||||
fi
|
|
||||||
} # set fixed mac to the 1st active network adapter
|
} # set fixed mac to the 1st active network adapter
|
||||||
|
|||||||
@@ -19,11 +19,11 @@ case "$1" in
|
|||||||
cpu_cores=$(grep -c '^processor' /proc/cpuinfo | sed 's/^0$/1/')
|
cpu_cores=$(grep -c '^processor' /proc/cpuinfo | sed 's/^0$/1/')
|
||||||
|
|
||||||
# adjust custom htop initial configuration based on CPU count https://github.com/avafinger/htop-2.1.1_enhanced-version
|
# adjust custom htop initial configuration based on CPU count https://github.com/avafinger/htop-2.1.1_enhanced-version
|
||||||
right_meters="Hostname Tasks LoadAverage Uptime CpuFreq"
|
right_meters="Hostname Tasks LoadAverage DiskIO NetworkIO Uptime Systemd CpuFreq"
|
||||||
right_meter_modes="2 2 2 2 2"
|
right_meter_modes="2 2 2 2 2 2 2 2"
|
||||||
sed -i 's/header_margin=.*/header_margin=1/g' /etc/skel/.config/htop/htoprc
|
sed -i 's/header_margin=.*/header_margin=1/g' /etc/skel/.config/htop/htoprc
|
||||||
sed -i 's/left_meters=.*/left_meters=AllCPUs Memory Swap CpuTemp/g' /etc/skel/.config/htop/htoprc
|
sed -i 's/left_meters=.*/left_meters=AllCPUs Memory Zram Swap CpuTemp/g' /etc/skel/.config/htop/htoprc
|
||||||
sed -i 's/left_meter_modes=.*/left_meter_modes=1 1 1 2/g' /etc/skel/.config/htop/htoprc
|
sed -i 's/left_meter_modes=.*/left_meter_modes=1 1 1 1 2/g' /etc/skel/.config/htop/htoprc
|
||||||
sed -i "s/right_meters=.*/right_meters=$right_meters/g" /etc/skel/.config/htop/htoprc
|
sed -i "s/right_meters=.*/right_meters=$right_meters/g" /etc/skel/.config/htop/htoprc
|
||||||
sed -i "s/right_meter_modes=.*/right_meter_modes=$right_meter_modes/g" /etc/skel/.config/htop/htoprc
|
sed -i "s/right_meter_modes=.*/right_meter_modes=$right_meter_modes/g" /etc/skel/.config/htop/htoprc
|
||||||
# copy predefined settings for root user
|
# copy predefined settings for root user
|
||||||
|
|||||||
Reference in New Issue
Block a user