Packages
nerves_system_bbb
2.12.3
2.30.0
2.29.5
2.29.4
2.29.3
2.29.2
2.29.1
2.29.0
2.28.0
2.27.3
2.27.2
2.27.1
2.27.0
2.26.1
2.26.0
2.25.1
2.25.0
2.24.0
2.23.0
2.22.1
2.22.0
2.21.0
2.20.2
2.20.1
2.20.0
2.19.1
2.19.0
2.18.2
2.18.1
2.18.0
2.17.2
2.17.1
2.17.0
2.16.2
2.16.1
2.16.0
2.15.3
2.15.2
2.15.1
2.15.0
retired
2.14.0
2.13.4
2.13.3
2.13.2
2.13.1
2.13.0
2.12.3
2.12.2
2.12.1
2.12.0
2.11.2
2.11.1
2.11.0
2.10.1
2.10.0
2.9.0
2.8.3
2.8.2
2.8.1
2.8.0
2.7.2
2.7.1
2.7.0
2.6.2
2.6.1
2.6.0
2.5.2
2.5.1
2.5.0
2.4.2
2.4.1
2.4.0
2.3.2
2.3.1
2.3.0
2.2.2
2.2.1
2.2.0
2.1.3
2.1.2
2.1.1
2.1.0
2.0.0
2.0.0-rc.0
1.4.0
1.3.0
1.2.1
1.2.0
1.1.1
1.1.0
1.0.0
1.0.0-rc.1
1.0.0-rc.0
0.20.0
0.18.0
0.17.1
0.17.0
0.16.1
0.16.0
0.15.0
0.14.0
0.13.0
0.12.0
0.11.0
0.10.0
0.9.0
0.8.0
0.7.1
0.7.0
0.6.2
0.6.1
0.6.0
0.5.0
Nerves System - BeagleBone Black, BeagleBone Green, PocketBeagle and more
Current section
Files
Jump to
Current section
Files
nerves_system_bbb
mix.exs
mix.exs
defmodule NervesSystemBbb.MixProject do use Mix.Project @github_organization "nerves-project" @app :nerves_system_bbb @source_url "https://github.com/#{@github_organization}/#{@app}" @version Path.join(__DIR__, "VERSION") |> File.read!() |> String.trim() def project do [ app: @app, version: @version, elixir: "~> 1.6", compilers: Mix.compilers() ++ [:nerves_package], nerves_package: nerves_package(), description: description(), package: package(), deps: deps(), aliases: [loadconfig: [&bootstrap/1], docs: ["docs", ©_images/1]], docs: docs(), preferred_cli_env: %{ docs: :docs, "hex.build": :docs, "hex.publish": :docs } ] end def application do [] end defp bootstrap(args) do set_target() Application.start(:nerves_bootstrap) Mix.Task.run("loadconfig", args) end defp nerves_package do [ type: :system, artifact_sites: [ {:github_releases, "#{@github_organization}/#{@app}"} ], build_runner_opts: build_runner_opts(), platform: Nerves.System.BR, platform_config: [ defconfig: "nerves_defconfig" ], # The :env key is an optional experimental feature for adding environment # variables to the crosscompile environment. These are intended for # llvm-based tooling that may need more precise processor information. env: [ {"TARGET_ARCH", "arm"}, {"TARGET_CPU", "cortex_a8"}, {"TARGET_OS", "linux"}, {"TARGET_ABI", "gnueabihf"} ], checksum: package_files() ] end defp deps do [ {:nerves, "~> 1.5.4 or ~> 1.6.0 or ~> 1.7.4", runtime: false}, {:nerves_system_br, "1.17.4", runtime: false}, {:nerves_toolchain_armv7_nerves_linux_gnueabihf, "~> 1.4.3", runtime: false}, {:nerves_system_linter, "~> 0.4", only: [:dev, :test], runtime: false}, {:ex_doc, "~> 0.22", only: :docs, runtime: false} ] end defp description do """ Nerves System - BeagleBone Black, BeagleBone Green, PocketBeagle and more """ end defp docs do [ extras: ["README.md", "CHANGELOG.md"], main: "readme", source_ref: "v#{@version}", source_url: @source_url, skip_undefined_reference_warnings_on: ["CHANGELOG.md"] ] end defp package do [ files: package_files(), licenses: ["Apache 2.0"], links: %{"GitHub" => @source_url} ] end defp package_files do [ "fwup_include", "linux", "rootfs_overlay", "uboot", "busybox.fragment", "CHANGELOG.md", "fwup-revert.conf", "fwup.conf", "LICENSE", "mix.exs", "nerves_defconfig", "post-build.sh", "post-createfs.sh", "README.md", "VERSION" ] end # Copy the images referenced by docs, since ex_doc doesn't do this. defp copy_images(_) do File.cp_r("assets", "doc/assets") end defp build_runner_opts() do # Download source files first to get download errors right away. [make_args: primary_site() ++ ["source", "all", "legal-info"]] end defp primary_site() do case System.get_env("BR2_PRIMARY_SITE") do nil -> [] primary_site -> ["BR2_PRIMARY_SITE=#{primary_site}"] end end defp set_target() do if function_exported?(Mix, :target, 1) do apply(Mix, :target, [:target]) else System.put_env("MIX_TARGET", "target") end endend