Skip to content

Commit

Permalink
modules/linux: Add support for multiple kernel versions
Browse files Browse the repository at this point in the history
Follow same pattern as used for coreboot. Add existing kernel version
as default for all existing boards.

Signed-off-by: Matt DeVillier <[email protected]>
  • Loading branch information
MrChromebox committed Aug 20, 2020
1 parent b14e564 commit 98ccc1a
Show file tree
Hide file tree
Showing 20 changed files with 30 additions and 6 deletions.
1 change: 1 addition & 0 deletions boards/kgpe-d16/kgpe-d16.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Configuration for a kgpe-d16 running non-Qubes
export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_COREBOOT_CONFIG=config/coreboot-kgpe-d16.config
CONFIG_LINUX_CONFIG=config/linux-kgpe-d16.config
Expand Down
1 change: 1 addition & 0 deletions boards/librem13v2/librem13v2.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CONFIG_COREBOOT_CONFIG=config/coreboot-librem13v2.config

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_CRYPTSETUP=y
CONFIG_FLASHROM=y
Expand Down
1 change: 1 addition & 0 deletions boards/librem13v4/librem13v4.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CONFIG_COREBOOT_CONFIG=config/coreboot-librem13v4.config

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_CRYPTSETUP=y
CONFIG_FLASHROM=y
Expand Down
1 change: 1 addition & 0 deletions boards/librem15v3/librem15v3.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CONFIG_COREBOOT_CONFIG=config/coreboot-librem15v3.config

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_CRYPTSETUP=y
CONFIG_FLASHROM=y
Expand Down
1 change: 1 addition & 0 deletions boards/librem15v4/librem15v4.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CONFIG_COREBOOT_CONFIG=config/coreboot-librem15v4.config

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_CRYPTSETUP=y
CONFIG_FLASHROM=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_COREBOOT_CONFIG=config/coreboot-qemu-fbwhiptail.config
CONFIG_LINUX_CONFIG=config/linux-qemu.config
Expand Down
1 change: 1 addition & 0 deletions boards/qemu-coreboot/qemu-coreboot.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# will just drop into the recovery shell.
export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_COREBOOT_CONFIG=config/coreboot-qemu.config
CONFIG_LINUX_CONFIG=config/linux-qemu.config
Expand Down
2 changes: 2 additions & 0 deletions boards/qemu-linuxboot/qemu-linuxboot.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Configuration for emulating LinuxBoot+Heads with qemu
#
export CONFIG_LINUXBOOT=y
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_LINUXBOOT_BOARD=qemu
CONFIG_LINUX_CONFIG=config/linux-linuxboot.config

Expand Down
2 changes: 2 additions & 0 deletions boards/r630/r630.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ CONFIG_LINUXBOOT=y
CONFIG_LINUXBOOT_ROM=blobs/r630-1.3.6.rom
CONFIG_LINUX_CONFIG=config/linux-linuxboot.config

export CONFIG_LINUX_VERSION=4.14.62

#CONFIG_CRYPTSETUP=y
CONFIG_FLASHROM=y
#CONFIG_GPG=y
Expand Down
2 changes: 2 additions & 0 deletions boards/s2600wf/s2600wf.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ CONFIG_LINUXBOOT=y
CONFIG_LINUXBOOT_ROM=blobs/s2600wf.rom
CONFIG_LINUX_CONFIG=config/linux-linuxboot.config

export CONFIG_LINUX_VERSION=4.14.62

#CONFIG_CRYPTSETUP=y
#CONFIG_FLASHROM=y
CONFIG_FLASHTOOLS=y
Expand Down
1 change: 1 addition & 0 deletions boards/t420/t420.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Configuration for a T420 running Qubes and other OS, T420 is identical to X230 on the Linux Side of things.
export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_COREBOOT_CONFIG=config/coreboot-t420.config
CONFIG_LINUX_CONFIG=config/linux-x230.config
Expand Down
1 change: 1 addition & 0 deletions boards/t430-flash/t430-flash.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ BOARD=t430.flash

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_FLASHROM=y
CONFIG_FLASHTOOLS=y
Expand Down
1 change: 1 addition & 0 deletions boards/t430/t430.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Configuration for a t430 running Qubes and other OSes
export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_COREBOOT_CONFIG=config/coreboot-t430.config
CONFIG_LINUX_CONFIG=config/linux-x230.config
Expand Down
2 changes: 2 additions & 0 deletions boards/tioga/tioga.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ CONFIG_LINUXBOOT=y
CONFIG_LINUXBOOT_ROM=blobs/tioga.rom
CONFIG_LINUX_CONFIG=config/linux-linuxboot.config

export CONFIG_LINUX_VERSION=4.14.62

# If you want to build with the go-based u-root instead of Heads
CONFIG_UROOT ?= n

Expand Down
2 changes: 2 additions & 0 deletions boards/winterfell/winterfell.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ CONFIG_LINUXBOOT=y
CONFIG_LINUXBOOT_ROM=blobs/winterfell.rom
CONFIG_LINUX_CONFIG=config/linux-linuxboot.config

export CONFIG_LINUX_VERSION=4.14.62

# If you want to build with the go-based u-root instead of Heads
CONFIG_UROOT ?= y

Expand Down
1 change: 1 addition & 0 deletions boards/x220/x220.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Configuration for a x220 running Qubes and other OS, X220 is identical to X230 on the Linux Side of things.
export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_COREBOOT_CONFIG=config/coreboot-x220.config
CONFIG_LINUX_CONFIG=config/linux-x230.config
Expand Down
1 change: 1 addition & 0 deletions boards/x230-flash/x230-flash.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ BOARD=x230.flash

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_FLASHROM=y
#CONFIG_GPG=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# running Qubes and other OSes
export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_COREBOOT_CONFIG=config/coreboot-x230-hotp-verification.config
CONFIG_LINUX_CONFIG=config/linux-x230.config
Expand Down
1 change: 1 addition & 0 deletions boards/x230/x230.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Configuration for a x230 running Qubes and other OSes
export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_COREBOOT_CONFIG=config/coreboot-x230.config
CONFIG_LINUX_CONFIG=config/linux-x230.config
Expand Down
12 changes: 6 additions & 6 deletions modules/linux
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
modules-y += linux

ifeq "$(CONFIG_LINUX_VERSION)" "4.14.62"
linux_version := 4.14.62
linux_hash := 51ca4d7e8ee156dc0f19bc7768915cfae41dbb0b4f251e4fa8b178c5674c22ab
else
$(error "$(BOARD): does not specify linux kernel version under CONFIG_LINUX_VERSION")
endif

linux_base_dir := linux-$(linux_version)

# TODO: fixup the patch process
Expand All @@ -15,12 +21,6 @@ linux_dir := $(linux_base_dir)/$(notdir $(basename $(linux_kconfig)))
linux_tar := linux-$(linux_version).tar.xz
linux_url := https://cdn.kernel.org/pub/linux/kernel/v4.x/$(linux_tar)

linux-4.9.38_hash := 76d789d87dd51d2fd58c095727171984fa4a992f5e25b9e3eb1e5fd5cd129074
linux-4.9.80_hash := 9e2e83ccc0afc3f23340ed5e58a35d8c6300a7c58aa98ca913848de41226477b
linux-4.14.62_hash := 51ca4d7e8ee156dc0f19bc7768915cfae41dbb0b4f251e4fa8b178c5674c22ab

linux_hash := $(linux-$(linux_version)_hash)

# Ensure that touching the config file will force a reconfig/rebuild
$(build)/$(linux_dir)/.configured: $(linux_kconfig)

Expand Down

0 comments on commit 98ccc1a

Please sign in to comment.