Showing 583 changed files with 15,520 additions and 4,916 deletions.
3 changes: 1 addition & 2 deletions .gitlab-ci.yml
@@ -1,5 +1,3 @@
image: coreboot/coreboot-sdk:1.50

services:
- docker:dind

Expand All @@ -21,6 +19,7 @@ check_dependencies:
- tags

.build_rom_apu: &build_rom_apu
image: coreboot/coreboot-sdk:1.50
variables:
PLATFORM: apux
stage: build_rom
Expand Down
17 changes: 15 additions & 2 deletions CHANGELOG.md
Expand Up @@ -17,9 +17,21 @@ Releases 4.8.0.x are based on continuous synchronization with official

## [Unreleased]

## [v4.8.0.3] - 2018-08-07
### Changed
- Synced and rebased with coreboot official repo commit c8e974f

### Fixed
- Change of date format in sign of life string now applies only to PC Engines
- Use CONFIG_LOCALVERSION as a coreboot version string
- Double sign-of-life during power on

# Added
- Enabled IOMMU

## [v4.8.0.2] - 2018-07-08
### Changed
- synced and rebased with coreboot official repo commit afc74ca
- Synced and rebased with coreboot official repo commit afc74ca

## [v4.8.0.1] - 2018-06-08
### Changed
Expand Down Expand Up @@ -196,7 +208,8 @@ redundant code which was similar for APU2/3/5 boards.
- turn off D4 and D5 leds on boot
- enable power on after power failure

[Unreleased]: https://github.com/pcengines/coreboot/compare/v4.8.0.2...develop
[Unreleased]: https://github.com/pcengines/coreboot/compare/v4.8.0.3...develop
[v4.8.0.3]: https://github.com/pcengines/coreboot/compare/v4.8.0.2...v4.8.0.3
[v4.8.0.2]: https://github.com/pcengines/coreboot/compare/v4.8.0.1...v4.8.0.2
[v4.8.0.1]: https://github.com/pcengines/coreboot/compare/v4.6.9...v4.8.0.1
[v4.6.10]: https://github.com/pcengines/coreboot/compare/v4.6.9...v4.6.10
Expand Down
2 changes: 1 addition & 1 deletion Documentation/getting_started/gerrit_guidelines.md
Expand Up @@ -167,7 +167,7 @@ as such. This can be done in the title ‘[DONOTSUBMIT]’, or can be pushed as
draft commits, so that only explicitly added reviewers will see them. These
sorts of patches are frequently posted as ideas or RFCs for the community
to look at. To push a draft, use the command:
git push origin HEAD:refs/drafts/master
git push origin HEAD:refs/for/master%private,wip

* Respond to anyone who has taken the time to review your patches, even if
it's just to say that you disagree. While it may seem annoying to address a
Expand Down
1 change: 0 additions & 1 deletion Documentation/mainboard/sifive/hifive-unleashed.md
Expand Up @@ -12,7 +12,6 @@ For general setup instructions, please refer to the [Getting Started Guide].
The following things are still missing from this coreboot port:

- Trampoline in the MBR block to support boot mode 1
- SiFive UART driver
- CBMEM support
- FU540 clock configuration
- FU540 RAM init
Expand Down
20 changes: 16 additions & 4 deletions Makefile.inc
Expand Up @@ -956,6 +956,10 @@ $(obj)/fmap.fmap: $(obj)/fmap.fmd $(FMAPTOOL)
echo " FMAP $(FMAPTOOL) -h $(obj)/fmap_config.h $< $@"
$(FMAPTOOL) -h $(obj)/fmap_config.h -R $(obj)/fmap.desc $< $@

ifeq ($(CONFIG_INTEL_ADD_TOP_SWAP_BOOTBLOCK),y)
TS_OPTIONS := -j $(CONFIG_INTEL_TOP_SWAP_BOOTBLOCK_SIZE)
FIT_OPTIONS := $(TS_OPTIONS)
endif
ifneq ($(CONFIG_UPDATE_IMAGE),y)
$(obj)/coreboot.pre: $(objcbfs)/bootblock.bin $$(prebuilt-files) $(CBFSTOOL) $$(cpu_ucode_cbfs_file) $(obj)/fmap.fmap $(obj)/fmap.desc
$(CBFSTOOL) $@.tmp create -M $(obj)/fmap.fmap -r $(shell cat $(obj)/fmap.desc)
Expand All @@ -964,7 +968,8 @@ ifeq ($(CONFIG_ARCH_X86),y)
-f $(objcbfs)/bootblock.bin \
-n bootblock \
-t bootblock \
-b -$(call file-size,$(objcbfs)/bootblock.bin) $(cbfs-autogen-attributes)
-b -$(call file-size,$(objcbfs)/bootblock.bin) $(cbfs-autogen-attributes) \
$(TS_OPTIONS)
else # ifeq ($(CONFIG_ARCH_X86),y)
$(CBFSTOOL) $@.tmp write -u \
-r BOOTBLOCK \
Expand All @@ -979,7 +984,7 @@ else # ifeq ($(CONFIG_ARCH_X86),y)
-b -4
rm -f $@.tmp.2
endif # ifeq ($(CONFIG_ARCH_X86),y)
$(CBFSTOOL) $@.tmp add-master-header
$(CBFSTOOL) $@.tmp add-master-header $(TS_OPTIONS)
$(prebuild-files) true
mv $@.tmp $@
else # ifneq ($(CONFIG_UPDATE_IMAGE),y)
Expand All @@ -999,6 +1004,11 @@ $(REFCODE_BLOB): $(RMODTOOL)
$(RMODTOOL) -i $(CONFIG_REFCODE_BLOB_FILE) -o $@
endif

