diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2018-03-13 11:22:26 +0100 |
---|---|---|
committer | Philipp Deppenwiese <zaolin.daisuki@gmail.com> | 2018-07-19 13:54:24 +0000 |
commit | 02c08147645d37e8d21f89b62cb7029be7543bd6 (patch) | |
tree | 98dc70e780a4a1a01145d58c254ce16d7471e276 /payloads/external | |
parent | 4e2f95b789d8f3b505f52c42b634401dd5f718a2 (diff) | |
download | coreboot-02c08147645d37e8d21f89b62cb7029be7543bd6.tar.xz |
payloads/LinuxBoot: Add ARM64 support
Add support for ARCH=ARM64 and introduce CROSS_COMPILE for all architectures.
* Always compress kernel Image using xz
* Create FIT uImage containing the kernel, initramfs and DTB
* Add ARM64 defconfig for all SoCs
Change-Id: I9a0cc248283432fb2384956ca55e687d4127398c
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/25152
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Diffstat (limited to 'payloads/external')
-rw-r--r-- | payloads/external/LinuxBoot/Kconfig | 21 | ||||
-rw-r--r-- | payloads/external/LinuxBoot/Kconfig.name | 2 | ||||
-rw-r--r-- | payloads/external/LinuxBoot/Makefile | 63 | ||||
-rw-r--r-- | payloads/external/LinuxBoot/arm64/defconfig | 383 | ||||
-rw-r--r-- | payloads/external/LinuxBoot/arm64/kernel_fdt_lzma.its | 74 | ||||
-rw-r--r-- | payloads/external/LinuxBoot/targets/u-root.mk | 7 | ||||
-rw-r--r-- | payloads/external/Makefile.inc | 24 |
7 files changed, 547 insertions, 27 deletions
diff --git a/payloads/external/LinuxBoot/Kconfig b/payloads/external/LinuxBoot/Kconfig index 74e6c9451c..24d44cf0a6 100644 --- a/payloads/external/LinuxBoot/Kconfig +++ b/payloads/external/LinuxBoot/Kconfig @@ -20,19 +20,30 @@ choice config LINUXBOOT_X86_64 bool "x86_64" + depends on ARCH_X86 help AMD64 kernel and initramfs config LINUXBOOT_X86 bool "x86" + depends on ARCH_X86 help X86 kernel and initramfs + +config LINUXBOOT_ARM64 + bool "arm64" + depends on ARCH_ARM64 + select PAYLOAD_FIT_SUPPORT + help + AARCH64 kernel and initramfs + endchoice config LINUXBOOT_ARCH string default "amd64" if LINUXBOOT_X86_64 default "386" if LINUXBOOT_X86 + default "arm64" if LINUXBOOT_ARM64 choice prompt "Kernel version" @@ -61,6 +72,11 @@ config LINUXBOOT_KERNEL_COMMANDLINE help Add your own kernel command-line arguments. +config LINUXBOOT_DTB_FILE + string "Compiled devicetree file" + depends on LINUXBOOT_ARM64 + default "" + config PAYLOAD_FILE default "payloads/external/LinuxBoot/linuxboot/kernel-image" @@ -106,8 +122,11 @@ config LINUXBOOT_UROOT_FILES initramfs. config PAYLOAD_USERSPACE - string "" + string "LinuxBoot initramfs" default "payloads/external/LinuxBoot/linuxboot/initramfs.cpio.xz" + help + The initramfs to use with the compiled kernel. + Useful for debugging or custom initramfs. endif endif diff --git a/payloads/external/LinuxBoot/Kconfig.name b/payloads/external/LinuxBoot/Kconfig.name index b7b10853ad..18438c7861 100644 --- a/payloads/external/LinuxBoot/Kconfig.name +++ b/payloads/external/LinuxBoot/Kconfig.name @@ -14,7 +14,7 @@ config PAYLOAD_LINUXBOOT bool "LinuxBoot" - depends on ARCH_X86 + depends on ARCH_X86 || ARCH_ARM64 help Select this option if you want to build a coreboot image with a LinuxBoot payload. If you don't know what this is diff --git a/payloads/external/LinuxBoot/Makefile b/payloads/external/LinuxBoot/Makefile index 10ad0c3391..651e9827b8 100644 --- a/payloads/external/LinuxBoot/Makefile +++ b/payloads/external/LinuxBoot/Makefile @@ -17,9 +17,30 @@ project_dir=linuxboot kernel_dir=$(project_dir)/kernel unexport $(COREBOOT_EXPORTS) +unexport MAKEFLAGS + +XGCCPATH?=$(PWD)/util/crossgcc/xgcc/bin +ifeq ($(CONFIG_LINUXBOOT_ARCH),386) +CROSS_COMPILE?=$(XGCCPATH)/i386-linux- +ARCH?=x86 +else ifeq ($(CONFIG_LINUXBOOT_ARCH),amd64) +CROSS_COMPILE?=$(XGCCPATH)/x86_64-linux- +ARCH?=x86_64 +else ifeq ($(CONFIG_LINUXBOOT_ARCH),arm64) +CROSS_COMPILE?=$(XGCCPATH)/aarch64-linux- +ARCH?=arm64 +endif + +OBJCOPY:=$(CROSS_COMPILE)objcopy all: payload +toolchain: + if [[ ! -x "$(CROSS_COMPILE)gcc" ]]; then \ + echo "Toolchain '$(CROSS_COMPILE)*' is missing."; \ + exit 1; \ + fi + $(kernel_dir)/.config: echo " WWW Download Linux $(CONFIG_LINUXBOOT_KERNEL_VERSION)" mkdir -p $(kernel_dir) @@ -36,23 +57,47 @@ ifeq ($(CONFIG_LINUXBOOT_ARCH),386) cp x86/defconfig $(kernel_dir)/.config else ifeq ($(CONFIG_LINUXBOOT_ARCH),amd64) cp x86_64/defconfig $(kernel_dir)/.config +else ifeq ($(CONFIG_LINUXBOOT_ARCH),arm64) + cp arm64/defconfig $(kernel_dir)/.config endif -$(project_dir)/kernel-image: config +ifneq (,$(filter $(CONFIG_LINUXBOOT_ARCH),386 amd64)) +$(kernel_dir)/arch/x86/boot/bzImage: config toolchain +else ifeq ($(CONFIG_LINUXBOOT_ARCH),arm64) +$(kernel_dir)/vmlinux: config toolchain +endif echo " MAKE Kernel $(CONFIG_LINUXBOOT_KERNEL_VERSION)" - $(MAKE) -C $(kernel_dir) olddefconfig - $(MAKE) -C $(kernel_dir) -j $(CPUS) -ifeq ($(CONFIG_LINUXBOOT_ARCH),386) - cp $(kernel_dir)/arch/x86/boot/bzImage $(project_dir)/kernel-image -else ifeq ($(CONFIG_LINUXBOOT_ARCH),amd64) - cp $(kernel_dir)/arch/x86/boot/bzImage $(project_dir)/kernel-image + $(MAKE) -C $(kernel_dir) olddefconfig CROSS_COMPILE=$(CROSS_COMPILE) ARCH=$(ARCH) + $(MAKE) -C $(kernel_dir) -j $(CPUS) CROSS_COMPILE=$(CROSS_COMPILE) ARCH=$(ARCH) + +ifneq (,$(filter $(CONFIG_LINUXBOOT_ARCH),386 amd64)) +$(project_dir)/kernel-image: $(kernel_dir)/arch/x86/boot/bzImage + cp $< $@ +else ifeq ($(CONFIG_LINUXBOOT_ARCH),arm64) +$(project_dir)/vmlinux.bin: $(kernel_dir)/vmlinux + $(OBJCOPY) -O binary $< $@ + +$(project_dir)/target.dtb: $(CONFIG_LINUXBOOT_DTB_FILE) + cp $< $@ + +$(project_dir)/vmlinux.bin.lzma: $(project_dir)/vmlinux.bin + xz -c -k -f --format=lzma --lzma1=dict=1MiB,lc=3,lp=0,pb=3 $< > $@ + +$(project_dir)/kernel-image: $(project_dir)/vmlinux.bin.lzma $(project_dir)/../arm64/kernel_fdt_lzma.its $(project_dir)/target.dtb $(project_dir)/initramfs.cpio.xz + cp $(project_dir)/../arm64/kernel_fdt_lzma.its $(project_dir) + mkimage -f $(project_dir)/kernel_fdt_lzma.its $@ endif -payload: $(project_dir)/kernel-image ifeq ($(CONFIG_LINUXBOOT_UROOT),y) +$(project_dir)/initramfs.cpio.xz: $(MAKE) -f targets/u-root.mk +else +$(project_dir)/initramfs.cpio.xz: + echo "Building without u-root support" endif +payload: $(project_dir)/kernel-image $(project_dir)/initramfs.cpio.xz + clean: if [ -d "$(kernel_dir)" ]; then make -C $(kernel_dir) clean; fi rm -f $(project_dir)/initramfs.cpio.xz @@ -60,4 +105,4 @@ clean: distclean: rm -rf $(project_dir) -.PHONY: config patch payload clean distclean clone fetch all +.PHONY: config patch payload clean distclean clone fetch all toolchain diff --git a/payloads/external/LinuxBoot/arm64/defconfig b/payloads/external/LinuxBoot/arm64/defconfig new file mode 100644 index 0000000000..6f68019af3 --- /dev/null +++ b/payloads/external/LinuxBoot/arm64/defconfig @@ -0,0 +1,383 @@ +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_IRQ_TIME_ACCOUNTING=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_NUMA_BALANCING=y +CONFIG_CGROUPS=y +CONFIG_MEMCG=y +CONFIG_BLK_CGROUP=y +CONFIG_DEBUG_BLK_CGROUP=y +CONFIG_CGROUP_SCHED=y +CONFIG_CGROUP_PIDS=y +CONFIG_CGROUP_RDMA=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CPUSETS=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_NAMESPACES=y +CONFIG_USER_NS=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_KALLSYMS_ALL=y +CONFIG_EMBEDDED=y +# CONFIG_COMPAT_BRK is not set +CONFIG_JUMP_LABEL=y +CONFIG_CC_STACKPROTECTOR_NONE=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEBUG_FS is not set +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_ARCH_ACTIONS=y +CONFIG_ARCH_SUNXI=y +CONFIG_ARCH_ALPINE=y +CONFIG_ARCH_BCM2835=y +CONFIG_ARCH_BCM_IPROC=y +CONFIG_ARCH_BERLIN=y +CONFIG_ARCH_BRCMSTB=y +CONFIG_ARCH_EXYNOS=y +CONFIG_ARCH_LAYERSCAPE=y +CONFIG_ARCH_LG1K=y +CONFIG_ARCH_HISI=y +CONFIG_ARCH_MEDIATEK=y +CONFIG_ARCH_MESON=y +CONFIG_ARCH_MVEBU=y +CONFIG_ARCH_QCOM=y +CONFIG_ARCH_REALTEK=y +CONFIG_ARCH_ROCKCHIP=y +CONFIG_ARCH_SEATTLE=y +CONFIG_ARCH_SYNQUACER=y +CONFIG_ARCH_RENESAS=y +CONFIG_ARCH_R8A7795=y +CONFIG_ARCH_R8A7796=y +CONFIG_ARCH_R8A77970=y +CONFIG_ARCH_R8A77995=y +CONFIG_ARCH_STRATIX10=y +CONFIG_ARCH_TEGRA=y +CONFIG_ARCH_SPRD=y +CONFIG_ARCH_THUNDER=y +CONFIG_ARCH_THUNDER2=y +CONFIG_ARCH_UNIPHIER=y +CONFIG_ARCH_VEXPRESS=y +CONFIG_ARCH_XGENE=y +CONFIG_ARCH_ZX=y +CONFIG_ARCH_ZYNQMP=y +CONFIG_PCI=y +CONFIG_PCI_REALLOC_ENABLE_AUTO=y +CONFIG_PCI_IOV=y +CONFIG_PCI_PRI=y +CONFIG_PCI_PASID=y +CONFIG_HOTPLUG_PCI=y +CONFIG_PCI_HOST_GENERIC=y +CONFIG_PCI_XGENE=y +CONFIG_PCI_HOST_THUNDER_PEM=y +CONFIG_ARM64_VA_BITS_48=y +CONFIG_SCHED_MC=y +CONFIG_NR_CPUS=8 +CONFIG_NUMA=y +CONFIG_PREEMPT=y +# CONFIG_COMPACTION is not set +CONFIG_KSM=y +CONFIG_CMA=y +CONFIG_SECCOMP=y +CONFIG_KEXEC=y +# CONFIG_EFI is not set +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +# CONFIG_BINFMT_SCRIPT is not set +CONFIG_CPU_IDLE=y +CONFIG_ARM_CPUIDLE=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_PACKET_DIAG=y +CONFIG_UNIX=y +CONFIG_TLS=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=y +CONFIG_NET_IPGRE_DEMUX=y +CONFIG_SYN_COOKIES=y +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_BRIDGE=y +CONFIG_VLAN_8021Q=y +CONFIG_NET_DEVLINK=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_EXTRA_FIRMWARE="cpt8x-mc-ae.out cpt8x-mc-se.out" +CONFIG_DMA_CMA=y +CONFIG_MTD=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_PLATFORM=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=y +CONFIG_VIRTIO_BLK=y +CONFIG_BLK_DEV_NVME=y +CONFIG_NVME_MULTIPATH=y +CONFIG_NVME_FC=y +CONFIG_SRAM=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_SG=y +CONFIG_SCSI_SAS_LIBSAS=y +CONFIG_SCSI_VIRTIO=y +CONFIG_ATA=y +CONFIG_SATA_AHCI=y +CONFIG_SATA_AHCI_PLATFORM=y +# CONFIG_ATA_BMDMA is not set +CONFIG_MD=y +CONFIG_BLK_DEV_DM=y +CONFIG_DM_CRYPT=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_THUNDER_NIC_PF=y +CONFIG_THUNDER_NIC_VF=y +CONFIG_LIQUIDIO=y +CONFIG_LIQUIDIO_VF=y +# 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_HISILICON 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_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MELLANOX is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MYRI 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_MDIO_OCTEON=y +CONFIG_AQUANTIA_PHY=y +CONFIG_MARVELL_PHY=y +CONFIG_VITESSE_PHY=y +# CONFIG_USB_NET_DRIVERS is not set +# CONFIG_WLAN is not set +CONFIG_INPUT_POLLDEV=y +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_CROS_EC=y +CONFIG_INPUT_MISC=y +# CONFIG_SERIO_SERPORT is not set +CONFIG_SERIO_AMBAKMI=y +CONFIG_LEGACY_PTY_COUNT=16 +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_DW=y +CONFIG_SERIAL_8250_UNIPHIER=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_XILINX_PS_UART=y +CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y +CONFIG_SERIAL_DEV_BUS=y +CONFIG_VIRTIO_CONSOLE=y +CONFIG_HW_RANDOM=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=y +CONFIG_I2C_MUX_PCA954x=y +CONFIG_I2C_DESIGNWARE_PLATFORM=y +CONFIG_I2C_RK3X=y +CONFIG_I2C_UNIPHIER_F=y +CONFIG_I2C_THUNDERX=y +CONFIG_I2C_CROS_EC_TUNNEL=y +CONFIG_I2C_SLAVE=y +CONFIG_SPI=y +CONFIG_SPI_THUNDERX=y +# CONFIG_PINCTRL_UNIPHIER is not set +CONFIG_GPIO_DWAPB=y +CONFIG_GPIO_PL061=y +CONFIG_GPIO_THUNDERX=y +CONFIG_GPIO_UNIPHIER=y +CONFIG_GPIO_XGENE=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCA953X_IRQ=y +CONFIG_GPIO_PCF857X=y +CONFIG_GPIO_MAX77620=y +CONFIG_POWER_RESET_XGENE=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_SYSCON_REBOOT_MODE=y +CONFIG_BATTERY_BQ27XXX=y +# CONFIG_HWMON is not set +CONFIG_WATCHDOG=y +CONFIG_SOFT_WATCHDOG=y +CONFIG_XILINX_WATCHDOG=y +CONFIG_ZIIRAVE_WATCHDOG=y +CONFIG_ARM_SP805_WATCHDOG=y +CONFIG_ARM_SBSA_WATCHDOG=y +CONFIG_CADENCE_WATCHDOG=y +CONFIG_MAX77620_WATCHDOG=y +CONFIG_UNIPHIER_WATCHDOG=y +CONFIG_MFD_CROS_EC=y +CONFIG_MFD_CROS_EC_I2C=y +CONFIG_MFD_HI6421_PMIC=y +CONFIG_MFD_MAX77620=y +CONFIG_MFD_RK808=y +CONFIG_MFD_SEC_CORE=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +# CONFIG_VGA_ARB is not set +CONFIG_FB=y +CONFIG_FB_ARMCLCD=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y +CONFIG_HID_A4TECH=y +CONFIG_HID_APPLE=y +CONFIG_HID_BELKIN=y +CONFIG_HID_CHERRY=y +CONFIG_HID_CHICONY=y +CONFIG_HID_CYPRESS=y +CONFIG_HID_EZKEY=y +CONFIG_HID_ITE=y +CONFIG_HID_KENSINGTON=y +CONFIG_HID_LOGITECH=y +CONFIG_HID_MICROSOFT=y +CONFIG_HID_MONTEREY=y +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_PLATFORM=y +CONFIG_USB_ACM=y +CONFIG_USB_STORAGE=y +CONFIG_USB_UAS=y +CONFIG_USB_SERIAL=y +CONFIG_MMC=y +CONFIG_SDIO_UART=y +CONFIG_MMC_ARMMMCI=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_CAVIUM_THUNDERX=m +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_ISL1208=y +CONFIG_RTC_DRV_ISL12022=y +CONFIG_SYNC_FILE=y +CONFIG_VIRTIO_BALLOON=y +CONFIG_VIRTIO_MMIO=y +CONFIG_COMMON_CLK_RK808=y +CONFIG_COMMON_CLK_CS2000_CP=y +CONFIG_COMMON_CLK_S2MPS11=y +CONFIG_CLK_QORIQ=y +CONFIG_IOMMU_IO_PGTABLE_ARMV7S=y +CONFIG_ARM_SMMU=y +CONFIG_ARM_SMMU_V3=y +CONFIG_EXTCON_USB_GPIO=y +CONFIG_PHY_XGENE=y +CONFIG_TEE=y +CONFIG_OPTEE=y +CONFIG_GOOGLE_FIRMWARE=y +CONFIG_GOOGLE_COREBOOT_TABLE_OF=y +CONFIG_GOOGLE_MEMCONSOLE_COREBOOT=y +CONFIG_GOOGLE_VPD=y +CONFIG_EXT3_FS=y +CONFIG_XFS_FS=y +CONFIG_BTRFS_FS=y +CONFIG_F2FS_FS=y +CONFIG_FS_DAX=y +CONFIG_EXPORTFS_BLOCK_OPS=y +CONFIG_FANOTIFY=y +CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y +CONFIG_ISO9660_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_UTF8=y +CONFIG_NTFS_FS=y +CONFIG_TMPFS=y +# CONFIG_MISC_FILESYSTEMS is not set +# CONFIG_NETWORK_FILESYSTEMS is not set +CONFIG_PRINTK_TIME=y +CONFIG_MESSAGE_LOGLEVEL_DEFAULT=5 +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_FS=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHED_DEBUG is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_FTRACE is not set +CONFIG_MEMTEST=y +# CONFIG_STRICT_DEVMEM is not set +CONFIG_KEYS=y +CONFIG_SECURITY=y +# CONFIG_INTEGRITY is not set +CONFIG_CRYPTO_RSA=y +CONFIG_CRYPTO_ECDH=y +# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set +CONFIG_CRYPTO_AUTHENC=y +CONFIG_CRYPTO_ECHAINIV=y +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_CMAC=y +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA512=y +CONFIG_CRYPTO_ARC4=y +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_ANSI_CPRNG=y +# CONFIG_CRYPTO_DEV_VIRTIO is not set +CONFIG_ASYMMETRIC_KEY_TYPE=y +CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y +CONFIG_X509_CERTIFICATE_PARSER=y +CONFIG_PKCS7_MESSAGE_PARSER=y +CONFIG_SYSTEM_TRUSTED_KEYRING=y +CONFIG_ARM64_CRYPTO=y +CONFIG_CRYPTO_SHA512_ARM64=y +CONFIG_CRYPTO_SHA1_ARM64_CE=y +CONFIG_CRYPTO_SHA2_ARM64_CE=y +CONFIG_CRYPTO_GHASH_ARM64_CE=y +CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=y +CONFIG_CRYPTO_CRC32_ARM64_CE=y +CONFIG_CRYPTO_AES_ARM64_CE_CCM=y +CONFIG_CRYPTO_AES_ARM64_CE_BLK=y +CONFIG_CRYPTO_CHACHA20_NEON=y +CONFIG_CRYPTO_AES_ARM64_BS=y +CONFIG_CRC_T10DIF=y +CONFIG_CRC_ITU_T=y +CONFIG_CRC7=y diff --git a/payloads/external/LinuxBoot/arm64/kernel_fdt_lzma.its b/payloads/external/LinuxBoot/arm64/kernel_fdt_lzma.its new file mode 100644 index 0000000000..50f6a2f4d8 --- /dev/null +++ b/payloads/external/LinuxBoot/arm64/kernel_fdt_lzma.its @@ -0,0 +1,74 @@ +/* + * Simple U-Boot uImage source file containing a single kernel and FDT blob + */ + +/dts-v1/; + +/ { + description = "Simple image with single Linux kernel and FDT blob"; + #address-cells = <1>; + + images { + kernel { + description = "Vanilla Linux kernel"; + data = /incbin/("vmlinux.bin.lzma"); + type = "kernel"; + arch = "arm64"; + os = "linux"; + compression = "lzma"; + load = <0x80000>; + entry = <0x80000>; + hash-1 { + algo = "crc32"; + }; + hash-2 { + algo = "sha1"; + }; + hash-3 { + algo = "sha256"; + }; + }; + fdt-1 { + description = "Flattened Device Tree blob"; + data = /incbin/("target.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + hash-1 { + algo = "crc32"; + }; + hash-2 { + algo = "sha1"; + }; + hash-3 { + algo = "sha256"; + }; + }; + ramdisk-1 { + description = "Compressed Initramfs"; + data = /incbin/("initramfs.cpio.xz"); + type = "ramdisk"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <00000000>; + entry = <00000000>; + hash-1 { + algo = "sha1"; + }; + hash-2 { + algo = "sha256"; + }; + }; + }; + + configurations { + default = "conf-1"; + conf-1 { + description = "Boot Linux kernel with FDT blob"; + kernel = "kernel"; + fdt = "fdt-1"; + ramdisk = "ramdisk-1"; + }; + }; +}; diff --git a/payloads/external/LinuxBoot/targets/u-root.mk b/payloads/external/LinuxBoot/targets/u-root.mk index 9b0e5687d7..4c2994c2e3 100644 --- a/payloads/external/LinuxBoot/targets/u-root.mk +++ b/payloads/external/LinuxBoot/targets/u-root.mk @@ -52,8 +52,11 @@ checkout: fetch done;,true;) \ fi -$(project_dir)/initramfs.cpio.xz: checkout - cd $(uroot_dir); GOARCH=$(CONFIG_LINUXBOOT_ARCH) GOPATH=$(go_path_dir) go build u-root.go +$(uroot_dir)/u-root: $(uroot_dir)/u-root.go + echo " GO u-root" + cd $(uroot_dir); GOPATH=$(go_path_dir) go build u-root.go + +$(project_dir)/initramfs.cpio.xz: checkout $(uroot_dir)/u-root echo " MAKE u-root $(CONFIG_LINUXBOOT_UROOT_VERSION)" ifneq ($(CONFIG_LINUXBOOT_UROOT_COMMANDS),) ifneq ($(CONFIG_LINUXBOOT_UROOT_FILES),) diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc index 1d3e7a17d9..973bdfb10d 100644 --- a/payloads/external/Makefile.inc +++ b/payloads/external/Makefile.inc @@ -33,10 +33,14 @@ $(PAYLOAD_CONFIG): payloads/external/depthcharge/depthcharge/build/depthcharge.e endif ifeq ($(CONFIG_PAYLOAD_LINUXBOOT),y) -ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUXBOOT_KERNEL_COMMANDLINE))),) + ifeq ($(CONFIG_ARCH_X86),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 + ifneq ($(strip $(call strip_quotes,$(CONFIG_PAYLOAD_USERSPACE))),) + ADDITIONAL_PAYLOAD_CONFIG+=-I $(strip $(call strip_quotes,$(CONFIG_PAYLOAD_USERSPACE))) + endif + endif endif ifeq ($(CONFIG_PAYLOAD_LINUX),y) @@ -259,16 +263,6 @@ payloads/external/iPXE/ipxe/ipxe.rom ipxe: $(DOTCONFIG) 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) \ CPUS=$(CPUS) \ CONFIG_LINUXBOOT_KERNEL_VERSION=$(CONFIG_LINUXBOOT_KERNEL_VERSION) \ CONFIG_LINUXBOOT_KERNEL_CONFIGFILE=$(CONFIG_LINUXBOOT_KERNEL_CONFIGFILE) \ @@ -277,7 +271,9 @@ linuxboot: CONFIG_LINUXBOOT_UROOT_COMMANDS="$(CONFIG_LINUXBOOT_UROOT_COMMANDS)" \ CONFIG_LINUXBOOT_ARCH=$(CONFIG_LINUXBOOT_ARCH) \ CONFIG_LINUXBOOT_UROOT=$(CONFIG_LINUXBOOT_UROOT) \ - CONFIG_LINUXBOOT_UROOT_FILES=$(CONFIG_LINUXBOOT_UROOT_FILES) + CONFIG_LINUXBOOT_UROOT_FILES=$(CONFIG_LINUXBOOT_UROOT_FILES) \ + CONFIG_LINUXBOOT_DTB_FILE=$(CONFIG_LINUXBOOT_DTB_FILE) + payloads/external/LinuxBoot/linuxboot/kernel-image: linuxboot payloads/external/LinuxBoot/linuxboot/initramfs.cpio.xz: linuxboot |