forked from DGNum/liminix
make loadAddress and entryPoint device configuration
... already having second thoughts about loadAddress
This commit is contained in:
parent
8cead61740
commit
0a06319d0c
6 changed files with 27 additions and 22 deletions
|
@ -501,3 +501,11 @@ For better developer experience, I am thinking that either (1)
|
||||||
swap tasks 2 and 3 (writable filesystem before module system)
|
swap tasks 2 and 3 (writable filesystem before module system)
|
||||||
or (2) add NBD support so I can iterate on a real device without
|
or (2) add NBD support so I can iterate on a real device without
|
||||||
full rebuilds every time
|
full rebuilds every time
|
||||||
|
|
||||||
|
|
||||||
|
Fri Feb 10 06:18:25 PM GMT 2023
|
||||||
|
|
||||||
|
did the overlay->module thing
|
||||||
|
|
||||||
|
Need to fix all the configuration around PHRAM, I can't see how it
|
||||||
|
would ever ork
|
||||||
|
|
|
@ -45,7 +45,7 @@ let
|
||||||
};
|
};
|
||||||
uimage = (callPackage ./kernel/uimage.nix {}) {
|
uimage = (callPackage ./kernel/uimage.nix {}) {
|
||||||
commandLine = concatStringsSep " " config.boot.commandLine;
|
commandLine = concatStringsSep " " config.boot.commandLine;
|
||||||
inherit (device.boot) loadAddress entryPoint;
|
inherit (config.device) loadAddress entryPoint;
|
||||||
inherit kernel;
|
inherit kernel;
|
||||||
inherit dtb;
|
inherit dtb;
|
||||||
};
|
};
|
||||||
|
@ -80,8 +80,9 @@ let
|
||||||
ln -s ${manifest} manifest
|
ln -s ${manifest} manifest
|
||||||
ln -s ${kernel.headers} build
|
ln -s ${kernel.headers} build
|
||||||
'' +
|
'' +
|
||||||
(if device ? boot then ''
|
(if config.device.loadAddress != null then
|
||||||
ln -s ${uimage} uimage
|
''
|
||||||
|
ln -s {uimage} uimage
|
||||||
${if phram then "ln -s ${boot-scr} boot.scr" else ""}
|
${if phram then "ln -s ${boot-scr} boot.scr" else ""}
|
||||||
ln -s ${boot-scr} flash.scr
|
ln -s ${boot-scr} flash.scr
|
||||||
'' else ""));
|
'' else ""));
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
hash = "sha256-YYi4gkpLjbOK7bM2MGQjAyEBuXJ9JNXoz/JEmYf8xE8=";
|
hash = "sha256-YYi4gkpLjbOK7bM2MGQjAyEBuXJ9JNXoz/JEmYf8xE8=";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
device.defaultOutput = "directory";
|
device = {
|
||||||
device.boot = {
|
defaultOutput = "directory";
|
||||||
loadAddress = "0x80060000";
|
loadAddress = "0x80060000";
|
||||||
entryPoint = "0x80060000";
|
entryPoint = "0x80060000";
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,11 +23,9 @@
|
||||||
in {
|
in {
|
||||||
device = {
|
device = {
|
||||||
defaultOutput = "directory";
|
defaultOutput = "directory";
|
||||||
boot = {
|
|
||||||
loadAddress = "0x80000000";
|
loadAddress = "0x80000000";
|
||||||
entryPoint = "0x80000000";
|
entryPoint = "0x80000000";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
kernel = {
|
kernel = {
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
|
|
|
@ -23,11 +23,9 @@
|
||||||
in {
|
in {
|
||||||
device = {
|
device = {
|
||||||
defaultOutput = "directory";
|
defaultOutput = "directory";
|
||||||
boot = {
|
|
||||||
loadAddress = "0x80000000";
|
loadAddress = "0x80000000";
|
||||||
entryPoint = "0x80000000";
|
entryPoint = "0x80000000";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
kernel = {
|
kernel = {
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
|
|
|
@ -29,28 +29,28 @@ in {
|
||||||
default = "true";
|
default = "true";
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
} ;
|
} ;
|
||||||
dts = mkOption { type = types.string; };
|
dts = mkOption { type = types.path; };
|
||||||
config = mkOption {
|
config = mkOption {
|
||||||
# mostly the values are y n or m, but sometimes
|
# mostly the values are y n or m, but sometimes
|
||||||
# other strings are also used
|
# other strings are also used
|
||||||
type = types.attrsOf types.nonEmptyStr;
|
type = types.attrsOf types.nonEmptyStr;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
boot.commandLine = mkOption {
|
|
||||||
type = types.listOf types.nonEmptyStr;
|
|
||||||
};
|
|
||||||
groups = mkOption {
|
groups = mkOption {
|
||||||
type = types.attrsOf types.anything;
|
type = types.attrsOf types.anything;
|
||||||
};
|
};
|
||||||
users = mkOption {
|
users = mkOption {
|
||||||
type = types.attrsOf types.anything;
|
type = types.attrsOf types.anything;
|
||||||
};
|
};
|
||||||
device = {
|
boot.commandLine = mkOption {
|
||||||
defaultOutput = mkOption {
|
type = types.listOf types.nonEmptyStr;
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
|
device.defaultOutput = mkOption {
|
||||||
type = types.nonEmptyStr;
|
type = types.nonEmptyStr;
|
||||||
};
|
};
|
||||||
boot = mkOption { type = types.any; };
|
device.loadAddress = mkOption { default = null; };
|
||||||
};
|
device.entryPoint = mkOption { };
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
defaultProfile.packages = with pkgs;
|
defaultProfile.packages = with pkgs;
|
||||||
|
|
Loading…
Reference in a new issue