FIT_ENTRY=$(call strip_quotes, $(CONFIG_INTEL_TOP_SWAP_FIT_ENTRY_FMAP_REG))
ifneq ($(FIT_ENTRY),)
FIT_OPTIONS += -q $(FIT_ENTRY)
endif

$(obj)/coreboot.rom: $(obj)/coreboot.pre $(objcbfs)/ramstage.elf $(CBFSTOOL) $$(INTERMEDIATE)
@printf " CBFS $(subst $(obj)/,,$(@))\n"
# The full ROM may be larger than the CBFS part, so create an empty
Expand All @@ -1016,12 +1026,14 @@ endif
ifeq ($(CONFIG_CPU_INTEL_FIRMWARE_INTERFACE_TABLE),y)
ifeq ($(CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_HEADER),y)
@printf " UPDATE-FIT\n"
$(CBFSTOOL) $@.tmp update-fit -n cpu_microcode_blob.bin -x $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES)
$(CBFSTOOL) $@.tmp update-fit -n cpu_microcode_blob.bin -x $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) \
$(FIT_OPTIONS)
endif

ifeq ($(CONFIG_CPU_MICROCODE_CBFS_GENERATE),y)
@printf " UPDATE-FIT\n"
$(CBFSTOOL) $@.tmp update-fit -n cpu_microcode_blob.bin -x $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES)
$(CBFSTOOL) $@.tmp update-fit -n cpu_microcode_blob.bin -x $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) \
$(FIT_OPTIONS)
endif
endif
mv $@.tmp $@
Expand Down
1 change: 1 addition & 0 deletions configs/config.pcengines_apu1
Expand Up @@ -15,3 +15,4 @@ CONFIG_MEMTEST_SECONDARY_PAYLOAD=y
CONFIG_MEMTEST_MASTER=y
CONFIG_SORTBOOTORDER_SECONDARY_PAYLOAD=y
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_1=y
CONFIG_LOCALVERSION="v4.8.0.3"
1 change: 1 addition & 0 deletions configs/config.pcengines_apu2
Expand Up @@ -17,3 +17,4 @@ CONFIG_PAYLOAD_CONFIGFILE="$(top)/src/mainboard/$(MAINBOARDDIR)/seabios_config"
CONFIG_SEABIOS_REVISION=y
CONFIG_SEABIOS_REVISION_ID="rel-1.11.0.5"
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_1=y
CONFIG_LOCALVERSION="v4.8.0.3"
1 change: 1 addition & 0 deletions configs/config.pcengines_apu3
Expand Up @@ -15,3 +15,4 @@ CONFIG_PAYLOAD_CONFIGFILE="$(top)/src/mainboard/$(MAINBOARDDIR)/seabios_config"
CONFIG_SEABIOS_REVISION=y
CONFIG_SEABIOS_REVISION_ID="rel-1.11.0.5"
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_1=y
CONFIG_LOCALVERSION="v4.8.0.3"
1 change: 1 addition & 0 deletions configs/config.pcengines_apu4
Expand Up @@ -15,3 +15,4 @@ CONFIG_PAYLOAD_CONFIGFILE="$(top)/src/mainboard/$(MAINBOARDDIR)/seabios_config"
CONFIG_SEABIOS_REVISION=y
CONFIG_SEABIOS_REVISION_ID="rel-1.11.0.5"
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_1=y
CONFIG_LOCALVERSION="v4.8.0.3"
1 change: 1 addition & 0 deletions configs/config.pcengines_apu5
Expand Up @@ -15,3 +15,4 @@ CONFIG_PAYLOAD_CONFIGFILE="$(top)/src/mainboard/$(MAINBOARDDIR)/seabios_config"
CONFIG_SEABIOS_REVISION=y
CONFIG_SEABIOS_REVISION_ID="rel-1.11.0.5"
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_1=y
CONFIG_LOCALVERSION="v4.8.0.3"
22 changes: 11 additions & 11 deletions payloads/Kconfig
Expand Up @@ -8,17 +8,6 @@ choice
default PAYLOAD_NONE if NO_DEFAULT_PAYLOAD || !ARCH_X86
default PAYLOAD_SEABIOS if ARCH_X86

config PAYLOAD_FIT
bool "A FIT payload"
select PAYLOAD_FIT_SUPPORT
help
Select this option if you have a payload image (a FIT file) which
coreboot should run as soon as the basic hardware initialization
is completed.

You will be able to specify the location and file name of the
payload image later.

config PAYLOAD_NONE
bool "None"
help
Expand All @@ -39,6 +28,17 @@ config PAYLOAD_ELF
You will be able to specify the location and file name of the
payload image later.

config PAYLOAD_FIT
bool "A FIT payload"
select PAYLOAD_FIT_SUPPORT
help
Select this option if you have a payload image (a FIT file) which
coreboot should run as soon as the basic hardware initialization
is completed.

You will be able to specify the location and file name of the
payload image later.

config PAYLOAD_BAYOU
bool "Bayou"
help
Expand Down
21 changes: 20 additions & 1 deletion payloads/external/LinuxBoot/Kconfig
Expand Up @@ -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"
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion payloads/external/LinuxBoot/Kconfig.name
Expand Up @@ -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
Expand Down
63 changes: 54 additions & 9 deletions payloads/external/LinuxBoot/Makefile
Expand Up @@ -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)
Expand All @@ -36,28 +57,52 @@ 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

distclean:
rm -rf $(project_dir)

.PHONY: config patch payload clean distclean clone fetch all
.PHONY: config patch payload clean distclean clone fetch all toolchain