mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2025-01-07 12:11:28 +03:00
hardware-allwinner: Configure initial gap
This commit is contained in:
parent
df75b6debd
commit
ad4c5f811a
@ -2,7 +2,14 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf mkMerge mkOption types;
|
inherit (lib) mkIf mkMerge mkOption types;
|
||||||
|
inherit (pkgs) imageBuilder;
|
||||||
cfg = config.mobile.hardware.socs;
|
cfg = config.mobile.hardware.socs;
|
||||||
|
initialGapSize =
|
||||||
|
# Start of the "magic" location bs=1024 seek=8
|
||||||
|
(imageBuilder.size.MiB 8) +
|
||||||
|
# Current u-boot size: 483K, so let's leave a *bunch* of room.
|
||||||
|
(imageBuilder.size.MiB 2)
|
||||||
|
;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.mobile = {
|
options.mobile = {
|
||||||
@ -22,13 +29,19 @@ in
|
|||||||
{
|
{
|
||||||
mobile = mkIf cfg.allwinner-a64.enable {
|
mobile = mkIf cfg.allwinner-a64.enable {
|
||||||
system.system = "aarch64-linux";
|
system.system = "aarch64-linux";
|
||||||
quirks.u-boot.soc.family = "allwinner";
|
quirks.u-boot = {
|
||||||
|
soc.family = "allwinner";
|
||||||
|
inherit initialGapSize;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mobile = mkIf cfg.allwinner-r18.enable {
|
mobile = mkIf cfg.allwinner-r18.enable {
|
||||||
system.system = "aarch64-linux";
|
system.system = "aarch64-linux";
|
||||||
quirks.u-boot.soc.family = "allwinner";
|
quirks.u-boot = {
|
||||||
|
soc.family = "allwinner";
|
||||||
|
inherit initialGapSize;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user