#133 U-Boot fixes for osboot merge, and more

Merged
vimuser merged 19 commits from alpernebbi/cros-postmerge-fixes into libreboot/master 2 years ago

+ 4 - 0
resources/coreboot/qemu_arm64_12mb/board.cfg

@@ -0,0 +1,4 @@
+cbtree="default"
+romtype="normal"
+arch="AArch64"
+payload_uboot="y"

+ 359 - 0
resources/coreboot/qemu_arm64_12mb/config/libgfxinit_corebootfb

@@ -0,0 +1,359 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# coreboot configuration
+#
+
+#
+# General setup
+#
+CONFIG_COREBOOT_BUILD=y
+CONFIG_LOCALVERSION=""
+CONFIG_CBFS_PREFIX="fallback"
+CONFIG_COMPILER_GCC=y
+# CONFIG_COMPILER_LLVM_CLANG is not set
+# CONFIG_ANY_TOOLCHAIN is not set
+# CONFIG_CCACHE is not set
+# CONFIG_FMD_GENPARSER is not set
+# CONFIG_UTIL_GENPARSER is not set
+CONFIG_OPTION_BACKEND_NONE=y
+CONFIG_COMPRESS_RAMSTAGE=y
+CONFIG_COMPRESS_PRERAM_STAGES=y
+CONFIG_INCLUDE_CONFIG_FILE=y
+# CONFIG_COLLECT_TIMESTAMPS is not set
+CONFIG_USE_BLOBS=y
+# CONFIG_USE_AMD_BLOBS is not set
+# CONFIG_USE_QC_BLOBS is not set
+# CONFIG_COVERAGE is not set
+# CONFIG_UBSAN is not set
+# CONFIG_ASAN is not set
+CONFIG_NO_STAGE_CACHE=y
+# CONFIG_TSEG_STAGE_CACHE is not set
+# CONFIG_UPDATE_IMAGE is not set
+# CONFIG_BOOTSPLASH_IMAGE is not set
+# CONFIG_FW_CONFIG is not set
+# end of General setup
+
+#
+# Mainboard
+#
+
+#
+# Important: Run 'make distclean' before switching boards
+#
+# CONFIG_VENDOR_51NB is not set
+# CONFIG_VENDOR_ACER is not set
+# CONFIG_VENDOR_ADLINK is not set
+# CONFIG_VENDOR_AMD is not set
+# CONFIG_VENDOR_AOPEN is not set
+# CONFIG_VENDOR_APPLE is not set
+# CONFIG_VENDOR_ASROCK is not set
+# CONFIG_VENDOR_ASUS is not set
+# CONFIG_VENDOR_BAP is not set
+# CONFIG_VENDOR_BIOSTAR is not set
+# CONFIG_VENDOR_BOSTENTECH is not set
+# CONFIG_VENDOR_CAVIUM is not set
+# CONFIG_VENDOR_CLEVO is not set
+# CONFIG_VENDOR_COMPULAB is not set
+# CONFIG_VENDOR_DELL is not set
+# CONFIG_VENDOR_ELMEX is not set
+CONFIG_VENDOR_EMULATION=y
+# CONFIG_VENDOR_EXAMPLE is not set
+# CONFIG_VENDOR_FACEBOOK is not set
+# CONFIG_VENDOR_FOXCONN is not set
+# CONFIG_VENDOR_GETAC is not set
+# CONFIG_VENDOR_GIGABYTE is not set
+# CONFIG_VENDOR_GIZMOSPHERE is not set
+# CONFIG_VENDOR_GOOGLE is not set
+# CONFIG_VENDOR_HP is not set
+# CONFIG_VENDOR_IBASE is not set
+# CONFIG_VENDOR_INTEL is not set
+# CONFIG_VENDOR_JETWAY is not set
+# CONFIG_VENDOR_KONTRON is not set
+# CONFIG_VENDOR_LENOVO is not set
+# CONFIG_VENDOR_LIBRETREND is not set
+# CONFIG_VENDOR_LIPPERT is not set
+# CONFIG_VENDOR_MSI is not set
+# CONFIG_VENDOR_OCP is not set
+# CONFIG_VENDOR_OPENCELLULAR is not set
+# CONFIG_VENDOR_PACKARDBELL is not set
+# CONFIG_VENDOR_PCENGINES is not set
+# CONFIG_VENDOR_PINE64 is not set
+# CONFIG_VENDOR_PORTWELL is not set
+# CONFIG_VENDOR_PRODRIVE is not set
+# CONFIG_VENDOR_PROTECTLI is not set
+# CONFIG_VENDOR_PURISM is not set
+# CONFIG_VENDOR_RAZER is not set
+# CONFIG_VENDOR_RODA is not set
+# CONFIG_VENDOR_SAMSUNG is not set
+# CONFIG_VENDOR_SAPPHIRE is not set
+# CONFIG_VENDOR_SCALEWAY is not set
+# CONFIG_VENDOR_SIEMENS is not set
+# CONFIG_VENDOR_SIFIVE is not set
+# CONFIG_VENDOR_SUPERMICRO is not set
+# CONFIG_VENDOR_SYSTEM76 is not set
+# CONFIG_VENDOR_TI is not set
+# CONFIG_VENDOR_UP is not set
+CONFIG_BOARD_SPECIFIC_OPTIONS=y
+CONFIG_MAINBOARD_PART_NUMBER="QEMU AArch64"
+CONFIG_MAINBOARD_DIR="emulation/qemu-aarch64"
+CONFIG_DIMM_MAX=4
+CONFIG_DIMM_SPD_SIZE=256
+CONFIG_FMDFILE=""
+# CONFIG_NO_POST is not set
+CONFIG_MAINBOARD_VENDOR="QEMU"
+CONFIG_CBFS_SIZE=0x00c00000
+CONFIG_MAX_CPUS=2
+# CONFIG_VBOOT is not set
+CONFIG_DEVICETREE="devicetree.cb"
+CONFIG_OVERRIDE_DEVICETREE=""
+CONFIG_DRAM_SIZE_MB=261120
+CONFIG_UART_FOR_CONSOLE=0
+# CONFIG_CONSOLE_POST is not set
+CONFIG_POST_DEVICE=y
+CONFIG_BOARD_EMULATION_QEMU_AARCH64=y
+# CONFIG_BOARD_EMULATION_QEMU_ARMV7 is not set
+# CONFIG_BOARD_EMULATION_QEMU_X86_I440FX is not set
+# CONFIG_BOARD_EMULATION_QEMU_POWER8 is not set
+# CONFIG_BOARD_EMULATION_QEMU_X86_Q35 is not set
+# CONFIG_BOARD_EMULATION_QEMU_RISCV_RV64 is not set
+# CONFIG_BOARD_EMULATION_QEMU_RISCV_RV32 is not set
+# CONFIG_BOARD_EMULATION_SPIKE_RISCV is not set
+CONFIG_MEMLAYOUT_LD_FILE="src/mainboard/emulation/qemu-aarch64/memlayout.ld"
+CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x20000
+CONFIG_CONSOLE_SERIAL=y
+CONFIG_PS2K_EISAID="PNP0303"
+CONFIG_PS2M_EISAID="PNP0F13"
+CONFIG_HEAP_SIZE=0x4000
+CONFIG_BOARD_ROMSIZE_KB_4096=y
+# CONFIG_COREBOOT_ROMSIZE_KB_256 is not set
+# CONFIG_COREBOOT_ROMSIZE_KB_512 is not set
+# CONFIG_COREBOOT_ROMSIZE_KB_1024 is not set
+# CONFIG_COREBOOT_ROMSIZE_KB_2048 is not set
+# CONFIG_COREBOOT_ROMSIZE_KB_4096 is not set
+# CONFIG_COREBOOT_ROMSIZE_KB_5120 is not set
+# CONFIG_COREBOOT_ROMSIZE_KB_6144 is not set
+# CONFIG_COREBOOT_ROMSIZE_KB_8192 is not set
+# CONFIG_COREBOOT_ROMSIZE_KB_10240 is not set
+CONFIG_COREBOOT_ROMSIZE_KB_12288=y
+# CONFIG_COREBOOT_ROMSIZE_KB_16384 is not set
+# CONFIG_COREBOOT_ROMSIZE_KB_32768 is not set
+# CONFIG_COREBOOT_ROMSIZE_KB_65536 is not set
+CONFIG_COREBOOT_ROMSIZE_KB=12288
+CONFIG_ROM_SIZE=0x00c00000
+# end of Mainboard
+
+#
+# Chipset
+#
+
+#
+# SoC
+#
+CONFIG_CHIPSET_DEVICETREE=""
+CONFIG_SMM_MODULE_STACK_SIZE=0x400
+CONFIG_CBFS_CACHE_ALIGN=8
+CONFIG_ARM64_BL31_EXTERNAL_FILE=""
+CONFIG_ARCH_ARMV8_EXTENSION=0
+CONFIG_STACK_SIZE=0x0
+CONFIG_VBT_DATA_SIZE_KB=8
+CONFIG_INTEL_GMA_BCLV_OFFSET=0xc8254
+CONFIG_INTEL_GMA_BCLV_WIDTH=16
+CONFIG_INTEL_GMA_BCLM_OFFSET=0xc8256
+CONFIG_INTEL_GMA_BCLM_WIDTH=16
+CONFIG_TTYS0_BASE=0x3f8
+CONFIG_UART_PCI_ADDR=0x0
+CONFIG_GENERIC_UDELAY=y
+
+#
+# CPU
+#
+CONFIG_XAPIC_ONLY=y
+CONFIG_LOGICAL_CPUS=y
+CONFIG_SMM_TSEG=y
+CONFIG_SMM_MODULE_HEAP_SIZE=0x4000
+CONFIG_SMM_STUB_STACK_SIZE=0x400
+
+#
+# Northbridge
+#
+
+#
+# Southbridge
+#
+CONFIG_FIXED_RCBA_MMIO_BASE=0xfed1c000
+CONFIG_RCBA_LENGTH=0x4000
+
+#
+# Super I/O
+#
+
+#
+# Embedded Controllers
+#
+CONFIG_ARCH_ARM64=y
+CONFIG_ARCH_BOOTBLOCK_ARM64=y
+CONFIG_ARCH_VERSTAGE_ARM64=y
+CONFIG_ARCH_ROMSTAGE_ARM64=y
+CONFIG_ARCH_RAMSTAGE_ARM64=y
+CONFIG_ARCH_BOOTBLOCK_ARMV8_64=y
+CONFIG_ARCH_VERSTAGE_ARMV8_64=y
+CONFIG_ARCH_ROMSTAGE_ARMV8_64=y
+CONFIG_ARCH_RAMSTAGE_ARMV8_64=y
+CONFIG_ARM64_USE_ARCH_TIMER=y
+CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE=y
+# end of Chipset
+
+#
+# Devices
+#
+CONFIG_HAVE_LINEAR_FRAMEBUFFER=y
+CONFIG_MAINBOARD_HAS_NATIVE_VGA_INIT=y
+CONFIG_MAINBOARD_FORCE_NATIVE_VGA_INIT=y
+CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT=y
+
+#
+# Display
+#
+CONFIG_GENERIC_LINEAR_FRAMEBUFFER=y
+CONFIG_LINEAR_FRAMEBUFFER=y
+# CONFIG_BOOTSPLASH is not set
+# end of Display
+
+# CONFIG_SOFTWARE_I2C is not set
+CONFIG_RESOURCE_ALLOCATOR_V4=y
+# end of Devices
+
+#
+# Generic Drivers
+#
+CONFIG_CRB_TPM_BASE_ADDRESS=0xfed40000
+CONFIG_DRIVERS_UART=y
+CONFIG_HAVE_UART_SPECIAL=y
+CONFIG_DRIVERS_UART_PL011=y
+# CONFIG_VPD is not set
+# CONFIG_DRIVERS_GENERIC_CBFS_SERIAL is not set
+# CONFIG_DRIVERS_GENESYSLOGIC_GL9755 is not set
+CONFIG_INTEL_GMA_OPREGION_2_0=y
+# end of Generic Drivers
+
+#
+# Security
+#
+
+#
+# Verified Boot (vboot)
+#
+# end of Verified Boot (vboot)
+
+#
+# Trusted Platform Module
+#
+CONFIG_NO_TPM=y
+# end of Trusted Platform Module
+
+#
+# Memory initialization
+#
+# end of Memory initialization
+
+CONFIG_BOOTMEDIA_LOCK_NONE=y
+# CONFIG_BOOTMEDIA_LOCK_CONTROLLER is not set
+# CONFIG_BOOTMEDIA_LOCK_CHIP is not set
+# end of Security
+
+CONFIG_ACPI_HAVE_PCAT_8259=y
+CONFIG_BOOT_DEVICE_NOT_SPI_FLASH=y
+
+#
+# Console
+#
+CONFIG_BOOTBLOCK_CONSOLE=y
+
+#
+# device-specific UART
+#
+# CONFIG_CONSOLE_SERIAL_921600 is not set
+# CONFIG_CONSOLE_SERIAL_460800 is not set
+# CONFIG_CONSOLE_SERIAL_230400 is not set
+CONFIG_CONSOLE_SERIAL_115200=y
+# CONFIG_CONSOLE_SERIAL_57600 is not set
+# CONFIG_CONSOLE_SERIAL_38400 is not set
+# CONFIG_CONSOLE_SERIAL_19200 is not set
+# CONFIG_CONSOLE_SERIAL_9600 is not set
+CONFIG_TTYS0_BAUD=115200
+CONFIG_CONSOLE_CBMEM=y
+# CONFIG_CONSOLE_SPI_FLASH is not set
+# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_8 is not set
+CONFIG_DEFAULT_CONSOLE_LOGLEVEL_7=y
+# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_6 is not set
+# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_5 is not set
+# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_4 is not set
+# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_3 is not set
+# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_2 is not set
+# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_1 is not set
+# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_0 is not set
+CONFIG_DEFAULT_CONSOLE_LOGLEVEL=7
+CONFIG_POST_DEVICE_NONE=y
+CONFIG_HWBASE_DEBUG_CB=y
+# end of Console
+
+CONFIG_HAVE_MONOTONIC_TIMER=y
+
+#
+# System tables
+#
+# end of System tables
+
+#
+# Payload
+#
+CONFIG_PAYLOAD_NONE=y
+# CONFIG_PAYLOAD_ELF is not set
+# CONFIG_PAYLOAD_FIT is not set
+# CONFIG_PAYLOAD_BOOTBOOT is not set
+# CONFIG_PAYLOAD_LINUXBOOT is not set
+# CONFIG_PAYLOAD_TIANOCORE is not set
+CONFIG_PAYLOAD_OPTIONS=""
+# CONFIG_PAYLOAD_FIT_SUPPORT is not set
+CONFIG_COMPRESS_SECONDARY_PAYLOAD=y
+
+#
+# Secondary Payloads
+#
+# end of Secondary Payloads
+# end of Payload
+
+#
+# Debugging
+#
+
+#
+# CPU Debug Settings
+#
+# CONFIG_DISPLAY_MTRRS is not set
+
+#
+# BLOB Debug Settings
+#
+
+#
+# General Debug Settings
+#
+# CONFIG_GDB_STUB is not set
+# CONFIG_FATAL_ASSERTS is not set
+# CONFIG_DEBUG_CBFS is not set
+# CONFIG_DEBUG_MALLOC is not set
+# CONFIG_DEBUG_CONSOLE_INIT is not set
+# CONFIG_DEBUG_BOOT_STATE is not set
+# CONFIG_DEBUG_ADA_CODE is not set
+# CONFIG_HAVE_EM100_SUPPORT is not set
+# end of Debugging
+
+CONFIG_MISSING_BOARD_RESET=y
+CONFIG_WARNINGS_ARE_ERRORS=y
+CONFIG_MAX_REBOOT_CNT=3
+CONFIG_NO_XIP_EARLY_STAGES=y
+CONFIG_BOOTBLOCK_CUSTOM=y
+CONFIG_HAVE_BOOTBLOCK=y
+CONFIG_HAVE_ROMSTAGE=y
+CONFIG_HAVE_RAMSTAGE=y

