65 Commits

Author SHA1 Message Date
Serge Schneider
0755b07f06 Merge branch 'master' into arm64 2024-05-15 15:52:53 +01:00
Tom Dewey
fb48183f0d
Expand trap cleanup function (#773)
* build.sh: Unmount intermediates on trap

Iterate through image files which might be in use and detach them

Avoid silent failures - let the user know whether the build failed

* common: update unmount_image

Use udevadm settle instead of sleep if possible

Use losetup's -j option to find the loop device associated with a give image file

* build.sh: update clean-up trap term

---------

Co-authored-by: Serge Schneider <serge@raspberrypi.com>
2024-05-15 15:50:40 +01:00
Pev
d790fed832
Compare mount output using base of dirname (#771)
* Compare mount output using base of dirname

If you're building from a bind-mounted directory, the build will
fail as it will find two entries to unmount, but a single unmount
will remove them both causing an error. Adding a space means that
the mountpoint will only match with a single mount entry ; the
expected path, rather than the pre bind-mount.

* Switch to awk instead of mount, grep, cut pipes

Retry unmount 5 times and give up, letting the user know that they need to resolve the issue manually

---------

Co-authored-by: David Peverley <pev@analogue-micro.com>
Co-authored-by: Serge Schneider <serge@raspberrypi.com>
2024-05-15 15:45:43 +01:00
Serge Schneider
b4f2aeabde Merge branch 'master' into arm64 2024-02-26 14:15:02 +00:00
Serge Schneider
c029146a13 ensure_loopdev_partitions: let udev settle 2024-02-26 14:04:17 +00:00
Mark Spatz
502e5fa0e3
Remove QCOW2 build mechanism (#648) 2024-02-23 04:19:10 +00:00
Serge Schneider
94bb86632d Merge branch 'master' into arm64 2024-01-17 17:37:07 +00:00
Vasilis Tsiligiannis
1377e903b8
Ensure loop device partition nodes are created (#741)
Although the loop block device is created before attaching the image
to it, the devices for the partition that the image contains are still
not created. This patch creates those devices as well, when they are
not already available.

Fixes #482

Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2024-01-04 11:05:51 +00:00
Serge Schneider
1460069163 Merge branch 'master' into arm64 2023-11-27 15:34:52 +00:00
Stefan Becker
d966897395
README.md: add PI_GEN_RELEASE (#720)
This is the text written to "/etc/issue.txt" by update_issue(). The
default is the name used by official Raspberry Pi builds.

Fixes #719
2023-10-23 12:11:43 +01:00
Serge Schneider
e484aa8581 Merge branch 'master' into arm64 2023-08-17 16:51:11 +01:00
bamartin125
446f3e34c8
Adds call to mknod if loop dev does not exist after call to losetup -f (#483) 2023-08-17 16:24:47 +01:00
Serge Schneider
0defafedd4 Merge branch 'master' into arm64 2023-03-29 07:59:56 +01:00
Serge Schneider
4e92753982 Use tmpfs for chroot /run and /tmp 2023-03-29 07:56:32 +01:00
Serge Schneider
366bc2c8f3 Merge branch 'master' into arm64 2022-11-11 08:58:33 +00:00
rfc6919
1d13a292a7
use a single partitioned loop device (#641) 2022-11-11 08:56:04 +00:00
Serge Schneider
bd2cf0e0e4 Merge branch 'master' into arm64 2022-11-08 12:07:33 +00:00
Serge Schneider
c3083ecd50 Add parameter to keep cap_setfcap
Fixes #643
2022-11-08 12:04:12 +00:00
Serge Schneider
4e9aaac41e Merge branch 'master' into arm64 2022-09-01 16:32:50 +01:00
Serge Schneider
00da85177c Adjust partition formatting and mount options
Format the root partition with the metadata_csum option

Format the boot partition with 4 sectors per cluster for a slight performance boost

Remove 'flush' mount option from the boot partition
2022-06-17 15:48:27 +01:00
Serge Schneider
733513aa25 Enable APT_PROXY for arm64 builds
Closes #598
2022-02-22 11:34:06 +00:00
Serge Schneider
61c6294e23 Merge branch 'master' into arm64 2022-01-14 09:18:35 +00:00
Serge Schneider
40f67ce4ba Install ca-certificates during bootstrap
Fixes #424
2022-01-14 09:12:38 +00:00
Serge Schneider
6d2d36e7f2 Don't try to use qemu-debootstrap
Fixes #563
2022-01-14 09:11:46 +00:00
XECDesign
45b4cc19d0
Remove use of setarch for arm64
Fixes #572
2021-12-22 15:43:06 +00:00
Serge Schneider
2e3603d228 Merge branch 'master' into arm64 2021-10-05 17:43:06 +01:00
Serge Schneider
456aa2e50b bootstrap: do not install the info package 2021-10-05 17:26:51 +01:00
Josh Ackley
a8596e0d89 Use sync mode when running 'kpartx -a' 2021-10-05 13:53:08 +01:00
Serge Schneider
5971767590 Merge branch 'master' into arm64 2021-09-21 16:36:50 +01:00
Rob Smith
029f258cdd Don't check for binfmt_misc on arm platforms
When building on a native ARM platform, binfmt_misc is not
required to be loaded. This change checks the machine type
and if it's a ARM platform, skip the binfmt_misc validation.
2021-09-20 16:20:09 +01:00
Serge Schneider
4b59b5a70d Merge remote-tracking branch 'upstream/master' into arm64 2021-06-22 15:57:11 +01:00
Serge Schneider
f9d44edb72 Copy debootstrap.log on failure 2021-06-22 15:48:09 +01:00
Serge Schneider
4929d829f2 Merge branch 'master' into arm64 2021-03-04 00:37:55 +00:00
Holger Pandel
bf8c9f5383
Add QCOW2 build mechanism (#349) 2021-02-10 10:37:15 +00:00
Serge Schneider
99399d30fc aarch64 2020-07-30 15:29:40 +01:00
Serge Schneider
19c0188798 Ensure debootstrap runs through 'sh' rather than 'bash'
This fixes #338 and fixes #294
2019-10-30 13:31:07 +00:00
Kevin Stone
18b945ffb2 Moved git-hash determination to passed in build variable (#273) 2019-08-11 16:44:00 +01:00
Serge Schneider
f86cb0d54a script/common: Handle aarch64 host builds 2019-06-07 19:51:08 +01:00
Serge Schneider
67241b9626 Handle cases where binfmt_misc is built into the kernel
Fixes #264
2019-03-06 16:25:42 +00:00
Sam Tygier
7068086c94 Make sure unmount_image finds stale loop devices
Fixes #257 #104 #193

Instead of searching by full path, which is prone to fail, read full list and grep on filename.
2019-02-18 12:01:00 +00:00
Sam Tygier
a8eb03a5e4 Check binfmt_misc module is loaded
Give a friendly error message early.
2019-02-18 09:45:10 +00:00
Hugo Hromic
9e6af47045 Improve update_issue() function in common script
* Allow to customise pi-gen script name and repository in the generated issue file
* Preserve compatibility with existing function calls
2019-02-18 09:21:10 +00:00
Hugo Hromic
3b90b7ffed Improve bootstrap() function in common script
* Tidy up and simplify function code
* Allow to pass extra arguments to debootstrap, e.g. `--variant minbase`
* Preserve compatibility with existing function calls
2019-02-18 09:21:10 +00:00
Tomas Cerskus
4fc1423fdf scripts: do not ignore errors inside on_chroot calls 2018-11-08 12:12:04 +00:00
Serge Schneider
f8b629d6c7 Check /debootstrap exists before trying to remove 2018-10-15 09:12:13 +01:00
Serge Schneider
7ccf8185b3 Remove /debootstrap 2018-10-11 16:29:31 +01:00
Serge Schneider
ff2d5edee1 shellcheck 2018-03-13 12:50:50 +00:00
Serge Schneider
56da271499 Remove unnecessary files 2018-03-13 12:37:13 +00:00
TJ Rana
3441133d1c Corrected various typos (#91)
* Rename License.md to LICENSE

* Correct typos

* Clean up code layout

Organize layout with extra lines
2017-07-27 12:11:07 +02:00
Serge Schneider
530b66fd3f bootstrap: cope with NFS and FUSE filesystems 2017-06-20 16:17:12 +01:00