Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 32 additions & 2 deletions .github/workflows/test-build-kontron-vx3060-s2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,40 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- name: Workaround for sources.list
run: |
set -euxo pipefail

apt-cache policy
grep -RInE '^(deb|Types|URIs)' /etc/apt || true

shopt -s nullglob

sudo sed -i \
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|https://mirror.arizona.edu/ubuntu/|g" \
/etc/apt/sources.list || true

for f in /etc/apt/sources.list.d/*.list; do
sudo sed -i \
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|https://mirror.arizona.edu/ubuntu/|g" \
"$f"
done

for f in /etc/apt/sources.list.d/*.sources; do
sudo sed -i \
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|https://mirror.arizona.edu/ubuntu/|g" \
-e "s|https\?://azure\.archive\.ubuntu\.com|https://mirror.arizona.edu|g" \
"$f"
done

if grep -qE '^[[:space:]]*https?://azure\.archive\.ubuntu\.com/ubuntu/?' /etc/apt/apt-mirrors.txt; then
sudo sed -i 's|https\?://azure\.archive\.ubuntu\.com/ubuntu/|https://mirror.arizona.edu/ubuntu/|g' /etc/apt/apt-mirrors.txt
fi
- name: install req
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y -q nasm gcc-multilib
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update -o Acquire::Retries=3
sudo apt-get install --no-install-recommends -y -q -o Acquire::Retries=3 nasm gcc-multilib
- name: setup git
run: |
git config --global user.email "you@example.com"
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/test-renode-fastmath-smallstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [ '*' ]

permissions:
contents: read
packages: read

jobs:
renode_automated_fastmath_smallstack:
runs-on: ubuntu-22.04
Expand All @@ -15,6 +19,13 @@ jobs:
with:
submodules: true

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Select config
run: |
cp config/examples/nrf52840.config .config && make include/target.h
Expand Down Expand Up @@ -70,4 +81,3 @@ jobs:
with:
name: Renode Test Results
path: test_results/

11 changes: 11 additions & 0 deletions .github/workflows/test-renode-fastmath.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [ '*' ]

permissions:
contents: read
packages: read

jobs:
renode_automated_fastmath:
runs-on: ubuntu-22.04
Expand All @@ -16,6 +20,13 @@ jobs:
with:
submodules: true

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Select config
run: |
cp config/examples/nrf52840.config .config && make include/target.h
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/test-renode-noasm-smallstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [ '*' ]

permissions:
contents: read
packages: read

jobs:
renode_automated_noasm_smallstack:
runs-on: ubuntu-22.04
Expand All @@ -16,6 +20,13 @@ jobs:
with:
submodules: true

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Select config
run: |
cp config/examples/nrf52840.config .config && make include/target.h
Expand Down Expand Up @@ -71,4 +82,3 @@ jobs:
with:
name: Renode Test Results
path: test_results/

12 changes: 11 additions & 1 deletion .github/workflows/test-renode-noasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [ '*' ]

permissions:
contents: read
packages: read

jobs:
renode_automated_noasm:
runs-on: ubuntu-22.04
Expand All @@ -16,6 +20,13 @@ jobs:
with:
submodules: true

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Select config
run: |
cp config/examples/nrf52840.config .config && make include/target.h
Expand Down Expand Up @@ -80,4 +91,3 @@ jobs:
with:
name: Renode Test Results
path: test_results/

12 changes: 11 additions & 1 deletion .github/workflows/test-renode-nrf52.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [ '*' ]

permissions:
contents: read
packages: read

jobs:
renode_automated_base:
runs-on: ubuntu-22.04
Expand All @@ -16,6 +20,13 @@ jobs:
with:
submodules: true

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Select config
run: |
cp config/examples/nrf52840.config .config && make include/target.h SIGN=NONE
Expand Down Expand Up @@ -84,4 +95,3 @@ jobs:
with:
name: Renode Test Results
path: test_results/

11 changes: 11 additions & 0 deletions .github/workflows/test-renode-sha3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [ '*' ]

permissions:
contents: read
packages: read

jobs:
renode_automated_multi_sha:
runs-on: ubuntu-22.04
Expand All @@ -16,6 +20,13 @@ jobs:
with:
submodules: true

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Select config
run: |
cp config/examples/nrf52840.config .config && make include/target.h
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/test-renode-sha384.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [ '*' ]

permissions:
contents: read
packages: read

jobs:
renode_automated_multi_sha:
runs-on: ubuntu-22.04
Expand All @@ -16,6 +20,13 @@ jobs:
with:
submodules: true

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Select config
run: |
cp config/examples/nrf52840.config .config && make include/target.h
Expand Down Expand Up @@ -68,4 +79,3 @@ jobs:
with:
name: Renode Test Results
path: test_results/

12 changes: 11 additions & 1 deletion .github/workflows/test-renode-smallstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [ '*' ]

permissions:
contents: read
packages: read

jobs:
renode_automated_smallstack:
runs-on: ubuntu-22.04
Expand All @@ -16,6 +20,13 @@ jobs:
with:
submodules: true

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Select config
run: |
cp config/examples/nrf52840.config .config && make include/target.h
Expand Down Expand Up @@ -86,4 +97,3 @@ jobs:
with:
name: Renode Test Results
path: test_results/

34 changes: 32 additions & 2 deletions .github/workflows/test-x86-fsp-qemu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,40 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- name: Workaround for sources.list
run: |
set -euxo pipefail

apt-cache policy
grep -RInE '^(deb|Types|URIs)' /etc/apt || true

shopt -s nullglob

sudo sed -i \
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|https://mirror.arizona.edu/ubuntu/|g" \
/etc/apt/sources.list || true

for f in /etc/apt/sources.list.d/*.list; do
sudo sed -i \
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|https://mirror.arizona.edu/ubuntu/|g" \
"$f"
done

for f in /etc/apt/sources.list.d/*.sources; do
sudo sed -i \
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|https://mirror.arizona.edu/ubuntu/|g" \
-e "s|https\?://azure\.archive\.ubuntu\.com|https://mirror.arizona.edu|g" \
"$f"
done

if grep -qE '^[[:space:]]*https?://azure\.archive\.ubuntu\.com/ubuntu/?' /etc/apt/apt-mirrors.txt; then
sudo sed -i 's|https\?://azure\.archive\.ubuntu\.com/ubuntu/|https://mirror.arizona.edu/ubuntu/|g' /etc/apt/apt-mirrors.txt
fi
- name: install req
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y -q nasm gcc-multilib qemu-system-x86 swtpm uuid-dev
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update -o Acquire::Retries=3
sudo apt-get install --no-install-recommends -y -q -o Acquire::Retries=3 nasm gcc-multilib qemu-system-x86 swtpm uuid-dev
- name: setup git
run: |
git config --global user.email "you@example.com"
Expand Down
10 changes: 7 additions & 3 deletions hal/nrf52.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,21 @@
#include "nrf52.h"

#ifdef DEBUG_UART
#define UARTE_ENABLE_ENABLE 8u

void uart_init(void)
{
UART0_BAUDRATE = BAUD_115200;
UART0_ENABLE = 1;
UART0_ENABLE = UARTE_ENABLE_ENABLE;
}
Comment thread
danielinux marked this conversation as resolved.

static volatile uint8_t uart_tx_buf;

static void uart_write_char(char c)
{
uart_tx_buf = c;
UART0_EVENT_ENDTX = 0;

UART0_TXD_PTR = (uint32_t)(&c);
UART0_TXD_PTR = (uint32_t)&uart_tx_buf;
UART0_TXD_MAXCOUNT = 1;
UART0_TASK_STARTTX = 1;
while(UART0_EVENT_ENDTX == 0)
Expand Down
11 changes: 4 additions & 7 deletions tools/renode/docker-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,23 @@ declare -r HOST_TEST_RESULTS_PATH=${HOST_ROOT_DIR}/test_results
declare -r HOST_LOG_PATH=${HOST_TEST_RESULTS_PATH}
declare -r HOST_LOG_FILENAME=${HOST_LOG_PATH}/logs.txt

declare -r DOCKER_TAG=renode_nrf52
declare -r DOCKER_IMAGE="${DOCKER_IMAGE:-ghcr.io/wolfssl/wolfboot-ci-renode:v1.5}"
declare -r DOCKER_WORKSPACE=/workspace
declare -r DOCKER_TEST_RESULTS_PATH=/tmp/test_results

mkdir -p ${HOST_LOG_PATH}

docker build -t ${DOCKER_TAG} -f ${HOST_ROOT_DIR}/tools/renode/Dockerfile .

# running in `if` to avoid setting +e
docker pull ${DOCKER_IMAGE} >/dev/null 2>&1 || true

exit_code=0
if ! docker run \
--log-driver=none -a stdout -a stderr \
--volume ${HOST_ROOT_DIR}:${DOCKER_WORKSPACE} \
--volume ${HOST_TEST_RESULTS_PATH}:${DOCKER_TEST_RESULTS_PATH} \
--env SCRIPT=${DOCKER_WORKSPACE}/renode-config.resc \
--env RENODE_CHECKOUT=/home/developer/renode \
--workdir ${DOCKER_WORKSPACE} \
${DOCKER_TAG} \
/bin/bash -c "tools/scripts/renode-test-update.sh $@ 2>&1 > ${DOCKER_TEST_RESULTS_PATH}/logs.txt"
${DOCKER_IMAGE} \
/bin/bash -c 'tools/scripts/renode-test-update.sh "$@" > '"${DOCKER_TEST_RESULTS_PATH}"'/logs.txt 2>&1' -- "$@"
then
echo "FAILED"
exit_code=1
Expand Down
Loading
Loading