netbsd.sys: actually build the kernel
Before, we were only building the headers, firmware, and bootloader. CONFIG could be overridden to use another pre-defined kernel, but there's no way to pass a custom kernel configuration yet. Tested booting the built kernel in a NetBSD VM.
This commit is contained in:
parent
37ac32a351
commit
ddcb48cc3d
@ -433,12 +433,35 @@ let
|
|||||||
path = "sys";
|
path = "sys";
|
||||||
version = "8.0";
|
version = "8.0";
|
||||||
sha256 = "123ilg8fqmp69bw6bs6nh98fpi1v2n9lamrzar61p27ji6sj7g0w";
|
sha256 = "123ilg8fqmp69bw6bs6nh98fpi1v2n9lamrzar61p27ji6sj7g0w";
|
||||||
|
|
||||||
|
CONFIG = "GENERIC";
|
||||||
|
|
||||||
propagatedBuildInputs = [ include ];
|
propagatedBuildInputs = [ include ];
|
||||||
nativeBuildInputs = [ makeMinimal install tsort lorder statHook uudecode ];
|
nativeBuildInputs = [
|
||||||
|
makeMinimal install tsort lorder statHook uudecode config genassym
|
||||||
|
];
|
||||||
|
|
||||||
|
postConfigure = ''
|
||||||
|
pushd arch/$MACHINE/conf
|
||||||
|
config $CONFIG
|
||||||
|
popd
|
||||||
|
'';
|
||||||
|
|
||||||
|
makeFlags = [ "FIRMWAREDIR=$(out)/libdata/firmware" ];
|
||||||
|
hardeningDisable = [ "pic" ];
|
||||||
|
MKKMOD = "no";
|
||||||
|
NIX_CFLAGS_COMPILE = [ "-Wa,--no-warn" ];
|
||||||
|
|
||||||
|
postBuild = ''
|
||||||
|
make -C arch/$MACHINE/compile/$CONFIG $makeFlags
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
cp arch/$MACHINE/compile/$CONFIG/netbsd $out
|
||||||
|
'';
|
||||||
|
|
||||||
meta.platforms = lib.platforms.netbsd;
|
meta.platforms = lib.platforms.netbsd;
|
||||||
extraPaths = [ common.src ];
|
extraPaths = [ common.src ];
|
||||||
MKKMOD = "no";
|
|
||||||
makeFlags = [ "FIRMWAREDIR=$(out)/libdata/firmware" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
headers = symlinkJoin {
|
headers = symlinkJoin {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user