+ 1 - 1
resources/coreboot/qemu_x86_12mb/board.cfg

@@ -6,4 +6,4 @@ payload_grub_withseabios="y"
 payload_seabios="y"
 payload_seabios="y"
 payload_memtest="y"
 payload_memtest="y"
 grub_scan_disk="ahci"
 grub_scan_disk="ahci"
-#payload_uboot="y"
+payload_uboot="y"

+ 24 - 2
resources/coreboot/qemu_x86_12mb/config/libgfxinit_corebootfb

@@ -120,6 +120,7 @@ CONFIG_POST_IO=y
 CONFIG_OVERRIDE_DEVICETREE=""
 CONFIG_OVERRIDE_DEVICETREE=""
 CONFIG_CMOS_DEFAULT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.default"
 CONFIG_CMOS_DEFAULT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.default"
 CONFIG_CMOS_LAYOUT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.layout"
 CONFIG_CMOS_LAYOUT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.layout"
+CONFIG_UART_FOR_CONSOLE=0
 # CONFIG_CONSOLE_POST is not set
 # CONFIG_CONSOLE_POST is not set
 CONFIG_POST_DEVICE=y
 CONFIG_POST_DEVICE=y
 # CONFIG_BOARD_EMULATION_QEMU_AARCH64 is not set
 # CONFIG_BOARD_EMULATION_QEMU_AARCH64 is not set
