Commit Graph

16 Commits (dca867c5a368045efe38db0ed9bc393ba9a2c9f4)

Author SHA1 Message Date
David Woodhouse dca867c5a3 firmware-utils/ptgen: allow explicit placement of partitions
For Banana Pi R2 we need to place the U-Boot partition at precisely 0x50000.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years ago
李国 1963bbaa8f firmware-utils: ptgen: add GPT support
Add GPT support to ptgen, so we can generate EFI bootable images.

Introduced two options:
    -g        generate GPT partition table
    -G GUID   use GUID for disk and increase last bit for all partitions

We drop The alternate partition table to reduce size, This may cause
problems when generate vmdk images or vdi images. We have to pad enough
sectors when generate these images.

Signed-off-by: 李国 <uxgood.org@gmail.com>
[fixed compilation on macOS]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Linus Walleij 6cdf08f026 firmware-tools/ptgen: Allow generation 0 size partitions
The firmware on the D-Link DNS-313 NAS require two blank
partitions before the boot partition. Support this if
explicitly requested with a "-n" flag.

Tested on the D-Link DNS-313.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[Broken out from original patch]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years ago
Michael Heimpold 498285922e firmware-tools/ptgen: use portable exit codes
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
6 years ago
Michael Heimpold 83f729dfb2 firmware-tools/ptgen: fix minor coding style issues
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
6 years ago
Jonas Gorski 997fed94e3 ptgen: work around gcc miscompilation
Some gcc versions seem to miscompile code using ternary operators,
work around this by just returning the result if exp is 0.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Felix Fietkau 7eeb254cc4 treewide: replace nbd@openwrt.org with nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 39b8f7c0f7 firmware-tools/ptgen: use stdint types for struct pte
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45957
9 years ago
Felix Fietkau 6263567444 firmware-tools/ptgen: fix endianness conversion for PTE .start, .length field.
They are of 32-bit little endian integers.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

SVN-Revision: 45956
9 years ago
Jo-Philipp Wich 6358368500 firmware-utils: allow passing a specific MBR signature to ptgen
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 42934
10 years ago
John Crispin 6c9d20d6e7 tools/firmware-utils/ptgen option to use MB rounding
SVN-Revision: 33218
12 years ago
Felix Fietkau 216c6cd8a9 firmware-utils: when using open with O_CREAT and O_WRONLY, also use O_TRUNC to ensure that overwritten files have the right size (fixes #3505)
SVN-Revision: 12667
16 years ago
Felix Fietkau b71b54bb25 fix x86 boot filesystem allocation (#1736)
SVN-Revision: 7312
17 years ago
Felix Fietkau 41ac34a2a2 make ptgen print the end offset of the last partition as well
SVN-Revision: 6358
17 years ago
Felix Fietkau aa22253602 fix cylinder rounding in ptgen
SVN-Revision: 6352
17 years ago
Felix Fietkau cf52f51b85 remove custom partition table hack, add ptgen utility for generating partition tables
SVN-Revision: 5704
18 years ago