/
android.nix
34 lines (32 loc) · 1004 Bytes
/
android.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# What?
# =====
#
# Allows producing android boot.img for this tablet.
# Using kernelflinger from the vendor, this allows booting using
# the android boot flow, but more importantly, using `fastboot boot`.
{ lib, baseModules, modules, ... }:
let
# FIXME: Do not rely on NIX_PATH here
android = (import <mobile-nixos/lib/eval-config.nix> {
inherit baseModules;
modules = modules ++ [{
mobile.system.android = {
boot_as_recovery = false;
has_recovery_partition = true;
bootimg.flash = {
offset_base = "0x10000000";
offset_kernel = "0x00008000";
offset_ramdisk = "0x01000000";
offset_second = "0x00f00000";
offset_tags = "0x00000100";
pagesize = "2048";
};
};
mobile.system.type = lib.mkForce "android";
}];
});
in
{
system.build.android-bootimg = android.config.system.build.android-bootimg;
system.build.android-recovery = android.config.system.build.android-recovery;
}