Expand build tests for aarch64 and ppc. Fixes for some minor build errors uncovered.

pull/268/head
David Garske 2022-12-28 11:23:06 -08:00 committed by Daniele Lacamera
parent 005df0949d
commit 4c4fab7612
6 changed files with 130 additions and 15 deletions

View File

@ -4,6 +4,9 @@ on:
workflow_call:
inputs:
arch:
required: true
type: string
config-file:
required: true
type: string
@ -13,20 +16,17 @@ on:
jobs:
build_arm:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
# Get the arm-non-eabi-gcc toolchain
- name: Install arm-none-eabi-gcc
uses: fiam/arm-none-eabi-gcc@v1
with:
# The arm-none-eabi-gcc release to use.
release: "9-2019-q4"
- name: Install cross compilers
run: |
sudo apt-get install -y gcc-arm-none-eabi gcc-aarch64-linux-gnu gcc-powerpc-linux-gnu gnu-efi
- name: make clean
run: |

View File

@ -8,126 +8,220 @@ on:
jobs:
# DISABLED: cypsoc6.config requires cy_device_headers.h
# TODO: cypsoc6.config requires cy_device_headers.h
# cypsoc6_test:
# uses: ./.github/workflows/test-build.yml
# with:
# arch: arm
# config-file: ./config/examples/cypsoc6.config
# TODO: hifive.config requires RISC-V compiler
# hifive1_test:
# uses: ./.github/workflows/test-build.yml
# with:
# arch: riscv
# config-file: ./config/examples/hifive.config
# TODO: imx-rt1050.config
# TODO: imx-rt1060.config
# TODO: kinetis-k82f.config requires the KSDK
# kinetis_k82f_test:
# uses: ./.github/workflows/test-build.yml
# with:
# arch: arm
# config-file: ./config/examples/kinetis-k82f.config
library_test:
uses: ./.github/workflows/test-build.yml
with:
arch: host
config-file: ./config/examples/library.config
# TODO: lpc54606j512.config requires MCUXPRESSO files
# lpc54606j512_test
# uses: ./.github/workflows/test-build.yml
# with:
# arch: arm
# config-file: ./config/examples/lpc54606j512.config
nrf52840_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/nrf52840.config
nxp_t2080_68ppc2_test:
uses: ./.github/workflows/test-build.yml
with:
arch: ppc
config-file: ./config/examples/t2080_68ppc2.config
nxp_t2080_test:
uses: ./.github/workflows/test-build.yml
with:
arch: ppc
config-file: ./config/examples/t2080.config
raspi3_test:
uses: ./.github/workflows/test-build.yml
with:
arch: aarch64
config-file: ./config/examples/raspi3.config
make-args: wolfboot.bin CROSS_COMPILE=aarch64-linux-gnu-
sim_test:
uses: ./.github/workflows/test-build.yml
with:
arch: host
config-file: ./config/examples/sim.config
stm32f4_small_blocks_uart_update_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32f4-small-blocks-uart-update.config
stm32f4_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32f4.config
stm32f7_dualbank_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32f7-dualbank.config
stm32f7_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32f7.config
stm32g0_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32g0.config
stm32h7_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32h7.config
stm32h7_qspi_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32h7.config
make-args: QSPI_FLASH=1
stm32l0_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32l0.config
# DISABLED: stm32l4-cube.config requires Cube HAL
# TODO: stm32l4-cube.config requires Cube HAL
# stm32l4_cube_test:
# uses: ./.github/workflows/test-build.yml
# with:
# arch: arm
# config-file: ./config/examples/stm32l4-cube.config
stm32l5_nonsecure_dualbank_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32l5-nonsecure-dualbank.config
stm32l5_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32l5.config
stm32u5_nonsecure_dualbank_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32u5-nonsecure-dualbank.config
stm32u5_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32u5.config
stm32wb_delta_enc_ext_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32wb-delta-enc-ext.config
stm32wb_delta_ext_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32wb-delta-ext.config
stm32wb_delta_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32wb-delta.config
# DISABLED: stm32wb-pka-1mb.config requires STM32 HAL #include "stm32wbxx_hal.h
# TODO: stm32wb-pka-1mb.config requires STM32 HAL #include "stm32wbxx_hal.h
# stm32wb_pka_1mb_test:
# uses: ./.github/workflows/test-build.yml
# with:
# arch: arm
# config-file: ./config/examples/stm32wb-pka-1mb.config
stm32wb_tpm_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32wb-tpm.config
stm32wb_uart_flash_encryption_aes128_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32wb-uart-flash-encryption-aes128.config
stm32wb_uart_flash_encryption_aes256_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32wb-uart-flash-encryption-aes256.config
stm32wb_uart_flash_encryption_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32wb-uart-flash-encryption.config
stm32wb_test:
uses: ./.github/workflows/test-build.yml
with:
arch: arm
config-file: ./config/examples/stm32wb.config
# TODO: ti-tms570lc435.config requires CCS_ROOT
x86_64_efi_test:
uses: ./.github/workflows/test-build.yml
with:
arch: host
config-file: ./config/examples/x86_64_efi.config
zynqmp_test:
uses: ./.github/workflows/test-build.yml
with:
arch: aarch64
config-file: ./config/examples/zynqmp.config
make-args: CROSS_COMPILE=aarch64-linux-gnu-