@@ -138,6 +139,7 @@ CONFIG_DCACHE_BSP_STACK_SIZE=0x4000
 CONFIG_MAX_ACPI_TABLE_SIZE_KB=144
 CONFIG_MAX_ACPI_TABLE_SIZE_KB=144
 # CONFIG_DRIVERS_INTEL_WIFI is not set
 # CONFIG_DRIVERS_INTEL_WIFI is not set
 CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x20000
 CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x20000
+CONFIG_CONSOLE_SERIAL=y
 CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME="ThinkPad X230"
 CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME="ThinkPad X230"
 CONFIG_PCIEXP_HOTPLUG_BUSES=8
 CONFIG_PCIEXP_HOTPLUG_BUSES=8
 CONFIG_PCIEXP_HOTPLUG_MEM=0x800000
 CONFIG_PCIEXP_HOTPLUG_MEM=0x800000
@@ -145,7 +147,7 @@ CONFIG_PCIEXP_HOTPLUG_PREFETCH_MEM=0x10000000
 CONFIG_PS2K_EISAID="PNP0303"
 CONFIG_PS2K_EISAID="PNP0303"
 CONFIG_PS2M_EISAID="PNP0F13"
 CONFIG_PS2M_EISAID="PNP0F13"
 # CONFIG_PCIEXP_CLK_PM is not set
 # CONFIG_PCIEXP_CLK_PM is not set
