1. 30 Mar, 2021 1 commit
    • Christian Ehrhardt's avatar
      d/u/geniso: fix rounding to unbreak iso creation · 2d444547
      Christian Ehrhardt authored
      
      
      In certain cases (e.g. toolchain changes) the size of the created EFI
      blob can end up triggering a rounding down which breaks the build.
      Example:
        debian/util/geniso src/bin-combined/ipxe.iso src/bin-i386-pcbios/ipxe.lkrn \
          src/bin-x86_64-efi/ipxe.efi
        ...
        ++ stat -c %s src/bin-x86_64-efi/ipxe.efi
        + blocks=896
        + mkfs.msdos -C src/bin-combined/iso.dir.uayAjK/efi.img 896
        + mmd -i src/bin-combined/iso.dir.uayAjK/efi.img ::efi
        + mmd -i src/bin-combined/iso.dir.uayAjK/efi.img ::efi/boot
        + mcopy -o -i src/bin-combined/iso.dir.uayAjK/efi.img \
            src/bin-x86_64-efi/ipxe.efi ::efi/boot/bootx64.efi
        Disk full
      
      This is due to:
        echo $(($(stat -c %s "$EFI") / 1024))
        872
        echo $(($(stat -c %s "$EFI") / 1024 + 55))
        927
        echo $(((($(stat -c %s "$EFI") / 1024 + 55)/32*32)))
        896 <- Rounds DOWN
      
      This is due to size+55 => 927 being "just below" the next 32 iteration
      which would be at 928. In many cases that works fine (I don't know how
      the +55 was invented, I guess that is for headers). But in some cases
      it caps too much eventualily ending up in a too small image file.
      
      Rounding up (in bash) usually is "N+1/divisor". Therefore if add +1 before
      the rounding for 32 we'd avoid the issue.
      
      I compared the resulting ISO size with former (Ubuntu) builds and it was
      still well within the range of past builds (869,947,948 - now 884).
      
      Signed-off-by: Christian Ehrhardt's avatarChristian Ehrhardt <christian.ehrhardt@canonical.com>
      2d444547
  2. 25 Feb, 2020 2 commits
  3. 02 Jan, 2020 4 commits
  4. 19 Dec, 2019 2 commits
  5. 14 Dec, 2019 7 commits
  6. 09 Feb, 2019 8 commits
  7. 25 Jan, 2019 1 commit
  8. 21 Jan, 2019 3 commits
  9. 15 Jan, 2019 3 commits
  10. 17 Sep, 2018 1 commit
  11. 26 Aug, 2018 1 commit
  12. 17 Jul, 2018 2 commits
  13. 09 Jul, 2018 1 commit
  14. 08 Jul, 2018 1 commit
    • Michael Brown's avatar
      [build] Use positive-form tests when checking for supported warnings · 1c47eb18
      Michael Brown authored
      
      
      Some versions of gcc seem to silently accept an attempt to disable an
      unrecognised warning (e.g. via -Wno-stringop-truncation) but will then
      report the unrecognised warning if any other error occurs during the
      build, resulting in a potentially misleading error message.
      
      Avoid this potential confusion by using the positive-form tests in
      order to determine the workaround CFLAGS.
      
      Signed-off-by: default avatarMichael Brown <mcb30@ipxe.org>
      1c47eb18
  15. 07 Jul, 2018 3 commits