mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-29 17:28:54 +00:00
03d8f93c95
Rationale: cpio -t alone cannot extract initrd past early cpio (microcode) in most packed initrd. unpack_initramfs.sh already under master comes to the rescue, but its usage up to today was limited to pass firmware blobs to final OS under boards/librem_mini_v2 Debian OSes (and probably others) need to have cryptroot/crypttab overriden directly, otherwise generic generation of crypttab is not enough. Extracting crypttab and overriding directly what is desired by final OS and exposed into /boot/initrd is the way to go otherwise hacking on top of hacks. This brings default packed modules under Heads to 5 modules, which needs to be deactivate in board configs if undesired: user@heads-tests-deb12:~/heads$ grep -Rn "?= y" modules/ | grep -v MUSL modules/zlib:1:CONFIG_ZLIB ?= y modules/zstd:3:CONFIG_ZSTD ?= y modules/exfatprogs:2:CONFIG_EXFATPROGS ?= y modules/busybox:2:CONFIG_BUSYBOX ?= y modules/e2fsprogs:2:CONFIG_E2FSPROGS ?= y
50 lines
1.7 KiB
Makefile
50 lines
1.7 KiB
Makefile
# Minimal configuration for a x230 to support flashrom and USB
|
|
# This top SPI flash image needed to flash legacy board counterpart internally
|
|
# This image can be flashed through 1vyrain and skulls
|
|
# IDEALLY you should flash maximized top and bottom rom images exteranlly once instead.
|
|
|
|
export CONFIG_COREBOOT=y
|
|
export CONFIG_COREBOOT_VERSION=4.19
|
|
export CONFIG_LINUX_VERSION=5.10.5
|
|
|
|
CONFIG_COREBOOT_CONFIG=config/coreboot-t430-legacy-flash.config
|
|
CONFIG_LINUX_CONFIG=config/linux-x230-flash.config
|
|
|
|
#Add bare minimal tools for flashing boards
|
|
CONFIG_BASH=n
|
|
CONFIG_FLASHROM=y
|
|
CONFIG_ZSTD=n
|
|
#CONFIG_GPG=y
|
|
#CONFIG_FLASHTOOLS=y
|
|
CONFIG_PCIUTILS=y
|
|
#CONFIG_MBEDTLS=y
|
|
#CONFIG_QRENCODE=y
|
|
#CONFIG_TPMTOTP=y
|
|
#CONFIG_DROPBEAR=y
|
|
|
|
|
|
#Additional hardware support
|
|
CONFIG_LINUX_USB=y
|
|
#CONFIG_LINUX_E1000E=y
|
|
|
|
export CONFIG_BOOTSCRIPT=/bin/xx30-flash.init
|
|
export CONFIG_BOARD_NAME="ThinkPad X230-legacy-flash"
|
|
export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal --ifd --image bios"
|
|
|
|
# This board is "special" in that we need a 4MB top SPI flashable ROM.
|
|
# This is enough to allow the board to boot into a minimal Heads and read the full Legacy
|
|
# ROM from an external USB media.
|
|
#
|
|
# No tools outside of flashrom are provided here as you can see per activated modules above.
|
|
# Everything Heads is now delegated to the Legacy ROM to be flashed
|
|
# from xx30-flash ROMs.
|
|
#
|
|
# Instructions to mount USB thumb drive and flash legacy 12Mb image will be given on screen
|
|
# per CONFIG_BOOTSCRIPT script above.
|
|
#
|
|
# Below, we just move produced ROM with a name appended with -top.rom for clarity.
|
|
all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom
|
|
$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE)
|
|
$(call do,MV 4MB top ROM,$@, mv $< $@)
|
|
@sha256sum $@
|