Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nerves-project/nerves
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.10.1
Choose a base ref
...
head repository: nerves-project/nerves
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 12,557 additions and 4,322 deletions.
  1. +89 −11 .circleci/config.yml
  2. +23 −0 .credo.exs
  3. +1 −1 .formatter.exs
  4. +7 −0 .github/dependabot.yml
  5. +4 −5 .gitignore
  6. +794 −91 CHANGELOG.md
  7. +2 −7 CODE_REVIEW.md
  8. +0 −12 ISSUE_TEMPLATE.md
  9. +63 −0 Makefile
  10. +204 −26 README.md
  11. +3 −3 RELEASE.md
  12. +0 −71 docs/CODE_OF_CONDUCT.md
  13. +0 −236 docs/CONTRIBUTING.md
  14. +0 −78 docs/FAQ.md
  15. +0 −152 docs/Getting Started.md
  16. +0 −127 docs/Installation.md
  17. +0 −424 docs/Systems.md
  18. +0 −40 docs/Targets.md
  19. +0 −200 docs/Updating Projects.md
  20. +0 −168 docs/User Interfaces.md
  21. +0 −10 docs/cheatsheet/Makefile
  22. +0 −13 docs/cheatsheet/README.md
  23. +0 −197 docs/cheatsheet/cheatsheet.tex
  24. +0 −886 docs/cheatsheet/nerves-logo.eps
  25. +1 −2 {docs → guides}/README.md
  26. +87 −6 docs/Advanced Configuration.md → guides/advanced/advanced-configuration.md
  27. +348 −0 guides/advanced/building-sytems.md
  28. +99 −0 guides/advanced/compiling-non-beam-code.md
  29. +422 −0 guides/advanced/customizing-systems.md
  30. +117 −0 guides/advanced/environment-variables.md
  31. +238 −0 guides/advanced/experimental-features.md
  32. +15 −15 docs/Internals.md → guides/advanced/internals.md
  33. +295 −0 guides/advanced/systems.md
  34. +771 −0 guides/advanced/updating-projects.md
  35. +247 −0 guides/core/connecting-to-a-nerves-target.md
  36. +88 −0 guides/core/faq.md
  37. +383 −0 guides/core/iex-with-nerves.md
  38. +71 −0 guides/core/supported-targets.md
  39. +64 −0 guides/core/user-interfaces.md
  40. +273 −0 guides/introduction/getting-started.md
  41. +245 −0 guides/introduction/installation.md
  42. +39 −0 lib/mix/nerves/io.ex
  43. +101 −0 lib/mix/nerves/preflight.ex
  44. +38 −6 lib/mix/nerves/shell.ex
  45. +214 −67 lib/mix/nerves/utils.ex
  46. +158 −0 lib/mix/tasks/burn.ex
  47. +91 −18 lib/mix/tasks/compile.nerves_package.ex
  48. +29 −133 lib/mix/tasks/firmware.burn.ex
  49. +224 −49 lib/mix/tasks/firmware.ex
  50. +35 −0 lib/mix/tasks/firmware.gen.gdb.ex
  51. +13 −8 lib/mix/tasks/firmware.image.ex
  52. +72 −0 lib/mix/tasks/firmware.metadata.ex
  53. +120 −0 lib/mix/tasks/firmware.patch.ex
  54. +86 −0 lib/mix/tasks/firmware.unpack.ex
  55. +59 −0 lib/mix/tasks/nerves.artifact.details.ex
  56. +25 −24 lib/mix/tasks/nerves.artifact.ex
  57. +54 −40 lib/mix/tasks/nerves.artifact.get.ex
  58. +54 −0 lib/mix/tasks/nerves.clean.ex
  59. +19 −0 lib/mix/tasks/nerves.deps.get.ex
  60. +58 −0 lib/mix/tasks/nerves.env.ex
  61. +6 −4 lib/mix/tasks/nerves.info.ex
  62. +43 −0 lib/mix/tasks/nerves.loadpaths.ex
  63. +100 −0 lib/mix/tasks/nerves.precompile.ex
  64. +0 −20 lib/mix/tasks/nerves.release.init.ex
  65. +80 −0 lib/mix/tasks/nerves.system.shell.ex
  66. +3 −39 lib/nerves.ex
  67. +183 −113 lib/nerves/artifact.ex
  68. +6 −5 lib/nerves/artifact/{provider.ex → build_runner.ex}
  69. +455 −0 lib/nerves/artifact/build_runners/docker.ex
  70. +59 −0 lib/nerves/artifact/build_runners/docker/image.ex
  71. +9 −0 lib/nerves/artifact/build_runners/docker/utils.ex
  72. +16 −13 lib/nerves/artifact/{providers → build_runners}/docker/volume.ex
  73. +96 −0 lib/nerves/artifact/build_runners/local.ex
  74. +13 −5 lib/nerves/artifact/cache.ex
  75. +0 −296 lib/nerves/artifact/providers/docker.ex
  76. +0 −53 lib/nerves/artifact/providers/docker/image.ex
  77. +0 −5 lib/nerves/artifact/providers/docker/utils.ex
  78. +0 −59 lib/nerves/artifact/providers/local.ex
  79. +34 −37 lib/nerves/artifact/resolver.ex
  80. +138 −0 lib/nerves/artifact/resolvers/gitea_api.ex
  81. +151 −0 lib/nerves/artifact/resolvers/github_api.ex
  82. +28 −0 lib/nerves/artifact/resolvers/uri.ex
  83. +197 −76 lib/nerves/env.ex
  84. +195 −0 lib/nerves/erlinit.ex
  85. +49 −47 lib/nerves/package.ex
  86. +6 −6 lib/nerves/package/platform.ex
  87. +31 −20 lib/nerves/package/utils/squashfs.ex
  88. +147 −0 lib/nerves/port.ex
  89. +260 −0 lib/nerves/release.ex
  90. +24 −13 lib/nerves/system/br.ex
  91. +9 −2 lib/nerves/utils.ex
  92. +12 −1 lib/nerves/utils/file.ex
  93. +108 −36 lib/nerves/utils/http_client.ex
  94. +8 −5 lib/nerves/utils/proxy.ex
  95. +9 −3 lib/nerves/utils/shell.ex
  96. +31 −14 lib/nerves/utils/stream.ex
  97. +260 −0 lib/nerves/utils/wsl.ex
  98. +74 −36 mix.exs
  99. +23 −4 mix.lock
  100. +0 −56 priv/templates/release.eex
  101. +43 −0 priv/templates/script.run-gdb.sh.eex
  102. BIN resources/logo-color.png
  103. BIN resources/logo.png
  104. BIN resources/menu-search-tip.gif
  105. +2 −2 scripts/docker/nerves_system_br/noninteractive-build.sh
  106. +472 −0 scripts/nerves_system_compatibility.exs
  107. +345 −0 src/port.c
  108. +0 −39 template/Dockerfile
  109. +0 −4 template/_iex.vm.args
  110. +4 −1 test/.gitignore
  111. +1 −0 test/fixtures/host_tool/lib/host_tool.ex
  112. +9 −3 test/fixtures/host_tool/lib/host_tool/platform.ex
  113. +7 −6 test/fixtures/host_tool/lib/mix/tasks/compile.host_tool.ex
  114. +14 −13 test/fixtures/host_tool/mix.exs
  115. +0 −3 test/fixtures/host_tool/mix.lock
  116. +3 −0 test/fixtures/integration_app/config/config.exs
  117. +9 −17 test/fixtures/integration_app/mix.exs
  118. +5 −5 test/fixtures/package/mix.exs
  119. 0 test/fixtures/{package_provider_override → package_build_runner_opts}/VERSION
  120. +8 −8 test/fixtures/{package_provider_override → package_build_runner_opts}/mix.exs
  121. 0 test/fixtures/{package_provider_override → package_build_runner_opts}/nerves_defconfig
  122. +1 −0 test/fixtures/package_build_runner_override/VERSION
  123. +41 −0 test/fixtures/package_build_runner_override/mix.exs
  124. 0 ...em/.nerves/artifacts/system-portable-0.1.0/file → package_build_runner_override/nerves_defconfig}
  125. +23 −0 test/fixtures/port/Makefile
  126. +10 −0 test/fixtures/port/do_nothing.c
  127. +15 −0 test/fixtures/port/ignore_sigterm.c
  128. +17 −0 test/fixtures/port/kill_self_with_signal.c
  129. +2 −0 test/fixtures/release_app/config/config.exs
  130. +34 −0 test/fixtures/release_app/mix.exs
  131. +1 −0 test/fixtures/release_app/rel/vm.args.eex
  132. BIN test/fixtures/resolver/artifact.tar.gz
  133. +1 −0 test/fixtures/resolver/corrupt.tar.gz
  134. +7 −13 test/fixtures/simple_app/mix.exs
  135. +22 −0 test/fixtures/simple_app_artifact/mix.exs
  136. +0 −1 test/fixtures/system/.nerves/artifacts/system-portable-0.1.0/CHECKSUM
  137. +20 −9 test/fixtures/system/mix.exs
  138. +1 −0 test/fixtures/system_artifact/VERSION
  139. +54 −0 test/fixtures/system_artifact/mix.exs
  140. 0 ...toolchain/.nerves/artifacts/toolchain-linux_x86_64-0.1.0/file → system_artifact/nerves_defconfig}
  141. +0 −1 test/fixtures/system_platform/env.exs
  142. +8 −0 test/fixtures/system_platform/lib/system_platform.ex
  143. +6 −6 test/fixtures/system_platform/mix.exs
  144. +0 −1 test/fixtures/toolchain/.nerves/artifacts/toolchain-linux_x86_64-0.1.0/CHECKSUM
  145. +7 −7 test/fixtures/toolchain/mix.exs
  146. +8 −0 test/fixtures/toolchain_platform/lib/toolchain_platform.ex
  147. +6 −6 test/fixtures/toolchain_platform/mix.exs
  148. +21 −0 test/fixtures/umbrella/.gitignore
  149. +1 −0 test/fixtures/umbrella/apps/toolchain/VERSION
  150. 0 test/fixtures/umbrella/apps/toolchain/darwin_defconfig
  151. 0 test/fixtures/umbrella/apps/toolchain/linux_defconfig
  152. +50 −0 test/fixtures/umbrella/apps/toolchain/mix.exs
  153. +1 −0 test/fixtures/umbrella/apps/toolchain_platform/VERSION
  154. +46 −0 test/fixtures/umbrella/apps/toolchain_platform/lib/toolchain_platform.ex
  155. +41 −0 test/fixtures/umbrella/apps/toolchain_platform/mix.exs
  156. +18 −0 test/fixtures/umbrella/config/config.exs
  157. +20 −0 test/fixtures/umbrella/mix.exs
  158. +5 −0 test/mix/nerves/utils_test.exs
  159. +164 −0 test/nerves/artifact/resolver_test.exs
  160. +143 −0 test/nerves/artifact/resolvers_gitea_api_test.exs
  161. +197 −0 test/nerves/artifact/resolvers_github_api_test.exs
  162. +98 −15 test/nerves/artifact_test.exs
  163. +3 −3 test/nerves/{provider → build_runners}/docker_test.exs
  164. +105 −0 test/nerves/cache_test.exs
  165. +124 −1 test/nerves/env_test.exs
  166. +211 −0 test/nerves/erlinit_test.exs
  167. +8 −15 test/nerves/integration_test.exs
  168. +21 −0 test/nerves/mix_test.exs
  169. +121 −0 test/nerves/port_test.exs
  170. +132 −0 test/nerves/release_test.exs
  171. +17 −8 test/nerves/utils_test.exs
  172. +178 −0 test/nerves/utils_wsl_test.exs
  173. +202 −40 test/support/test_case.ex
  174. +41 −0 test/support/test_http_client.ex
  175. +60 −0 test/support/test_server/router.ex
  176. +17 −1 test/test_helper.exs
