mirror of https://github.com/wolfSSL/wolfBoot.git
Expand build tests for aarch64 and ppc. Fixes for some minor build errors uncovered.
parent
005df0949d
commit
4c4fab7612
|
@ -4,6 +4,9 @@ on:
|
||||||
|
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
arch:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
config-file:
|
config-file:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
@ -13,20 +16,17 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build_arm:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
# Get the arm-non-eabi-gcc toolchain
|
- name: Install cross compilers
|
||||||
- name: Install arm-none-eabi-gcc
|
run: |
|
||||||
uses: fiam/arm-none-eabi-gcc@v1
|
sudo apt-get install -y gcc-arm-none-eabi gcc-aarch64-linux-gnu gcc-powerpc-linux-gnu gnu-efi
|
||||||
with:
|
|
||||||
# The arm-none-eabi-gcc release to use.
|
|
||||||
release: "9-2019-q4"
|
|
||||||
|
|
||||||
- name: make clean
|
- name: make clean
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -8,126 +8,220 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
# DISABLED: cypsoc6.config requires cy_device_headers.h
|
# TODO: cypsoc6.config requires cy_device_headers.h
|
||||||
# cypsoc6_test:
|
# cypsoc6_test:
|
||||||
# uses: ./.github/workflows/test-build.yml
|
# uses: ./.github/workflows/test-build.yml
|
||||||
# with:
|
# with:
|
||||||
|
# arch: arm
|
||||||
# config-file: ./config/examples/cypsoc6.config
|
# 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:
|
nrf52840_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/nrf52840.config
|
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:
|
stm32f4_small_blocks_uart_update_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32f4-small-blocks-uart-update.config
|
config-file: ./config/examples/stm32f4-small-blocks-uart-update.config
|
||||||
|
|
||||||
stm32f4_test:
|
stm32f4_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32f4.config
|
config-file: ./config/examples/stm32f4.config
|
||||||
|
|
||||||
stm32f7_dualbank_test:
|
stm32f7_dualbank_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32f7-dualbank.config
|
config-file: ./config/examples/stm32f7-dualbank.config
|
||||||
|
|
||||||
stm32f7_test:
|
stm32f7_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32f7.config
|
config-file: ./config/examples/stm32f7.config
|
||||||
|
|
||||||
stm32g0_test:
|
stm32g0_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32g0.config
|
config-file: ./config/examples/stm32g0.config
|
||||||
|
|
||||||
stm32h7_test:
|
stm32h7_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32h7.config
|
config-file: ./config/examples/stm32h7.config
|
||||||
|
|
||||||
stm32h7_qspi_test:
|
stm32h7_qspi_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32h7.config
|
config-file: ./config/examples/stm32h7.config
|
||||||
make-args: QSPI_FLASH=1
|
make-args: QSPI_FLASH=1
|
||||||
|
|
||||||
stm32l0_test:
|
stm32l0_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32l0.config
|
config-file: ./config/examples/stm32l0.config
|
||||||
|
|
||||||
# DISABLED: stm32l4-cube.config requires Cube HAL
|
# TODO: stm32l4-cube.config requires Cube HAL
|
||||||
# stm32l4_cube_test:
|
# stm32l4_cube_test:
|
||||||
# uses: ./.github/workflows/test-build.yml
|
# uses: ./.github/workflows/test-build.yml
|
||||||
# with:
|
# with:
|
||||||
|
# arch: arm
|
||||||
# config-file: ./config/examples/stm32l4-cube.config
|
# config-file: ./config/examples/stm32l4-cube.config
|
||||||
|
|
||||||
stm32l5_nonsecure_dualbank_test:
|
stm32l5_nonsecure_dualbank_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32l5-nonsecure-dualbank.config
|
config-file: ./config/examples/stm32l5-nonsecure-dualbank.config
|
||||||
|
|
||||||
stm32l5_test:
|
stm32l5_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32l5.config
|
config-file: ./config/examples/stm32l5.config
|
||||||
|
|
||||||
stm32u5_nonsecure_dualbank_test:
|
stm32u5_nonsecure_dualbank_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32u5-nonsecure-dualbank.config
|
config-file: ./config/examples/stm32u5-nonsecure-dualbank.config
|
||||||
|
|
||||||
stm32u5_test:
|
stm32u5_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32u5.config
|
config-file: ./config/examples/stm32u5.config
|
||||||
|
|
||||||
stm32wb_delta_enc_ext_test:
|
stm32wb_delta_enc_ext_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32wb-delta-enc-ext.config
|
config-file: ./config/examples/stm32wb-delta-enc-ext.config
|
||||||
|
|
||||||
stm32wb_delta_ext_test:
|
stm32wb_delta_ext_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32wb-delta-ext.config
|
config-file: ./config/examples/stm32wb-delta-ext.config
|
||||||
|
|
||||||
stm32wb_delta_test:
|
stm32wb_delta_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32wb-delta.config
|
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:
|
# stm32wb_pka_1mb_test:
|
||||||
# uses: ./.github/workflows/test-build.yml
|
# uses: ./.github/workflows/test-build.yml
|
||||||
# with:
|
# with:
|
||||||
|
# arch: arm
|
||||||
# config-file: ./config/examples/stm32wb-pka-1mb.config
|
# config-file: ./config/examples/stm32wb-pka-1mb.config
|
||||||
|
|
||||||
stm32wb_tpm_test:
|
stm32wb_tpm_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32wb-tpm.config
|
config-file: ./config/examples/stm32wb-tpm.config
|
||||||
|
|
||||||
stm32wb_uart_flash_encryption_aes128_test:
|
stm32wb_uart_flash_encryption_aes128_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32wb-uart-flash-encryption-aes128.config
|
config-file: ./config/examples/stm32wb-uart-flash-encryption-aes128.config
|
||||||
|
|
||||||
stm32wb_uart_flash_encryption_aes256_test:
|
stm32wb_uart_flash_encryption_aes256_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32wb-uart-flash-encryption-aes256.config
|
config-file: ./config/examples/stm32wb-uart-flash-encryption-aes256.config
|
||||||
|
|
||||||
stm32wb_uart_flash_encryption_test:
|
stm32wb_uart_flash_encryption_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32wb-uart-flash-encryption.config
|
config-file: ./config/examples/stm32wb-uart-flash-encryption.config
|
||||||
|
|
||||||
stm32wb_test:
|
stm32wb_test:
|
||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
with:
|
with:
|
||||||
|
arch: arm
|
||||||
config-file: ./config/examples/stm32wb.config
|
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-
|
||||||
|
|
|
@ -10,3 +10,7 @@ HASH?=SHA256
|
||||||
IMAGE_HEADER_SIZE?=256
|
IMAGE_HEADER_SIZE?=256
|
||||||
DEBUG=0
|
DEBUG=0
|
||||||
SPMATH=0
|
SPMATH=0
|
||||||
|
WOLFBOOT_NO_PARTITIONS=1
|
||||||
|
|
||||||
|
# Required to build keytools
|
||||||
|
WOLFBOOT_SECTOR_SIZE=0x1000
|
||||||
|
|
|
@ -804,6 +804,7 @@ int wolfBoot_open_image_address(struct wolfBoot_image* img, uint8_t* image)
|
||||||
if (!img->hdr_ok) {
|
if (!img->hdr_ok) {
|
||||||
img->hdr = image;
|
img->hdr = image;
|
||||||
}
|
}
|
||||||
|
img->trailer = img->hdr + WOLFBOOT_PARTITION_SIZE;
|
||||||
#else
|
#else
|
||||||
if (img->hdr == NULL) {
|
if (img->hdr == NULL) {
|
||||||
img->hdr = image;
|
img->hdr = image;
|
||||||
|
@ -811,7 +812,6 @@ int wolfBoot_open_image_address(struct wolfBoot_image* img, uint8_t* image)
|
||||||
#endif
|
#endif
|
||||||
img->hdr_ok = 1;
|
img->hdr_ok = 1;
|
||||||
img->fw_base = img->hdr + IMAGE_HEADER_SIZE;
|
img->fw_base = img->hdr + IMAGE_HEADER_SIZE;
|
||||||
img->trailer = img->hdr + WOLFBOOT_PARTITION_SIZE;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,11 @@
|
||||||
|
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#ifndef PLATFORM_library
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#else
|
||||||
|
size_t strlen(const char *s); /* forward declaration */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG_UART
|
#ifdef DEBUG_UART
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
|
|
|
@ -124,7 +124,7 @@ void RAMFUNCTION wolfBoot_start(void)
|
||||||
/* Load DTS to RAM */
|
/* Load DTS to RAM */
|
||||||
if (PART_IS_EXT(&os_image) &&
|
if (PART_IS_EXT(&os_image) &&
|
||||||
wolfBoot_open_image(&os_image, PART_DTS_BOOT) >= 0) {
|
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;
|
dts_size = (uint32_t)os_image.fw_size;
|
||||||
|
|
||||||
wolfBoot_printf("Loading DTS (size %lu) to RAM at %08lx\n",
|
wolfBoot_printf("Loading DTS (size %lu) to RAM at %08lx\n",
|
||||||
|
@ -136,8 +136,21 @@ void RAMFUNCTION wolfBoot_start(void)
|
||||||
#else
|
#else
|
||||||
wolfBoot_printf("Loading %d bytes to RAM at %08lx\n", os_image.fw_size,
|
wolfBoot_printf("Loading %d bytes to RAM at %08lx\n", os_image.fw_size,
|
||||||
(WOLFBOOT_LOAD_ADDRESS));
|
(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);
|
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();
|
dts_buf = hal_get_dts_address();
|
||||||
if (dts_buf) {
|
if (dts_buf) {
|
||||||
ret = wolfBoot_get_dts_size(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);
|
memcpy((void*)WOLFBOOT_LOAD_DTS_ADDRESS, dts_buf, dts_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* MMU */
|
#endif /* MMU */
|
||||||
|
|
||||||
#endif /* WOLFBOOT_FIXED_PARTITIONS */
|
#endif /* WOLFBOOT_FIXED_PARTITIONS */
|
||||||
wolfBoot_printf("Booting at %08lx\n", WOLFBOOT_LOAD_ADDRESS);
|
wolfBoot_printf("Booting at %08lx\n", WOLFBOOT_LOAD_ADDRESS);
|
||||||
|
|
Loading…
Reference in New Issue