diff --git a/config/config.exs b/config/config.exs index 993a63e..6f4878a 100644 --- a/config/config.exs +++ b/config/config.exs @@ -8,7 +8,7 @@ import Config # Enable the Nerves integration with Mix Application.start(:nerves_bootstrap) -config :bivouac, target: Mix.target() +config :bivouac_nerves, target: Mix.target() # Customize non-Elixir parts of the firmware. See # https://hexdocs.pm/nerves/advanced-configuration.html for details. diff --git a/config/host.exs b/config/host.exs index 9c9f31b..55b856a 100644 --- a/config/host.exs +++ b/config/host.exs @@ -23,7 +23,7 @@ config :nerves_runtime, config :git_ops, mix_project: Mix.Project.get!(), changelog_file: "CHANGELOG.md", - repository_url: "https://code.harton.nz/james/bivouac", + repository_url: "https://code.harton.nz/bivouac/bivouac_nerves", manage_mix_version?: true, version_tag_prefix: "v", manage_readme_version: "README.md" diff --git a/lib/bivouac.ex b/lib/bivouac_nerves.ex similarity index 56% rename from lib/bivouac.ex rename to lib/bivouac_nerves.ex index f9fc6fe..662ae70 100644 --- a/lib/bivouac.ex +++ b/lib/bivouac_nerves.ex @@ -1,6 +1,6 @@ -defmodule Bivouac do +defmodule BivouacNerves do @moduledoc """ - Documentation for Bivouac. + Documentation for BivouacNerves. """ @doc """ @@ -8,7 +8,7 @@ defmodule Bivouac do ## Examples - iex> Bivouac.hello + iex> BivouacNerves.hello :world """ diff --git a/lib/bivouac/application.ex b/lib/bivouac_nerves/application.ex similarity index 86% rename from lib/bivouac/application.ex rename to lib/bivouac_nerves/application.ex index 70094b5..f6d8b91 100644 --- a/lib/bivouac/application.ex +++ b/lib/bivouac_nerves/application.ex @@ -1,4 +1,4 @@ -defmodule Bivouac.Application do +defmodule BivouacNerves.Application do # See https://hexdocs.pm/elixir/Application.html # for more information on OTP Applications @moduledoc false @@ -10,7 +10,7 @@ defmodule Bivouac.Application do def start(_type, _args) do # See https://hexdocs.pm/elixir/Supervisor.html # for other strategies and supported options - opts = [strategy: :one_for_one, name: Bivouac.Supervisor] + opts = [strategy: :one_for_one, name: BivouacNerves.Supervisor] children = [ @@ -43,6 +43,6 @@ defmodule Bivouac.Application do @doc false def target do - Application.get_env(:bivouac, :target) + Application.get_env(:bivouac_nerves, :target) end end diff --git a/mix.exs b/mix.exs index cd013a6..dbe9269 100644 --- a/mix.exs +++ b/mix.exs @@ -1,21 +1,9 @@ -defmodule Bivouac.MixProject do +defmodule BivouacNerves.MixProject do use Mix.Project - @app :bivouac + @app :bivouac_nerves @version "0.1.0" - @all_targets [ - :rpi, - :rpi0, - :rpi2, - :rpi3, - :rpi3a, - :rpi4, - :bbb, - :osd32mp1, - :x86_64, - :grisp2, - :mangopi_mq_pro - ] + @all_targets [:rpi4, :x86_64] def project do [ @@ -33,7 +21,7 @@ defmodule Bivouac.MixProject do # Run "mix help compile.app" to learn about applications. def application do [ - mod: {Bivouac.Application, []}, + mod: {BivouacNerves.Application, []}, extra_applications: [:logger, :runtime_tools] ] end @@ -61,17 +49,8 @@ defmodule Bivouac.MixProject do # bumps to Nerves systems. Since these include Linux kernel and Erlang # version updates, please review their release notes in case # changes to your application are needed. - {:nerves_system_rpi, "~> 1.19", runtime: false, targets: :rpi}, - {:nerves_system_rpi0, "~> 1.19", runtime: false, targets: :rpi0}, - {:nerves_system_rpi2, "~> 1.19", runtime: false, targets: :rpi2}, - {:nerves_system_rpi3, "~> 1.19", runtime: false, targets: :rpi3}, - {:nerves_system_rpi3a, "~> 1.19", runtime: false, targets: :rpi3a}, {:nerves_system_rpi4, "~> 1.19", runtime: false, targets: :rpi4}, - {:nerves_system_bbb, "~> 2.14", runtime: false, targets: :bbb}, - {:nerves_system_osd32mp1, "~> 0.15", runtime: false, targets: :osd32mp1}, {:nerves_system_x86_64, "~> 1.19", runtime: false, targets: :x86_64}, - {:nerves_system_grisp2, "~> 0.8", runtime: false, targets: :grisp2}, - {:nerves_system_mangopi_mq_pro, "~> 0.4", runtime: false, targets: :mangopi_mq_pro}, # Dev/test deps diff --git a/run-qemu.sh b/run-qemu.sh index d32588b..9490c05 100755 --- a/run-qemu.sh +++ b/run-qemu.sh @@ -28,11 +28,16 @@ help() { [ -f "$IMAGE" ] || (echo "Error: can't find '$IMAGE'"; help) echo "Starting QEMU..." -qemu-system-x86_64 \ +screen -S bivouac-session \ + qemu-system-x86_64 \ + -m 4G \ -drive file="$IMAGE",if=virtio,format=raw \ - -drive file="tmp/disk0.img",if=virtio,format=raw \ - -drive file="tmp/disk1.img",if=virtio,format=raw \ - -drive file="tmp/disk2.img",if=virtio,format=raw \ + -drive file="tmp/disk0.img",if=virtio,format=qcow2 \ + -drive file="tmp/disk1.img",if=virtio,format=qcow2 \ + -drive file="tmp/disk2.img",if=virtio,format=qcow2 \ + -nographic \ -net nic,model=virtio \ -net user,hostfwd=tcp::10022-:22 \ - -serial stdio + -smp cpus=4,maxcpus=4 \ + -accel kvm + diff --git a/test/bivouac_test.exs b/test/bivouac_test.exs index 34717ff..e88213f 100644 --- a/test/bivouac_test.exs +++ b/test/bivouac_test.exs @@ -1,8 +1,8 @@ -defmodule BivouacTest do +defmodule BivouacNervesTest do use ExUnit.Case - doctest Bivouac + doctest BivouacNerves test "greets the world" do - assert Bivouac.hello() == :world + assert BivouacNerves.hello() == :world end end