Skip to content

Commit 092dc12

Browse files
committed
Add support for the GRiSP2 and build on CI
This is a very early release.
1 parent d783bfa commit 092dc12

File tree

5 files changed

+110
-5
lines changed

5 files changed

+110
-5
lines changed

.circleci/config.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,53 @@ build: &build
9191
paths:
9292
- /home/nerves/deploy
9393

94+
build_grisp2: &build_grisp2
95+
steps:
96+
- checkout
97+
- <<: *install_system_deps
98+
- <<: *install_elixir
99+
- <<: *install_hex_rebar
100+
- <<: *install_nerves_bootstrap
101+
- run: echo "$MIX_TARGET" > .target
102+
- run:
103+
name: Fetch Deps
104+
command: |
105+
n=0
106+
until [ $n -ge 5 ]; do
107+
mix deps.get && break
108+
n=$((n+1))
109+
echo "Error while fetching deps. Retrying in 5 seconds"
110+
sleep 5
111+
done
112+
- run:
113+
name: Check formatting
114+
command: mix format --check-formatted
115+
- run:
116+
name: Build
117+
command: mix compile
118+
- run:
119+
name: Create firmware
120+
command: |
121+
mix firmware
122+
mix firmware.image
123+
- run:
124+
name: Create artifacts dir
125+
command: mkdir -p /home/nerves/deploy/artifacts
126+
- run:
127+
name: Copy firmware file
128+
command: |
129+
cp _build/*/nerves/images/*.fw /home/nerves/deploy/artifacts/circuits_quickstart_${MIX_TARGET}.fw
130+
gzip -k circuits_quickstart.img
131+
cp circuits_quickstart.img.gz /home/nerves/deploy/artifacts/circuits_quickstart_${MIX_TARGET}.img.gz
132+
cp ./CHANGELOG.md /home/nerves/deploy/CHANGELOG.md
133+
- store_artifacts:
134+
path: /home/nerves/deploy
135+
destination: images
136+
- save_cache:
137+
key: nerves/deploy/{{ checksum ".target" }}-{{ .Revision }}-{{ .Environment.CIRCLE_TAG }}
138+
paths:
139+
- /home/nerves/deploy
140+
94141
version: 2.0
95142

96143
jobs:
@@ -157,6 +204,13 @@ jobs:
157204
MIX_TARGET: npi_imx6ull
158205
<<: *build
159206

207+
build_grisp2:
208+
<<: *defaults
209+
environment:
210+
<<: *elixir_version
211+
MIX_TARGET: grisp2
212+
<<: *build_grisp2
213+
160214
build_x86_64:
161215
<<: *defaults
162216
environment:
@@ -217,6 +271,11 @@ jobs:
217271
command: echo "npi_imx6ull" > .target
218272
- restore_cache:
219273
key: nerves/deploy/{{ checksum ".target" }}-{{ .Revision }}-{{ .Environment.CIRCLE_TAG }}
274+
- run:
275+
name: grisp2
276+
command: echo "grisp2" > .target
277+
- restore_cache:
278+
key: nerves/deploy/{{ checksum ".target" }}-{{ .Revision }}-{{ .Environment.CIRCLE_TAG }}
220279
- run:
221280
name: x86_64
222281
command: echo "x86_64" > .target
@@ -282,6 +341,11 @@ workflows:
282341
filters:
283342
tags:
284343
only: /.*/
344+
- build_grisp2:
345+
context: org-global
346+
filters:
347+
tags:
348+
only: /.*/
285349
# - build_x86_64:
286350
# context: org-global
287351
# filters:
@@ -299,6 +363,7 @@ workflows:
299363
- build_rpi0
300364
- build_bbb
301365
- build_npi_imx6ull
366+
- build_grisp2
302367
# - build_x86_64
303368
filters:
304369
branches:

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ extension and if you're using `etcher`, get the `zip` file. Releases are named
4141
by the boards they support:
4242

