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)
|
||||
or (2) add NBD support so I can iterate on a real device without
|
||||
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 {}) {
|
||||
commandLine = concatStringsSep " " config.boot.commandLine;
|
||||
inherit (device.boot) loadAddress entryPoint;
|
||||
inherit (config.device) loadAddress entryPoint;
|
||||
inherit kernel;
|
||||
inherit dtb;
|
||||
};
|
||||
|
@ -80,8 +80,9 @@ let
|
|||
ln -s ${manifest} manifest
|
||||
ln -s ${kernel.headers} build
|
||||
'' +
|
||||
(if device ? boot then ''
|
||||
ln -s ${uimage} uimage
|
||||
(if config.device.loadAddress != null then
|
||||
''
|
||||
ln -s {uimage} uimage
|
||||
${if phram then "ln -s ${boot-scr} boot.scr" else ""}
|
||||
ln -s ${boot-scr} flash.scr
|
||||
'' else ""));
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
hash = "sha256-YYi4gkpLjbOK7bM2MGQjAyEBuXJ9JNXoz/JEmYf8xE8=";
|
||||
};
|
||||
in {
|
||||
device.defaultOutput = "directory";
|
||||
device.boot = {
|
||||
device = {
|
||||
defaultOutput = "directory";
|
||||
loadAddress = "0x80060000";
|
||||
entryPoint = "0x80060000";
|
||||
};
|
||||
|
|
|
@ -23,10 +23,8 @@
|
|||
in {
|
||||
device = {
|
||||
defaultOutput = "directory";
|
||||
boot = {
|
||||
loadAddress = "0x80000000";
|
||||
entryPoint = "0x80000000";
|
||||
};
|
||||
loadAddress = "0x80000000";
|
||||
entryPoint = "0x80000000";
|
||||
};
|
||||
|
||||
kernel = {
|
||||
|
|
|
@ -23,10 +23,8 @@
|
|||
in {
|
||||
device = {
|
||||
defaultOutput = "directory";
|
||||
boot = {
|
||||
loadAddress = "0x80000000";
|
||||
entryPoint = "0x80000000";
|
||||
};
|
||||
loadAddress = "0x80000000";
|
||||
entryPoint = "0x80000000";
|
||||
};
|
||||
|
||||
kernel = {
|
||||
|
|
|
@ -29,28 +29,28 @@ in {
|
|||
default = "true";
|
||||
type = types.lines;
|
||||
} ;
|
||||
dts = mkOption { type = types.string; };
|
||||
dts = mkOption { type = types.path; };
|
||||
config = mkOption {
|
||||
# mostly the values are y n or m, but sometimes
|
||||
# other strings are also used
|
||||
type = types.attrsOf types.nonEmptyStr;
|
||||
};
|
||||
};
|
||||
boot.commandLine = mkOption {
|
||||
type = types.listOf types.nonEmptyStr;
|
||||
};
|
||||
groups = mkOption {
|
||||
type = types.attrsOf types.anything;
|
||||
};
|
||||
users = mkOption {
|
||||
type = types.attrsOf types.anything;
|
||||
};
|
||||
device = {
|
||||
defaultOutput = mkOption {
|
||||
type = types.nonEmptyStr;
|
||||
};
|
||||
boot = mkOption { type = types.any; };
|
||||
boot.commandLine = mkOption {
|
||||
type = types.listOf types.nonEmptyStr;
|
||||
default = [];
|
||||
};
|
||||
device.defaultOutput = mkOption {
|
||||
type = types.nonEmptyStr;
|
||||
};
|
||||
device.loadAddress = mkOption { default = null; };
|
||||
device.entryPoint = mkOption { };
|
||||
};
|
||||
config = {
|
||||
defaultProfile.packages = with pkgs;
|
||||
|
|
Loading…
Reference in a new issue