-# CONFIG_DRIVERS_UART_8250IO is not set
+CONFIG_DRIVERS_UART_8250IO=y
 CONFIG_HEAP_SIZE=0x8000
 CONFIG_HEAP_SIZE=0x8000
 CONFIG_BOARD_ROMSIZE_KB_256=y
 CONFIG_BOARD_ROMSIZE_KB_256=y
 # CONFIG_COREBOOT_ROMSIZE_KB_256 is not set
 # CONFIG_COREBOOT_ROMSIZE_KB_256 is not set
@@ -188,6 +190,8 @@ CONFIG_INTEL_GMA_BCLM_OFFSET=0xc8256
 CONFIG_INTEL_GMA_BCLM_WIDTH=16
 CONFIG_INTEL_GMA_BCLM_WIDTH=16
 CONFIG_PCIEXP_ASPM=y
 CONFIG_PCIEXP_ASPM=y
 CONFIG_PCIEXP_COMMON_CLOCK=y
 CONFIG_PCIEXP_COMMON_CLOCK=y
+CONFIG_TTYS0_BASE=0x3f8
+CONFIG_TTYS0_LCS=3
 CONFIG_UART_PCI_ADDR=0x0
 CONFIG_UART_PCI_ADDR=0x0
 
 
 #
 #
@@ -290,6 +294,7 @@ CONFIG_RESOURCE_ALLOCATOR_V4=y
 # Generic Drivers
 # Generic Drivers
 #
 #
 CONFIG_CRB_TPM_BASE_ADDRESS=0xfed40000
 CONFIG_CRB_TPM_BASE_ADDRESS=0xfed40000
+CONFIG_DRIVERS_UART=y
 # CONFIG_DRIVERS_UART_OXPCIE is not set
 # CONFIG_DRIVERS_UART_OXPCIE is not set
 # CONFIG_VPD is not set
 # CONFIG_VPD is not set
 CONFIG_DRIVERS_EMULATION_QEMU_BOCHS=y
 CONFIG_DRIVERS_EMULATION_QEMU_BOCHS=y