4343
* `bbb` - BeagleBone Black, BeagleBone Green, PocketBeagle, etc.
44+
* `grisp2` - GRiSP2 (Experimental)
4445
* `rpi0` - Raspberry Pi Zero or Zero W
4546
* `rpi` - The original Raspberry Pi Model B
4647
* `rpi2` Raspberry Pi 2 Model B
@@ -50,9 +51,13 @@ by the boards they support:
5051
* `osd32mp1` - Octavo OSD32MP1-BRK
5152
* `npi_imx6ull` - Seeed Studio imx6ull (select MicroSD boot mode)
5253

53-
Once that's done, you're ready to burn the firmware to the MicroSD card.
54+
Once the download completes, you're ready to install the firmware on your device.
5455

55-
## Burning the Firmware
56+
## Burning the Firmware for devices that boot from MicroSD
57+
58+
These instructions will work for the Raspberry Pi, Beaglebones and other devices
59+
that either boot off MicroSD cards or can be configured to do so. If you're
60+
using a GRiSP 2, see the GRiSP 2 installation section.
5661

5762
Navigate to the directory where you downloaded the firmware. We'll go through
5863
both `fwup` and `etcher` methods.
@@ -85,6 +90,28 @@ Start `etcher`, point it to the zip file, and follow the prompts:
8590

8691
![etcher screenshot](assets/etcher.png)
8792

93+
## GRiSP 2 installation
94+
95+
GRiSP 2 support is VERY new. While it should be safe, you should make sure
96+
you're comfortable with the GRiSP instructions for using Barebox to flash the
97+
original GRiSP demo image.
98+
99+
1. Find a FAT-formatted MicroSD card and copy
100+
`circuits_quickstart_grisp2.img.gz` to it.
101+
2. Insert the MicroSD card in the GRiSP 2 and power it up
102+
3. Press a key on the serial console to break into Barebox.
103+
4. At the Barebox prompt, run:
104+
```
105+
uncompress /mnt/mmc/circuits_quickstart_grisp2.img.gz /dev/mmc1
106+
reset
107+
```
108+
5. The GRiSP 2 will reboot into the Circuits Quickstart firmware. The first boot
109+
takes a little longer due to it initializing the application data partition.
110+
111+
The normal Nerves firmware update methods will work. Since the GRiSP 2 port
112+
is so new, it may be required to perform a fresh install using the above
113+
instructions in the future.
114+
88115
## Testing the Firmware
89116
90117
Eject the SD card and insert it into the device that you're using. Power up and

config/grisp2.exs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import Config
2+
3+
# Configure the network using vintage_net
4+
# See https://github.com/nerves-networking/vintage_net for more information
5+
config :vintage_net,
6+
regulatory_domain: "US",
7+
config: [
8+
{"eth0", %{type: VintageNetEthernet, ipv4: %{method: :dhcp}}},
9+
{"wlan0", %{type: VintageNetWiFi}}
10+
]

mix.exs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ defmodule CircuitsQuickstart.MixProject do
1313
:bbb,
1414
:osd32mp1,
1515
:x86_64,
16-
:npi_imx6ull
16+
:npi_imx6ull,
17+
:grisp2
1718
]
1819

1920
def project do
@@ -66,7 +67,8 @@ defmodule CircuitsQuickstart.MixProject do
6667
{:nerves_system_bbb, "~> 2.11", runtime: false, targets: :bbb},
6768
{:nerves_system_osd32mp1, "~> 0.7", runtime: false, targets: :osd32mp1},
6869
{:nerves_system_x86_64, "~> 1.16", runtime: false, targets: :x86_64},
69-
{:nerves_system_npi_imx6ull, "~> 0.6", runtime: false, targets: :npi_imx6ull}
70+
{:nerves_system_npi_imx6ull, "~> 0.6", runtime: false, targets: :npi_imx6ull},
71+
{:nerves_system_grisp2, "~> 0.2", runtime: false, targets: :grisp2}
7072
]
7173
end
7274

