Files
pico-openpgp/workflows/autobuild.sh
T

54 lines
1.3 KiB
Bash
Raw Normal View History

2023-02-04 23:46:20 +01:00
#!/bin/bash
git submodule update --init --recursive
sudo apt update
2024-10-01 09:33:22 +02:00
if [[ $1 == "pico" ]]; then
2023-02-04 23:46:20 +01:00
sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
git clone https://github.com/raspberrypi/pico-sdk
cd pico-sdk
git submodule update --init
cd ..
2024-10-01 09:33:22 +02:00
git clone https://github.com/raspberrypi/picotool
cd picotool
git submodule update --init
2023-02-04 23:46:20 +01:00
mkdir build
cd build
2024-10-01 09:33:22 +02:00
cmake -DPICO_SDK_PATH=../../pico-sdk ..
make -j`nproc`
sudo make install
cd ../..
mkdir build_pico
cd build_pico
2023-02-04 23:46:20 +01:00
cmake -DPICO_SDK_PATH=../pico-sdk ..
make
2024-12-27 02:17:59 +01:00
cd ..
2024-10-01 09:33:22 +02:00
elif [[ $1 == "esp32" ]]; then
sudo apt install -y git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
git clone --recursive https://github.com/espressif/esp-idf.git
cd esp-idf
./install.sh esp32s3
. ./export.sh
cd ..
idf.py set-target esp32s3
idf.py all
2024-12-27 02:17:59 +01:00
mkdir -p release
cd build
2024-12-27 02:21:44 +01:00
esptool.py --chip ESP32-S3 merge_bin -o ../release/pico_openpgp_esp32-s3.bin @flash_args
2024-12-27 02:17:59 +01:00
cd ..
2025-02-19 12:16:27 +01:00
cd esp-idf
./install.sh esp32s2
. ./export.sh
cd ..
idf.py set-target esp32s2
idf.py all
mkdir -p release
cd build
esptool.py --chip ESP32-S2 merge_bin -o ../release/pico_openpgp_esp32-s2.bin @flash_args
cd ..
2024-10-01 09:33:22 +02:00
else
mkdir build
cd build
cmake -DENABLE_EMULATION=1 ..
make
fi