Igor Velkov
3814034624
partitioning: fix #9201 /etc/fstab entry (double comma)
...
Infrastructure: Dispatch to fork / 📢 Run repository dispatch on fork (push) Has been cancelled
Infrastructure: Mirror to Codeberg / codeberg (push) Has been cancelled
Maintenance: Announce merge / announcepush (push) Has been cancelled
Maintenance: Security scan / Scorecards analysis (push) Has been cancelled
Data: Sync board list / Send dispatch (push) Has been cancelled
mountopts[] values start with a leading comma by convention (line 26),
but all call sites added an explicit comma before the expansion, producing
e.g. `defaults,,commit=120,errors=remount-ro` for ext4.
Also removed duplicate mountopts[btrfs] override (line 345 duplicated
line 85 and would silently clobber options set by hooks).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 21:17:01 +02:00
Igor Velkov
3e4de6c02b
( #9400 P1a) lib/functions/image/fingerprint.sh: convert [ ] to [[ ]]
...
Replace POSIX `[ ]` with bash `[[ ]]` on one -n test.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
b9bf4489a8
( #9400 P1a) lib/functions/image/initrd.sh: convert [ ] to [[ ]]
...
Replace POSIX `[ ]` with bash `[[ ]]` on one string comparison.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
f0201782a4
( #9400 P1a) lib/functions/image/partitioning.sh: convert [ ] to [[ ]]
...
Replace POSIX `[ ]` with bash `[[ ]]` on three remaining single-bracket
conditionals: two numeric comparisons on sfdisk version (lines 251, 270)
and one -z test with unquoted variable (line 485, also adds quoting).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
ed371f5f5a
( #9400 P3a) Replace useless cat with input redirection ( #9404 )
...
Infrastructure: Dispatch to fork / 📢 Run repository dispatch on fork (push) Has been cancelled
Infrastructure: Mirror to Codeberg / codeberg (push) Has been cancelled
Maintenance: Announce merge / announcepush (push) Has been cancelled
Maintenance: Security scan / Scorecards analysis (push) Has been cancelled
Data: Sync board list / Send dispatch (push) Has been cancelled
* (#9400 P3a) trap-logging: replace useless cat with direct file arguments
- gzip < file → gzip -c file (direct argument, -c for stdout)
- cat file | ansi2txt → ansi2txt < file (ansi2txt has no file argument)
- Remove now-unnecessary shellcheck disable=SC2002 comments
* (#9400 P3a) logging: replace useless cat with direct file argument
- cat file | grep | sed → grep file | sed (grep accepts filename directly)
- Remove now-unnecessary shellcheck disable=SC2002 comment
* (#9400 P3a) initrd: replace useless cat with direct file argument
- cat file | md5sum → md5sum file (md5sum accepts filename directly)
* (#9400 P3a) write-device: replace useless cat with direct file argument
- cat file | awk → awk file (awk accepts filename directly)
- Remove now-unnecessary shellcheck disable=SC2002 comment
* (#9400 P3a) export-logs: replace useless cat with direct file argument
- cat file | sed → sed file (sed accepts filename directly)
- Remove now-unnecessary shellcheck disable=SC2002 comment
* (#9400 P3a) python-tools: replace cat subshell with $(<file) syntax
- $(cat file) → $(< file) (bash builtin, no subprocess)
* (#9400 P3a) artifact-armbian-base-files: replace useless cat with direct file argument
- cat file | grep → grep file (grep accepts filename directly)
2026-02-18 09:28:14 +01:00
Igor Pecovnik
4d60ce08f2
chore: update copyright years to 2026
...
Update all copyright notices in shell scripts from 2025 to 2026.
## Changes
- **Igor Pecovnik**: 2013-2025 → 2013-2026 (129 files)
- **Ricardo Pardini**: 2023-2025 → 2023-2026, 2020-2025 → 2020-2026 (5 files)
## Additional Improvements
Also updated the backtitle in `lib/functions/configuration/interactive.sh`:
- Changed title from "Armbian building script" to "Armbian Linux build framework"
- Removed docs link for cleaner display
- Uses dynamic year calculation with separate declaration (fixes shellcheck SC2155)
2025-12-25 12:03:34 +01:00
Ricardo Pardini
d4f7046c88
compress-checksum: introduce COMPRESS_OUTPUTIMAGE=zst ( #9101 )
2025-12-19 13:00:45 +01:00
Alex Simkin
b47445c990
add CRYPTROOT_AUTOUNLOCK option and fix CRYPTROOT for uefi builds
...
fixes #6280
2025-11-02 20:15:19 +01:00
Jianfeng Liu
d890a4b3f3
partitioning: allow single root partition for all filesystem type
2025-10-17 19:33:52 +02:00
Rolf Leggewie
aec8988419
lib / partitioning.sh: remove some whitespace at end-of-line
2025-09-04 01:59:32 +08:00
Mecid
02fb49bced
Make the Partition Type UUID if-chain more readable
2025-09-04 01:59:32 +08:00
Mecid Urganci
61526350f3
Partitioning UFS: Add rockchip support
2025-09-04 01:59:32 +08:00
Ricardo Pardini
fa0d9ab820
rootfs-to-image: do not use --sparse, it's _very slow_ on certain IO/FS combos
...
- Revert "rootfs-to-image: preserve sparse files when moving artefacts to final destination with rsync"
This reverts commit 4fd0e0c29d3f8e58c182f6c5042307bbb15163b2.
2025-05-29 17:55:27 +02:00
alex3d
df6a133a14
partitioning: fix compressed BTRFS creation
2025-05-18 17:43:21 +02:00
Franklyn Tackitt
4a8199b992
partitioning: Use btrfs set-default MOUNT/subvolume
...
Forked Helper / 📢 Run repository dispatch on fork (push) Waiting to run
Announce PR merge to Discord / announcepush (push) Waiting to run
Scorecards Security Scan / Scorecards analysis (push) Waiting to run
This simplifies the code, removing the need to grep/cut the output of btrfs subvolume list
2025-05-05 06:15:50 +02:00
Franklyn Tackitt
76470b1dad
partitioning: Rely on the btrfs default subvolume for remounting
...
This allows changes to the default subvolume in `btrfs_root_add_subvolumes`
to propagate as needed into the final image.
2025-05-05 06:15:50 +02:00
Franklyn Tackitt
9f37e55980
partitioning: Add BTRFS_ROOT_SUBVOLUME switch
...
This allows changing the default root subvolume from @ to any user
defined subvolume name
2025-05-05 06:15:50 +02:00
FantasyGmm
76229701ca
Adding Variables to Set the Sector Size for UFS Devices
Forked Helper / 📢 Run repository dispatch on fork (push) Waiting to run
Announce PR merge to Discord / announcepush (push) Waiting to run
Scorecards Security Scan / Scorecards analysis (push) Waiting to run
2025-04-19 13:19:13 +02:00
Igor Velkov
ab6587ac05
If rootfs placed on btrfs filesystem, place root on @ subvolume
...
Forked Helper / 📢 Run repository dispatch on fork (push) Has been cancelled
Announce PR merge to Discord / announcepush (push) Has been cancelled
Scorecards Security Scan / Scorecards analysis (push) Has been cancelled
Update Board Lists / Send dispatch (push) Has been cancelled
It makes possible to work with snapshots of a root filesystem
2025-04-16 23:33:07 +02:00
Igor Pecovnik
ec2544e005
Bugfix: Remove directories from sha files
2025-02-10 20:17:25 +01:00
Igor Pecovnik
5cc3e2e872
Fix handling loop devices
2025-01-08 13:17:47 +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
Alex Shumsky
4fd0e0c29d
rootfs-to-image: preserve sparse files when moving artefacts to final destination with rsync
Forked Helper / 📢 Run repository dispatch on fork (push) Has been cancelled
Announce PR merge to Discord / announcepush (push) Has been cancelled
Scorecards Security Scan / Scorecards analysis (push) Has been cancelled
2024-12-24 22:33:51 +01:00
M.Schmidt
6607728e24
improve(lvm,cryptroot): export private key with a structurally equal naming scheme; cleanup
2024-12-13 10:01:19 +01:00
M.Schmidt
590b75fd6f
improve(lvm+cryptroot extensions): enable possibility for LVM on LUKS
2024-12-13 10:01:19 +01:00
M.Schmidt
3ec24d40e8
fix(lvm,cryptroot extensions): introduce another variable to keep track of the physical partition/uuid and rootdevice/uuid seperately
2024-12-13 10:01:19 +01:00
user
502e139598
New option: CRYPTROOT_MAPPER. Make ROOT_MAPPER name for CRYPTROOT changable.
2024-11-05 16:35:02 +01:00
user
817519210b
Fix partitioning root UUID bug in /etc/crypttab.
2024-11-05 16:35:02 +01:00
rafael
dcff6cf71d
fixes #7210 for extensions that modify rootdevice
2024-09-14 21:44:52 +02:00
Igor Pecovnik
8ee40367d4
Revert "Store list of preinstalled extensions EXTENSIONS and add VENDORPRETTYNAME to image fingerprint"
...
This reverts commit 9af94d5977f1c5f330088e87c7936b097658952b.
2024-09-08 16:22:02 +02:00
Igor Pecovnik
9af94d5977
Store list of preinstalled extensions EXTENSIONS and add VENDORPRETTYNAME to image fingerprint
2024-09-03 22:03:04 +02:00
ColorfulRhino
b8dbe607e5
partitioning: Declare rootpart as local variable
...
The others like `uefipart` and `bootpart` are also defined as local var. Establish consistency.
2024-08-05 20:39:57 +02:00
ColorfulRhino
1092d60d3e
partitioning: Set correct partition type UUID for root filesystem
...
Previously, only the type "Generic Linux filesystem" was used.
Use the correct type "Linux root ($ARCHITECTURE)" for the root filesystem.
2024-08-05 20:39:57 +02:00
ColorfulRhino
a027c4be37
partitioning: Add check to use legacy BIOS boot partition with GPT only, not MBR
...
Exit with an error message if trying to add this partition to an MBR disk.
2024-08-05 20:39:57 +02:00
ColorfulRhino
01d8716bf9
partitioning: Output the partitioning options to the debug log
2024-08-05 20:39:57 +02:00
ColorfulRhino
0b6d61f4c4
partitioning: Add some comments to improve readbility
2024-08-05 20:39:57 +02:00
ColorfulRhino
d638276fcc
partitioning: Reduce commit mount option for btrfs and ext4 to 120
...
Mount option `commit=600` (=10 minutes) seems pretty high.
Reduce it to 120 for ext4 (default for ext4 is `commit=5`)
and 120 for btrfs (default for btrfs is `commit=30`) to reduce
risk of losing data on power loss.
Sources:
- https://www.kernel.org/doc/html/latest/admin-guide/ext4.html
- https://wiki.archlinux.org/title/Btrfs#Commit_interval
- https://btrfs.readthedocs.io/en/latest/Administration.html
2024-07-09 11:31:51 +02:00
Ricardo Pardini
1ff783d867
fix: partitioning: disable orphan_file (FEATURE_C12) for ext4 filesystems on 1.47+ e2fsprogs host
...
- otherwise:
```
fsck.ext4 -a -C0 /dev/mmcblk0p1
/dev/mmcblk0p1 has unsupported feature(s): FEATURE_C12
e2fsck: Get a newer version of e2fsck!
```
- `orphan_file` can only be disabled on recent-enough e2fsprogs, thus check version and compare
2024-06-27 14:25:20 +02:00
Igor Pecovnik
75ce67f329
Run shellfmt to complete code
2024-06-22 19:22:24 +02:00
Alex Shumsky
bbd5699e13
partitioning: fix race condition on loop device allocation
2024-06-21 22:14:01 -04:00
JohnTheCoolingFan
7da42c8a42
Revert "Added a call to losetup -f"
...
This reverts commit b3d9a17a5798ff4a8deec9d1b42d252479cbc1bc.
2024-05-20 15:58:51 +02:00
JohnTheCoolingFan
b3d9a17a57
Added a call to losetup -f
...
See https://github.com/armbian/build/issues/6568
2024-05-20 08:51:39 +02:00
Ricardo Pardini
40371934d2
lib & config: give shellcheck directions (to /dev/null for dynamic, to repo-relative path for static) for all sourced references
...
- in preparation for tightening the shellcheck severity level
- it needs to be able to follow all sources; dynamic ones are ignored, static ones need root-relative prefix
2024-05-19 19:41:35 +02:00
Igor
33906869c0
Improve loop devices management by allocating random free device instead of next one ( #6345 )
2024-03-06 01:09:54 +01:00
BlitzKrieg
85eced8d64
Adds --partscan parameter to losetup command for forcing the kernel to scan partition table. #6333
2024-03-02 21:00:55 +01:00
Rafael
94d4c007d1
Feature lvm support ( #6204 )
...
* using the configured volume group name
* added LVM support
* ensuring /boot never on LVM volume, created hook to setup root device
* preparing root device via extension, not assuming any particular partition for root
* using tab spacing
* using global parameter to require a boot partition
* using boot require, moving cryptroot code to extension
* adds crypt image suffix
---------
Co-authored-by: rafael <rvalle@privaz.io>
2024-02-01 20:01:58 +01:00
Alex Shumsky
eee0d33bbc
partitioning: allow to disable boot partition if bootloader known to support rootfs
2024-01-22 21:18:15 +01:00
Alex Shumsky
86a743ad83
partitioning: do not force image size estimation for (potentially) compressed btrfs rootfs
2024-01-22 21:18:15 +01:00
Igor Pecovnik
565a33d62d
Add SWITCH to define XZ compression as a parameter and leave defaults as is
2024-01-17 13:08:13 +01:00
Ricardo Pardini
c434c3613c
core: semantic change, KERNELSOURCE must be explicitly 'none' to avoid kernel compilation (not unset)
2024-01-07 18:58:36 +01:00