Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build from from rootfs.tar system files #978

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
steps:
- run:
name: Install system dependencies
command: apk add --no-cache build-base procps
command: apk add --no-cache build-base procps git
- checkout
- run:
name: Install hex, rebar, and nerves_bootstrap
Expand All @@ -45,7 +45,7 @@ jobs:
- run: mix format --check-formatted
- run: mix deps.unlock --check-unused
- run: mix docs
- run: mix hex.build
# - run: mix hex.build
- run: mix test || mix test
- run: mix credo -a --strict
- run: mix dialyzer
Expand Down
16 changes: 13 additions & 3 deletions lib/mix/nerves/preflight.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defmodule Mix.Nerves.Preflight do
# OSX
defp check_platform!(:darwin) do
ensure_fwup_version!()
ensure_available!("mksquashfs", package: "squashfs")
ensure_fs_tools!()
ensure_available!("gstat", package: "gstat (coreutils)")
end

Expand All @@ -35,13 +35,23 @@ defmodule Mix.Nerves.Preflight do
defp check_platform!(:wsl) do
ensure_fwup_version!()
ensure_fwup_version!("fwup.exe")
ensure_available!("mksquashfs", package: "squashfs")
ensure_fs_tools!()
end

# Non-WSL Linux
defp check_platform!(_) do
ensure_fwup_version!()
ensure_available!("mksquashfs", package: "squashfs")
ensure_fs_tools!()
end

defp ensure_fs_tools!() do
fs_type = Application.get_env(:nerves, :firmware, [])[:fs_type]

if fs_type == :erofs do
ensure_available!("mkfs.erofs", package: "erofs-utils")
else
ensure_available!("mksquashfs", package: "squashfs")
end
end

@doc """
Expand Down
Loading