@@ -343,10 +348,26 @@ CONFIG_BOOT_DEVICE_NOT_SPI_FLASH=y
 CONFIG_BOOTBLOCK_CONSOLE=y
 CONFIG_BOOTBLOCK_CONSOLE=y
 CONFIG_POSTCAR_CONSOLE=y
 CONFIG_POSTCAR_CONSOLE=y
 CONFIG_SQUELCH_EARLY_SMP=y
 CONFIG_SQUELCH_EARLY_SMP=y
+
+#
+# I/O mapped, 8250-compatible
+#
+
+#
+# Serial port base address = 0x3f8
+#
+# CONFIG_CONSOLE_SERIAL_921600 is not set
+# CONFIG_CONSOLE_SERIAL_460800 is not set
+# CONFIG_CONSOLE_SERIAL_230400 is not set
+CONFIG_CONSOLE_SERIAL_115200=y
+# CONFIG_CONSOLE_SERIAL_57600 is not set
+# CONFIG_CONSOLE_SERIAL_38400 is not set
+# CONFIG_CONSOLE_SERIAL_19200 is not set
+# CONFIG_CONSOLE_SERIAL_9600 is not set
+CONFIG_TTYS0_BAUD=115200
 # CONFIG_SPKMODEM is not set
 # CONFIG_SPKMODEM is not set
 # CONFIG_CONSOLE_NE2K is not set
 # CONFIG_CONSOLE_NE2K is not set
 CONFIG_CONSOLE_CBMEM=y
 CONFIG_CONSOLE_CBMEM=y
-# CONFIG_CONSOLE_CBMEM_DUMP_TO_UART is not set
 # CONFIG_CONSOLE_SPI_FLASH is not set
 # CONFIG_CONSOLE_SPI_FLASH is not set
 CONFIG_CONSOLE_QEMU_DEBUGCON=y
 CONFIG_CONSOLE_QEMU_DEBUGCON=y
 CONFIG_CONSOLE_QEMU_DEBUGCON_PORT=0x402
 CONFIG_CONSOLE_QEMU_DEBUGCON_PORT=0x402
@@ -425,6 +446,7 @@ CONFIG_COMPRESS_SECONDARY_PAYLOAD=y
 #
 #
 # General Debug Settings
 # General Debug Settings
 #
 #
+# CONFIG_GDB_STUB is not set
 # CONFIG_FATAL_ASSERTS is not set
 # CONFIG_FATAL_ASSERTS is not set
 # CONFIG_DEBUG_CBFS is not set
 # CONFIG_DEBUG_CBFS is not set
 # CONFIG_DEBUG_PIRQ is not set
 # CONFIG_DEBUG_PIRQ is not set

+ 24 - 2
resources/coreboot/qemu_x86_12mb/config/libgfxinit_txtmode

@@ -120,6 +120,7 @@ CONFIG_POST_IO=y
 CONFIG_OVERRIDE_DEVICETREE=""
 CONFIG_OVERRIDE_DEVICETREE=""
 CONFIG_CMOS_DEFAULT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.default"
 CONFIG_CMOS_DEFAULT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.default"
 CONFIG_CMOS_LAYOUT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.layout"
 CONFIG_CMOS_LAYOUT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.layout"
+CONFIG_UART_FOR_CONSOLE=0
 # CONFIG_CONSOLE_POST is not set
 # CONFIG_CONSOLE_POST is not set
 CONFIG_POST_DEVICE=y
 CONFIG_POST_DEVICE=y
 # CONFIG_BOARD_EMULATION_QEMU_AARCH64 is not set
 # CONFIG_BOARD_EMULATION_QEMU_AARCH64 is not set
@@ -138,6 +139,7 @@ CONFIG_DCACHE_BSP_STACK_SIZE=0x4000
 CONFIG_MAX_ACPI_TABLE_SIZE_KB=144
 CONFIG_MAX_ACPI_TABLE_SIZE_KB=144
 # CONFIG_DRIVERS_INTEL_WIFI is not set
 # CONFIG_DRIVERS_INTEL_WIFI is not set
 CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x20000
 CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x20000
+CONFIG_CONSOLE_SERIAL=y
 CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME="ThinkPad X230"
 CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME="ThinkPad X230"
 CONFIG_PCIEXP_HOTPLUG_BUSES=8
 CONFIG_PCIEXP_HOTPLUG_BUSES=8
 CONFIG_PCIEXP_HOTPLUG_MEM=0x800000
 CONFIG_PCIEXP_HOTPLUG_MEM=0x800000
@@ -145,7 +147,7 @@ CONFIG_PCIEXP_HOTPLUG_PREFETCH_MEM=0x10000000
 CONFIG_PS2K_EISAID="PNP0303"
 CONFIG_PS2K_EISAID="PNP0303"
 CONFIG_PS2M_EISAID="PNP0F13"
 CONFIG_PS2M_EISAID="PNP0F13"
 # CONFIG_PCIEXP_CLK_PM is not set
 # CONFIG_PCIEXP_CLK_PM is not set
-# CONFIG_DRIVERS_UART_8250IO is not set
+CONFIG_DRIVERS_UART_8250IO=y
 CONFIG_HEAP_SIZE=0x8000
 CONFIG_HEAP_SIZE=0x8000
 CONFIG_BOARD_ROMSIZE_KB_256=y
 CONFIG_BOARD_ROMSIZE_KB_256=y
 # CONFIG_COREBOOT_ROMSIZE_KB_256 is not set
 # CONFIG_COREBOOT_ROMSIZE_KB_256 is not set
