diff options
| author | Simon Rettberg | 2021-07-22 14:36:35 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2021-07-22 14:36:35 +0200 |
| commit | fc21afb08c7b827b3cd4a77618f36a7abdc13494 (patch) | |
| tree | f7909726a1d49cb834bfa9647621b29cb15caea4 /src/util | |
| parent | Merge branch 'master' into openslx (diff) | |
| parent | [cloud] Retry DHCP aggressively in AWS EC2 (diff) | |
| download | ipxe-fc21afb08c7b827b3cd4a77618f36a7abdc13494.tar.gz ipxe-fc21afb08c7b827b3cd4a77618f36a7abdc13494.tar.xz ipxe-fc21afb08c7b827b3cd4a77618f36a7abdc13494.zip | |
Merge branch 'master' into openslx
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/elf2efi.c | 16 | ||||
| -rwxr-xr-x | src/util/genfsimg | 18 |
2 files changed, 31 insertions, 3 deletions
diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c index 5542b99f8..8af53aeb4 100644 --- a/src/util/elf2efi.c +++ b/src/util/elf2efi.c @@ -125,7 +125,21 @@ #define R_ARM_V4BX 40 #endif -#define EFI_FILE_ALIGN 0x20 +/** + * Alignment of raw data of sections in the image file + * + * Some versions of signtool.exe will spuriously complain if this + * value is less than 512. + */ +#define EFI_FILE_ALIGN 0x200 + +/** + * Alignment of sections when loaded into memory + * + * This must equal the architecture page size, in order to allow for + * the possibility of the firmware using page-level protection to + * enforce section attributes at runtime. + */ #define EFI_IMAGE_ALIGN 0x1000 struct elf_file { diff --git a/src/util/genfsimg b/src/util/genfsimg index c3123f3ed..1635a11ac 100755 --- a/src/util/genfsimg +++ b/src/util/genfsimg @@ -230,7 +230,7 @@ done # since isohybrid will refuse to work without them. # if [ -n "${ISOIMG}" ] ; then - ISOARGS="-J -R" + ISOARGS="-J -R -l" copy_syslinux_file "isolinux.bin" "${ISODIR}" copy_syslinux_file "ldlinux.c32" "${ISODIR}" 2>/dev/null || true ISOARGS="${ISOARGS} -no-emul-boot -eltorito-boot isolinux.bin" @@ -240,6 +240,16 @@ if [ -n "${ISOIMG}" ] ; then else FATIMG= fi + if [ -n "${SOURCE_DATE_EPOCH:-}" ] ; then + DATE_FMT="+%Y%m%d%H%M%S00" + BUILD_DATE=$(date -u -d "@${SOURCE_DATE_EPOCH}" "${DATE_FMT}" \ + 2>/dev/null || \ + date -u -r "${SOURCE_DATE_EPOCH}" "${DATE_FMT}" \ + 2>/dev/null || \ + date -u "${DATE_FMT}") + ISOARGS="${ISOARGS} --set_all_file_dates ${BUILD_DATE}" + ISOARGS="${ISOARGS} --modification-date=${BUILD_DATE}" + fi fi # Create FAT filesystem image, if applicable @@ -297,7 +307,11 @@ if [ -n "${ISOIMG}" ] ; then -publisher "ipxe.org" -sysid "iPXE" -o "${ISOIMG}" \ ${ISOARGS} "${ISODIR}" if isohybrid --version >/dev/null 2>&1 ; then - isohybrid "${ISOIMG}" + ISOHYBRIDARGS= + if [ -n "${SOURCE_DATE_EPOCH:-}" ] ; then + ISOHYBRIDARGS="${ISOHYBRIDARGS} --id ${SOURCE_DATE_EPOCH}" + fi + isohybrid ${ISOHYBRIDARGS} "${ISOIMG}" fi fi |
