Commit 55fd59b0 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files


Conflicts:
	drivers/net/ethernet/ibm/ibmvnic.c

Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents a4390e96 bbe2ba04
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -137,15 +137,24 @@ Boot Kernel With a Boot Config
==============================

Since the boot configuration file is loaded with initrd, it will be added
to the end of the initrd (initramfs) image file with size, checksum and
12-byte magic word as below.
to the end of the initrd (initramfs) image file with padding, size,
checksum and 12-byte magic word as below.

[initrd][bootconfig][size(u32)][checksum(u32)][#BOOTCONFIG\n]
[initrd][bootconfig][padding][size(le32)][checksum(le32)][#BOOTCONFIG\n]

The size and checksum fields are unsigned 32bit little endian value.

When the boot configuration is added to the initrd image, the total
file size is aligned to 4 bytes. To fill the gap, null characters
(``\0``) will be added. Thus the ``size`` is the length of the bootconfig
file + padding bytes.

The Linux kernel decodes the last part of the initrd image in memory to
get the boot configuration data.
Because of this "piggyback" method, there is no need to change or
update the boot loader and the kernel image itself.
update the boot loader and the kernel image itself as long as the boot
loader passes the correct initrd file size. If by any chance, the boot
loader passes a longer size, the kernel feils to find the bootconfig data.

To do this operation, Linux kernel provides "bootconfig" command under
tools/bootconfig, which allows admin to apply or delete the config file
@@ -176,7 +185,8 @@ up to 512 key-value pairs. If keys contains 3 words in average, it can
contain 256 key-value pairs. In most cases, the number of config items
will be under 100 entries and smaller than 8KB, so it would be enough.
If the node number exceeds 1024, parser returns an error even if the file
size is smaller than 32KB.
size is smaller than 32KB. (Note that this maximum size is not including
the padding null characters.)
Anyway, since bootconfig command verifies it when appending a boot config
to initrd image, user can notice it before boot.

+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ tcan4x5x: tcan4x5x@0 {
		spi-max-frequency = <10000000>;
		bosch,mram-cfg = <0x0 0 0 32 0 0 1 1>;
		interrupt-parent = <&gpio1>;
		interrupts = <14 GPIO_ACTIVE_LOW>;
		interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
		device-state-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
		device-wake-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ Example (for ARM-based BeagleBone with NPC100 NFC controller on I2C2):
		clock-frequency = <100000>;

		interrupt-parent = <&gpio1>;
		interrupts = <29 GPIO_ACTIVE_HIGH>;
		interrupts = <29 IRQ_TYPE_LEVEL_HIGH>;

		enable-gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
		firmware-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ Example (for ARM-based BeagleBone with PN544 on I2C2):
		clock-frequency = <400000>;

		interrupt-parent = <&gpio1>;
		interrupts = <17 GPIO_ACTIVE_HIGH>;
		interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;

		enable-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
		firmware-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
+2 −3
Original line number Diff line number Diff line
@@ -57,9 +57,8 @@ to enable them. ::
They can be enabled individually. The full list of the parameters: ::

	make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \
	  OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \
	  READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \
	  HOSTLD=ld.lld
	  OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump READELF=llvm-readelf \
	  HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar HOSTLD=ld.lld

Currently, the integrated assembler is disabled by default. You can pass
``LLVM_IAS=1`` to enable it.
Loading