summaryrefslogtreecommitdiffstats
path: root/payloads
Commit message (Collapse)AuthorAgeFilesLines
* tests: Add support for tests build failures detectionJakub Czapiga2022-09-211-5/+47
| | | | | | | | | | | | This patch introduces new target: junit.xml-unit-tests, which builds and runs unit-tests. It also creates build log containing build logs. This feature allows for one to see build failures in Jenkins dashboard. Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Change-Id: I94184379dcc2ac10f1a47f4a9d205cacbeb640fe Reviewed-on: https://review.coreboot.org/c/coreboot/+/67372 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* cbfs/vboot: Adapt to new vb2_digest APIJulius Werner2022-09-023-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | CL:3825558 changes all vb2_digest and vb2_hash functions to take a new hwcrypto_allowed argument, to potentially let them try to call the vb2ex_hwcrypto API for hash calculation. This change will open hardware crypto acceleration up to all hash calculations in coreboot (most notably CBFS verification). As part of this change, the vb2_digest_buffer() function has been removed, so replace existing instances in coreboot with the newer vb2_hash_calculate() API. Due to the circular dependency of these changes with vboot, this patch also needs to update the vboot submodule: Updating from commit id 18cb85b5: 2load_kernel.c: Expose load kernel as vb2_api to commit id b827ddb9: tests: Ensure auxfw sync runs after EC sync This brings in 15 new commits. Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: I287d8dac3c49ad7ea3e18a015874ce8d610ec67e Reviewed-on: https://review.coreboot.org/c/coreboot/+/66561 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jakub Czapiga <jacz@semihalf.com>
* x86/cache.c: Implement dcache_*Hsin-Te Yuan2022-09-015-10/+169
| | | | | | | | | | | | | | | | | | | | | | | | A new ChromeOS automated test will be introduced to check the cbmem log of diagnostic boot mode. Because the diagnostic boot does not allow booting into kernel, the test must perform AP reset and then check the cbmem log afterwards. However, the memory content might not be written back to memory (from CPU cache) during AP reset because of the cache snooping mechanism on x86. Hence, some API to flush cache is needed. Implement dcache_* to allow flushing cache proactively in x86. To avoid unnecessary flush, check dma_coherent before calling dcache_* functions, which will be always true in x86. Therefore, this change won't affect the original functionality. BUG=b:190026346 TEST=FW_NAME=primus emerge-brya libpayload Cq-Depend: chromium:3841252 Signed-off-by: Hsin-Te Yuan <yuanhsinte@google.com> Change-Id: I622d8b1cc652cbe477954a900885d12e6494d94d Reviewed-on: https://review.coreboot.org/c/coreboot/+/66578 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* payloads/edk2: Remove architecture from build stringSean Rhodes2022-09-011-4/+5
| | | | | | | | | | | | | | | Whilst UefiPayloadPkg is always built with support for 32-bit and 64-bit, this is not the case for all edk2 targets. Move this to the build command so they can be specified on each target. Also add the `-s` switch, which stands for quiet to suppress edk2 printing War and Peace whilst building. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: If94abd4e28917718c76ad5945966e7be668c8f61 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66364 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* payloads/edk2: Rename the update recipeSean Rhodes2022-09-011-4/+4
| | | | | | | | | | | | | Rename the update recipe, which updates the edk2 repository, to $(EDK2_PATH). There is no functional change here. This recipe must be phony so it runs every time. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I30fedbee7459b79a85a23678e0075368eda95da0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66363 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* payloads/edk2: Clone edk2 and its submodules in parallelSean Rhodes2022-09-011-1/+1
| | | | | | | | | | | When cloning edk2, download the submodules at the same time. There is no functional change here, just a minor speed improvement. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Ieeb481346093588bd8d237857966001dc81460b1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66362 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* payloads/edk2: Adjust the WORKSPACE targetSean Rhodes2022-09-011-3/+1
| | | | | | | | | | | | | | First, remove the `-p` flag; as it's a file target it's not needed in this case. Second, remove the clone as this is handled in the update recipe. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I3829a3151be2d05a067a160fa770e5eb7ad4aad4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66361 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* payloads/edk2: Convert UefiPayloadPkg to a file targetSean Rhodes2022-09-012-9/+18
| | | | | | | | | | | | | | Convert UefiPayloadPkg (UEFIPAYLOAD.fd) to a file target. There is no functional change here, it just avoids it being copied out of the build dir, into an output directory and then into build. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Iff097f6f1e715c697c33c50c395d7c1b88cc6280 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66360 Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* payloads/edk2: Separate the tasks required to build edk2Sean Rhodes2022-08-241-3/+7
| | | | | | | | | | | | | | | Separate the tasks that are required to be completed prior to building edk2 into a prep recipe. This allows this to be used for building different targets. This also ensures that the COREBOOT toolchain is used. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Ic4ae8ac4118a5747f38297d0fbf4cb53aa3b6d6d Reviewed-on: https://review.coreboot.org/c/coreboot/+/66359 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
* payloads/edk2: Separate the Release String variableSean Rhodes2022-08-241-4/+6
| | | | | | | | | | | Separate the Release String from the Build String. This allows the makefile to locate built files more precisely. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Id98674f0bbf485b2bfdbf5784d325c5ac89ad076 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66358 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* libpayload: Add const for dma_coherent argumentYu-Ping Wu2022-08-242-2/+2
| | | | | | | | | | | | | | | | Add the const modifier for the ptr argument of dma_coherent to avoid unnecessary type casting in payloads. BUG=none TEST=emerge-corsola libpayload BRANCH=none Change-Id: Ic4bb1d8318c7e83fd3ab3054aa0333cb27afe588 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/66961 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Hsin-Te Yuan <yuanhsinte@google.com>
* payloads/edk2: Move building to directory called workspaceSean Rhodes2022-08-243-24/+24
| | | | | | | | | | | | | | | The current edk2 makefile will work in a directory that's name is derived from the repository, such as `mrchromebox` or `starlabsltd`. Move this under a directory, so that it can be ignored by git and so that the makefile can be adjusted to use file targets, rather than phony recipes with wildcards. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: If0c80dbc59130f229b78cab9578115e14172301d Reviewed-on: https://review.coreboot.org/c/coreboot/+/66356 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* payloads/edk2: Move the restoration of the logoSean Rhodes2022-08-141-1/+1
| | | | | | | | | | | | | | | Logo.bmp is overwritten with a custom one from coreboot. This needs to be restored before the branch is updated otherwise git will report that the repository is dirty. Move this to the update recipe so that will always be done for any recipe that needs to update the branch. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I85bf753a47d9e70d6555dec9a539e8ed7395bead Reviewed-on: https://review.coreboot.org/c/coreboot/+/66355 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* payloads/edk2: Move printing the build options to a separate recipeSean Rhodes2022-08-131-2/+6
| | | | | | | | | | | | | | Move the code that prints the edk2 build options to it's own recipe so that it can be called for different targets. This change also fixes the print, as it accounts for recent switches such as `--pcd` and `-s`. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Ie797ca26cd28eab0f633bd8dee5ec19634fcea99 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66354 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
* payloads/tianocore: Rename TianoCore to edk2Sean Rhodes2022-08-137-112/+111
| | | | | | | | | | | | | | | | | | | | | | coreboot uses TianoCore interchangeably with EDK II, and whilst the meaning is generally clear, it's not the payload it uses. EDK II is commonly written as edk2. coreboot builds edk2 directly from the edk2 repository. Whilst it can build some components from edk2-platforms, the target is still edk2. [1] tianocore.org - "Welcome to TianoCore, the community supporting" [2] tianocore.org - "EDK II is a modern, feature-rich, cross-platform firmware development environment for the UEFI and UEFI Platform Initialization (PI) specifications." Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I4de125d92ae38ff8dfd0c4c06806c2d2921945ab Reviewed-on: https://review.coreboot.org/c/coreboot/+/65820 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* libpayload: usb: Fix spacing issuesYidi Lin2022-08-1224-623/+623
| | | | | | | | | | | | Found by: find payloads/libpayload/drivers/usb -type f -name "*.[ch]" | xargs \ util/lint/checkpatch.pl --types SPACING -q --fix-inplace -f Change-Id: Id23e2e573e475c6d795812a4b2df9aeffbcaaaf4 Signed-off-by: Yidi Lin <yidilin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/66596 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* libpayload: usbmsc: Prevent usbdisk_remove() from being called twiceYidi Lin2022-08-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | When removing SD card from USB card reader, the USB MSC stack does not detach the device immediately. Instead, the USB MSC stack calls usbdisk_remove() and calls usb_msc_destroy() after several pollings. It results in usbdisk_remove() being called twice. Since the usbmsc_inst_t instance is freed after first usbdisk_remove() call, the second call invokes an invalid usbmsc_inst_t instance and causes exception in CPU. This patch prevents usbdisk_remove() from being called twice by setting usbdisk_created to zero. BUG=b:239492347 TEST=insert an empty SD card into the USB card reader then remove the SD card. AP firmware does not crash. Change-Id: I0675e9fde3e770d63dd0047928356a204245ef18 Signed-off-by: Yidi Lin <yidilin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/66449 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* payloads/tianocore: Remove the option for CorebootPayloadPkgSean Rhodes2022-08-073-39/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Recent changes to both coreboot and edk2 means that UefiPayloadPkg seems to work on all hardware. It has been tested on: * Intel Core 2nd, 3rd, 4th, 5th, 6th, 8th, 8th, 9th, 10th, 11th and 12th generation processors * Intel Small Core BYT, BSW, APL, GLK and GLK-R processors * AMD Stoney Ridge and Picasso This includes the problematic Lenovo X230s. The most likely fixes are: * Configuring the PCI Base and Length in edk2 * Fixes to the HostBridgeLib in edk2 * Adjustment to the SD/eMMC initialisation timeout This means we can now remove the already deprecated option for CorebootPayloadPkg and the legacy 8254 timer build option. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Ice7b7576eb3d32ea46e5138266b7df3fbcdcf7ea Reviewed-on: https://review.coreboot.org/c/coreboot/+/65721 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
* payloads/tianocore/Makefile: Fix restoring default boot logoMatt DeVillier2022-08-021-1/+1
| | | | | | | | | | | | | | the missing `; \` at the end of the line meant subsequent lines were no longer run from $project_dir, so Logo.bmp was silently failing to restore. This led to the working dir being dirty, and on subsequent runs, any change to a different branch in the same repo would fail. Change-Id: I17a323bc2dda19b69d809e398b273f24e14b43af Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/66321 Reviewed-by: Sean Rhodes <sean@starlabs.systems> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* libpayload: Enable PCIe driver for sc7280Veerabhadrarao Badiganti2022-08-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Enable PCIe driver for herobrine board. BUG=b:182963902,b:216686574,b:181098581 TEST=Verified on Qualcomm sc7280 development board with NVMe card (Koixa NVMe, Model-KBG40ZPZ256G with FW AEGA0102). Confirmed NVMe is getting detected in response to 'storage init' command in depthcharge CLI prompt. Output logs: ->dpch: storage init Initializing NVMe controller 1e0f:0001 Identified NVMe model KBG40ZPZ256G TOSHIBA MEMORY Added NVMe drive "NVMe Namespace 1" lbasize:512, count:0x1dcf32b0 * 0: NVMe Namespace 1 1 devices total Also verified NVMe boot path, that is depthcharge is able to load the kernel image from NVMe storage. Change-Id: Idb693ca219ba1e5dfc8aec34027085b53af49a2c Signed-off-by: Veerabhadrarao Badiganti <quic_vbadigan@quicinc.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/65661 Reviewed-by: Shelley Chen <shchen@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* libpayload/pci: Add pci_map_bus function for Qualcomm platformPrasad Malisetty2022-08-013-0/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add 'pci_map_bus' function and PCIE_QCOM config for Qualcomm platform. BUG=b:182963902,b:216686574,b:181098581 TEST=Verified on Qualcomm sc7280 development board with NVMe endpoint (Koixa NVMe, Model-KBG40ZPZ256G with FW AEGA0102). Confirmed NVMe is getting detected in response to 'storage init' command in depthcharge CLI prompt. Output logs: ->dpch: storage init Initializing NVMe controller 1e0f:0001 Identified NVMe model KBG40ZPZ256G TOSHIBA MEMORY Added NVMe drive "NVMe Namespace 1" lbasize:512, count:0x1dcf32b0 * 0: NVMe Namespace 1 1 devices total Also verified NVMe boot path that is depthcharge is able to load the kernel image from NVMe storage. Change-Id: I7d1217502cbd7d4d0cdd298919ae82435630d61c Signed-off-by: Prasad Malisetty <quic_pmaliset@quicinc.com> Signed-off-by: Veerabhadrarao Badiganti <quic_vbadigan@quicinc.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57615 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* payloads/tianocore: Update MrChromebox’ default branch to 202207Sean Rhodes2022-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | Update MrChromebox’ default branch from uefipayload_202107 to uefipayload_202207. This is based on upstream edk2, commit f26b70c (UefiPayloadPkg: Add support for logging to CBMEM console). Tested on: * StarBook Mk V * StarLite Mk III Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I16a012485e4b4957439e776914ffd016b4506a47 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66083 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
* payloads/tianocore: Use SMMSTORE when branch is MrChromeBoxMatt DeVillier2022-07-302-0/+2
| | | | | | | | | | | | | | | | | SMMSTORE support in edk2 was not allowed in upstream edk2 as it was bootloader specific. Shortly, it will be built from edk2-platforms and then, it will be retired. For now, the patches exist in the MrChromeBox fork (TIANOCORE_UEFIPAYLOAD), so enable these by default when SMMSTORE_v2 is enabled. Change-Id: I1861bf739c2e25f661b4f06a303348f0537dc8b3 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/65867 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* payloads/tianocore: Allow passing custom build params to all versionsSean Rhodes2022-07-302-8/+4
| | | | | | | | | | | | Allow passing custom build parameters to any version of edk2, not just forks. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I4eed535415ba15ae73e22cada9153820538f5f6d Reviewed-on: https://review.coreboot.org/c/coreboot/+/66210 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
* payloads/tianocore: Bind the PCDs for screen size to KconfigSean Rhodes2022-07-273-0/+11
| | | | | | | | | | | | Bind the PCDs that allow edk2 to use the whole display to a Kconfig option called TIANOCORE_FULL_SCREEN_SETUP. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Ic977a199f3b308c566391e37f126c4fe518b2eb6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66162 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
* payloads/tianocore: Correct the multiplication of the SD/MMC timeoutSean Rhodes2022-07-271-1/+1
| | | | | | | | | | | | | | | | The `call int-multiply` couldn't handle the Kconfig option being a string so do the calculation in bash. Tested on: * Qemu * StarLite Mk III Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I1879d7efd504e2c42dadb12d2d8add4f69ca7b9c Reviewed-on: https://review.coreboot.org/c/coreboot/+/66161 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
* payloads/tianocore: Add missing CONFIG for SERIAL_SUPPORTSean Rhodes2022-07-271-1/+1
| | | | | | | | | | | This caused edk2 serial output to be disabled 100% of the time. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: If272369b405e7745fe82f49026cbed0abc50f355 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66160 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
* payloads/tianocore: use BMP (vs SVG) logo file as defaultMatt DeVillier2022-07-271-1/+1
| | | | | | | | | | | | | | | | converting the SVG logo to BMP at compile time using 'convert' introduces terrible aliasing artifacts, so use a properly converted BMP file as the default instead. Test: boot qemu w/Tianocore, observe lack of aliasing in coreboot logo Change-Id: I62d643c24abca57fa35b79732d8cedc83b94815f Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/66144 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* payloads/tianocore: Fix bootsplash/logo handlingMatt DeVillier2022-07-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | commit 108e53792804 ("payloads/tianocore: Add a proper target for the Boot Splash") introduced 2 bugs in bootsplash handling: - the "logo" make target added a spurious "/edk2" to the project dir - the "logo" make target failed to account for the case where no user- defined logo file is used (the upstream Tianocore one will be used in this case) Fix both these issues. Test: build/boot qemu w/Tianocore w/o user-defined bootsplash file. Change-Id: Ieebc547670213459823f58956ae87c6bf94b74ef Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/66142 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
* payloads/ext/tianocore/Makefile: Fix word in commentAngel Pons2022-07-271-1/+1
| | | | | | | | | | | revalant ---> relevant Change-Id: Id31a57644947bf8c0f461dbfc9ca8b1984e9acb8 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/66151 Reviewed-by: Sean Rhodes <sean@starlabs.systems> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
* payloads/tianocore: Add a proper target for the Boot SplashSean Rhodes2022-07-252-24/+41
| | | | | | | | | | | | | | edk2's default is to show a Boot Splash with their own logo which looks like it's from the 1960's. Therefore, we replace this image with coreboot's logo, taken from https://coreboot.org unless a custom one is specified. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I1b133e2a2cfd45a6650e4523b267f7508974137b Reviewed-on: https://review.coreboot.org/c/coreboot/+/65881 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Martin L Roth <gaumless@tutanota.com>
* payloads/tianocore: Increase default timeout for SD MMC init to 10msSean Rhodes2022-07-192-4/+4
| | | | | | | | | | | | | | | | | | | Firstly, change the unit of `μs` to `ms` so it's easier to read. This patch changes the default amount of time allowed to initialise SD Card Readers and eMMC drives from 1ms to 10ms. Having a timeout too short will stop certain devices from booting, which was seen on google/akemi; it throws an exception when attempting to boot from the internal eMMC drive. This new value is still lower than upstream edk2's value of 1s. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Id1f66d5d50f889f07a34836ab2932b28ef7fb245 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65813 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
* Remove executable flag from source codes and text filesPetr Cvek2022-07-141-0/+0
| | | | | | | | | | | Markdown, definition file and sconfig source codes don't need to be executables. This patch fixes that. Signed-off-by: Petr Cvek <petrcvekcz@gmail.com> Change-Id: Ic97d684318c689259f7895e3dfbd552434c3882e Reviewed-on: https://review.coreboot.org/c/coreboot/+/65807 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
* payloads/tianocore: Limit legacy build options to CorebootPayloadPkgSean Rhodes2022-07-131-0/+2
| | | | | | | | | | | Limited to two legacy build options to only be set when CorebootPayloadPkg is used, as they don't exist in UefiPayloadPkg. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I71aaa940543075962e167b52b23f45976d39c616 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65779 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
* payloads/tianocore: Allow edk2 to use the full framebufferSean Rhodes2022-07-131-0/+8
| | | | | | | | | | | Set all PCDs relating to console size to 0, which allows edk2 to use the full framebuffer. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Id105a2c822a2b05da6e45dac9deeca1f155bfa33 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65778 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
* payloads/tianocore: Hook up PCI Express Base Address and LengthSean Rhodes2022-07-132-0/+9
| | | | | | | | | | | | | | | | | Hook up edk2 build options PCIE_BASE_ADDRESS and PCIE_BASE_LENGTH to CONFIG_ECAM_MMCONF_BASE_ADDRESS and CONFIG_ECAM_MMCONF_LENGTH. This patch has been reviewed upstream but not yet merged (2022/07/08). It won't cause any problems for any existing branches or forks that do not have this build option hooked up. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Ie5d50cc4619354d3c98adf6cde12c192be759869 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65644 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
* payloads/external/tianocore: Hook up debug builds to serial supportSean Rhodes2022-07-063-0/+13
| | | | | | | | | | | | | | | | ConSplitterDxe uses the intersection of all outputs, which includes serial, for the list of supported text modes. When serial output is supported, this slows down performance and limits the size of FrontPage. Only enable edk2's serial support when it's a debug build as it's the only case where there will be debug output. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Ic3633767dabb3543e865aa65c4101840a7b69cc1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65643 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
* treewide: Unify Google brandingJon Murphy2022-07-045-6/+6
| | | | | | | | | | | | | | | | | Branding changes to unify and update Chrome OS to ChromeOS (removing the space). This CL also includes changing Chromium OS to ChromiumOS as well. BUG=None TEST=N/A Change-Id: I39af9f1069b62747dbfeebdd62d85fabfa655dcd Signed-off-by: Jon Murphy <jpmurphy@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/65479 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
* payloads/tianocore: Show build optionsSean Rhodes2022-06-231-1/+11
| | | | | | | | | | Show the build options that are passed to edk2 in one clear block. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I917a8c1d3ac8f2a223e584fec10689679835630c Reviewed-on: https://review.coreboot.org/c/coreboot/+/65184 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* payloads/tianocore/Makefile.inc: Alphabetise Kconfig optionsSean Rhodes2022-06-221-1/+1
| | | | | | | | Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I12a18acd24a0aede8113e1daa607c852eba67049 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65160 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* payloads/external/tianocore: Allow Kconfig options for all UefiPayloadPkg ↵Sean Rhodes2022-06-211-1/+1
| | | | | | | | | | | | | | | versions Most of the Kconfig options are upstream, so they should exist in most forks. Therefore, allow them to be set and passed when using a custom repository or upstream edk2. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I31e6e267ee6e4e3a254f733e1dfc1ecb3a3d3576 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65040 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
* libpayload/Makefile.inc: Initialize vboot submoduleNicholas Chin2022-06-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | After commit 63e54275f684 (libpayload: Implement new CBFS access API), libpayload includes headers from commonlib/bsd, which in turn include vb2_sha.h from vboot after commit 0655f78041ef (commonlib/bsd: Add new CBFS core implementation). Usually submodules are initialized by the top level Makefile.inc, but since this file is never read when building libpayload based payloads outside the main coreboot build, the header cannot be found unless the vboot submodule had previously been initialized. This is especially evident when following Tutorial 1 in the documentation, where the coreboot repo is cloned without recursing into submodules and coreinfo is built separately from the coreboot build using `make -C payloads/coreinfo`. TEST=Deinitialize submodules and run `make -C payloads/coreinfo`. Coreinfo should build without error. Change-Id: I29b16525999921fbce51c2459d3d534b64e00b3c Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/65222 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* payloads/LinuxBoot: Use wildcardsArthur Heymans2022-06-171-4/+1
| | | | | | | | | | | If no directory is found then no harm is done either. Change-Id: I0842ec106f11eca80bf01fd4771e1dfc4588b3fa Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/65153 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
* libpayload/libcbfs: Fix file hash checkYu-Ping Wu2022-06-162-7/+31
| | | | | | | | | | | | | | Fix the buffer pointer passed to cbfs_file_hash_mismatch(). Add a test case with LZ4 compression, which would catch the bug we are fixing. Change-Id: I36605e2dbc0423fa6743087512f2042b37c49d35 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/65149 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* libpayload/Makefile.payload: Fix CFLAGSNico Huber2022-06-151-1/+1
| | | | | | | | | | | | | | GCC_CFLAGS_<arch> contains only the flags that are GCC specific, iow. flags that don't work with Clang. CFLAGS_<arch>, OTOH, contains all flags that should be used and auto- matically includes GCC_CFLAGS_<arch> if GCC is selected. Change-Id: I5ec15f169d51c7a32ca86e54a98a2ce0e3b51e6d Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/62248 Reviewed-by: Thomas Heijligen <src@posteo.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* libpayload/Makefile.payload: Include libpayload's .configNico Huber2022-06-151-0/+2
| | | | | | | | | | It's required to tell xcompile what compiler to use. Change-Id: I9f1ddef96a20df1d83bfd4883b2e006ba78ce7c4 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/62269 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de>
* libpayload/Makefile.payload: Revise config strategyNico Huber2022-06-151-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Payloads often just use one of the defconfigs for libpayload. When the `Makefile.payload` was introduced, it also added dependencies to pass a `make oldconfig` or `make defconfig` for the payload on to libpayload. Turned out, this creates some dependency madness when, for instance, `make oldconfig` gets called without a libpay- load `.config` available, or when we try to include the `.config` in the `Makefile`. To make things worse, Kconfig's `Makefile` that is imported from Linux contains some rarely used paths that are generally incompa- tible to our environment. So let's get rid of the hard-to-control automatism. Payloads that don't want to use a libpayload defconfig need to clear the `$(LIBPAYLOAD_DEFCONFIG)` variable and manually run the respective config target to generate a `.config`. To fully support this, the rule to create a `.config` via `defconfig` is guarded by `$(LIBPAYLOAD_DEFCONFIG)`. Otherwise we'd have a spurious, broken recipe when the variable is unset. We keep the option to call libpayload targets with an `lp-` prefix for convenience. The existing, explicit targets `lp-defconfig` and `lp-oldconfig` are replaced with a pattern match, so all config and other targets should work. Change-Id: Ie3fcce58d98e248c7182cd47f2a797fe066dd18a Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/62273 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de>
* external/LinuxBoot: Fix cleanup mechanismPatrik Tesarik2022-06-141-2/+5
| | | | | | | | | | | | `make clean` never thoroughly removed LinuxBoot build artifacts. This change checks for kernel directories present in the project directory and deletes all of them, if found. Signed-off-by: Patrik Tesarik <patrik.tesarik@9elements.com> Change-Id: Ia056ac6608e3631dfc270ba5c2f32216c3e1ac50 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65098 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* external/LinuxBoot: Kconfig defaults to systembootPatrik Tesarik2022-06-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | In addition to change CB:40316 this commit proposes a change of default behavior inside of the LinuxBoot toolchain. Currently the defaults build a LinuxBoot payload which boots into the u-root shell and waits for input. In fact it does not deliver any bootloader with it, but the build image is on the other hand rather small. This commit changes the defaults in a way that the LinuxBoot bootloader will actually be able to boot a local or remote system image. In consequence the build payload size is rather big, but accepted for a working out-of-the-box startup behavior. See discussion on that topic in the above mentioned change. Signed-off-by: Patrik Tesarik <mail@patrik-tesarik.de> Change-Id: Ieaba7e523aef10c467a8bea29ae323e22324b225 Reviewed-on: https://review.coreboot.org/c/coreboot/+/40527 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* payloads/external/LinuxBoot: Adopt u-root changePatrik Tesarik2022-06-133-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | The u-root toolkit dropped the original uinit bootloader in the master branch and respectively the systemboot-option in templates.go. In consequence the LinuxBoot builds will boot into the u-root shell and waiting for input. This commit enables the reuse of the -uinitcmd flag to specify a command, which runs after the u-root init-process. Systemboot as a bootloader wrapper will mimic a BIOS/UEFI boot device selection. Other preselections, i.e. stboot and boot2 are implemented as well. Custom strings or programs can be set as well, but they cannot contain program flags. E.g. 'fbnetboot -class linuxboot' will not work, because they aren't symlinkable. This commit and its respective LinuxBoot builds with systemboot, none and one custom option have been tested successfully on a UP squared single board computer with the intended behavior. Change-Id: I4ac3409040ea77a1836f90f43fba07d2cd05a952 Signed-off-by: Patrik Tesarik <mail@patrik-tesarik.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40316 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Christian Walter <christian.walter@9elements.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>