@@ -188,6 +190,8 @@ CONFIG_INTEL_GMA_BCLM_OFFSET=0xc8256
 CONFIG_INTEL_GMA_BCLM_WIDTH=16
 CONFIG_INTEL_GMA_BCLM_WIDTH=16
 CONFIG_PCIEXP_ASPM=y
 CONFIG_PCIEXP_ASPM=y
 CONFIG_PCIEXP_COMMON_CLOCK=y
 CONFIG_PCIEXP_COMMON_CLOCK=y
+CONFIG_TTYS0_BASE=0x3f8
+CONFIG_TTYS0_LCS=3
 CONFIG_UART_PCI_ADDR=0x0
 CONFIG_UART_PCI_ADDR=0x0
 
 
 #
 #
@@ -288,6 +292,7 @@ CONFIG_RESOURCE_ALLOCATOR_V4=y
 # Generic Drivers
 # Generic Drivers
 #
 #
 CONFIG_CRB_TPM_BASE_ADDRESS=0xfed40000
 CONFIG_CRB_TPM_BASE_ADDRESS=0xfed40000
+CONFIG_DRIVERS_UART=y
 # CONFIG_DRIVERS_UART_OXPCIE is not set
 # CONFIG_DRIVERS_UART_OXPCIE is not set
 # CONFIG_VPD is not set
 # CONFIG_VPD is not set
 CONFIG_DRIVERS_EMULATION_QEMU_BOCHS=y
 CONFIG_DRIVERS_EMULATION_QEMU_BOCHS=y
@@ -339,10 +344,26 @@ CONFIG_BOOT_DEVICE_NOT_SPI_FLASH=y
 CONFIG_BOOTBLOCK_CONSOLE=y
 CONFIG_BOOTBLOCK_CONSOLE=y
 CONFIG_POSTCAR_CONSOLE=y
 CONFIG_POSTCAR_CONSOLE=y
 CONFIG_SQUELCH_EARLY_SMP=y
 CONFIG_SQUELCH_EARLY_SMP=y
+
+#
+# I/O mapped, 8250-compatible
+#
+
+#
+# Serial port base address = 0x3f8
+#
+# CONFIG_CONSOLE_SERIAL_921600 is not set
+# CONFIG_CONSOLE_SERIAL_460800 is not set
+# CONFIG_CONSOLE_SERIAL_230400 is not set
+CONFIG_CONSOLE_SERIAL_115200=y
+# CONFIG_CONSOLE_SERIAL_57600 is not set
+# CONFIG_CONSOLE_SERIAL_38400 is not set
+# CONFIG_CONSOLE_SERIAL_19200 is not set
+# CONFIG_CONSOLE_SERIAL_9600 is not set
+CONFIG_TTYS0_BAUD=115200
 # CONFIG_SPKMODEM is not set
 # CONFIG_SPKMODEM is not set
 # CONFIG_CONSOLE_NE2K is not set
 # CONFIG_CONSOLE_NE2K is not set
 CONFIG_CONSOLE_CBMEM=y
 CONFIG_CONSOLE_CBMEM=y
-# CONFIG_CONSOLE_CBMEM_DUMP_TO_UART is not set
 # CONFIG_CONSOLE_SPI_FLASH is not set
 # CONFIG_CONSOLE_SPI_FLASH is not set
 CONFIG_CONSOLE_QEMU_DEBUGCON=y
 CONFIG_CONSOLE_QEMU_DEBUGCON=y
 CONFIG_CONSOLE_QEMU_DEBUGCON_PORT=0x402
 CONFIG_CONSOLE_QEMU_DEBUGCON_PORT=0x402
@@ -421,6 +442,7 @@ CONFIG_COMPRESS_SECONDARY_PAYLOAD=y
 #
 #
 # General Debug Settings
 # General Debug Settings
 #
 #
+# CONFIG_GDB_STUB is not set
 # CONFIG_FATAL_ASSERTS is not set
 # CONFIG_FATAL_ASSERTS is not set
 # CONFIG_DEBUG_CBFS is not set
 # CONFIG_DEBUG_CBFS is not set
 # CONFIG_DEBUG_PIRQ is not set
 # CONFIG_DEBUG_PIRQ is not set

+ 52 - 29
resources/scripts/build/boot/roms_helper

@@ -146,12 +146,6 @@ if [ "${payload_uboot}" = "y" ] && \
 	uboot_config="default"
 	uboot_config="default"
 fi
 fi
 
 
-if [ "${payload_memtest}" = "y" ]; then
-	if [ ! -f "memtest86plus/memtest" ]; then
-		./build module memtest86plus
-	fi
-fi
-
 # Override all payload directives with cmdline args
 # Override all payload directives with cmdline args
 if [ ! -z ${payloads} ]; then	
 if [ ! -z ${payloads} ]; then	
 	echo "setting payloads $payloads"
 	echo "setting payloads $payloads"
@@ -159,6 +153,7 @@ if [ ! -z ${payloads} ]; then
 	payload_grub_withseabios="n" # seabios chainloaded from grub
 	payload_grub_withseabios="n" # seabios chainloaded from grub
 	payload_seabios="n"
 	payload_seabios="n"
 	payload_seabios_withgrub="n" # i386-coreboot grub accessible from SeaBIOS boot menu
 	payload_seabios_withgrub="n" # i386-coreboot grub accessible from SeaBIOS boot menu
