Linux kernel: Difference between revisions

imported>Khoi
No edit summary
imported>Khoi
No edit summary
Line 136: Line 136:


== Embedded Linux Cross-compile xconfig and menuconfig ==
== Embedded Linux Cross-compile xconfig and menuconfig ==
This section details the on how to get an environment that can be used to configure and cross-compile the kernel for embedded Linux development. The kernel source won't come from nix unpack phase but rather gotten externally(such as from the chip vendor github). So first clone the kernel source, then use the shell.nix below will to set up the dev environment(example below is for aarch64):
This section details the on how to get an environment that can be used to configure and cross-compile the kernel for embedded Linux development. The kernel source won't come from nix unpack phase but rather gotten externally(such as from the chip vendor github). So first clone the kernel source, then use the shell.nix below to set up the dev environment(example below is for aarch64):


<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
let
let
   pkgs = import <nixpkgs> { };
   pkgs = import <nixpkgs> { };
  aarch64Pkgs = import <nixpkgs> {
    crossSystem = {
      config = "aarch64-unknown-linux-gnu";
    };
  };
in
in
(pkgs.buildFHSUserEnv {
(pkgs.buildFHSUserEnv {