Commit Graph

28 Commits

Author SHA1 Message Date
Jianfeng Liu fb363e8829 add initial loong64 support 2025-08-04 17:34:24 +08:00
Igor Pecovnik 3199178c70 Multiple sources fix: after changing to deb822 we forgot on leftovers
- deboostrap still uses old ways and we need to remove this file
- when displaying the content of sources, we need to look correct file
2025-03-05 10:40:48 +01:00
Ricardo Pardini b0303e5edc rootfs: fix: don't try to use chroot binaries after qemu was undeployed
- `"${cache_fname}.list"` and `"${cache_fname}.hash_text"` were very old and unused anyway
2025-01-02 13:46:03 +01:00
Ricardo Pardini 6755e9190a don't ship qemu binary in rootfs cache + armhf image/rootfs building on non-armhf-capable-arm64 hosts (Apple M1+)
- refactor `prepare_host_binfmt_qemu()` out of `prepare_host_noninteractive()` and into `rootfs/qemu-static.sh`
  - further split into more functions and return early to avoid deep nesting
  - implement force import and load of qemu-arm for non-armhf capable arm64 hosts (incl magic numbers)
- enhance `deploy_qemu_binary_to_chroot()` & `undeploy_qemu_binary_from_chroot()`;
  - add 2nd param "caller" for better logging/tracking
  - does sanity-check and preserve existing binary if it exists
- explicitly deploy/undeploy for the 3 cases:
  - image: moved undeploy from `post_debootstrap_tweaks()` into image build proper for consistency
  - rootfs: was leaving trash behind (since post_debootstrap_tweaks never ran for rootfs), now properly undeploys
  - initrd: was already fine, just added caller info
- added `arch-test` host dependency
  - ensure `arch-test ${ARCH}` works during prepare-host
- > tl,dr: "can build 32-bit armv7 armhf using Apple silicon; can use rootfs cache cross-arch reliably"
2024-12-31 11:52:12 +01:00
Igor Pecovnik 6a03d070d7 MD5 sum: changing default checking as it will fail on base-files
Base files are changed during the process.

