Can boot RPi with TORch off this image
This commit is contained in:
parent
dd96ca1c86
commit
e6ce8d591a
34
README.md
34
README.md
|
@ -1,7 +1,37 @@
|
|||
# pi-gen
|
||||
# TORch pi-gen (forked from [pi-gen](https://github.com/RPi-Distro/pi-gen) on GitHub)
|
||||
|
||||
Tool used to create Raspberry Pi OS images. (Previously known as Raspbian).
|
||||
A configurable Rasbian image with [TORch](../torch-agent) installed
|
||||
|
||||
## Quick Start
|
||||
|
||||
* Create a `config` file in the project similar to the following:
|
||||
|
||||
```
|
||||
IMG_NAME=RasbianTorch
|
||||
KEYBOARD_KEYMAP="us"
|
||||
LOCALE_DEFAULT="en_CA.UTF-8"
|
||||
FIRST_USER_NAME=[USERNAME]
|
||||
ENABLE_SSH=1
|
||||
PUBKEY_SSH_FIRST_USER=[YOUR_SSH_PUBKEY]
|
||||
PUBKEY_ONLY_SSH=1
|
||||
STAGE_LIST="stage0 stage1 stage2"
|
||||
```
|
||||
|
||||
* Build the image:
|
||||
|
||||
```bash
|
||||
./build-docker.sh
|
||||
```
|
||||
|
||||
After a nice, long build, a file named (something like) `image_2020-10-07-RasbianTorch-lite.zip` will appear in the `deploy/` directory.
|
||||
|
||||
* Unzip this file to an `.img` file and flash it to an SD card
|
||||
|
||||
* Mount the `/boot` partition of the image an create a dir named `/boot/torch`
|
||||
|
||||
* Copy your torch configuration files for this device into the `/boot/torch` dir (see [../torch-agent] for details on configuration)
|
||||
|
||||
* Unmount the `/boot` partition and eject the SD card
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
|
1
stage2/04-torch/00-packages
Normal file
1
stage2/04-torch/00-packages
Normal file
|
@ -0,0 +1 @@
|
|||
tor ssh
|
18
stage2/04-torch/01-run.sh
Executable file
18
stage2/04-torch/01-run.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
install -v -d "${ROOTFS_DIR}/tmp/torch-install"
|
||||
install -v -m 644 files/torch-agent_0.0.1-1_all.deb "${ROOTFS_DIR}/tmp/torch-install/"
|
||||
|
||||
on_chroot <<EOF
|
||||
apt install -y /tmp/torch-install/torch-agent_0.0.1-1_all.deb
|
||||
EOF
|
||||
|
||||
install -v -d 600 "${ROOTFS_DIR}/lib/systemd/system/torch-agent.service.d"
|
||||
install -v -m 600 files/01-config-dir.conf "${ROOTFS_DIR}/lib/systemd/system/torch-agent.service.d/"
|
||||
|
||||
on_chroot <<EOF
|
||||
systemctl daemon-reload
|
||||
systemctl enable torch-agent.service
|
||||
EOF
|
||||
|
||||
rm -rf "${ROOTFS_DIR}/tmp/torch-install"
|
2
stage2/04-torch/files/01-config-dir.conf
Normal file
2
stage2/04-torch/files/01-config-dir.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
[Service]
|
||||
Environment=TORCH_CONFIG_DIR=/boot/torch
|
BIN
stage2/04-torch/files/torch-agent_0.0.1-1_all.deb
Normal file
BIN
stage2/04-torch/files/torch-agent_0.0.1-1_all.deb
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user