Skip to content
Open
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
12 changes: 0 additions & 12 deletions .cirun.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM ubuntu:latest

RUN apt-get update && \
apt-get install -y \
git ssh make gcc gcc-multilib g++-multilib \
module-assistant expect g++ gawk texinfo libssl-dev \
bison flex fakeroot cmake unzip gperf autoconf \
device-tree-compiler libncurses5-dev pkg-config bc \
python-is-python3 passwd openssl openssh-server \
openssh-client vim file cpio rsync

RUN apt-get install -y sudo

RUN apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
8 changes: 8 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "Luckfox Pico Alpine DevContainer",
"build": {
"dockerfile": "Dockerfile",
"context": "."
},
"containerUser": "ubuntu"
}
5 changes: 2 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,15 @@ jobs:
strategy:
matrix:
device: [ pico-mini-b, pico-plus, pico-pro-max ]
# runs-on: "cirun-aws-amd64--${{ github.run_id }}"
runs-on: ubuntu-latest
needs: build-rootfs
steps:
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
submodules: "recursive"
- name: download rootfs
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: rootfs-alpine
- name: update apt
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
output/

*.img
*.tar.gz
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "sdk"]
path = sdk
url = https://github.com/soyflourbread/luckfox-pico-sdk.git
url = https://github.com/ohaiibuzzle/luckfox-pico-sdk.git
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ This system image has RNDIS enabled for all boards.
To connect to your Pico through RNDIS,
check out [the official guide](https://wiki.luckfox.com/Luckfox-Pico/SSH-Telnet-Login/).

The board's static IP is `172.32.0.93`.
The board's static IP is `172.16.42.1`.

Below is a brief guide to connect via RNDIS on Linux:
```bash
ip link # obtain network device name of pico
sudo ip addr add 172.32.0.100/16 dev <network_device_of_pico>
ping 172.32.0.93 # it works!
# Step 1: Plug in
ping 172.16.42.1 # Step 2: Get Connected
# Step 3: There's no Step 3. Thanks unudhcpd!
```

## Customization
Expand Down
12 changes: 3 additions & 9 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,14 @@ rc-update add local default
apk add agetty

# Setting up shell
apk add shadow
apk add bash bash-completion
apk add shadow bash bash-completion --no-cache
chsh -s /bin/bash
echo -e "luckfox\nluckfox" | passwd
apk del -r shadow

# Install SSH
apk add openssh
rc-update add sshd default

# Extra stuff
apk add mtd-utils-ubi
apk add bottom
apk add neofetch
apk add dropbear mtd-utils-ubi bottom fastfetch unudhcpd --no-cache
rc-update add dropbear default

# Clear apk cache
rm -rf /var/cache/apk/*
Expand Down
10 changes: 9 additions & 1 deletion overlay/etc/init.d/10_usb_gadget
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#!/sbin/openrc-run

command="/usr/bin/usb_gadget start || true"
start() {
/usr/bin/usb_gadget start || true
/usr/bin/unudhcpd -i usb0 -s 172.16.42.1 -c 172.16.42.2 &
}

stop() {
# dont
true
}
4 changes: 2 additions & 2 deletions overlay/etc/network/interfaces
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ iface eth0 inet dhcp
udhcpc_opts -t 1
auto usb0
iface usb0 inet static
address 172.32.0.93
address 172.16.42.1
netmask 255.255.255.0
gateway 172.32.0.1
gateway 172.16.42.2
2 changes: 0 additions & 2 deletions overlay/etc/ssh/sshd_config.d/20-root.conf

This file was deleted.

4 changes: 1 addition & 3 deletions rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# Create docker
docker container rm -f armv7alpine
docker run \
--platform linux/arm/v7 \
--name armv7alpine \
--net host \
--mount type=bind,source=./bootstrap.sh,target=/bootstrap.sh \
Expand All @@ -50,9 +51,6 @@ overlay() {
rsync -a "$OVERLAY_WORKSPACE/" "$ROOTFS_WORKSPACE_MNT/"
rm -rf "$OVERLAY_WORKSPACE"

echo "Include /etc/ssh/sshd_config.d/*.conf" >> \
"$ROOTFS_WORKSPACE_MNT/etc/ssh/sshd_config"

ln -s "/etc/init.d/00_link_mount" \
"$ROOTFS_WORKSPACE_MNT/etc/runlevels/default/00_link_mount"

Expand Down
2 changes: 1 addition & 1 deletion sdk
Submodule sdk updated from 8dde6a to eee6b6
13 changes: 8 additions & 5 deletions system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ while getopts ":f:d:" opt; do
esac
done

DEVICE_ID="6"
DEVICE_ID="2"
case $DEVICE_NAME in
pico-mini-b) DEVICE_ID="6" ;;
pico-plus) DEVICE_ID="7" ;;
pico-pro-max) DEVICE_ID="8" ;;
pico-mini-b) DEVICE_ID="1" ;;
pico-plus) DEVICE_ID="2" ;;
pico-pro-max) DEVICE_ID="4" ;;
*)
echo "Invalid device: ${DEVICE_NAME}."
exit 1
Expand All @@ -29,14 +29,17 @@ rm -rf sdk/sysdrv/custom_rootfs/
mkdir -p sdk/sysdrv/custom_rootfs/
cp "$ROOTFS_NAME" sdk/sysdrv/custom_rootfs/

# Make dang sure at this point rootfs name only has file name (ala. no paths in there)
ROOTFS_NAME=$(basename "$ROOTFS_NAME")

pushd sdk || exit

pushd tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/ || exit
source env_install_toolchain.sh
popd || exit

rm -rf .BoardConfig.mk
echo "$DEVICE_ID" | ./build.sh lunch
echo -e "$DEVICE_ID\n1\n0" | ./build.sh lunch
echo "export RK_CUSTOM_ROOTFS=../sysdrv/custom_rootfs/$ROOTFS_NAME" >> .BoardConfig.mk
echo "export RK_BOOTARGS_CMA_SIZE=\"1M\"" >> .BoardConfig.mk

Expand Down