FORCE_CHECK_MD5_PACKAGES=yes turns checking back on.
2024-09-29 09:55:15 +02:00
Igor Pecovnik 9d187dffeb Deboostrap: switch to last known working tag 2024-06-21 11:14:29 +02:00
Ricardo Pardini 41b99ec2b1 rootfs-create: if debootstrap second stage fails, find debootstrap.log and show it so we know what the error is
- runner: let `if_error_find_files_sdcard` be a simple filename (different debootstraps put debootstrap.log in different places)
2024-04-07 13:22:11 +02:00
Igor Pecovnik 9905082d4e Changing file to force full rootfs cache rebuild due to upstream backdoor 2024-03-29 20:22:54 +01:00
Ricardo Pardini 5e1b3ca392 debootstrap: use latest git for Ubuntu/Debian debootstrap instead of host-installed
- `DEBOOTSTRAP_DIR` must be set during the 1st stage, but NOT the second stage
- latest devel versions might be missing scripts for old releases; just symlink to the default one if so
- this hopefully should _end_ the debootstrap madness we've been handling, at least until we get around to mmdebstrap (Perl) one day
2024-03-02 20:46:58 +01:00
Ricardo Pardini e37525d234 debootstrap: Partially revert f2e663f0 "Improved debootstrap hacking support with fixes for Ubuntu Noble" 2024-03-02 20:46:58 +01:00
Ricardo Pardini 34bfa92052 Revert "Debootstrap is again too old for latest releases. Lets ship currently latest with and install it when we build distros that needs it."
This reverts commit 7b61b05867.
2024-03-02 20:46:58 +01:00
Igor Pecovnik 7b61b05867 Debootstrap is again too old for latest releases. Lets ship currently latest with and install it when we build distros that needs it. 2024-03-01 12:45:11 +01:00
Gunjan Gupta 6f1b675591 Prevent systemd from starting all services on first-boot 2024-02-11 01:20:17 +05:30
Igor Pecovnik 07037232a1 Unstable / testing packages sometimes contain hacks that are patching files 2024-02-01 22:01:44 +05:30
Igor Pecovnik 6cd3981805 Re-enable resolv.conf during deboostrap process as network manager seems to break it 2024-01-13 11:48:38 +01:00
Igor f2e663f087
Improved debootstrap hacking support with fixes for Ubuntu Noble (#6076)
* Remove extension for patching Deboostrap to support Ubuntu Noble
* Integrate Deboostrap patching to the build script
* fix problems related to Noble
2023-12-22 08:04:55 +01:00
Igor 2a8cb5793f Removing exceptions needed to support riscv64 withing Debian
Signed-off-by: Igor <igor@armbian.com>
2023-08-17 22:09:05 +02:00
Ricardo Pardini f26a41ff6c rootfs/image: introduce new hook `custom_apt_repo()` (hashed into rootfs version); deploy different repo components/custom repos depending on rootfs or image
- rationale: we don't want an eternal chicken-egg problem with rootfs vs repo.
  - but, desktop rootfs require some parts of repo. case in point: `system-monitoring-center`
    - so only add certain components of repo (-desktop, -utils) to rootfs so that is honored
- introduce `custom_apt_repo()` hook for extensions to add their repos as well
  - same chicken-egg-avoiding is possible via param `CUSTOM_REPO_WHEN`
2023-05-16 20:09:47 +02:00
Ricardo Pardini 637c4fec01 include (clean/real) apt lists in built images; update xapian index during image build, not rootfs; don't leave junk in the rootfs cache
- revert #5139 Revert "Apt lists is needed for synpatic index generation"
  This reverts commit 63e9bd3baa
  - this actually only left junk in rootfs cache for the future to find
2023-05-09 10:04:50 +02:00
Igor 63e9bd3baa Apt lists is needed for synpatic index generation 2023-05-05 19:37:19 +02:00
Ricardo Pardini 2b28f29ebe rootfs/image: avoid apt junk leftover by `debootstrap`; add warnings and debugs over target cache and general rootfs sizes
- rootfs: rootfs-create: show a summary of the 20 biggest dirs, right before tarring the rootfs (for debugging)
- rootfs: rootfs-create: show usage of caches between first and second stages
- rootfs: rootfs-create: cleanup junk left by `debootstrap` after second stage
- rootfs: rootfs-create: _always_ clean apt stuff at the end
- rename `apt_purge_unneeded_packages()` to `apt_purge_unneeded_packages_and_clean_apt_caches()` for clarity
- image: `apt_purge_unneeded_packages_and_clean_apt_caches()`: warn if apt caches not empty; clean them off, always.
- host-utils: `local_apt_deb_cache_prepare()`: also test the target, warn if not empty
- extension: cleanup-space-final-image: do NOT clean apt stuff. done in core now
- the metric shit-ton of debugs added should help the next person who faces this in the future
2023-04-18 16:27:06 +02:00
Ricardo Pardini ed0b406265 lib: fix: replace undue `export` statements with `declare -g` 2023-03-31 09:12:44 +02:00
Igor Pečovnik b7b8eb7b72
Add / modify (c) in bash scripts (#4922)
* Add / modify (c) in bash scripts

Signed-off-by: Igor <igor@armbian.com>

* Add (c) to the source config files

---------

Signed-off-by: Igor <igor@armbian.com>
2023-03-09 18:30:40 +01:00
amazingfate e6915eabc4 add shebang to rootfs-create.sh 2023-02-24 18:59:53 +08:00
amazingfate 3d2cfbc620 use chroot_sdcard_apt_get_install for packages 2023-02-24 18:49:18 +08:00
Igor 00bc1b4a1e
armbian-next: rootfs: introduce `ROOTFS_COMPRESSION_RATIO`, default 5 for general use, default 15 for `rootfs` CLI; fix pv | tar bug; remove GPG signing
- Remove PGP signing from the script as its done in GHA
- Also remove generating .current control file as its obsolete in this design

Co-authored-by: Ricardo Pardini <ricardo@pardini.net>
2023-02-18 07:44:42 -03:00
Ricardo Pardini 091ae1d27f
armbian-next: `rootfs`: adapt to new reality after huge refactor
- make `tmpfs_estimated_size` and `available_physical_memory_mib` readonly and global and only ever set once
- remove subshell from `get_rootfs_cache_list()`, new version `get_rootfs_cache_list_into_array_variable()` for sanity
- warns if `ROOT_FS_CREATE_ONLY=yes` is set during cached build path
- add a `wait_for_disk_sync()` after restoring rootfs cache
- fix logging sections for `build_rootfs_only()` and `prepare_rootfs_build_params_and_trap()` in `build_rootfs_and_image()`
- remove the logging section from `get_or_create_rootfs_cache_chroot_sdcard()` call in `build_rootfs_only()` (which is now itself logged)
- @TODO: `deploy_qemu_binary_to_chroot()` is leaking a qemu bin in rootfs cache!
2023-02-18 07:44:24 -03:00
Ricardo Pardini 6176dc3702
armbian-next: `rootfs`: split `create-cache` into `rootfs-create`
- bear with me, this will make sense in the end
- a `mount_chroot()` was ejected out of rootfs building code into main, for reuse's sake
2023-02-18 07:44:21 -03:00