Skip to content

Instantly share code, notes, and snippets.

View lupyuen's full-sized avatar
💭
Apache NuttX RTOS on Oz64 RISC-V SBC / Sophgo SG2000 SoC

Lup Yuen Lee lupyuen

💭
Apache NuttX RTOS on Oz64 RISC-V SBC / Sophgo SG2000 SoC
View GitHub Profile
@lupyuen
lupyuen / gist:3afe37d47933d17b8646b3c9de12f17d
Created December 21, 2024 06:03
sync-mirror-to-update.sh
➜ nuttx-forgejo git:(main) ✗ $ ./sync-mirror-to-update.sh
+ tmp_dir=/tmp/sync-mirror-to-update
+ rm -rf /tmp/sync-mirror-to-update
+ mkdir /tmp/sync-mirror-to-update
+ cd /tmp/sync-mirror-to-update
+ git clone git@nuttx-forge:nuttx/nuttx-mirror upstream
Cloning into 'upstream'...
remote: Enumerating objects: 831937, done.
remote: Counting objects: 100% (831937/831937), done.
remote: Compressing objects: 100% (141976/141976), done.
@lupyuen
lupyuen / gist:c83079d249ff0ab14f38b34d926c9458
Created December 21, 2024 05:27
Sync Failed: Upstream and Downstream Commits don't match!
+ script_path=./sync-mirror-to-update.sh
+++ dirname -- ./sync-mirror-to-update.sh
++ cd -P .
++ pwd
+ script_dir=/Users/luppy/nuttx-forgejo
+ tmp_dir=/tmp/sync-mirror-to-update
+ rm -rf /tmp/sync-mirror-to-update
+ mkdir /tmp/sync-mirror-to-update
+ cd /tmp/sync-mirror-to-update
+ git clone git@nuttx-forge:nuttx/nuttx-mirror upstream
➜ nuttx-forgejo git:(main) ✗ $ docker exec \
-it \
forgejo \
/bin/bash -c \
"tar cvf /tmp/data.tar /data"
tar: removing leading '/' from member names
data/
data/git/
data/git/repositories/
@lupyuen
lupyuen / gist:efdd2db49e2d333bc7058194d78cd846
Last active December 21, 2024 04:10
nuttx-forgejo: sudo docker compose up
➜ lupyuen.github.io git:(master) ✗ $ cd ~/nuttx-forgejo
➜ nuttx-forgejo git:(main) ✗ $ ls
LICENSE forgejo
README.md sync-mirror-to-update.sh
docker-compose.yml
➜ nuttx-forgejo git:(main) ✗ $ mv forgejo /tmp
➜ nuttx-forgejo git:(main) ✗ $ ls
LICENSE docker-compose.yml
README.md sync-mirror-to-update.sh
➜ nuttx-forgejo git:(main) ✗ $ docker up
➜ ~ $ ## WebFinger: Fetch the User nuttx_build at nuttx-feed.org
➜ ~ $ curl \
https://nuttx-feed.org/.well-known/webfinger\?resource\=acct:nuttx_build@nuttx-feed.org \
| jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 478 100 478 0 0 8800 0 --:--:-- --:--:-- --:--:-- 8690
{
Last login: Sat Dec 21 08:10:09 on ttys023
➜ ~ $ ## Fetch the Public Timeline for nuttx-feed.org
## https://docs.joinmastodon.org/client/public/\#timelines
➜ ~ $ curl https://nuttx-feed.org/api/v1/timelines/public \
| jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 53162 100 53162 0 0 550k 0 --:--:-- --:--:-- --:--:-- 552k
[
@lupyuen
lupyuen / gist:394aaa99616553921238ab6e164b6614
Last active December 20, 2024 00:49
./cibuild.sh -c -A -N -R testlist/sim-02.dat
sudo docker run \
-it \
ghcr.io/apache/nuttx/apache-nuttx-ci-linux:latest \
/bin/bash
cd
git clone https://github.com/apache/nuttx --branch releases/12.8
git clone https://github.com/jerpelea/nuttx-apps apps --branch bp-2902
pushd nuttx ; echo NuttX Source: https://github.com/apache/nuttx/tree/$(git rev-parse HEAD) ; popd
pushd apps ; echo NuttX Apps: https://github.com/apache/nuttx-apps/tree/$(git rev-parse HEAD) ; popd
cd nuttx/tools/ci
sudo docker run \
-it \
ghcr.io/apache/nuttx/apache-nuttx-ci-linux:latest \
/bin/bash
cd
git clone https://github.com/apache/nuttx --branch releases/12.8
git clone https://github.com/jerpelea/nuttx-apps apps --branch bp-2902
pushd nuttx ; echo NuttX Source: https://github.com/apache/nuttx/tree/$(git rev-parse HEAD) ; popd
pushd apps ; echo NuttX Apps: https://github.com/apache/nuttx-apps/tree/$(git rev-parse HEAD) ; popd
cd nuttx
This file has been truncated, but you can view the full file.
➜ lupyuen.github.io git:(master) ✗ $ cd ~/nuttx-forgejo
➜ nuttx-forgejo git:(main) $ ls
LICENSE docker-compose.yml
README.md forgejo
➜ nuttx-forgejo git:(main) $ docker compose down
[+] Running 2/2
✔ Container forgejo Removed 1.6s
✔ Network nuttx-forgejo_forgejo Removed 0.5s
➜ nuttx-forgejo git:(main) $ cd ..
➜ ~ $ rm -rf nuttx-forgejo
@lupyuen
lupyuen / gist:5a92fb9ea76751a54d2a82ba0341c493
Created December 19, 2024 06:31
second run of git bisect: good 6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c / bad 79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b
* Executing task: set -e ; set -x ; sudo $PWD/run2.sh
+ sudo /home/luppy/nuttx-bisect/run2.sh
[sudo] password for luppy:
Sorry, try again.
[sudo] password for luppy:
+ script_path=/home/luppy/nuttx-bisect/run2.sh
+++ dirname -- /home/luppy/nuttx-bisect/run2.sh
++ cd -P /home/luppy/nuttx-bisect
++ pwd