R-Car/Boards/Yocto-Gen3-CommonFAQ/How to use upstream kernel on R-Car Gen3 Starter Kit.

From eLinux.org
< R-Car‎ | Boards/Yocto-Gen3-CommonFAQ
Revision as of 03:32, 18 September 2020 by Y.H. (talk | contribs) (separate renesas repository from this page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How to use upstream kernel on R-Car Gen3 Starter Kit.

By replacing with upstream kernel/dtb, it 's enabled to boot it on Starter Kit.
Below is how to build upstream kernel.

  1. Preparing aarch64 cross-compiler
    It is enough to execute one of the following:
    1. Using gcc-aarch64-linux-gnu
      sudo apt install g++-aarch64-linux-gnu
      export CROSS_COMPILE=aarch64-linux-gnu-
      export ARCH=arm64
      
    2. Using Yocto SDK
      Please refer to the R-Car/Boards/Yocto-Gen3##Build_SDK to install SDK.
      source /opt/poky/x.y.z/environment-setup-aarch64-poky-linux
      
    3. Using other cross compiler(ex. linaro, kernel.org and so on)
      Set environment variable "CROSS_COMPILE" and "ARCH":
      export CROSS_COMPILE=<path/to/compiler>/<compiler_prefix>
      export ARCH=arm64
      
  2. Build kernel
    1. Build kernel of linus's repository
      git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
      cd linux
      make defconfig
      make
      
    2. Build linux stable kernel
      git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
      cd renesas-devel
      git checkout -b tmp <branch name> # ex.) linux-5.8.y, linux-4.19.y and so on.
      make renesas_defconfig
      make
      

See also: