-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ab3df29
Showing
80 changed files
with
95,280 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
name: Build Docker Image | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
build-docker-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- uses: dorny/paths-filter@v3 | ||
id: filter | ||
with: | ||
filters: | | ||
src: | ||
- 'scripts/**' | ||
- '.github/**' | ||
- name: Log into registry ghcr.io | ||
if: github.event_name != 'pull_request' && steps.filter.outputs.src == 'true' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract Docker metadata | ||
if: steps.filter.outputs.src == 'true' | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ghcr.io/fishwaldo/sophgo-sg200x-debian | ||
|
||
- name: Build and push Docker image | ||
if: steps.filter.outputs.src == 'true' | ||
id: build-and-push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./scripts/Dockerfile | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
|
||
build-image: | ||
strategy: | ||
matrix: | ||
boards: [licheervnano] | ||
runs-on: ubuntu-latest | ||
needs: build-docker-image | ||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Get Board Configs | ||
uses: actions/checkout@v4 | ||
- name: Build Images | ||
uses: addnab/docker-run-action@v3 | ||
with: | ||
image: ghcr.io/fishwaldo/sophgo-sg200x-debian:master | ||
options: --privileged -v ${{ github.workspace }}/images/:/output -v ${{ github.workspace }}/configs/:/configs/ | ||
run: | | ||
make BOARD=${{ matrix.boards }} image | ||
chmod 777 /output/ | ||
- name: Pack | ||
run: | | ||
cd images/ | ||
ls -lah | ||
if [ -f ${{ matrix.boards }}_sd.img ]; then | ||
lz4 -9 -f ${{ matrix.boards }}_sd.img ${{ matrix.boards }}_sd.img.lz4 | ||
rm ${{ matrix.boards }}_sd.img | ||
fi | ||
tar czvf ${{ matrix.boards }}_debs.tar.gz *.deb | ||
rm *.deb | ||
echo "PACKAGE=${{ github.workspace }}/images/*" >> $GITHUB_ENV | ||
- name: Upload package | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: image-files-${{ matrix.boards }} | ||
path: | | ||
${{env.PACKAGE}} | ||
release: | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-latest | ||
needs: [build-image] | ||
permissions: write-all | ||
steps: | ||
- name: download firmware | ||
uses: actions/download-artifact@v4 | ||
- name: list images | ||
run: | | ||
ls -lah | ||
ls -lah image-files-*/ | ||
- name: publish artifacts | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
append_body: true | ||
files: | | ||
image-files-*/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
__pycache__ | ||
image/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker build -t builder -f scripts/Dockerfile . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
docker run --privileged -it --rm -v ./configs/:/configs -v ./image:/output builder make BOARD=licheervnano image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
&dac{ | ||
mute-gpio-l = <&porta 15 GPIO_ACTIVE_LOW>; | ||
mute-gpio-r = <&porta 30 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
/ { | ||
/delete-node/ i2s@04110000; | ||
/delete-node/ i2s@04120000; | ||
/delete-node/ sound_ext1; | ||
/delete-node/ sound_ext2; | ||
/delete-node/ sound_PDM; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
&sd { | ||
no-1-8-v; | ||
}; | ||
|
||
&mipi_rx{ | ||
snsr-reset = <&portc 13 GPIO_ACTIVE_LOW>, <&portc 13 GPIO_ACTIVE_LOW>, <&portc 13 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
&dac{ | ||
mute-gpio-r = <&porte 2 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
&spi0 { | ||
status = "disabled"; | ||
num-cs = <1>; | ||
spidev@0 { | ||
compatible = "rohm,dh2228fv"; | ||
spi-max-frequency = <1000000>; | ||
reg = <0>; | ||
}; | ||
}; | ||
|
||
&spi1 { | ||
status = "disabled"; | ||
num-cs = <1>; | ||
spidev@0 { | ||
compatible = "rohm,dh2228fv"; | ||
spi-max-frequency = <1000000>; | ||
reg = <0>; | ||
}; | ||
}; | ||
|
||
&spi2 { | ||
status = "disabled"; | ||
num-cs = <1>; | ||
spidev@0 { | ||
compatible = "rohm,dh2228fv"; | ||
spi-max-frequency = <1000000>; | ||
reg = <0>; | ||
}; | ||
}; | ||
|
||
&spi3 { | ||
status = "okay"; | ||
num-cs = <1>; | ||
spidev@0 { | ||
compatible = "rohm,dh2228fv"; | ||
spi-max-frequency = <1000000>; | ||
reg = <0>; | ||
}; | ||
}; | ||
|
||
/ { | ||
/delete-node/ wifi-sd@4320000; | ||
/delete-node/ i2s@04110000; | ||
/delete-node/ sound_ext1; | ||
/delete-node/ sound_ext2; | ||
/delete-node/ sound_PDM; | ||
|
||
wifi_pin { | ||
compatible = "cvitek,wifi-pin"; | ||
poweron-gpio = <&porte 2 GPIO_ACTIVE_HIGH>; | ||
wakeup-gpio = <&porte 6 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/ { | ||
/delete-node/ cv-emmc@4300000; | ||
/delete-node/ cv-spinf@4060000; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/ { | ||
/delete-node/ cvi-spif@10000000; | ||
/delete-node/ cv-emmc@4300000; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/ { | ||
/delete-node/ cv-emmc@4300000; | ||
/delete-node/ cv-spinf@4060000; | ||
}; | ||
|
Oops, something went wrong.