linux_chromiumos_3_18: init at 3.18.0

Co-authored-by: Nikolay Amiantov <ab@fmap.me>

Al Zohali ee9e7b72 9237faad

+193 -1
+48
pkgs/os-specific/linux/kernel/chromiumos-patches/fix-double-Kconfig-entry-3.18.patch
··· 1 + diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig 2 + index 48398b4..0e37f7d 100644 3 + --- a/drivers/base/Kconfig 4 + +++ b/drivers/base/Kconfig 5 + @@ -198,30 +198,6 @@ config DEV_COREDUMP 6 + default y if WANT_DEV_COREDUMP 7 + depends on ALLOW_DEV_COREDUMP 8 + 9 + -config WANT_DEV_COREDUMP 10 + - bool 11 + - help 12 + - Drivers should "select" this option if they desire to use the 13 + - device coredump mechanism. 14 + - 15 + -config ALLOW_DEV_COREDUMP 16 + - bool "Allow device coredump" if EXPERT 17 + - default y 18 + - help 19 + - This option controls if the device coredump mechanism is available or 20 + - not; if disabled, the mechanism will be omitted even if drivers that 21 + - can use it are enabled. 22 + - Say 'N' for more sensitive systems or systems that don't want 23 + - to ever access the information to not have the code, nor keep any 24 + - data. 25 + - 26 + - If unsure, say Y. 27 + - 28 + -config DEV_COREDUMP 29 + - bool 30 + - default y if WANT_DEV_COREDUMP 31 + - depends on ALLOW_DEV_COREDUMP 32 + - 33 + config DEBUG_DRIVER 34 + bool "Driver Core verbose debug messages" 35 + depends on DEBUG_KERNEL 36 + diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig 37 + index 58154a9..53a0d73 100644 38 + --- a/drivers/mfd/Kconfig 39 + +++ b/drivers/mfd/Kconfig 40 + @@ -81,7 +81,7 @@ config MFD_AXP20X 41 + 42 + config MFD_CROS_EC 43 + tristate "Support ChromeOS Embedded Controller" 44 + - depends on MFD_CORE 45 + + select MFD_CORE 46 + help 47 + If you say Y here you get support for the ChromeOS Embedded 48 + Controller (EC) providing keyboard, battery and power services.
+62 -1
pkgs/os-specific/linux/kernel/common-config.nix
··· 147 147 148 148 # Video configuration. 149 149 # Enable KMS for devices whose X.org driver supports it. 150 - ${optionalString (versionOlder version "4.3") '' 150 + ${optionalString (versionOlder version "4.3" && !(features.chromiumos or false)) '' 151 151 DRM_I915_KMS y 152 152 ''} 153 153 # Allow specifying custom EDID on the kernel command line ··· 502 502 503 503 # Disable the firmware helper fallback, udev doesn't implement it any more 504 504 FW_LOADER_USER_HELPER_FALLBACK? n 505 + 506 + # ChromiumOS support 507 + ${optionalString (features.chromiumos or false) '' 508 + CHROME_PLATFORMS y 509 + VGA_SWITCHEROO n 510 + MMC_SDHCI_PXAV2 n 511 + NET_IPVTI n 512 + IPV6_VTI n 513 + REGULATOR_FIXED_VOLTAGE n 514 + TPS6105X n 515 + CPU_FREQ_STAT y 516 + IPV6 y 517 + MFD_CROS_EC y 518 + MFD_CROS_EC_LPC y 519 + MFD_CROS_EC_DEV y 520 + CHARGER_CROS_USB_PD y 521 + I2C y 522 + MEDIA_SUBDRV_AUTOSELECT n 523 + VIDEO_IR_I2C n 524 + BLK_DEV_DM y 525 + ANDROID_PARANOID_NETWORK n 526 + DM_VERITY n 527 + DRM_VGEM n 528 + CPU_FREQ_GOV_INTERACTIVE n 529 + INPUT_KEYRESET n 530 + DM_BOOTCACHE n 531 + UID_CPUTIME n 532 + 533 + ${optionalString (versionAtLeast version "3.18") '' 534 + CPUFREQ_DT n 535 + EXTCON_CROS_EC n 536 + DRM_POWERVR_ROGUE n 537 + CHROMEOS_OF_FIRMWARE y 538 + TEST_RHASHTABLE n 539 + BCMDHD n 540 + TRUSTY n 541 + ''} 542 + 543 + ${optionalString (versionOlder version "3.18") '' 544 + MALI_MIDGARD n 545 + DVB_USB_DIB0700 n 546 + DVB_USB_DW2102 n 547 + DVB_USB_PCTV452E n 548 + DVB_USB_TTUSB2 n 549 + DVB_USB_AF9015 n 550 + DVB_USB_AF9035 n 551 + DVB_USB_ANYSEE n 552 + DVB_USB_AZ6007 n 553 + DVB_USB_IT913X n 554 + DVB_USB_LME2510 n 555 + DVB_USB_RTL28XXU n 556 + USB_S2255 n 557 + VIDEO_EM28XX n 558 + VIDEO_TM6000 n 559 + USB_DWC2 n 560 + USB_GSPCA n 561 + SPEAKUP n 562 + XO15_EBOOK n 563 + USB_GADGET n 564 + ''} 565 + ''} 505 566 506 567 ${kernelPlatform.kernelExtraConfig or ""} 507 568 ${extraConfig}
+19
pkgs/os-specific/linux/kernel/genksyms-fix-segfault.patch
··· 1 + diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c 2 + index 88632df..ba6cfa9 100644 3 + --- a/scripts/genksyms/genksyms.c 4 + +++ b/scripts/genksyms/genksyms.c 5 + @@ -233,11 +233,11 @@ static struct symbol *__add_symbol(const char *name, enum symbol_type type, 6 + free_list(last_enum_expr, NULL); 7 + last_enum_expr = NULL; 8 + enum_counter = 0; 9 + - if (!name) 10 + - /* Anonymous enum definition, nothing more to do */ 11 + - return NULL; 12 + } 13 + 14 + + if (!name) 15 + + return NULL; 16 + + 17 + h = crc32(name) % HASH_BUCKETS; 18 + for (sym = symtab[h]; sym; sym = sym->hash_next) { 19 + if (map_to_ns(sym->type) == map_to_ns(type) &&
+21
pkgs/os-specific/linux/kernel/linux-chromiumos-3.18.nix
··· 1 + { stdenv, fetchgit, perl, buildLinux, ncurses, ... } @ args: 2 + 3 + import ./generic.nix (args // rec { 4 + version = "3.18.0"; 5 + extraMeta.branch = "3.18"; 6 + 7 + src = fetchgit { 8 + url = "https://chromium.googlesource.com/chromiumos/third_party/kernel"; 9 + rev = "3179ec7e3f07fcc3ca35817174c5fc6584030ab3"; 10 + sha256 = "0hfa97fs216x8q20fsmw02kvf6mw6c6zczfjk2bpym6v7zxdzj28"; 11 + }; 12 + 13 + features.iwlwifi = true; 14 + features.efiBootStub = true; 15 + features.needsCifsUtils = true; 16 + features.canDisableNetfilterConntrackHelpers = true; 17 + features.netfilterRPFilter = true; 18 + features.chromiumos = true; 19 + 20 + extraMeta.hydraPlatforms = []; 21 + } // (args.argsOverride or {}))
+15
pkgs/os-specific/linux/kernel/patches.nix
··· 103 103 patch = ./crc-regression.patch; 104 104 }; 105 105 106 + genksyms_fix_segfault = 107 + { name = "genksyms-fix-segfault"; 108 + patch = ./genksyms-fix-segfault.patch; 109 + }; 110 + 111 + 112 + chromiumos_Kconfig_fix_entries_3_18 = 113 + { name = "Kconfig_fix_entries_3_18"; 114 + patch = ./chromiumos-patches/fix-double-Kconfig-entry-3.18.patch; 115 + }; 116 + 117 + chromiumos_no_link_restrictions = 118 + { name = "chromium-no-link-restrictions"; 119 + patch = ./chromiumos-patches/no-link-restrictions.patch; 120 + }; 106 121 }
+13
pkgs/top-level/all-packages.nix
··· 10057 10057 ]; 10058 10058 }; 10059 10059 10060 + linux_chromiumos_3_18 = callPackage ../os-specific/linux/kernel/linux-chromiumos-3.18.nix { 10061 + kernelPatches = [ kernelPatches.chromiumos_Kconfig_fix_entries_3_18 10062 + kernelPatches.chromiumos_no_link_restrictions 10063 + kernelPatches.genksyms_fix_segfault 10064 + ]; 10065 + }; 10066 + 10067 + linux_chromiumos_latest = linux_chromiumos_3_18; 10068 + 10060 10069 /* grsec configuration 10061 10070 10062 10071 We build several flavors of 'default' grsec kernels. These are ··· 10243 10252 linuxPackages_grsec_testing_desktop = grPackage grFlavors.linux_grsec_testing_desktop; 10244 10253 linuxPackages_grsec_testing_server = grPackage grFlavors.linux_grsec_testing_server; 10245 10254 linuxPackages_grsec_testing_server_xen = grPackage grFlavors.linux_grsec_testing_server_xen; 10255 + 10256 + # ChromiumOS kernels 10257 + linuxPackages_chromiumos_3_18 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_chromiumos_3_18 linuxPackages_chromiumos_3_18); 10258 + linuxPackages_chromiumos_latest = recurseIntoAttrs (linuxPackagesFor pkgs.linux_chromiumos_latest linuxPackages_chromiumos_latest); 10246 10259 10247 10260 # A function to build a manually-configured kernel 10248 10261 linuxManualConfig = pkgs.buildLinux;