+	payload_uboot="n"
 	seabios_opromloadonly="0"
 	seabios_opromloadonly="0"
 	payload_memtest="n"
 	payload_memtest="n"
 
 
@@ -180,29 +175,42 @@ if [ ! -d "${cbdir}" ]; then
 	./download coreboot ${cbtree}
 	./download coreboot ${cbtree}
 fi
 fi
 
 
+cat version > "${cbdir}/.coreboot-version"
+
 if [ "${arch}" = "x86_32" ] || [ "${arch}" = "x86_64" ]; then
 if [ "${arch}" = "x86_32" ] || [ "${arch}" = "x86_64" ]; then
 	if [ ! -d "${cbdir}/util/crossgcc/xgcc/i386-elf/" ]; then
 	if [ ! -d "${cbdir}/util/crossgcc/xgcc/i386-elf/" ]; then
-		(
-			cat version > "${cbdir}/.coreboot-version"
-			cd "${cbdir}"
-			make crossgcc-i386 CPUS=$(nproc) # even for 64-bit machines, coreboot builds
-				# 32-bit ROM images, so we only need to worry about i386-elf
-		)
+		# Even for 64-bit machines, coreboot builds 32-bit ROM
+		# images, so we only need to worry about i386-elf
+		make -C "${cbdir}" crossgcc-i386 CPUS=$(nproc)
 	fi
 	fi
+	case "$(uname -m)" in
+		x86*|i*86|amd64) : ;;
+		*) export CROSS_COMPILE=i386-elf- ;;
+	esac
 elif [ "${arch}" = "ARMv7" ]; then
 elif [ "${arch}" = "ARMv7" ]; then
-	(
-		cat version > "${cbdir}/.coreboot-version"
-		cd "${cbdir}"
-		make crossgcc-arm CPUS=$(nproc) # This is for armv7, doesn't apply to aarch64
-	)
+	if [ ! -d "${cbdir}/util/crossgcc/xgcc/arm-eabi/" ]; then
+		make -C "${cbdir}" crossgcc-arm CPUS=$(nproc)
+	fi
+	case "$(uname -m)" in
+		arm|arm32|armv6*|armv7*) : ;;
+		*) export CROSS_COMPILE=arm-eabi- ;;
+	esac
 elif [ "${arch}" = "AArch64" ]; then
 elif [ "${arch}" = "AArch64" ]; then
-	(
-		cat version > "${cbdir}/.coreboot-version"
-		cd "${cbdir}"
-		make crossgcc-aarch64 CPUS=$(nproc) # This is for aarch64, doesn't apply to armv7
-	)
+	if [ ! -d "${cbdir}/util/crossgcc/xgcc/aarch64-elf/" ]; then
+		make -C "${cbdir}" crossgcc-aarch64 CPUS=$(nproc)
+	fi
+	# aarch64 also needs armv7 toolchain for arm-trusted-firmware
+	if [ ! -d "${cbdir}/util/crossgcc/xgcc/arm-eabi/" ]; then
+		make -C "${cbdir}" crossgcc-arm CPUS=$(nproc)
+	fi
+	case "$(uname -m)" in
+		arm64|aarch64) : ;;
+		*) export CROSS_COMPILE=aarch64-elf- ;;
+	esac
 fi
 fi
 
 
+export PATH="$(pwd)/${cbdir}/util/crossgcc/xgcc/bin:$PATH"
+
 if [ ! -f "${cbfstool}" ]; then
 if [ ! -f "${cbfstool}" ]; then
 	./build module cbutils ${cbtree}
 	./build module cbutils ${cbtree}
 fi
 fi
@@ -218,6 +226,12 @@ if [ ! -f "${seavgabiosrom}" ] \
 	fi
 	fi
 fi
 fi
 
 
