Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Astro
firmware
Commits
cb221011
Commit
cb221011
authored
5 years ago
by
Astro
Browse files
Options
Downloads
Patches
Plain Diff
chore(nix): update to meson/ninja build system
parent
bb000950
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#674
failed
5 years ago
Stage: build
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
default.nix
+2
-12
2 additions, 12 deletions
default.nix
nix/firmware.nix
+14
-41
14 additions, 41 deletions
nix/firmware.nix
nix/python-crc16.nix
+0
-10
0 additions, 10 deletions
nix/python-crc16.nix
shell.nix
+2
-3
2 additions, 3 deletions
shell.nix
with
18 additions
and
66 deletions
default.nix
+
2
−
12
View file @
cb221011
...
...
@@ -2,10 +2,9 @@
}:
with
pkgs
;
let
firmware
Builder
=
callPackage
./nix/firmware.nix
{};
firmware
=
callPackage
./nix/firmware.nix
{};
openocd
=
callPackage
./nix/openocd.nix
{
};
in
with
firmwareBuilder
;
{
openocd
=
stdenv
.
mkDerivation
{
name
=
"openocd-card10"
;
...
...
@@ -20,14 +19,5 @@ with firmwareBuilder;
--add-flags "-f $out/share/openocd/scripts/target/max32665.cfg"
''
;
};
bootloader
=
firmware
"bootloader"
;
ble
=
loadable
"ble"
;
bmatest
=
loadable
"bmatest"
;
bmetest
=
loadable
"bmetest"
;
ecgtest
=
loadable
"ecgtest"
;
Hello_World
=
loadable
"Hello_World"
;
Hello_World_FreeRTOS
=
loadable
"Hello_World_FreeRTOS"
;
imutest
=
loadable
"imutest"
;
ips
=
loadable
"ips"
;
inherit
firmware
;
}
This diff is collapsed.
Click to expand it.
nix/firmware.nix
+
14
−
41
View file @
cb221011
{
pkgsCross
,
python3
,
callPackage
}:
{
pkgsCross
,
python3
,
ninja
,
meson
,
gcc
}:
let
crc16
=
callPackage
./python-crc16.nix
{};
in
rec
{
firmware
=
subdir
:
pkgsCross
.
arm-embedded
.
stdenv
.
mkDerivation
{
name
=
"
${
subdir
}
"
;
src
=
./..
;
buildInputs
=
[
];
hardeningDisable
=
[
"all"
];
buildPhase
=
''
cd
${
subdir
}
make clean
make -j
''$
NIX_BUILD_CORES
make -j
''$
NIX_BUILD_CORES build/max32665.elf
''
;
installPhase
=
''
mkdir -p $out/lib
cp build/max32665.elf $out/lib/card10.elf
''
;
};
loadable
=
subdir
:
pkgsCross
.
arm-embedded
.
stdenv
.
mkDerivation
{
name
=
"loadable-
${
subdir
}
"
;
src
=
./..
;
buildInputs
=
[
crc16
];
hardeningDisable
=
[
"all"
];
buildPhase
=
''
cd
${
subdir
}
make clean
make -j
''$
NIX_BUILD_CORES APP=1
make -j
''$
NIX_BUILD_CORES build/max32665.bin
${
python3
}
/bin/python ../bootloader/crc_patch.py build/max32665.bin
''
;
installPhase
=
''
mkdir -p $out/lib
cp build/max32665.elf $out/lib/card10.elf
cp build/max32665.bin $out/lib/card10.bin
''
;
};
pkgsCross
.
armhf-embedded
.
stdenv
.
mkDerivation
{
name
=
"card10"
;
src
=
./..
;
postPatch
=
''
substituteInPlace card10-cross.ini \
--replace arm-none-eabi arm-none-eabihf
''
;
nativeBuildInputs
=
[
ninja
meson
python3
gcc
];
mesonFlags
=
[
"--cross-file card10-cross.ini"
"--optimization s"
];
ninjaFlags
=
[
"-v"
];
}
This diff is collapsed.
Click to expand it.
nix/python-crc16.nix
deleted
100644 → 0
+
0
−
10
View file @
bb000950
{
python3Packages
}:
python3Packages
.
buildPythonPackage
rec
{
pname
=
"crc16"
;
version
=
"0.1.1"
;
src
=
python3Packages
.
fetchPypi
{
inherit
pname
version
;
sha256
=
"15nkx0pa4lskwin84flpk8fsw3jqg6wic6v3s83syjqg76h6my61"
;
};
}
This diff is collapsed.
Click to expand it.
shell.nix
+
2
−
3
View file @
cb221011
with
import
<
nixpkgs
>
{};
pkgsCross
.
arm-embedded
.
stdenv
.
mkDerivation
{
pkgsCross
.
arm
hf
-embedded
.
stdenv
.
mkDerivation
{
name
=
"env"
;
buildInputs
=
[
bashInteractive
];
hardeningDisable
=
[
"all"
];
buildInputs
=
[
ninja
meson
python3
gcc
bashInteractive
];
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment