summaryrefslogtreecommitdiffstats
path: root/scripts/gen_image_generic.sh
Commit message (Collapse)AuthorAgeFilesLines
* scripts: gen_image_generic: allow the partition types to be setMathew McBride2023-06-021-1/+3
| | | | | | | | | The use case for this is to set the kernel partition as the EFI system partition. Versions of U-Boot with the EFI boot manager (eficonfig and efidebug commands) will store their boot order data on the ESP. Signed-off-by: Mathew McBride <matt@traverse.com.au>
* scripts/gen_image_generic.sh: allow passing in partition offsetTim Harvey2023-05-181-1/+1
| | | | | | | | | | Allow passing in an optional offset (PARTOFFSET) for the first partition. If not specified this will default to 256K (512 blocks) as it has before. For example if you want to start partition data at a 16M offset instead of 256K, specify 'PARTOFFSET=16M'. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* scripts/gen_image_generic.sh: fix order of files in EFI bootfsDaniel Golle2022-04-151-2/+19
| | | | | | | | | | | | mtools recursive copy (mcopy -s ...) is using READDIR(3) to iterate over the directory entries, hence they end up in the FAT filesystem in traversal order which breaks reproducibility (rather than being added to the FAT filesystem in a reproducible order). Implement recursive copy in gen_image_generic.sh in Shell code instead, as in that way we can force files to be copied in reproducible order. Fixes: aece8f5ae8 ("scripts/gen_image_generic.sh: generate reproducible EFI filesystem") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* scripts/gen_image_generic.sh: generate reproducible EFI filesystemDaniel Golle2022-04-111-2/+3
| | | | | | | | | Generate FAT filesystem for EFI boot in a reproducible way: * use '--invariant' option of mkfs.fat * set timestamps of all files to SOURCE_DATE_EPOCH * make sure files are ordered locale-independent Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* scripts/gen_image_generic.sh: make ext4 bootfs reproducibleDaniel Golle2022-03-281-1/+1
| | | | | | | Set fixed timestamp for kernel other files in /boot filesystem. This should help making x86 *combined* images reproducible. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* scripts/gen_image_generic.sh: fix more shellcheck warningsPetr Štetiar2020-07-111-4/+3
| | | | | | | | | | | | | | | | | | Fixes following shellcheck warnings: In scripts/gen_image_generic.sh line 20: cyl=$(( (KERNELSIZE + ROOTFSSIZE) * 1024 * 1024 / (head * sect * 512))) ^-^ SC2034: cyl appears unused. Verify use (or export if used externally). -- In scripts/gen_image_generic.sh line 34: [ -n "$PADDING" ] && dd if=/dev/zero of="$OUTPUT" bs=512 seek="$(($ROOTFSOFFSET + $ROOTFSSIZE))" conv=notrunc count="$sect" ^-----------^ SC2004: $/${} is unnecessary on arithmetic variables. -- In scripts/gen_image_generic.sh line 35: mkfs.fat -n kernel -C "$OUTPUT.kernel" -S 512 "$(($KERNELSIZE / 1024))" ^---------^ SC2004: $/${} is unnecessary on arithmetic variables. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* scripts/gen_image_generic.sh: use /bin/shRosen Penev2020-07-111-1/+1
| | | | | | This has nothing bash specific. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* scripts/gen_image_generic.sh: replace -o with if/&&Rosen Penev2020-07-111-2/+2
| | | | | | | | -o is not well defined. Found with shellcheck. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* x86: generate EFI platform bootable images李国2020-03-311-2/+8
| | | | | | | | | | | | | | | | | Add EFI platform bootable images for x86 platforms. These images can also boot from legacy BIOS platform. EFI System Partition need to be fat12/fat16/fat32 (not need to load filesystem drivers), so the first partition of EFI images are not ext4 filesystem any more. GPT partition table has an alternate partition table, we did not generate it. This may cause problems when use these images as qemu disk (kernel can not find rootfs), we pad enough sectors will be ok. Signed-off-by: 李国 <uxgood.org@gmail.com> [part_magic_* refactoring, removed genisoimage checks] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* scripts/gen_image_generic.sh: replace deprecated backticks with $()Rosen Penev2019-12-311-1/+1
| | | | | | | | | | This replaces deprecated backticks by more versatile $(...) syntax. Found with shellcheck. Signed-off-by: Rosen Penev <rosenp@gmail.com> [adjust commit title and message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* scripts/gen_image_generic.sh: remove $ in arithmeticRosen Penev2019-12-311-1/+1
| | | | | | | | Fixes shellcheck warning: SC2004: $/${} is unnecessary on arithmetic variables. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* build: label kernel and rootfs ext4 volumesYousong Zhou2019-11-031-1/+1
| | | | | | | | | | | UUID of ext4 volumes generated by make_ext4fs are determined by volume label and it will all be 57f8f4bc-abf4-655f-bf67-946fc0f9f25b when label is empty Labeling them does not make them unique but tools like block command from fstools have a better chance differentiating them Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* scripts/gen_image_generic.sh: fail on errorsStijn Tintel2019-03-271-1/+1
| | | | | | | | | | | The script always exits with value 0, even if some of the commands fail. This can potentially create broken, unbootable images, e.g. when make_ext4fs fails due to TARGET_KERNEL_PARTSIZE being too small for the kernel. Avoid this by failing the script when any command fails. Acked-by: Jo-Philipp Wich <jo@mein.io> Acked-by: Petr Štetiar <ynezz@true.cz> Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* scripts/gen_image_generic.sh: drop NOGRUB variableStijn Tintel2017-07-141-2/+0
| | | | | | It's not used since commit 816a9b30f683b8376423ff029d40e0e4a2701026. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* scripts/gen_image_generic.sh: move from x86/imageStijn Tintel2017-07-141-0/+37
The script can also be useful for other targets. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>