Skip to content

Commit

Permalink
Merge pull request #2 from mh-superbox/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mh-superbox committed Jun 8, 2022
2 parents 897c11b + 323a46f commit 8895292
Show file tree
Hide file tree
Showing 57 changed files with 795 additions and 282 deletions.
55 changes: 0 additions & 55 deletions .github/workflows/iot_hub_rpi3b.yaml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/unipi_neuron_rpi3b.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

env:
REPO_URL: https://github.com/buildroot/buildroot
REPO_BRANCH: 2021.08.x
REPO_BRANCH: 2022.02.2
CONFIG_FILE: .config
TZ: Europe/Vienna

Expand Down Expand Up @@ -35,13 +35,13 @@ jobs:
- name: Clone buildroot source code
working-directory: /workdir
run: |
git clone --depth 1 $REPO_URL -b $REPO_BRANCH buildroot
ln -sf /workdir/buildroot $GITHUB_WORKSPACE/buildroot
git clone --depth 1 $REPO_URL -b $REPO_BRANCH buildroot_src
ln -sf /workdir/buildroot_src $GITHUB_WORKSPACE/buildroot_src
- name: Load Unipi Neuron RPi 3B configuration
run: |
cd $GITHUB_WORKSPACE/buildroot
make BR2_EXTERNAL=$GITHUB_WORKSPACE unipi_neuron_rpi3b_defconfig
cd $GITHUB_WORKSPACE/buildroot_src
make BR2_EXTERNAL=$GITHUB_WORKSPACE/buildroot unipi_neuron_rpi3b_defconfig
- name: Compile Unipi Neuron RPi 3B sdcard image
run: |
Expand Down
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions Config.in

This file was deleted.

41 changes: 28 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,44 @@
# Unipi Neuron buildroot

This is an external buildroot tree for the Unipi Neuron (https://www.unipi.technology/).
All images contain Systemd, Python 3, Unipi kernel, Unipi tools and many useful system tools.
The sdcard image is less than 300 MB!
This is an external buildroot tree for the [Unipi Neuron](https://www.unipi.technology/) and the [Unipi Control](https://github.com/mh-superbox/unipi-control).

Device config for:
* Unipi Neuron - RPi 3B+
* Unipi Neuron - RPi 4B

## Usage

Download buildroot from https://buildroot.org/download.html and add this repro as external path.

```shell
$ git clone git@github.com:mh-superbox/rpi-buildroot.git
$ git clone git://git.buildroot.net/buildroot
~$ git clone https://github.com/mh-superbox/rpi-buildroot.git
~$ git clone git://git.buildroot.net/buildroot

~$ cd /buildroot
~/buildroot$ # checkout LTS version
~/buildroot$ git checkout 2022.02.2

$ cd /buildroot
$ # checkout LTS version
$ git checkout 2021.02.9
~/buildroot$ make BR2_EXTERNAL=../unipi-buildroot/buildroot list-defconfigs
~/buildroot$ make unipi_neuron_rpi3b_defconfig

$ make BR2_EXTERNAL=../rpi-buildroot list-defconfigs
$ make unipi_neuron_rpi3b_defconfig
# You can change the hostname with the BR2_TARGET_GENERIC_HOSTNAME variable
~/buildroot$ make BR2_TARGET_GENERIC_HOSTNAME=unipi clean all
```

For more information visit https://buildroot.org/ and read the documenation.
Wait a long time ... and then write the image to a sdcard.

```shell
~/buildroot$ cd output/images/
~/buildroot/output/images$ dd bs=4M if=sdcard.img of=/dev/XXX status=progress
```
Boot you Unipi Neuron with the sdcard and connect with ssh:
The username and password are `unipi`.

```shell
~$ ssh unipi@unipi.local
```

For more information visit https://buildroot.org/ and read the documenation.

## Features

* Monit is run at http://unipi.local:2812/ (Username and password are `unipi`)
* OWFS (1-Wire) is run at http://unipi.local:8080/
8 changes: 0 additions & 8 deletions board/common/rootfs_overlay/etc/motd

This file was deleted.

133 changes: 0 additions & 133 deletions board/common/rootfs_overlay/etc/zshrc

This file was deleted.

8 changes: 0 additions & 8 deletions board/unipi/neuron/post-build.sh

This file was deleted.

24 changes: 0 additions & 24 deletions board/unipi/neuron/post-image.sh

This file was deleted.

7 changes: 7 additions & 0 deletions buildroot/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
comment "Unipi packages"
source "$BR2_EXTERNAL_UNIPI_PATH/package/unipi-kernel/Config.in"
source "$BR2_EXTERNAL_UNIPI_PATH/package/unipi-tools/Config.in"

comment "Shell optimizations"
source "$BR2_EXTERNAL_UNIPI_PATH/package/zsh-autosuggestions/Config.in"
source "$BR2_EXTERNAL_UNIPI_PATH/package/zsh-history-substring-search/Config.in"
File renamed without changes.
37 changes: 37 additions & 0 deletions buildroot/board/common/config_3_64bit.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Please note that this is only a sample, we recommend you to change it to fit
# your needs.
# You should override this file using BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE.
# See http://buildroot.org/manual.html#rootfs-custom
# and http://elinux.org/RPiconfig for a description of config.txt syntax

start_file=start.elf
fixup_file=fixup.dat

kernel=Image

# To use an external initramfs file
#initramfs rootfs.cpio.gz

# Disable overscan assuming the display supports displaying the full resolution
# If the text shown on the screen disappears off the edge, comment this out
disable_overscan=1

# How much memory in MB to assign to the GPU on Pi models having
# 256, 512 or 1024 MB total memory
gpu_mem_256=100
gpu_mem_512=100
gpu_mem_1024=100

# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console
dtoverlay=miniuart-bt

# enable autoprobing of Bluetooth driver without need of hciattach/btattach
dtoverlay=krnbt=on

# Neuron
dtparam=i2c_arm=on
dtoverlay=i2c-rtc,mcp7941x
dtoverlay=neuron-spi-new

# enable 64bits support
arm_64bit=1
2 changes: 2 additions & 0 deletions buildroot/board/common/device_table.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# <name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
/etc/monit/monitrc f 700 0 0 - - - - -
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ mkdir -p ${TARGET_DIR}/etc/systemd/system/multi-user.target.wants
# Enable resize root systemd service
ln -fs ../resize-root.service ${TARGET_DIR}/etc/systemd/system/multi-user.target.wants/resize-root.service

# Enable monit systemd service
ln -fs ../resize-root.service ${TARGET_DIR}/etc/systemd/system/multi-user.target.wants/monit.service

# Disable owftpd
ln -fs /dev/null ${TARGET_DIR}/etc/systemd/system/owftpd.service

# Change Loglevel
grep -qE ' loglevel=3' ${BINARIES_DIR}/rpi-firmware/cmdline.txt || sed -i '$ s/$/ loglevel=3/' ${BINARIES_DIR}/rpi-firmware/cmdline.txt

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
check process avahi with pidfile /var/run/avahi-daemon/pid
group avahi

start program = "/bin/systemctl start avahi-daemon.service" with timeout 60 seconds
stop program = "/bin/systemctl stop avahi-daemon.service"

if failed host 0.0.0.0 port 5353 type udp then restart
if 5 restarts within 5 cycles then timeout

0 comments on commit 8895292

Please sign in to comment.