View File

@ -10,3 +10,7 @@ HASH?=SHA256
IMAGE_HEADER_SIZE?=256
DEBUG=0
SPMATH=0
WOLFBOOT_NO_PARTITIONS=1
# Required to build keytools
WOLFBOOT_SECTOR_SIZE=0x1000

View File

@ -804,6 +804,7 @@ int wolfBoot_open_image_address(struct wolfBoot_image* img, uint8_t* image)
if (!img->hdr_ok) {
img->hdr = image;
}
img->trailer = img->hdr + WOLFBOOT_PARTITION_SIZE;
#else
if (img->hdr == NULL) {
img->hdr = image;
@ -811,7 +812,6 @@ int wolfBoot_open_image_address(struct wolfBoot_image* img, uint8_t* image)
#endif
img->hdr_ok = 1;
img->fw_base = img->hdr + IMAGE_HEADER_SIZE;
img->trailer = img->hdr + WOLFBOOT_PARTITION_SIZE;
return 0;
}

View File

@ -24,7 +24,11 @@
#include <stddef.h>
#ifndef PLATFORM_library
#include <string.h>
#else
size_t strlen(const char *s); /* forward declaration */
#endif
#ifdef DEBUG_UART
#include "printf.h"

View File

@ -124,7 +124,7 @@ void RAMFUNCTION wolfBoot_start(void)
/* Load DTS to RAM */
if (PART_IS_EXT(&os_image) &&
wolfBoot_open_image(&os_image, PART_DTS_BOOT) >= 0) {
dts_buf = (uint32_t*)WOLFBOOT_LOAD_DTS_ADDRESS;
dts_buf = (uint8_t*)WOLFBOOT_LOAD_DTS_ADDRESS;
dts_size = (uint32_t)os_image.fw_size;
wolfBoot_printf("Loading DTS (size %lu) to RAM at %08lx\n",
@ -136,8 +136,21 @@ void RAMFUNCTION wolfBoot_start(void)
#else
wolfBoot_printf("Loading %d bytes to RAM at %08lx\n", os_image.fw_size,
(WOLFBOOT_LOAD_ADDRESS));
#ifdef __GNUC__
/* WOLFBOOT_LOAD_ADDRESS can be 0 address,
* so don't warn on use of NULL for memcpy */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnonnull"
#endif
memcpy((void*)WOLFBOOT_LOAD_ADDRESS, os_image.fw_base, os_image.fw_size);
#ifdef MMU
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
#ifdef MMU
dts_buf = hal_get_dts_address();
if (dts_buf) {
ret = wolfBoot_get_dts_size(dts_buf);
@ -150,7 +163,7 @@ void RAMFUNCTION wolfBoot_start(void)
memcpy((void*)WOLFBOOT_LOAD_DTS_ADDRESS, dts_buf, dts_size);
}
}
#endif /* MMU */
#endif /* MMU */
#endif /* WOLFBOOT_FIXED_PARTITIONS */
wolfBoot_printf("Booting at %08lx\n", WOLFBOOT_LOAD_ADDRESS);