-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for building Raspberry pi 2B Rev1.2, 3, Zero 2 W, 4 and 5…
… images (#8) * add support for rpi3 and zero 2W * fix raspberry pi 2 detection * add different variants * add recipe to set wifi (only required for raspberry pi zero 2W) * support building different images * retry getting tedge-identity if it fails due to startup issues * add parameters to pi zero 2w image definition
- Loading branch information
1 parent
a14f869
commit 2f47ca3
Showing
13 changed files
with
169 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/.rugpi | ||
/build | ||
recipes/build-info/files/.build_info | ||
**/debian-packages.list | ||
**/debian-packages.list | ||
rugpi-bakery.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
recipes = [ | ||
# "set-hostname", | ||
"persist-root-home", | ||
"ssh", | ||
"zsh", | ||
] | ||
|
||
# Include firmware as some older pi4 need a firmware update before tryboot will work | ||
include_firmware = "pi4" | ||
|
||
boot_flow = "tryboot" | ||
|
||
[parameters.set-hostname] | ||
hostname = "tedge-rugpi" | ||
|
||
[parameters.apt-cleanup] | ||
autoremove = true | ||
|
||
[parameters.ssh] | ||
root_authorized_keys = """ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfhQGWWw73ponAokdNSRZ5cQc9/CIX1TLQgYlr+BtObKoO4UNFP1YSbgK03GjhjeUid+QPmV+UURqxQTqLQoYWqUFP2CYkILFccVPmTvx9HLwupI+6QQKWfMDx9Djfph9GzInymaA5fT7hKppqittFrC/l3lkKgKTX5ohEOGshIbRgtgOYIaW3ByTx3urnaBbYCIgOyOZzSIyS0dUkwsiLu3XjPspgmn3Fs/+vofT/yhBe1carW0UM3ivV0JFfJzrxbCl/F7I2qwfjZXsypjkwlpNupUMuo3xPMi8YvNvyEu4d+IEAqO1dCcdGcxlkiHxrdITIpVLt5mjJ2LauHE/H bootstrap | ||
""" | ||
|
||
[parameters.rugpi-ctrl] | ||
rugpi_admin = true # Enable Rugpi Admin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
recipes = [ | ||
# "set-hostname", | ||
"persist-root-home", | ||
"ssh", | ||
"zsh", | ||
] | ||
|
||
# Make image generic so it can be used for pi4 and pi5 | ||
# So to either pi4 or pi5 if you want to build pi specific images which include the given firmware (EEPROM) | ||
include_firmware = "none" | ||
|
||
boot_flow = "tryboot" | ||
|
||
[parameters.set-hostname] | ||
hostname = "tedge-rugpi" | ||
|
||
[parameters.apt-cleanup] | ||
autoremove = true | ||
|
||
[parameters.ssh] | ||
root_authorized_keys = """ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfhQGWWw73ponAokdNSRZ5cQc9/CIX1TLQgYlr+BtObKoO4UNFP1YSbgK03GjhjeUid+QPmV+UURqxQTqLQoYWqUFP2CYkILFccVPmTvx9HLwupI+6QQKWfMDx9Djfph9GzInymaA5fT7hKppqittFrC/l3lkKgKTX5ohEOGshIbRgtgOYIaW3ByTx3urnaBbYCIgOyOZzSIyS0dUkwsiLu3XjPspgmn3Fs/+vofT/yhBe1carW0UM3ivV0JFfJzrxbCl/F7I2qwfjZXsypjkwlpNupUMuo3xPMi8YvNvyEu4d+IEAqO1dCcdGcxlkiHxrdITIpVLt5mjJ2LauHE/H bootstrap | ||
""" | ||
|
||
[parameters.rugpi-ctrl] | ||
rugpi_admin = true # Enable Rugpi Admin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
recipes = [ | ||
# "set-hostname", | ||
"persist-root-home", | ||
"ssh", | ||
"zsh", | ||
|
||
# wifi credentials are required as Raspberry Pi Zero's don't have an ethernet adapter | ||
"set-wifi", | ||
] | ||
|
||
# Make image generic so it can be used for pi4 and pi5 | ||
# So to either pi4 or pi5 if you want to build pi specific images which include the given firmware (EEPROM) | ||
include_firmware = "none" | ||
|
||
boot_flow = "u-boot" | ||
|
||
[parameters.set-hostname] | ||
hostname = "tedge-rugpi" | ||
|
||
[parameters.apt-cleanup] | ||
autoremove = true | ||
|
||
[parameters.ssh] | ||
root_authorized_keys = """ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfhQGWWw73ponAokdNSRZ5cQc9/CIX1TLQgYlr+BtObKoO4UNFP1YSbgK03GjhjeUid+QPmV+UURqxQTqLQoYWqUFP2CYkILFccVPmTvx9HLwupI+6QQKWfMDx9Djfph9GzInymaA5fT7hKppqittFrC/l3lkKgKTX5ohEOGshIbRgtgOYIaW3ByTx3urnaBbYCIgOyOZzSIyS0dUkwsiLu3XjPspgmn3Fs/+vofT/yhBe1carW0UM3ivV0JFfJzrxbCl/F7I2qwfjZXsypjkwlpNupUMuo3xPMi8YvNvyEu4d+IEAqO1dCcdGcxlkiHxrdITIpVLt5mjJ2LauHE/H bootstrap | ||
""" | ||
|
||
[parameters.set-wifi] | ||
# These values should be modified if you want to enable default wifi credentials in the image | ||
ssid = "onboarding_jail" | ||
password = "onboarding_jail" | ||
|
||
[parameters.rugpi-ctrl] | ||
rugpi_admin = true # Enable Rugpi Admin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
description = "Set wifi access" | ||
default = false | ||
|
||
[parameters] | ||
ssid = {} | ||
password = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
set -e | ||
echo "Setting wifi access" | ||
|
||
cat << EOT > /etc/NetworkManager/system-connections/wifi.nmconnection | ||
[connection] | ||
id=asio uplink | ||
uuid=354ca6a0-bc96-4a29-82f4-c7cbc6e43fac | ||
type=wifi | ||
[wifi] | ||
mode=infrastructure | ||
ssid=${RECIPE_PARAM_SSID} | ||
[wifi-security] | ||
key-mgmt=wpa-psk | ||
psk=${RECIPE_PARAM_PASSWORD} | ||
[ipv4] | ||
method=auto | ||
[ipv6] | ||
addr-gen-mode=default | ||
method=auto | ||
[proxy] | ||
EOT | ||
|
||
chmod 600 /etc/NetworkManager/system-connections/wifi.nmconnection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters