Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] kernel: attempt to rerun unpackPhase if sthg fishy (e.g. buildRoot unset) #31463

Closed
wants to merge 17 commits into from

Commits on Nov 30, 2017

  1. kernel: attempt to rerun unpackPhase if sthg fishy

    When trying to compile/hack the kernel, it would keep asking me to
    generate the .config file. That was because I had skipped the
    unpackPhase. Also if one exit the nix-shell (voluntarely or because of
    	an error) and wants to resume the configure phase, it would fail
    because '$buildRoot' is not set; it is set during the unpackPhase.
    
    My tackle on that is that there is a great chance the nix-shell was resumed from the unpacked folder.
    Then the configurePhase sets the buildRoot accordingly.
    I could have done it via a preConfigure hook but either way the current
    situation is not good since one doesn"t know why he is asked to generate
    the config. Dying with a message "set $buildRoot" could be an option.
    teto committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    e7018d3 View commit details
    Browse the repository at this point in the history
  2. fixes for nix-shell

    teto committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    4a55e65 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    26293f3 View commit details
    Browse the repository at this point in the history
  4. trying to be more flexible about config generation suing functions/sh…

    …ell etc wip in pkgs/os-specific/linux/kernel/config.nix
    teto committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    344475c View commit details
    Browse the repository at this point in the history
  5. wip

    teto committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    a0d1261 View commit details
    Browse the repository at this point in the history
  6. wip

    teto committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    c2818df View commit details
    Browse the repository at this point in the history
  7. it still does an unpack for the config

    ===========
    En gros on a linux_mptcp = callPackage generic.nix (linux_mptcp.nix)
    generic.nix fait appel a buildLinux qui est defini dans manual-config.nix
    generic.nix importe aussi kernelPlatform: import ./common-config.nix
    
    extraConfig (optional) is a string specifying extra options to be concatenated to the kernel configuration file (.config)
    ===========
    
    kernelPatches is a set of
      bridge_stp_helper =
        { name = "bridge-stp-helper";
          patch = ./bridge-stp-helper.patch;
        };
    
    'make oldconfig' It reads the existing .config file and prompts the user for options in the current kernel source that are not found in the file. This is useful when taking an existing configuration and moving it to a new kernel
    
    configfile est un chemin vers le fichier au format '.config' tandis que 'config'
      pcBase = {
        name = "pc";
        kernelHeadersBaseConfig = "defconfig";
        kernelBaseConfig = "defconfig";
        # Build whatever possible as a module, if not stated in the extra config.
        kernelAutoModules = true;
        kernelTarget = "bzImage";
      };
    
      pc64 = pcBase // { kernelArch = "x86_64"; };
    
     kernelTargets
    
        kernelExtraConfig =
          ''
            # Ubi for the mtd
            MTD_UBI y
            UBIFS_FS y
            UBIFS_FS_XATTR y
            UBIFS_FS_ADVANCED_COMPR y
            UBIFS_FS_LZO y
            UBIFS_FS_ZLIB y
            UBIFS_FS_DEBUG n
          '';
    
    dans la phase de build du noyau
    make -C ../$sourceRoot O=$PWD $kernelBaseConfig ARCH=$arch
    
    warning: dumping very large path (> 256 MiB); this may run out of memory
    
     Using .. as source for kernel
    teto committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    8e7296d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ab67f6b View commit details
    Browse the repository at this point in the history
  9. Wouldn't it be simpler to:

    - merge config/kernel and have a stopAtConfig boolean ?
    - override src of config ?
    - have 2 different configs ? embedded/inplace
    teto committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    452d9ec View commit details
    Browse the repository at this point in the history
  10. wip'

    teto committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    338fc22 View commit details
    Browse the repository at this point in the history
  11. use absolute paths in builder

    fixed perl script. this works in nix-shell but now fails with nix-build,
          aka nixops fails .
    teto committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    56886ab View commit details
    Browse the repository at this point in the history
  12. fixed callPacakge ?

    teto committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    70f08d0 View commit details
    Browse the repository at this point in the history
  13. Kinda works but ignores the custom platform because it is to be used …

    …for crossplatform comiplation only
    teto committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    dda2528 View commit details
    Browse the repository at this point in the history
  14. adding VIRTIO_PCI for nixops

    teto committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    7e5673d View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2017

  1. Configuration menu
    Copy the full SHA
    17f41a1 View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2017

  1. wip

    teto committed Dec 3, 2017
    Configuration menu
    Copy the full SHA
    ad522f1 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2017

  1. reverted some platform changes

    teto committed Dec 4, 2017
    Configuration menu
    Copy the full SHA
    8a2a39f View commit details
    Browse the repository at this point in the history