+if [ "${payload_memtest}" = "y" ]; then
+	if [ ! -f "memtest86plus/memtest" ]; then
+		./build module memtest86plus
+	fi
+fi
+
 [ -d "${romdir}/" ] || mkdir -p "${romdir}/"
 [ -d "${romdir}/" ] || mkdir -p "${romdir}/"
 rm -f "${romdir}"/*
 rm -f "${romdir}"/*
 
 
@@ -254,14 +268,17 @@ if [ "${payload_grub}" = "y" ] || [ "${payload_seabios_withgrub}" = "y" ]; then
 fi
 fi
 
 
 if [ "${payload_uboot}" = "y" ]; then
 if [ "${payload_uboot}" = "y" ]; then
-	if [ "${uboot_config}" = "default" ] && \
-		[ -f "payload/u-boot/${board}/u-boot.elf" ]; then
-			ubootelf="payload/u-boot/${board}/u-boot.elf"
+	if [ "${uboot_config}" = "default" ]; then
+		ubdir="payload/u-boot/${board}"
 	else
 	else
-		ubootelf="payload/u-boot/${board}/${uboot_config}/u-boot.elf"
+		ubdir="payload/u-boot/${board}/${uboot_config}"
 	fi
 	fi
 
 
-	if [ ! -f "${ubootelf}" ]; then
+	if [ -f "${ubdir}/u-boot.elf" ]; then
+		ubootelf="${ubdir}/u-boot.elf"
+	elif [ -f "${ubdir}/u-boot" ]; then
+		ubootelf="${ubdir}/u-boot"
+	else
 		printf "Required U-Boot payloads not yet built. Building now:\n"
 		printf "Required U-Boot payloads not yet built. Building now:\n"
 		rm -Rf "payload/u-boot/${board}" # just in case
 		rm -Rf "payload/u-boot/${board}" # just in case
 		./build payload u-boot "${board}"
 		./build payload u-boot "${board}"
@@ -383,9 +400,15 @@ make_uboot_payload_rom() {
 	cbfstool_path="${4}"
 	cbfstool_path="${4}"
 
 
 	if [ "${target_uboot_config}" = "default" ]; then
 	if [ "${target_uboot_config}" = "default" ]; then
-		target_ubootelf="payload/u-boot/${board}/u-boot.elf"
+		target_ubdir="payload/u-boot/${board}"
 	else
 	else
-		target_ubootelf="payload/u-boot/${board}/${target_uboot_config}/u-boot.elf"
+		target_ubdir="payload/u-boot/${board}/${target_uboot_config}"
+	fi
+
+	if [ -f "${target_ubdir}/u-boot.elf" ]; then
+		target_ubootelf="${target_ubdir}/u-boot.elf"
+	elif [ -f "${target_ubdir}/u-boot" ]; then
+		target_ubootelf="${target_ubdir}/u-boot"
 	fi
 	fi
 
 
 	tmprom=$(mktemp -t coreboot_rom.XXXXXXXXXX)
 	tmprom=$(mktemp -t coreboot_rom.XXXXXXXXXX)

+ 49 - 0
resources/scripts/build/clean/u-boot

@@ -0,0 +1,49 @@
+#!/usr/bin/env bash
+
+#  helper script: clean the u-boot builds
+#
+#       Copyright (C) 2014, 2015, 2016, 2020 Leah Rowe <info@minifree.org>
+#       Copyright (C) 2015 Klemens Nanni <contact@autoboot.org>
+#       Copyright (C) 2022 Alper Nebi Yasak <alpernebiyasak@gmail.com>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+# This script assumes that the current working directory is the root
+
+[ "x${DEBUG+set}" = 'xset' ] && set -v
+set -u -e
+
+# clean u-boot builds (dependencies for 'build'):
+
+printf "Cleaning u-boot builds for all boards\n"
+
+[ ! -d "coreboot/" ] && exit 0
+
+# clean u-boot (source archives preserved)
+for board in u-boot/*; do
+    if [ "${board##*/}" = "u-boot" ]; then
+        continue
+    fi
+    if [ ! -d "${board}" ]; then
+        continue
+    fi
+    make -C "${board}/" distclean
+
+    if [ -e "${board}/.git" ]; then
+        git -C "${board}" clean -fdx
+    fi
+done
+
+printf "\n\n"

+ 5 - 0
resources/scripts/build/dependencies/debian

@@ -88,6 +88,11 @@ apt-get -y install libncurses5-dev doxygen iasl gdb flex bison build-essential g
 
 
 apt-get -y install fonts-unifont libopts25 libselinux1-dev autogen m4 autoconf help2man libopts25-dev libfont-freetype-perl automake autotools-dev build-essential bison flex libfuse-dev liblzma-dev gawk libdevmapper-dev libtool libfreetype6-dev
 apt-get -y install fonts-unifont libopts25 libselinux1-dev autogen m4 autoconf help2man libopts25-dev libfont-freetype-perl automake autotools-dev build-essential bison flex libfuse-dev liblzma-dev gawk libdevmapper-dev libtool libfreetype6-dev
 
 
+# U-Boot build dependencies
+# -------------------------
+
+apt-get -y install bc bison build-essential device-tree-compiler efitools flex libfdt-dev liblz4-tool libgnutls28-dev libncurses-dev libpython3-dev libsdl2-dev libssl-dev lz4 lzma lzma-alone openssl pkg-config python3 python3-distutils python3-pkg-resources python3-pycryptodome python3-pyelftools swig uuid-dev
+
 # BucTS build dependencies (external script)
 # BucTS build dependencies (external script)
 # ------------------------------------------------------------
 # ------------------------------------------------------------
 
 

+ 0 - 8
resources/scripts/build/payload/u-boot

@@ -94,14 +94,6 @@ for board in "$@"; do
 		continue
 		continue
 	fi
 	fi
 
 
-	if [ "${arch}" = "x86_32" ] || [ "${arch}" = "x86_64" ]; then
-		export CROSS_COMPILE=x86_64-linux-
-	elif [ "${arch}" = "ARMv7" ]; then
-		export CROSS_COMPILE=arm-linux-gnueabi-
-	elif [ "${arch}" = "AArch64" ]; then
-		export CROSS_COMPILE=aarch64-linux-gnu-
-	fi
-
 	for config in "${board_dir}/config"/*; do
 	for config in "${board_dir}/config"/*; do
 		if [ ! -f "${config}" ]; then
 		if [ ! -f "${config}" ]; then
 			printf "%s: Target %s has no configs to build for. Skipping build.\n" \
 			printf "%s: Target %s has no configs to build for. Skipping build.\n" \

+ 0 - 0
resources/scripts/build/release/src


Some files were not shown because too many files changed in this diff