rusefi_documentation/Offtopic-SBC-Notes.md

110 lines
2.9 KiB
Markdown
Raw Permalink Normal View History

# Single Board Computer Notes
2020-06-03 06:28:25 -07:00
2022-01-24 14:57:52 -08:00
[Balena Etcher](https://www.balena.io/etcher/) is a popular tool to flash OS images to SD cards & USB drives.
2020-06-03 06:28:25 -07:00
rusEFI console in headless mode is known to work on Raspberry 3.
2021-04-24 07:00:32 -07:00
_buster_ is codename for Debian version 10.
Ubuntu is a Debian fork. _focal_ is a codename for one of Ubuntu releases.
Raspberry Pi OS (previously called Raspbian) is based on Debian.
## Notes on setup
2020-06-03 06:28:25 -07:00
Wifi password is in `/etc/network/interfaces` file
2023-01-02 11:22:23 -08:00
```shell
2020-06-03 06:28:25 -07:00
sudo dhclient wlan0
```
## Armbian
2023-01-02 11:22:23 -08:00
2021-04-24 07:00:32 -07:00
Default root password 1234
Default baud rate 115200
2022-01-24 14:57:52 -08:00
[Raspberry PI wifi headless setup](https://www.hackster.io/mexmarv/iot-raspberry-pi-wifi-headless-setup-6be0de)
2021-04-24 07:00:32 -07:00
2022-01-24 14:57:52 -08:00
[Raspberry PI fast boot](https://www.furkantokac.com/rpi3-fast-boot-less-than-2-seconds/)
2021-04-24 07:00:32 -07:00
### latest packages
2023-01-02 11:22:23 -08:00
```shell
2021-04-24 07:00:32 -07:00
sudo apt-get update && apt-get upgrade
sudo apt-get remove --purge triggerhappy logrotate dphys-swapfile
sudo rm -rf /var/lib/dhcp /var/lib/dhcpcd5 /var/spool /etc/resolv.conf
sudo ln -s /tmp /var/lib/dhcp
sudo ln -s /tmp /var/lib/dhcpcd5
sudo ln -s /tmp /var/spool
sudo touch /tmp/dhcpcd.resolv.conf
sudo ln -s /tmp/dhcpcd.resolv.conf /etc/resolv.conf
sudo rm /var/lib/systemd/random-seed
sudo ln -s /tmp/random-seed /var/lib/systemd/random-seed
ExecStartPre=/bin/echo "" >/tmp/random-seed
```
2021-04-24 07:00:32 -07:00
## Hardware
2021-04-24 07:00:32 -07:00
2022-01-24 14:57:52 -08:00
[Orange Pi Zero GPIO Pins](https://kaspars.net/blog/orange-pi-zero-gpio)
2021-07-10 18:43:46 -07:00
2022-01-24 20:06:11 -08:00
[Single Board Computers - Forum](https://rusefi.com/forum/viewtopic.php?p=37563#p37563)
2021-07-10 18:43:46 -07:00
2022-01-24 14:57:52 -08:00
[NanoPi Duo2 Dimensions](http://wiki.friendlyarm.com/wiki/index.php/NanoPi_Duo2#Dimensional_Diagram)
2021-07-10 18:43:46 -07:00
2021-07-26 13:50:04 -07:00
### SD card preparation
2022-01-24 14:57:52 -08:00
Resize primary partition [Resizing RPi Partitions](https://elinux.org/RPi_Resize_Flash_Partitions#Resizing)
2023-01-02 11:22:23 -08:00
```shell
2021-07-26 13:50:04 -07:00
lsusb
lsblk
resize2fs /dev/sdb 4g
parted /dev/sdb
resizepart 1
4300 works good for 4g filesystem
quit
e2fsck -f /dev/sdb1
fdisk -l /dev/sdb
to see last used sector and total number of sectors
fdisk /dev/sdb
n for 'new'
p for 'primary'
2
begin (last used sector+1)
end ( total number of sectors -1)
blkid /dev/sdb2 | awk -F'"' '{print $2}'
UUID=0e281f8d-1117-451d-9b1b-b07405a631bc /rw auto nosuid,nodev,nofail 0 0
```
now add ",ro" into /etc/fstab
2022-01-24 15:01:48 -08:00
[Make your Raspberry Pi file system read-only](https://medium.com/swlh/make-your-raspberry-pi-file-system-read-only-raspbian-buster-c558694de79)
2021-07-26 13:50:04 -07:00
```shell
2021-07-26 13:50:04 -07:00
backup
dd if=/dev/sdb of=2021_July_26_orange_zero.img
```
2021-07-10 18:43:46 -07:00
## Orange PI CI setup
2021-07-10 18:43:46 -07:00
2022-01-24 15:01:48 -08:00
[Orange Pi Zero](https://www.armbian.com/orange-pi-zero/)
2021-07-10 18:43:46 -07:00
```shell
2023-01-02 11:22:23 -08:00
wget <https://redirect.armbian.com/orangepizero/Buster_current.torrent>
2021-07-10 18:43:46 -07:00
sudo apt-get install transmission-cli transmission-common transmission-daemon
transmission-remote -n 'transmission:transmission' -a Buster_current.torrent
lsblk -p
sudo apt install xz-utils
xzcat /var/lib/transmission-daemon/downloads/Armbian_21.05.6_Orangepizero_buster_current_5.10.43.img.xz > Orangepizero.img
sudo dd if=Orangepizero.img of=/dev/sdb bs=4M conv=fsync
```