Commit ebfb94d8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'x86-build-2025-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 build updates from Ingo Molnar:

 - Drop CRC-32 checksum and the build tool that generates it (Ard
   Biesheuvel)

 - Fix broken copy command in genimage.sh when making isoimage (Nir
   Lichtman)

* tag 'x86-build-2025-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/boot: Add back some padding for the CRC-32 checksum
  x86/boot: Drop CRC-32 checksum and the build tool that generates it
  x86/build: Fix broken copy command in genimage.sh when making isoimage
parents e34c3805 e471a86a
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -1038,16 +1038,6 @@ Offset/size: 0x000c/4
  This field contains maximal allowed type for setup_data and setup_indirect structs.


The Image Checksum
==================

From boot protocol version 2.08 onwards the CRC-32 is calculated over
the entire file using the characteristic polynomial 0x04C11DB7 and an
initial remainder of 0xffffffff.  The checksum is appended to the
file; therefore the CRC of the file up to the limit specified in the
syssize field of the header is always 0.


The Kernel Command Line
=======================

+2 −5
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ setup-y += video-vesa.o
setup-y		+= video-bios.o

targets		+= $(setup-y)
hostprogs	:= tools/build
hostprogs	+= mkcpustr

HOST_EXTRACFLAGS += -I$(srctree)/tools/include \
@@ -61,11 +60,9 @@ KBUILD_CFLAGS += $(CONFIG_CC_IMPLICIT_FALLTHROUGH)
$(obj)/bzImage: asflags-y  := $(SVGA_MODE)

quiet_cmd_image = BUILD   $@
silent_redirect_image = >/dev/null
cmd_image = $(obj)/tools/build $(obj)/setup.bin $(obj)/vmlinux.bin \
			       $(obj)/zoffset.h $@ $($(quiet)redirect_image)
      cmd_image = cp $< $@; truncate -s %4K $@; cat $(obj)/vmlinux.bin >>$@

$(obj)/bzImage: $(obj)/setup.bin $(obj)/vmlinux.bin $(obj)/tools/build FORCE
$(obj)/bzImage: $(obj)/setup.bin $(obj)/vmlinux.bin FORCE
	$(call if_changed,image)
	@$(kecho) 'Kernel: $@ is ready' ' (#'$(or $(KBUILD_BUILD_VERSION),`cat .version`)')'

+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ SECTIONS
		*(.data)
		*(.data.*)

		/* Add 4 bytes of extra space for a CRC-32 checksum */
		/* Add 4 bytes of extra space for the obsolete CRC-32 checksum */
		. = ALIGN(. + 4, 0x200);
		_edata = . ;
	}
+4 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
# This script requires:
#   bash
#   syslinux
#   genisoimage
#   mtools (for fdimage* and hdimage)
#   edk2/OVMF (for hdimage)
#
@@ -251,7 +252,9 @@ geniso() {
	cp "$isolinux" "$ldlinux" "$tmp_dir"
	cp "$FBZIMAGE" "$tmp_dir"/linux
	echo default linux "$KCMDLINE" > "$tmp_dir"/isolinux.cfg
	if [ ${#FDINITRDS[@]} -gt 0 ]; then
		cp "${FDINITRDS[@]}" "$tmp_dir"/
	fi
	genisoimage -J -r -appid 'LINUX_BOOT' -input-charset=utf-8 \
		    -quiet -o "$FIMAGE" -b isolinux.bin \
		    -c boot.cat -no-emul-boot -boot-load-size 4 \
+2 −0
Original line number Diff line number Diff line
@@ -45,6 +45,8 @@ SECTIONS

		setup_size = ALIGN(ABSOLUTE(.), 4096);
		setup_sects = ABSOLUTE(setup_size / 512);
		ASSERT(setup_sects >= 5, "The setup must be at least 5 sectors in size");
		ASSERT(setup_sects <= 64, "The setup must be at most 64 sectors in size");
	}

	. = ALIGN(16);
Loading