mix.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"nerves_ssh": {:hex, :nerves_ssh, "0.2.3", "616527fc3adffcb32e12cf9392565f23bde43e0da292c91d1ed344b945fd203a", [:mix], [{:nerves_runtime, "~> 0.11", [hex: :nerves_runtime, repo: "hexpm", optional: false]}, {:ssh_subsystem_fwup, "~> 0.5", [hex: :ssh_subsystem_fwup, repo: "hexpm", optional: false]}], "hexpm", "accc4b53dce2054160ae4734a27945276016f45185af293cd4f0e3987f10d2af"},
1818
"nerves_system_bbb": {:hex, :nerves_system_bbb, "2.13.2", "e9b3da52a5d1951f6c9a0cce1c2d0934ff07117c0e843e1626226c318ed73ce2", [:mix], [{:nerves, "~> 1.5.4 or ~> 1.6.0 or ~> 1.7.15", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_system_br, "1.18.4", [hex: :nerves_system_br, repo: "hexpm", optional: false]}, {:nerves_toolchain_armv7_nerves_linux_gnueabihf, "~> 1.5.0", [hex: :nerves_toolchain_armv7_nerves_linux_gnueabihf, repo: "hexpm", optional: false]}], "hexpm", "42d9a163bb331efc2d42cdf9f69f9bd1f395831fe9e16c54b491f65e25120d39"},
1919
"nerves_system_br": {:hex, :nerves_system_br, "1.18.4", "97047c4ab9a75356145f6dda29b0843a9297e39c1cff6c4cc312fc5a4de88ca5", [:mix], [], "hexpm", "fb7c8ac3fca718faffaadc685a6faa3c22efedfea76bf2a86c5a49a45ca17d08"},
20+
"nerves_system_grisp2": {:hex, :nerves_system_grisp2, "0.2.0", "fb7f2f959209156b1bde0e5216e3f658ffe02a131e1da5254025b8d3f6e0ddd9", [:mix], [{:nerves, "~> 1.6.0 or ~> 1.7.15", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_system_br, "1.18.4", [hex: :nerves_system_br, repo: "hexpm", optional: false]}, {:nerves_toolchain_armv7_nerves_linux_gnueabihf, "~> 1.5.0", [hex: :nerves_toolchain_armv7_nerves_linux_gnueabihf, repo: "hexpm", optional: false]}], "hexpm", "8c7bd1dab072271d1563a5de1afa9c7b0b5817e9b815819fab5951945fd7645c"},
2021
"nerves_system_npi_imx6ull": {:hex, :nerves_system_npi_imx6ull, "0.6.3", "f9af7053798d85f064af6b9c028ac9c672cd75d95e0bc13aac8c6334c853a364", [:mix], [{:nerves, "~> 1.6.0 or ~> 1.7.15", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_system_br, "1.18.4", [hex: :nerves_system_br, repo: "hexpm", optional: false]}, {:nerves_toolchain_armv7_nerves_linux_gnueabihf, "~> 1.5.0", [hex: :nerves_toolchain_armv7_nerves_linux_gnueabihf, repo: "hexpm", optional: false]}], "hexpm", "fbe496e0b83c9404f74813b343c335f04a98ba34f47b0108f61f7e2f9bfc498f"},
2122
"nerves_system_osd32mp1": {:hex, :nerves_system_osd32mp1, "0.9.2", "d52e7679764c6d6134c05d4cb9f40ac324c8d35ed551c7e9d4710de623a5b475", [:mix], [{:nerves, "~> 1.5.4 or ~> 1.6.0 or ~> 1.7.15", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_system_br, "1.18.4", [hex: :nerves_system_br, repo: "hexpm", optional: false]}, {:nerves_toolchain_armv7_nerves_linux_gnueabihf, "~> 1.5.0", [hex: :nerves_toolchain_armv7_nerves_linux_gnueabihf, repo: "hexpm", optional: false]}], "hexpm", "bafdee2ff12d8694e7ead31afb503d7f47f37bb8b75f20812cbe77790286db6e"},
2223
"nerves_system_rpi": {:hex, :nerves_system_rpi, "1.18.2", "4ff66e3de51015e1c29178bad91fdf7b70fd577873bde0d09d894c812089fad4", [:mix], [{:nerves, "~> 1.5.4 or ~> 1.6.0 or ~> 1.7.15", [hex: :nerves, repo: "hexpm", optional: false]}, {:nerves_system_br, "1.18.4", [hex: :nerves_system_br, repo: "hexpm", optional: false]}, {:nerves_toolchain_armv6_nerves_linux_gnueabihf, "~> 1.5.0", [hex: :nerves_toolchain_armv6_nerves_linux_gnueabihf, repo: "hexpm", optional: false]}], "hexpm", "cbf491c0f51e021ccc9fb319e8a5d2d58b027c3e9184e806c26c5e092c4b8be6"},
@@ -44,5 +45,5 @@
4445
"vintage_net": {:hex, :vintage_net, "0.11.5", "f9a11f6673301816e9fc1c681d7eebd7c8280adeda1de18324b19aecacd5d86c", [:make, :mix], [{:beam_notify, "~> 1.0 or ~> 0.2.0", [hex: :beam_notify, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:gen_state_machine, "~> 2.0.0 or ~> 2.1.0 or ~> 3.0.0", [hex: :gen_state_machine, repo: "hexpm", optional: false]}, {:muontrap, "~> 1.0 or ~> 0.5.1 or ~> 0.6.0", [hex: :muontrap, repo: "hexpm", optional: false]}], "hexpm", "db3796103469ff1d78f2a02cda7f8e675f6d6a448ec7130d8a43f6c1be564331"},
4546
"vintage_net_direct": {:hex, :vintage_net_direct, "0.10.4", "1721c17bcd7f9f3882cf41380962c94b34c53dc340b386277cf60d9dcd583745", [:mix], [{:one_dhcpd, "~> 1.0 or ~> 0.2.3", [hex: :one_dhcpd, repo: "hexpm", optional: false]}, {:vintage_net, "~> 0.9.1 or ~> 0.10.0 or ~> 0.11.0", [hex: :vintage_net, repo: "hexpm", optional: false]}], "hexpm", "d81076fffd0d078020459bc673afcb7d4b6f644c43d0ebcee1e7fdbe28d1126e"},
4647
"vintage_net_ethernet": {:hex, :vintage_net_ethernet, "0.10.3", "5325c590459544f871b0a807061fa37c3833ed8f83b94b0a15d497177503d5c2", [:mix], [{:vintage_net, "~> 0.10.0 or ~> 0.11.0", [hex: :vintage_net, repo: "hexpm", optional: false]}], "hexpm", "4ec1ae7b2188829e493f54e0ba9e36ea53e8c95aecdf5950011ce4f13fe4ed52"},
47-
"vintage_net_wifi": {:hex, :vintage_net_wifi, "0.10.7", "186fb4f482b2b467af46fffa94bd628d15bb14b99bacf389261bb994baece9dd", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:vintage_net, "~> 0.10.0 or ~> 0.11.0", [hex: :vintage_net, repo: "hexpm", optional: false]}], "hexpm", "244e2d54ace35d8e178176e9121976eabec20cbf2b34ed17d2f9aad59169d505"},
48+
"vintage_net_wifi": {:hex, :vintage_net_wifi, "0.10.8", "8210b6890bda137aaa85c9ffbd2a081431121608ba64ae5b72ec0690f36f3256", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:vintage_net, "~> 0.10.0 or ~> 0.11.0", [hex: :vintage_net, repo: "hexpm", optional: false]}], "hexpm", "dc29bebbfa0f6ad6a4548d73ddad7fd7b2a183b7036e74aee207a2d08f18264e"},
4849
}

0 commit comments

Comments
 (0)