100 changes: 89 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,95 @@
# Elixir CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-elixir/ for more details
version: 2
version: 2.1

latest: &latest
pattern: "^1.17.*-erlang-27.*$"

tags: &tags
[
1.17.3-erlang-27.1.2-alpine-3.20.3,
1.16.3-erlang-26.2.5-alpine-3.20.0,
1.15.7-erlang-26.2.1-alpine-3.18.4,
1.14.5-erlang-25.3.2-alpine-3.18.0,
1.13.4-erlang-24.3.4-alpine-3.15.3
]

jobs:
build:
build-test:
parameters:
tag:
type: string
docker:
- image: circleci/elixir:1.5.1
- image: hexpm/elixir:<< parameters.tag >>
working_directory: ~/repo
environment:
MIX_ENV: test
LC_ALL: C.UTF-8
steps:
- run:
name: Install system dependencies
command: apk add --no-cache build-base procps
- checkout
- run: mix local.hex --force && mix local.rebar --force
- run: git clone https://github.com/nerves-project/nerves_bootstrap && cd nerves_bootstrap && mix deps.get && mix install && cd -
- run: mix deps.get --only test
- run: mix test
- run:
name: Install hex, rebar, and nerves_bootstrap
command: |
mix local.hex --force
mix local.rebar --force
mix archive.install hex nerves_bootstrap --force
- restore_cache:
keys:
- v1-mix-cache-<< parameters.tag >>-{{ checksum "mix.lock" }}
- run: mix deps.get
- when:
condition:
matches: { <<: *latest, value: << parameters.tag >> }
steps:
- run: mix format --check-formatted
- run: mix deps.unlock --check-unused
- run: mix docs
- run: mix hex.build
- run: mix test || mix test
- run: mix credo -a --strict
- run: mix dialyzer
- when:
condition:
not:
matches: { <<: *latest, value: << parameters.tag >> }
steps:
- run: mix test --exclude release || mix test --exclude release
- save_cache:
key: v1-mix-cache-<< parameters.tag >>-{{ checksum "mix.lock" }}
paths:
- _build
- deps

