mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
armbian-oleg: junk: drastically reduce host-side dependencies / "remove junk"
- remove a lot of hopefully / hardly confirmed, unused dependencies - don't use crossbuild-essential-xxx; avoid the c++ compiler that comes with it, install gcc-only instead - hostdeps: use `libc6-dev make dpkg-dev gcc` (without `g++`) instead of `build-essential` - drop `btrfs-progs` and `f2fs-tools` (@TODO add in extension when/whereused) - more: drop `cryptsetup` (@TODO add in extension when/whereused) - don't be too quiet when doing apt-update for hostdeps
This commit is contained in:
@@ -224,6 +224,8 @@ compile_plymouth_theme_armbian() {
|
|||||||
"${tmp_dir}/${plymouth_theme_armbian_dir}"/DEBIAN/
|
"${tmp_dir}/${plymouth_theme_armbian_dir}"/DEBIAN/
|
||||||
chmod 755 "${tmp_dir}/${plymouth_theme_armbian_dir}"/DEBIAN/{postinst,prerm,postrm}
|
chmod 755 "${tmp_dir}/${plymouth_theme_armbian_dir}"/DEBIAN/{postinst,prerm,postrm}
|
||||||
|
|
||||||
|
# this requires `imagemagick`
|
||||||
|
|
||||||
convert -resize 256x256 \
|
convert -resize 256x256 \
|
||||||
"${SRC}"/packages/plymouth-theme-armbian/armbian-logo.png \
|
"${SRC}"/packages/plymouth-theme-armbian/armbian-logo.png \
|
||||||
"${tmp_dir}/${plymouth_theme_armbian_dir}"/usr/share/plymouth/themes/armbian/bgrt-fallback.png
|
"${tmp_dir}/${plymouth_theme_armbian_dir}"/usr/share/plymouth/themes/armbian/bgrt-fallback.png
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
function get_urls() {
|
function get_urls() {
|
||||||
local catalog=$1
|
local catalog=$1
|
||||||
local filename=$2
|
local filename=$2
|
||||||
|
|
||||||
|
# this uses `jq` hostdep
|
||||||
case $catalog in
|
case $catalog in
|
||||||
toolchain)
|
toolchain)
|
||||||
local CCODE=$(curl --silent --fail https://dl.armbian.com/geoip | jq '.continent.code' -r)
|
local CCODE=$(curl --silent --fail https://dl.armbian.com/geoip | jq '.continent.code' -r)
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ function prepare_host_basic() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local sudo_prefix="" && is_root_or_sudo_prefix sudo_prefix # nameref; "sudo_prefix" will be 'sudo' or ''
|
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}"
|
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
|
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
|
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
|
else
|
||||||
display_alert "basic-deps are already installed on host" "nothing to be done" "debug"
|
display_alert "basic-deps are already installed on host" "nothing to be done" "debug"
|
||||||
|
|||||||
@@ -233,19 +233,27 @@ function adaptative_prepare_host_dependencies() {
|
|||||||
display_alert "Using passed-in target_arch" "${target_arch}" "debug"
|
display_alert "Using passed-in target_arch" "${target_arch}" "debug"
|
||||||
fi
|
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.
|
#### Common: for all releases, all host arches, and all target arches.
|
||||||
declare -a -g host_dependencies=(
|
declare -a -g host_dependencies=(
|
||||||
# big bag of stuff from before; alpha ordering, one letter per line
|
# big bag of stuff from before
|
||||||
acl aptly
|
bc binfmt-support
|
||||||
bc binfmt-support bison btrfs-progs busybox
|
bison
|
||||||
build-essential # @TODO: this includes parts of the toolchain for native builds. what if we're not doing native builds?
|
### build-essential # Composed of: libc6-dev make dpkg-dev gcc g++, we don't need g++ (C++ compiler)
|
||||||
ca-certificates ccache cpio cryptsetup
|
libc6-dev make dpkg-dev gcc # build-essential, without g++
|
||||||
debian-archive-keyring debian-keyring debootstrap device-tree-compiler dialog dirmngr dosfstools dwarves
|
ca-certificates ccache cpio
|
||||||
f2fs-tools fakeroot flex
|
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
|
gawk gnupg gpg
|
||||||
imagemagick # @TODO: why? this is huge.
|
imagemagick # required for boot_logo, plymouth: converting images / spinners
|
||||||
jq # @TODO: why? what uses this?
|
jq # required for parsing JSON, specially rootfs-caching related.
|
||||||
kmod
|
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
|
libbison-dev libelf-dev libfdt-dev libfile-fcntllock-perl libmpc-dev libfl-dev liblz4-tool
|
||||||
libncurses-dev libssl-dev libusb-1.0-0-dev
|
libncurses-dev libssl-dev libusb-1.0-0-dev
|
||||||
linux-base locales
|
linux-base locales
|
||||||
@@ -254,9 +262,9 @@ function adaptative_prepare_host_dependencies() {
|
|||||||
patchutils pkg-config pv
|
patchutils pkg-config pv
|
||||||
qemu-user-static
|
qemu-user-static
|
||||||
rsync
|
rsync
|
||||||
swig
|
u-boot-tools
|
||||||
u-boot-tools udev uuid-dev
|
udev # causes initramfs rebuild, but is usually pre-installed.
|
||||||
whiptail # @TODO: why? we use dialog...
|
uuid-dev
|
||||||
zlib1g-dev
|
zlib1g-dev
|
||||||
|
|
||||||
# by-category below
|
# by-category below
|
||||||
@@ -291,9 +299,6 @@ function adaptative_prepare_host_dependencies() {
|
|||||||
### ARCH
|
### ARCH
|
||||||
declare wanted_arch="${target_arch:-"all"}"
|
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
|
if [[ "${wanted_arch}" == "amd64" || "${wanted_arch}" == "all" ]]; then
|
||||||
host_dependencies+=("gcc-x86-64-linux-gnu") # from crossbuild-essential-amd64
|
host_dependencies+=("gcc-x86-64-linux-gnu") # from crossbuild-essential-amd64
|
||||||
fi
|
fi
|
||||||
@@ -335,7 +340,6 @@ function adaptative_prepare_host_dependencies() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function install_host_dependencies() {
|
function install_host_dependencies() {
|
||||||
display_alert "Installing build dependencies"
|
|
||||||
display_alert "Installing build dependencies" "$*" "debug"
|
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.
|
# don't prompt for apt cacher selection. this is to skip the prompt only, since we'll manage acng config later.
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
# and place to the file /lib/firmware/bootsplash
|
# and place to the file /lib/firmware/bootsplash
|
||||||
#--------------------------------------------------------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------------------------------------------------------
|
||||||
function boot_logo() {
|
function boot_logo() {
|
||||||
|
# this requires `imagemagick`
|
||||||
|
|
||||||
display_alert "Building kernel splash logo" "$RELEASE" "info"
|
display_alert "Building kernel splash logo" "$RELEASE" "info"
|
||||||
|
|
||||||
LOGO=${SRC}/packages/blobs/splash/logo.png
|
LOGO=${SRC}/packages/blobs/splash/logo.png
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ get_or_create_rootfs_cache_chroot_sdcard() {
|
|||||||
if [[ "${SKIP_ARMBIAN_REPO}" != "yes" ]]; then
|
if [[ "${SKIP_ARMBIAN_REPO}" != "yes" ]]; then
|
||||||
display_alert "ROOTFSCACHE_VERSION not set, getting remotely" "Github API and armbian/mirror " "debug"
|
display_alert "ROOTFSCACHE_VERSION not set, getting remotely" "Github API and armbian/mirror " "debug"
|
||||||
# rpardini: why 2 calls?
|
# 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)
|
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
|
# anonymous API access is very limited which is why we need a fallback
|
||||||
# rpardini: yeah but this is 404'ing
|
# rpardini: yeah but this is 404'ing
|
||||||
@@ -323,6 +324,7 @@ get_rootfs_cache_list() {
|
|||||||
local cache_type=$1
|
local cache_type=$1
|
||||||
local packages_hash=$2
|
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://api.github.com/repos/armbian/cache/releases?per_page=3" | jq -r '.[].tag_name' ||
|
||||||
curl --silent --fail -L https://cache.armbian.com/rootfs/list
|
curl --silent --fail -L https://cache.armbian.com/rootfs/list
|
||||||
|
|||||||
Reference in New Issue
Block a user