Philipp Deppenwiese has uploaded this change for review. ( https://review.coreboot.org/23071
Change subject: payloads: Add LinuxBoot payload in NERF mode ......................................................................
payloads: Add LinuxBoot payload in NERF mode
* Add LinuxBoot support * Add NERF mode
Change-Id: I3a25ff6812e046acc688cbbb203cf262ad751659 Signed-off-by: Philipp Deppenwiese zaolin@das-labor.org --- M .gitignore M payloads/Kconfig M payloads/Makefile.inc A payloads/external/LinuxBoot/Kconfig A payloads/external/LinuxBoot/Kconfig.name A payloads/external/LinuxBoot/Makefile A payloads/external/LinuxBoot/targets/nerf.mk A payloads/external/LinuxBoot/x86/defconfig A payloads/external/LinuxBoot/x86_64/defconfig M payloads/external/Makefile.inc M util/abuild/abuild 11 files changed, 685 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/23071/1
diff --git a/.gitignore b/.gitignore index e3fa3fe..d4d7ef6 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ payloads/external/U-Boot/u-boot/ payloads/external/Memtest86Plus/memtest86plus/ payloads/external/iPXE/ipxe/ +payloads/external/LinuxBoot/linuxboot/ util/crossgcc/acpica-unix-*/ util/crossgcc/binutils-*/ util/crossgcc/build-*BINUTILS/ diff --git a/payloads/Kconfig b/payloads/Kconfig index bb9348b..99e7e9e 100644 --- a/payloads/Kconfig +++ b/payloads/Kconfig @@ -53,7 +53,7 @@ config COMPRESSED_PAYLOAD_LZMA bool "Use LZMA compression for payloads" default y - depends on !PAYLOAD_NONE && !PAYLOAD_LINUX + depends on !PAYLOAD_NONE && !PAYLOAD_LINUX && !PAYLOAD_LINUXBOOT help In order to reduce the size payloads take up in the ROM chip coreboot can compress them using the LZMA algorithm. diff --git a/payloads/Makefile.inc b/payloads/Makefile.inc index b27d7fe..5d8eb8c 100644 --- a/payloads/Makefile.inc +++ b/payloads/Makefile.inc @@ -33,6 +33,7 @@ payloads/external/tint \ payloads/external/tianocore \ payloads/external/GRUB2 \ +payloads/external/LinuxBoot \
payloads/coreinfo/build/coreinfo.elf coreinfo: $(MAKE) -C payloads/coreinfo defaultbuild diff --git a/payloads/external/LinuxBoot/Kconfig b/payloads/external/LinuxBoot/Kconfig new file mode 100644 index 0000000..6b39091 --- /dev/null +++ b/payloads/external/LinuxBoot/Kconfig @@ -0,0 +1,97 @@ +if PAYLOAD_LINUXBOOT + +choice + prompt "Architecture" + default LINUXBOOT_X86_64 + +config LINUXBOOT_X86_64 + bool "x86_64" + help + AMD64 kernel and initramfs + +config LINUXBOOT_X86 + bool "x86" + help + X86 kernel and initramfs +endchoice + +config LINUXBOOT_ARCH + string + default "amd64" if LINUXBOOT_X86_64 + default "386" if LINUXBOOT_X86 + +choice + prompt "Kernel version" + default LINUXBOOT_KERNEL_STABLE + +config LINUXBOOT_KERNEL_STABLE + bool "4.14" + help + Stable kernel version +endchoice + +config LINUXBOOT_KERNEL_VERSION + string + default "4.14" if LINUXBOOT_KERNEL_STABLE + +config LINUXBOOT_KERNEL_CONFIGFILE + string "Kernel config file" + default "" + help + Add your own kernel configuration file. Otherwise a default + minimal defconfig is used. + +config LINUXBOOT_KERNEL_COMMANDLINE + string "Kernel command-line" + default "" + help + Add your own kernel command-line arguments. + +config PAYLOAD_FILE + default "payloads/external/LinuxBoot/linuxboot/kernel-image" + +choice + prompt "Payload Mode" + default LINUXBOOT_NERF + +config LINUXBOOT_NERF + bool "NERF" + help + Enable NERF linuxboot mode. +endchoice + +if LINUXBOOT_NERF + +choice + prompt "U-root version" + default LINUXBOOT_UROOT_STABLE + +config LINUXBOOT_UROOT_MASTER + bool "master" + help + Latest u-root version + +config LINUXBOOT_UROOT_STABLE + bool "20da368f2aecf7b7ea19cf48a94a51492a4c7785" + help + Stable u-root version +endchoice + +config LINUXBOOT_UROOT_VERSION + string + default "master" if LINUXBOOT_UROOT_MASTER + default "20da368f2aecf7b7ea19cf48a94a51492a4c7785" if LINUXBOOT_UROOT_STABLE + +config LINUXBOOT_UROOT_COMMANDS + string "U-root cmds" + default "" + help + Comma separated list of additional modules to include. Otherwise all modules + of u-root are included. + +config PAYLOAD_USERSPACE + string "" + default "payloads/external/LinuxBoot/linuxboot/initramfs.cpio.xz" + +endif +endif diff --git a/payloads/external/LinuxBoot/Kconfig.name b/payloads/external/LinuxBoot/Kconfig.name new file mode 100644 index 0000000..bfdd0a5 --- /dev/null +++ b/payloads/external/LinuxBoot/Kconfig.name @@ -0,0 +1,9 @@ +config PAYLOAD_LINUXBOOT + bool "LinuxBoot" + depends on ARCH_X86 + help + Select this option if you want to build a coreboot image + with a LinuxBoot payload. If you don't know what this is + about, just leave it enabled. + + See https://coreboot.org/Payloads for more information. diff --git a/payloads/external/LinuxBoot/Makefile b/payloads/external/LinuxBoot/Makefile new file mode 100644 index 0000000..3d9b2c2 --- /dev/null +++ b/payloads/external/LinuxBoot/Makefile @@ -0,0 +1,60 @@ +kernel_git_repo=https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git +project_dir=linuxboot +kernel_dir=$(project_dir)/kernel + +ifeq ($(CONFIG_LINUXBOOT_NERF),y) +include targets/nerf.mk +endif + +unexport KCONFIG_CONFIG +unexport KCONFIG_AUTOHEADER +unexport KCONFIG_AUTOCONFIG +unexport KCONFIG_DEPENDENCIES +unexport KCONFIG_SPLITCONFIG +unexport KCONFIG_TRISTATE +unexport KCONFIG_NEGATIVES + +all: build initramfs + +kernel: + echo " Cloning kernel from Git" + git clone $(kernel_git_repo) $(kernel_dir) || true + +checkout: kernel + echo " Checking out kernel revision v$(CONFIG_LINUXBOOT_KERNEL_VERSION)" + cd $(kernel_dir); git checkout v$(CONFIG_LINUXBOOT_KERNEL_VERSION); git branch -D coreboot 2>/dev/null; git checkout -b coreboot + +config: checkout + echo " CONFIG Linux $(CONFIG_LINUXBOOT_KERNEL_VERSION)" +ifeq ($(CONFIG_KERNEL_CONFIGFILE),y) + cp $(CONFIG_KERNEL_CONFIGFILE) $(kernel_dir)/.config +endif +ifeq ($(CONFIG_LINUXBOOT_ARCH),386) + cp x86/defconfig $(kernel_dir)/.config +endif +ifeq ($(CONFIG_LINUXBOOT_ARCH),amd64) + cp x86_64/defconfig $(kernel_dir)/.config +endif + +build: config + echo " MAKE Kernel $(CONFIG_LINUXBOOT_KERNEL_VERSION)" + $(MAKE) -C $(kernel_dir) olddefconfig + $(MAKE) -C $(kernel_dir) +ifeq ($(CONFIG_LINUXBOOT_ARCH),386) + cp $(kernel_dir)/arch/x86/boot/bzImage $(project_dir)/kernel-image +endif +ifeq ($(CONFIG_LINUXBOOT_ARCH),amd64) + cp $(kernel_dir)/arch/x86/boot/bzImage $(project_dir)/kernel-image +endif + +clean: + test -d $(project_dir) && rm -rf $(project_dir)/kernel-image && rm -rf $(project_dir)/initramfs.cpio.xz || exit 0 + $(MAKE) -C $(kernel_dir) distclean + +distclean: + test -d $(project_dir) && rm -rf $(project_dir)/* || exit 0 + +print-repo-info: + echo "$(kernel_git_repo) $(kernel_dir)" + +.PHONY: checkout config build clean distclean clone fetch print-repo-info diff --git a/payloads/external/LinuxBoot/targets/nerf.mk b/payloads/external/LinuxBoot/targets/nerf.mk new file mode 100644 index 0000000..a370660 --- /dev/null +++ b/payloads/external/LinuxBoot/targets/nerf.mk @@ -0,0 +1,30 @@ +uroot_git_repo=https://github.com/u-root/u-root.git +uroot_dir=$(project_dir)/go/src/github.com/u-root/u-root +go_path_dir=$(shell pwd)/$(project_dir)/go +go_check=$(shell which go | sed 's/.*///') + +initramfs: build +ifneq ($(go_check),go) + printf "\n<<Please install Golang 1.9 for NERF mode>>\n\n" + exit 1 +endif + mkdir -p $(project_dir)/go/src/github.com/u-root || true + echo " Cloning u-root from Git" + git clone $(uroot_git_repo) $(uroot_dir) || true + cd $(uroot_dir); \ + echo " Fetching new commits from the u-root git repo"; \ + git fetch + echo " Checking out u-root revision $(CONFIG_LINUXBOOT_UROOT_VERSION)" + cd $(uroot_dir); git checkout $(CONFIG_LINUXBOOT_UROOT_VERSION); git branch -D coreboot 2>/dev/null; git checkout -b coreboot + cd $(uroot_dir); GOARCH=$(CONFIG_LINUXBOOT_ARCH) GOPATH=$(go_path_dir) go get -u github.com/golang/dep/cmd/dep + cd $(uroot_dir); GOARCH=$(CONFIG_LINUXBOOT_ARCH) GOPATH=$(go_path_dir) $(go_path_dir)/bin/dep ensure + cd $(uroot_dir); GOARCH=$(CONFIG_LINUXBOOT_ARCH) GOPATH=$(go_path_dir) go build u-root.go + echo " MAKE u-root $(CONFIG_LINUXBOOT_UROOT_VERSION)" +ifneq ($(CONFIG_LINUXBOOT_UROOT_COMMANDS),) + cd $(uroot_dir); GOARCH=$(CONFIG_LINUXBOOT_ARCH) GOPATH=$(go_path_dir) ./u-root -build=bb -o ../../../../../initramfs.cpio ./cmds/{$(CONFIG_LINUXBOOT_UROOT_COMMANDS)} +else + cd $(uroot_dir); GOARCH=$(CONFIG_LINUXBOOT_ARCH) GOPATH=$(go_path_dir) ./u-root -build=bb -o ../../../../../initramfs.cpio +endif + xz -f --check=crc32 $(project_dir)/initramfs.cpio + +.PHONY: initramfs diff --git a/payloads/external/LinuxBoot/x86/defconfig b/payloads/external/LinuxBoot/x86/defconfig new file mode 100644 index 0000000..96a9543 --- /dev/null +++ b/payloads/external/LinuxBoot/x86/defconfig @@ -0,0 +1,227 @@ +# CONFIG_64BIT is not set +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_KERNEL_XZ=y +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_MEMCG=y +CONFIG_BLK_CGROUP=y +CONFIG_DEBUG_BLK_CGROUP=y +CONFIG_CFS_BANDWIDTH=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_CGROUP_PIDS=y +CONFIG_CGROUP_RDMA=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_CGROUP_PERF=y +CONFIG_CGROUP_BPF=y +CONFIG_CHECKPOINT_RESTORE=y +CONFIG_NAMESPACES=y +CONFIG_USER_NS=y +CONFIG_SCHED_AUTOGROUP=y +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_KALLSYMS is not set +# CONFIG_PCSPKR_PLATFORM is not set +CONFIG_BPF_SYSCALL=y +# CONFIG_AIO is not set +CONFIG_USERFAULTFD=y +CONFIG_EMBEDDED=y +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_COMPAT_BRK is not set +# CONFIG_SLAB_MERGE_DEFAULT is not set +CONFIG_SLAB_FREELIST_RANDOM=y +CONFIG_SLAB_FREELIST_HARDENED=y +CONFIG_GCC_PLUGINS=y +CONFIG_GCC_PLUGIN_LATENT_ENTROPY=y +CONFIG_GCC_PLUGIN_STRUCTLEAK=y +CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y +CONFIG_GCC_PLUGIN_RANDSTRUCT=y +CONFIG_CC_STACKPROTECTOR_STRONG=y +CONFIG_REFCOUNT_FULL=y +CONFIG_PARTITION_ADVANCED=y +# CONFIG_IOSCHED_DEADLINE is not set +CONFIG_CFQ_GROUP_IOSCHED=y +# CONFIG_MQ_IOSCHED_DEADLINE is not set +# CONFIG_MQ_IOSCHED_KYBER is not set +# CONFIG_ZONE_DMA is not set +CONFIG_SMP=y +# CONFIG_X86_FAST_FEATURE_TESTS is not set +CONFIG_X86_INTEL_LPSS=y +# CONFIG_SCHED_OMIT_FRAME_POINTER is not set +# CONFIG_DMI is not set +CONFIG_SCHED_SMT=y +CONFIG_PREEMPT=y +# CONFIG_X86_MCE is not set +CONFIG_X86_MSR=y +CONFIG_X86_CPUID=y +# CONFIG_COMPACTION is not set +CONFIG_KEXEC=y +# CONFIG_RELOCATABLE is not set +CONFIG_CMDLINE_BOOL=y +# CONFIG_MODIFY_LDT_SYSCALL is not set +# CONFIG_SUSPEND is not set +CONFIG_PM=y +CONFIG_ACPI_PCI_SLOT=y +CONFIG_PMIC_OPREGION=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +CONFIG_X86_PCC_CPUFREQ=y +CONFIG_X86_ACPI_CPUFREQ=y +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_PCIEPORTBUS=y +# CONFIG_PCIEASPM is not set +CONFIG_PCI_MSI=y +CONFIG_PCI_PRI=y +CONFIG_X86_SYSFB=y +# CONFIG_BINFMT_SCRIPT is not set +# CONFIG_COREDUMP is not set +CONFIG_NET=y +# CONFIG_WIRELESS is not set +# CONFIG_UEVENT_HELPER is not set +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +# CONFIG_ALLOW_DEV_COREDUMP is not set +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_SG=y +CONFIG_ATA=y +CONFIG_SATA_AHCI=y +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_ATA_GENERIC=y +CONFIG_MD=y +CONFIG_BLK_DEV_DM=y +CONFIG_DM_CRYPT=y +CONFIG_DM_VERITY=y +CONFIG_DM_VERITY_FEC=y +CONFIG_DM_INTEGRITY=y +CONFIG_NETDEVICES=y +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_NET_VENDOR_ADAPTEC is not set +# CONFIG_NET_VENDOR_AGERE is not set +# CONFIG_NET_VENDOR_ALACRITECH is not set +# CONFIG_NET_VENDOR_ALTEON is not set +# CONFIG_NET_VENDOR_AMAZON is not set +# CONFIG_NET_VENDOR_AMD is not set +# CONFIG_NET_VENDOR_AQUANTIA is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_ATHEROS is not set +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_BROCADE is not set +# CONFIG_NET_VENDOR_CAVIUM is not set +# CONFIG_NET_VENDOR_CHELSIO is not set +# CONFIG_NET_VENDOR_CISCO is not set +# CONFIG_NET_VENDOR_DEC is not set +# CONFIG_NET_VENDOR_DLINK is not set +# CONFIG_NET_VENDOR_EMULEX is not set +# CONFIG_NET_VENDOR_EZCHIP is not set +# CONFIG_NET_VENDOR_EXAR is not set +# CONFIG_NET_VENDOR_HP is not set +# CONFIG_NET_VENDOR_HUAWEI is not set +# CONFIG_NET_VENDOR_INTEL is not set +CONFIG_MVMDIO=y +CONFIG_SKGE=y +CONFIG_SKGE_GENESIS=y +CONFIG_SKY2=y +# CONFIG_NET_VENDOR_MELLANOX is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_NETRONOME is not set +# CONFIG_NET_VENDOR_NVIDIA is not set +# CONFIG_NET_VENDOR_OKI is not set +# CONFIG_NET_PACKET_ENGINE is not set +# CONFIG_NET_VENDOR_QLOGIC is not set +# CONFIG_NET_VENDOR_QUALCOMM is not set +# CONFIG_NET_VENDOR_REALTEK is not set +# CONFIG_NET_VENDOR_RENESAS is not set +# CONFIG_NET_VENDOR_RDC is not set +# CONFIG_NET_VENDOR_ROCKER is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SILAN is not set +# CONFIG_NET_VENDOR_SIS is not set +# CONFIG_NET_VENDOR_SOLARFLARE is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_SUN is not set +# CONFIG_NET_VENDOR_TEHUTI is not set +# CONFIG_NET_VENDOR_TI is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +# CONFIG_NET_VENDOR_SYNOPSYS is not set +# CONFIG_WLAN is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_TTY_PRINTK=y +CONFIG_HW_RANDOM_TIMERIOMEM=y +# CONFIG_HW_RANDOM_VIA is not set +CONFIG_HPET=y +CONFIG_TCG_TPM=y +CONFIG_TCG_TIS=y +CONFIG_TCG_NSC=y +CONFIG_TCG_ATMEL=y +CONFIG_TCG_INFINEON=y +CONFIG_TCG_CRB=y +# CONFIG_DEVPORT is not set +# CONFIG_HWMON is not set +CONFIG_LPC_ICH=y +CONFIG_LPC_SCH=y +CONFIG_MFD_INTEL_LPSS_ACPI=y +CONFIG_MFD_INTEL_LPSS_PCI=y +CONFIG_FB=y +CONFIG_FB_FOREIGN_ENDIAN=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y +CONFIG_FB_VESA=y +CONFIG_VGACON_SOFT_SCROLLBACK=y +CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=1024 +CONFIG_VGACON_SOFT_SCROLLBACK_PERSISTENT_ENABLE_BY_DEFAULT=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +# CONFIG_USB_SUPPORT is not set +CONFIG_RTC_CLASS=y +# CONFIG_X86_PLATFORM_DEVICES is not set +CONFIG_INTEL_IOMMU=y +CONFIG_INTEL_IOMMU_SVM=y +CONFIG_PWM=y +CONFIG_GOOGLE_FIRMWARE=y +CONFIG_GOOGLE_COREBOOT_TABLE_ACPI=y +CONFIG_GOOGLE_MEMCONSOLE_COREBOOT=y +CONFIG_GOOGLE_VPD=y +CONFIG_EXT4_FS=y +# CONFIG_FILE_LOCKING is not set +# CONFIG_DNOTIFY is not set +# CONFIG_INOTIFY_USER is not set +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_UTF8=y +CONFIG_TMPFS=y +CONFIG_CONFIGFS_FS=y +# CONFIG_MISC_FILESYSTEMS is not set +# CONFIG_ENABLE_WARN_DEPRECATED is not set +# CONFIG_ENABLE_MUST_CHECK is not set +CONFIG_FRAME_WARN=1024 +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set +# CONFIG_FTRACE is not set +CONFIG_STRICT_DEVMEM=y +CONFIG_IO_STRICT_DEVMEM=y +# CONFIG_X86_VERBOSE_BOOTUP is not set +# CONFIG_EARLY_PRINTK is not set +# CONFIG_DOUBLEFAULT is not set +CONFIG_OPTIMIZE_INLINING=y +# CONFIG_X86_DEBUG_FPU is not set +CONFIG_GUESS_UNWINDER=y +CONFIG_SECURITY_DMESG_RESTRICT=y +CONFIG_HARDENED_USERCOPY=y +CONFIG_HARDENED_USERCOPY_PAGESPAN=y +CONFIG_FORTIFY_SOURCE=y +CONFIG_CRYPTO_ANSI_CPRNG=y +# CONFIG_CRYPTO_HW is not set +# CONFIG_VIRTUALIZATION is not set diff --git a/payloads/external/LinuxBoot/x86_64/defconfig b/payloads/external/LinuxBoot/x86_64/defconfig new file mode 100644 index 0000000..16bf001 --- /dev/null +++ b/payloads/external/LinuxBoot/x86_64/defconfig @@ -0,0 +1,226 @@ +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_KERNEL_XZ=y +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_MEMCG=y +CONFIG_BLK_CGROUP=y +CONFIG_DEBUG_BLK_CGROUP=y +CONFIG_CFS_BANDWIDTH=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_CGROUP_PIDS=y +CONFIG_CGROUP_RDMA=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_CGROUP_PERF=y +CONFIG_CGROUP_BPF=y +CONFIG_CHECKPOINT_RESTORE=y +CONFIG_NAMESPACES=y +CONFIG_USER_NS=y +CONFIG_SCHED_AUTOGROUP=y +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_KALLSYMS is not set +# CONFIG_PCSPKR_PLATFORM is not set +CONFIG_BPF_SYSCALL=y +# CONFIG_AIO is not set +CONFIG_USERFAULTFD=y +CONFIG_EMBEDDED=y +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_COMPAT_BRK is not set +# CONFIG_SLAB_MERGE_DEFAULT is not set +CONFIG_SLAB_FREELIST_RANDOM=y +CONFIG_SLAB_FREELIST_HARDENED=y +CONFIG_GCC_PLUGINS=y +CONFIG_GCC_PLUGIN_LATENT_ENTROPY=y +CONFIG_GCC_PLUGIN_STRUCTLEAK=y +CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y +CONFIG_GCC_PLUGIN_RANDSTRUCT=y +CONFIG_CC_STACKPROTECTOR_STRONG=y +CONFIG_REFCOUNT_FULL=y +CONFIG_PARTITION_ADVANCED=y +# CONFIG_IOSCHED_DEADLINE is not set +CONFIG_CFQ_GROUP_IOSCHED=y +# CONFIG_MQ_IOSCHED_DEADLINE is not set +# CONFIG_MQ_IOSCHED_KYBER is not set +# CONFIG_ZONE_DMA is not set +CONFIG_SMP=y +# CONFIG_X86_FAST_FEATURE_TESTS is not set +CONFIG_X86_INTEL_LPSS=y +# CONFIG_SCHED_OMIT_FRAME_POINTER is not set +# CONFIG_DMI is not set +CONFIG_SCHED_SMT=y +CONFIG_PREEMPT=y +# CONFIG_X86_MCE is not set +CONFIG_X86_MSR=y +CONFIG_X86_CPUID=y +# CONFIG_COMPACTION is not set +CONFIG_KEXEC=y +# CONFIG_RELOCATABLE is not set +CONFIG_CMDLINE_BOOL=y +# CONFIG_MODIFY_LDT_SYSCALL is not set +# CONFIG_SUSPEND is not set +CONFIG_PM=y +CONFIG_ACPI_PCI_SLOT=y +CONFIG_PMIC_OPREGION=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +CONFIG_X86_PCC_CPUFREQ=y +CONFIG_X86_ACPI_CPUFREQ=y +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_PCIEPORTBUS=y +# CONFIG_PCIEASPM is not set +CONFIG_PCI_MSI=y +CONFIG_PCI_PRI=y +CONFIG_X86_SYSFB=y +# CONFIG_BINFMT_SCRIPT is not set +# CONFIG_COREDUMP is not set +CONFIG_NET=y +# CONFIG_WIRELESS is not set +# CONFIG_UEVENT_HELPER is not set +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +# CONFIG_ALLOW_DEV_COREDUMP is not set +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_SG=y +CONFIG_ATA=y +CONFIG_SATA_AHCI=y +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_ATA_GENERIC=y +CONFIG_MD=y +CONFIG_BLK_DEV_DM=y +CONFIG_DM_CRYPT=y +CONFIG_DM_VERITY=y +CONFIG_DM_VERITY_FEC=y +CONFIG_DM_INTEGRITY=y +CONFIG_NETDEVICES=y +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_NET_VENDOR_ADAPTEC is not set +# CONFIG_NET_VENDOR_AGERE is not set +# CONFIG_NET_VENDOR_ALACRITECH is not set +# CONFIG_NET_VENDOR_ALTEON is not set +# CONFIG_NET_VENDOR_AMAZON is not set +# CONFIG_NET_VENDOR_AMD is not set +# CONFIG_NET_VENDOR_AQUANTIA is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_ATHEROS is not set +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_BROCADE is not set +# CONFIG_NET_VENDOR_CAVIUM is not set +# CONFIG_NET_VENDOR_CHELSIO is not set +# CONFIG_NET_VENDOR_CISCO is not set +# CONFIG_NET_VENDOR_DEC is not set +# CONFIG_NET_VENDOR_DLINK is not set +# CONFIG_NET_VENDOR_EMULEX is not set +# CONFIG_NET_VENDOR_EZCHIP is not set +# CONFIG_NET_VENDOR_EXAR is not set +# CONFIG_NET_VENDOR_HP is not set +# CONFIG_NET_VENDOR_HUAWEI is not set +# CONFIG_NET_VENDOR_INTEL is not set +CONFIG_MVMDIO=y +CONFIG_SKGE=y +CONFIG_SKGE_GENESIS=y +CONFIG_SKY2=y +# CONFIG_NET_VENDOR_MELLANOX is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_NETRONOME is not set +# CONFIG_NET_VENDOR_NVIDIA is not set +# CONFIG_NET_VENDOR_OKI is not set +# CONFIG_NET_PACKET_ENGINE is not set +# CONFIG_NET_VENDOR_QLOGIC is not set +# CONFIG_NET_VENDOR_QUALCOMM is not set +# CONFIG_NET_VENDOR_REALTEK is not set +# CONFIG_NET_VENDOR_RENESAS is not set +# CONFIG_NET_VENDOR_RDC is not set +# CONFIG_NET_VENDOR_ROCKER is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SILAN is not set +# CONFIG_NET_VENDOR_SIS is not set +# CONFIG_NET_VENDOR_SOLARFLARE is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_SUN is not set +# CONFIG_NET_VENDOR_TEHUTI is not set +# CONFIG_NET_VENDOR_TI is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +# CONFIG_NET_VENDOR_SYNOPSYS is not set +# CONFIG_WLAN is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_TTY_PRINTK=y +CONFIG_HW_RANDOM_TIMERIOMEM=y +# CONFIG_HW_RANDOM_VIA is not set +CONFIG_HPET=y +CONFIG_TCG_TPM=y +CONFIG_TCG_TIS=y +CONFIG_TCG_NSC=y +CONFIG_TCG_ATMEL=y +CONFIG_TCG_INFINEON=y +CONFIG_TCG_CRB=y +# CONFIG_DEVPORT is not set +# CONFIG_HWMON is not set +CONFIG_LPC_ICH=y +CONFIG_LPC_SCH=y +CONFIG_MFD_INTEL_LPSS_ACPI=y +CONFIG_MFD_INTEL_LPSS_PCI=y +CONFIG_FB=y +CONFIG_FB_FOREIGN_ENDIAN=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y +CONFIG_FB_VESA=y +CONFIG_VGACON_SOFT_SCROLLBACK=y +CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=1024 +CONFIG_VGACON_SOFT_SCROLLBACK_PERSISTENT_ENABLE_BY_DEFAULT=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +# CONFIG_USB_SUPPORT is not set +CONFIG_RTC_CLASS=y +# CONFIG_X86_PLATFORM_DEVICES is not set +CONFIG_INTEL_IOMMU=y +CONFIG_INTEL_IOMMU_SVM=y +CONFIG_PWM=y +CONFIG_GOOGLE_FIRMWARE=y +CONFIG_GOOGLE_COREBOOT_TABLE_ACPI=y +CONFIG_GOOGLE_MEMCONSOLE_COREBOOT=y +CONFIG_GOOGLE_VPD=y +CONFIG_EXT4_FS=y +# CONFIG_FILE_LOCKING is not set +# CONFIG_DNOTIFY is not set +# CONFIG_INOTIFY_USER is not set +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_UTF8=y +CONFIG_TMPFS=y +CONFIG_CONFIGFS_FS=y +# CONFIG_MISC_FILESYSTEMS is not set +# CONFIG_ENABLE_WARN_DEPRECATED is not set +# CONFIG_ENABLE_MUST_CHECK is not set +CONFIG_FRAME_WARN=1024 +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set +# CONFIG_FTRACE is not set +CONFIG_STRICT_DEVMEM=y +CONFIG_IO_STRICT_DEVMEM=y +# CONFIG_X86_VERBOSE_BOOTUP is not set +# CONFIG_EARLY_PRINTK is not set +# CONFIG_DOUBLEFAULT is not set +CONFIG_OPTIMIZE_INLINING=y +# CONFIG_X86_DEBUG_FPU is not set +CONFIG_GUESS_UNWINDER=y +CONFIG_SECURITY_DMESG_RESTRICT=y +CONFIG_HARDENED_USERCOPY=y +CONFIG_HARDENED_USERCOPY_PAGESPAN=y +CONFIG_FORTIFY_SOURCE=y +CONFIG_CRYPTO_ANSI_CPRNG=y +# CONFIG_CRYPTO_HW is not set +# CONFIG_VIRTUALIZATION is not set diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc index 881b4e4..8eef5e0 100644 --- a/payloads/external/Makefile.inc +++ b/payloads/external/Makefile.inc @@ -31,6 +31,13 @@ #TODO: Figure out version endif
+ifeq ($(CONFIG_PAYLOAD_LINUXBOOT),y) +ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUXBOOT_KERNEL_COMMANDLINE))),) + ADDITIONAL_PAYLOAD_CONFIG+=-C $(CONFIG_LINUXBOOT_KERNEL_COMMANDLINE) +endif +ADDITIONAL_PAYLOAD_CONFIG+=-I $(CONFIG_PAYLOAD_USERSPACE) +endif + ifeq ($(CONFIG_PAYLOAD_LINUX),y) ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUX_COMMAND_LINE))),) ADDITIONAL_PAYLOAD_CONFIG+=-C $(CONFIG_LINUX_COMMAND_LINE) @@ -235,3 +242,28 @@ IPXE_UART=$(IPXE_UART) \ CONFIG_TTYS0_BAUD=$(CONFIG_TTYS0_BAUD) \ MFLAGS= MAKEFLAGS= + +# LinuxBoot + +linuxboot: + $(MAKE) -C payloads/external/LinuxBoot \ + HOSTCC="$(HOSTCC)" \ + CC="$(HOSTCC)" \ + GCC_CC_x86_32=$(GCC_CC_x86_32) \ + GCC_CC_x86_64=$(GCC_CC_x86_64) \ + GCC_CC_arm=$(GCC_CC_arm) \ + GCC_CC_arm64=$(GCC_CC_arm64) \ + OBJCOPY_x86_32=$(OBJCOPY_x86_32) \ + OBJCOPY_x86_64=$(OBJCOPY_x86_64) \ + OBJCOPY_arm=$(OBJCOPY_arm) \ + OBJCOPY_arm64=$(OBJCOPY_arm64) \ + CONFIG_LINUXBOOT_KERNEL_VERSION=$(CONFIG_LINUXBOOT_KERNEL_VERSION) \ + CONFIG_LINUXBOOT_KERNEL_CONFIGFILE=$(CONFIG_LINUXBOOT_KERNEL_CONFIGFILE) \ + CONFIG_LINUXBOOT_KERNEL_COMMANDLINE=$(CONFIG_LINUXBOOT_KERNEL_COMMANDLINE) \ + CONFIG_LINUXBOOT_UROOT_VERSION=$(CONFIG_LINUXBOOT_UROOT_VERSION) \ + CONFIG_LINUXBOOT_UROOT_COMMANDS="$(CONFIG_LINUXBOOT_UROOT_COMMANDS)" \ + CONFIG_LINUXBOOT_ARCH=$(CONFIG_LINUXBOOT_ARCH) \ + CONFIG_LINUXBOOT_NERF=$(CONFIG_LINUXBOOT_NERF) + +payloads/external/LinuxBoot/linuxboot/initramfs.cpio.xz: linuxboot +payloads/external/LinuxBoot/linuxboot/kernel-image: linuxboot diff --git a/util/abuild/abuild b/util/abuild/abuild index 91c5bf9..bf336ec 100755 --- a/util/abuild/abuild +++ b/util/abuild/abuild @@ -259,6 +259,7 @@ echo "# CONFIG_PAYLOAD_DEPTHCHARGE is not set" echo "# CONFIG_PAYLOAD_UBOOT is not set" echo "# CONFIG_PAYLOAD_TIANOCORE is not set" + echo "# CONFIG_PAYLOAD_LINUXBOOT is not set" } >> "${config_file}" elif [ "$PAYLOAD" != "/dev/null" ]; then {