You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.1 KiB
Nix

{ lib
, common_amd64
}:
{
overlays = common_amd64.overlays ++ [(final: prev: {
platform_name = "am1i";
kernel =
final.lib.makeOverridable (prev.kernel.override {
config = ./linux.config;
buildTargets = [ "bzImage" ];
}).overrideAttrs (a: {
postInstall = (a.postInstall or "") + ''
cp arch/x86_64/boot/bzImage $out/
'';
});
console-device = "ttyS1";
image = prev.image.override {
payload = "${final.kernel}/bzImage";
};
coreboot = (prev.coreboot.override {
iasl = final.iasl_20180531;
coreboot-toolchain = with final.coreboot-toolchain; [ x64 i386 ];
fmap = ./custom.fmap;
config = with lib.kernel; {
CBFS_PREFIX = lib.mkForce (freeform "prefix");
VENDOR_ASUS = lib.mkForce yes;
BOARD_ASUS_AM1I_A = lib.mkForce yes;
COREBOOT_ROMSIZE_KB_16384 = lib.mkForce yes;
COREBOOT_ROMSIZE_KB = lib.mkForce (freeform (toString (16 * 1024)));
ROM_SIZE = lib.mkForce (freeform "0x1000000");
CBFS_SIZE = lib.mkForce (freeform "0x7FFAC8");
CONSOLE_CBMEM = lib.mkForce no;
DRIVERS_INTEL_WIFI = lib.mkForce no;
HUDSON_XHCI_ENABLE = lib.mkForce no;
ON_DEVICE_ROM_LOAD = lib.mkForce no;
POST_DEVICE = lib.mkForce no;
POST_IO = lib.mkForce no;
DEFAULT_CONSOLE_LOGLEVEL = lib.mkForce (freeform "7");
ONBOARD_VGA_IS_PRIMARY = lib.mkForce yes;
MAINBOARD_SMBIOS_MANUFACTURER = lib.mkForce (freeform "ASUS");
MAINBOARD_SMBIOS_PRODUCT_NAME = lib.mkForce (freeform "AM1I-A");
};
uart-for-console =
if final.console-device == "ttyS0" then 0 # IDC ribbon-cable header on the motherboarod
else if final.console-device == "ttyS1" then 1 # DB9 connector on rear I/O panel; omitted from some board variants
else if final.console-device == null then null
else throw "am1i currently supports only `null` and `ttyS{0,1}` for `console-device`";
}).overrideAttrs (a: {
postInstall = (a.postInstall or "") + ''
cp src/mainboard/asus/am1i-a/cmos.layout $out/
'';
});
})];
}