diff --git a/lib/functions/compilation/debs.sh b/lib/functions/compilation/debs.sh index a35b10e4d..a34d794ce 100644 --- a/lib/functions/compilation/debs.sh +++ b/lib/functions/compilation/debs.sh @@ -224,6 +224,8 @@ compile_plymouth_theme_armbian() { "${tmp_dir}/${plymouth_theme_armbian_dir}"/DEBIAN/ chmod 755 "${tmp_dir}/${plymouth_theme_armbian_dir}"/DEBIAN/{postinst,prerm,postrm} + # this requires `imagemagick` + convert -resize 256x256 \ "${SRC}"/packages/plymouth-theme-armbian/armbian-logo.png \ "${tmp_dir}/${plymouth_theme_armbian_dir}"/usr/share/plymouth/themes/armbian/bgrt-fallback.png diff --git a/lib/functions/general/downloads.sh b/lib/functions/general/downloads.sh index 809afaefb..8ad50001d 100644 --- a/lib/functions/general/downloads.sh +++ b/lib/functions/general/downloads.sh @@ -2,7 +2,8 @@ function get_urls() { local catalog=$1 local filename=$2 - + + # this uses `jq` hostdep case $catalog in toolchain) local CCODE=$(curl --silent --fail https://dl.armbian.com/geoip | jq '.continent.code' -r) diff --git a/lib/functions/host/basic-deps.sh b/lib/functions/host/basic-deps.sh index 3ebdd8c93..1e9910009 100644 --- a/lib/functions/host/basic-deps.sh +++ b/lib/functions/host/basic-deps.sh @@ -32,8 +32,8 @@ function prepare_host_basic() { fi local sudo_prefix="" && is_root_or_sudo_prefix sudo_prefix # nameref; "sudo_prefix" will be 'sudo' or '' - display_alert "Updating and installing basic packages on host" "${sudo_prefix}: ${install_pack}" - run_host_command_logged "${sudo_prefix}" DEBIAN_FRONTEND=noninteractive apt-get -o "Dpkg::Use-Pty=0" -qq update + display_alert "Updating and installing basic packages on host ${sudo_prefix}" "${install_pack}" + run_host_command_logged "${sudo_prefix}" DEBIAN_FRONTEND=noninteractive apt-get -o "Dpkg::Use-Pty=0" -q update run_host_command_logged "${sudo_prefix}" DEBIAN_FRONTEND=noninteractive apt-get -o "Dpkg::Use-Pty=0" install -qq -y --no-install-recommends $install_pack else display_alert "basic-deps are already installed on host" "nothing to be done" "debug" diff --git a/lib/functions/host/prepare-host.sh b/lib/functions/host/prepare-host.sh index a160372cf..9c2e703c7 100644 --- a/lib/functions/host/prepare-host.sh +++ b/lib/functions/host/prepare-host.sh @@ -233,19 +233,27 @@ function adaptative_prepare_host_dependencies() { display_alert "Using passed-in target_arch" "${target_arch}" "debug" fi + # @TODO: move to extensions: + # btrfs-progs # @TODO: only needed if doing brtfs // causes initramfs rebuild + # cryptsetup - @TODO: this causes host-side initrd rebuild; only required for encrypted root stuff -- move to extension? + # f2fs-tools # @TODO: this is un-necessary if not building a f2fs rootfs // causes initramfs rebuild + # crossbuild-essential-arm64 @TODO: JetHub needs a c++ compiler, add "crossbuild-essential-arm64" there or ext + #### Common: for all releases, all host arches, and all target arches. declare -a -g host_dependencies=( - # big bag of stuff from before; alpha ordering, one letter per line - acl aptly - bc binfmt-support bison btrfs-progs busybox - build-essential # @TODO: this includes parts of the toolchain for native builds. what if we're not doing native builds? - ca-certificates ccache cpio cryptsetup - debian-archive-keyring debian-keyring debootstrap device-tree-compiler dialog dirmngr dosfstools dwarves - f2fs-tools fakeroot flex + # big bag of stuff from before + bc binfmt-support + bison + ### build-essential # Composed of: libc6-dev make dpkg-dev gcc g++, we don't need g++ (C++ compiler) + libc6-dev make dpkg-dev gcc # build-essential, without g++ + ca-certificates ccache cpio + debootstrap device-tree-compiler dialog dirmngr dosfstools + dwarves # dwarves has been replaced by "pahole" and is now a transitional package + fakeroot flex gawk gnupg gpg - imagemagick # @TODO: why? this is huge. - jq # @TODO: why? what uses this? - kmod + imagemagick # required for boot_logo, plymouth: converting images / spinners + jq # required for parsing JSON, specially rootfs-caching related. + kmod # this causes initramfs rebuild, but is usually pre-installed, so no harm done unless it's an upgrade libbison-dev libelf-dev libfdt-dev libfile-fcntllock-perl libmpc-dev libfl-dev liblz4-tool libncurses-dev libssl-dev libusb-1.0-0-dev linux-base locales @@ -254,9 +262,9 @@ function adaptative_prepare_host_dependencies() { patchutils pkg-config pv qemu-user-static rsync - swig - u-boot-tools udev uuid-dev - whiptail # @TODO: why? we use dialog... + u-boot-tools + udev # causes initramfs rebuild, but is usually pre-installed. + uuid-dev zlib1g-dev # by-category below @@ -291,9 +299,6 @@ function adaptative_prepare_host_dependencies() { ### ARCH declare wanted_arch="${target_arch:-"all"}" - # @TODO: armbian-oleg: crossbuild-essential-xxxx is "too much junk" - # @TODO: rpardini: we do have usages of the C++ compiler, eg, JetHub. Turn those into extensions, with their own deps. - if [[ "${wanted_arch}" == "amd64" || "${wanted_arch}" == "all" ]]; then host_dependencies+=("gcc-x86-64-linux-gnu") # from crossbuild-essential-amd64 fi @@ -335,7 +340,6 @@ function adaptative_prepare_host_dependencies() { } function install_host_dependencies() { - display_alert "Installing build dependencies" display_alert "Installing build dependencies" "$*" "debug" # don't prompt for apt cacher selection. this is to skip the prompt only, since we'll manage acng config later. diff --git a/lib/functions/rootfs/boot_logo.sh b/lib/functions/rootfs/boot_logo.sh index 9df72d2e9..dd2e05b3c 100644 --- a/lib/functions/rootfs/boot_logo.sh +++ b/lib/functions/rootfs/boot_logo.sh @@ -4,6 +4,8 @@ # and place to the file /lib/firmware/bootsplash #-------------------------------------------------------------------------------------------------------------------------------- function boot_logo() { + # this requires `imagemagick` + display_alert "Building kernel splash logo" "$RELEASE" "info" LOGO=${SRC}/packages/blobs/splash/logo.png diff --git a/lib/functions/rootfs/create-cache.sh b/lib/functions/rootfs/create-cache.sh index b8445c126..358c26b55 100644 --- a/lib/functions/rootfs/create-cache.sh +++ b/lib/functions/rootfs/create-cache.sh @@ -8,6 +8,7 @@ get_or_create_rootfs_cache_chroot_sdcard() { if [[ "${SKIP_ARMBIAN_REPO}" != "yes" ]]; then display_alert "ROOTFSCACHE_VERSION not set, getting remotely" "Github API and armbian/mirror " "debug" # rpardini: why 2 calls? + # this uses `jq` hostdep ROOTFSCACHE_VERSION=$(curl https://api.github.com/repos/armbian/cache/releases/latest -s --fail | jq .tag_name -r || true) # anonymous API access is very limited which is why we need a fallback # rpardini: yeah but this is 404'ing @@ -323,6 +324,7 @@ get_rootfs_cache_list() { local cache_type=$1 local packages_hash=$2 + # this uses `jq` hostdep { curl --silent --fail -L "https://api.github.com/repos/armbian/cache/releases?per_page=3" | jq -r '.[].tag_name' || curl --silent --fail -L https://cache.armbian.com/rootfs/list