automerge:
docker:
- image: alpine:3.18.4
steps:
- run:
name: Install GitHub CLI
command: apk add --no-cache build-base github-cli
- run:
name: Attempt PR automerge
command: |
author=$(gh pr view "${CIRCLE_PULL_REQUEST}" --json author --jq '.author.login' || true)
if [ "$author" = "app/dependabot" ]; then
gh pr merge "${CIRCLE_PULL_REQUEST}" --auto --rebase || echo "Failed trying to set automerge"
else
echo "Not a dependabot PR, skipping automerge"
fi
workflows:
checks:
jobs:
- build-test:
name: << matrix.tag >>
matrix:
parameters:
tag: *tags

- automerge:
requires: *tags
context: org-global
filters:
branches:
only: /^dependabot.*/
23 changes: 23 additions & 0 deletions .credo.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# .credo.exs
%{
configs: [
%{
name: "default",
files: %{included: ["lib/", "test/"], excluded: ["**/mix.exs"]},
strict: true,
checks: [
{Credo.Check.Design.AliasUsage, false},
{Credo.Check.Refactor.Apply, false},
{Credo.Check.Refactor.MapInto, false},
{Credo.Check.Warning.LazyLogging, false},
{Credo.Check.Readability.LargeNumbers, only_greater_than: 86400},
{Credo.Check.Readability.ParenthesesOnZeroArityDefs, parens: true},
{Credo.Check.Readability.Specs, tags: []},
{Credo.Check.Readability.StrictModuleLayout, tags: []},

# Report TODO comments, but don't fail the check
{Credo.Check.Design.TagTODO, exit_status: 0}
]
}
]
}
2 changes: 1 addition & 1 deletion .formatter.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Used by "mix format"
[
inputs: ["mix.exs", "{config,lib,test}/**/*.{ex,exs}"]
inputs: ["mix.exs", ".credo.exs", ".formatter.exs", "{config,lib,test}/**/*.{ex,exs}"]
]
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: mix
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -5,9 +5,8 @@
erl_crash.dump
*.ez
/doc
/test_tmp
/muontrap-*.log
test/fixtures/port/*.test
priv/port
/tmp
docs/cheatsheet/*
!docs/cheatsheet/*.tex
!docs/cheatsheet/*.eps
!docs/cheatsheet/Makefile
!docs/cheatsheet/README.md
Loading