2
0
Fork 0

lib: add gzip support to hwImage, novaImage

This commit is contained in:
Emery Hemingway 2020-05-21 18:55:08 +05:30
parent 6d2eb81def
commit 4975a2815e
1 changed files with 8 additions and 4 deletions

View File

@ -39,7 +39,9 @@ in rec {
> $out/config.dhall.bin
'';
hwImage = coreLinkAddr: bootstrapLinkAddr: basePkg: name: env: boot:
hwImage = coreLinkAddr: bootstrapLinkAddr: basePkg: name:
{ gzip ? false, ... }@env:
boot:
nixpkgs.stdenv.mkDerivation {
name = name + "-hw-image";
build = compileBoot name env boot;
@ -94,10 +96,12 @@ in rec {
bootstrap/modules_asm \
${bootstrapLinkAddr} \
$out/image.elf
'';
'' + nixpkgs.lib.optionalString gzip "gzip $out/image.elf";
};
novaImage = name: env: boot:
novaImage = name:
{ gzip ? false, ... }@env:
boot:
nixpkgs.stdenv.mkDerivation {
name = name + "-nova-image";
build = compileBoot name env boot;
@ -117,7 +121,7 @@ in rec {
-Ttext=0x100000 -gc-sections \
"${testPkgs.base-nova.coreObj}" boot_modules.o \
-o $out/image.elf
'';
'' + nixpkgs.lib.optionalString gzip "gzip $out/image.elf";
};
mergeManifests = inputs: