2
0
Fork 0

lib: add gzip support to hwImage, novaImage

This commit is contained in:
Ehmry - 2020-05-21 18:55:08 +05:30
parent f289a4b88f
commit e25d3562f2
1 changed files with 8 additions and 4 deletions

View File

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