diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..7fde95a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,45 @@ +name: Build +on: + push: + workflow_dispatch: + inputs: + memory: + description: 'Max memory size available to docker' + required: true + default: '1g' + +jobs: + build: + runs-on: ubuntu-latest + env: + MAX_MEMORY_SIZE: '500m' + steps: + - name: Checkout pixie-firmware + uses: actions/checkout@v3 + with: + ref: chore/add-submodules + submodules: 'recursive' + - name: Setup node version + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Set maximum memory for 'workflow_dispatch' trigger + if: github.event_name == 'workflow_dispatch' + env: + MAX_MEMORY_SIZE: ${{ inputs.memory }} + run: echo $MAX_MEMORY_SIZE + - name: Verify scene and display components + run: | + ls -la ${{ github.workspace }}/components/firefly-display + ls -la ${{ github.workspace }}/components/firefly-scene + git submodule status + - name: Build pixie-firmware using Docker + id: build + run: | + echo $MAX_MEMORY_SIZE + docker run -m $MAX_MEMORY_SIZE --rm -v $PWD:/project -w /project -u $UID -e HOME=/tmp espressif/idf idf.py build + - name: Verify assets + run: | + ls -l ${{ github.workspace }}/build/pixie.bin + ls -l ${{ github.workspace }}/build/bootloader/bootloader.bin + ls -l ${{ github.workspace }}/build/partition_table/partition-table.bin diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..189829a --- /dev/null +++ b/.gitmodules @@ -0,0 +1,8 @@ +[submodule "components/firefly-scene"] + path = components/firefly-scene + url = https://github.com/firefly/component-scene.git + branch = main +[submodule "components/firefly-display"] + path = components/firefly-display + url = https://github.com/firefly/component-display.git + branch = main diff --git a/README.md b/README.md index 3b1e5c2..e804c32 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,30 @@ but has many of the necessary API to implement a hardware wallet. - [Device](https://github.com/firefly/pixie-device) Design, Schematics and PCB - [Case](https://github.com/firefly/pixie-case) +Development +----------- + +To get this project and it's submodules: +```sh +git clone --recurse-submodules https://github.com/firefly/pixie-firmware.git +``` + +If you already cloned the project and forgot `--recurse-submodules` +```sh +git submodule update --init --recursive +``` + +To get upstream changes from the remote submodules +```sh +git pull --recurse-submodules +``` + +Use [docker](https://docs.docker.com/engine/install) to build the project: +```sh +docker run --rm -v $PWD:/project -w /project -e HOME=/tmp espressif/idf idf.py build +``` + + Hardware Specifications ----------------------- diff --git a/components/firefly-display b/components/firefly-display new file mode 160000 index 0000000..abf3708 --- /dev/null +++ b/components/firefly-display @@ -0,0 +1 @@ +Subproject commit abf37085a49546918ce08de8a149342c235a0660 diff --git a/components/firefly-scene b/components/firefly-scene new file mode 160000 index 0000000..8b96f66 --- /dev/null +++ b/components/firefly-scene @@ -0,0 +1 @@ +Subproject commit 8b96f6665feb40e91bca2398e47b7150e66d593f diff --git a/main/idf_component.yml b/main/idf_component.yml deleted file mode 100644 index d28867d..0000000 --- a/main/idf_component.yml +++ /dev/null @@ -1,9 +0,0 @@ -dependencies: - idf: - version: ">=4.1.0" - - firefly-display: - path: ../../firefly-display - - firefly-scene: - path: ../../firefly-scene