Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
7 changes: 7 additions & 0 deletions src/grisp_tools_build.erl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ run(Configuration) ->
]},
{compile, [
fun configure/1,
fun update_preloaded/1,
fun boot/1,
fun install/1,
fun post/1
Expand Down Expand Up @@ -190,6 +191,12 @@ configure(#{build := Build, otp_version := {[Ver | _], _, _, _}} = S0) ->
event(S0, ['_skip'])
end.

update_preloaded(#{build := #{flags := #{update_prebuild := true}}} = State0) ->
Opts = [{cd, mapz:deep_get([paths, build], State0)}],
build_step("./otp_build update_preloaded --no-commit", Opts, State0);
update_preloaded(State0) ->
event(State0, ['_skip']).

boot(State0) ->
Opts = [{cd, mapz:deep_get([paths, build], State0)}],
build_step("./otp_build boot -a", Opts, State0).
Expand Down
13 changes: 13 additions & 0 deletions src/grisp_tools_step.erl
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,19 @@ collect(#{project_root := Root, platform := Platform,
mapz:deep_put([build, hash], #{value => Hash, index => HashIndex}, S3).

toolchain(#{paths := #{toolchain := {docker, _}}} = S0) -> S0;
toolchain(#{platform := grisp_nano,
paths := #{toolchain := {directory, ToolchainRoot}}} = S0) ->
[error({toolchain_root_invalid, ToolchainRoot}) || not filelib:is_dir(ToolchainRoot)],
Files = [
["GRISP_TOOLCHAIN_REVISION"],
["GRISP_TOOLCHAIN_PLATFORM"],
["grisp_buildinfo.hrl"],
["arm-rtems6"],
["arm-rtems6", "stm32u5-grisp-nano"],
["bin","arm-rtems6-gcc"]
],
[ check_toolchain_file([ToolchainRoot|File]) || File <- Files],
S0;
toolchain(#{paths := #{toolchain := {directory, ToolchainRoot}}} = S0) ->
[error({toolchain_root_invalid, ToolchainRoot}) || not filelib:is_dir(ToolchainRoot)],
Files = [
Expand Down
Loading