Difference between revisions of "R-Car/Boards/Yocto-Gen3-CommonFAQ/How to use upstream kernel on R-Car Gen3 Starter Kit."
(Add categories) |
(separate renesas repository from this page) |
||
Line 4: | Line 4: | ||
# Preparing aarch64 cross-compiler | # Preparing aarch64 cross-compiler | ||
− | #: | + | #: It is enough to execute one of the following: |
− | # | + | ## Using gcc-aarch64-linux-gnu |
− | #: Please refer to the [[R-Car/Boards/Yocto-Gen3#Build_SDK]] | + | ##: <syntaxhighlight lang=bash> |
− | # | + | sudo apt install g++-aarch64-linux-gnu |
− | #:<syntaxhighlight lang=bash> | + | export CROSS_COMPILE=aarch64-linux-gnu- |
− | + | export ARCH=arm64 | |
− | # git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git | + | </syntaxhighlight> |
+ | ## Using Yocto SDK | ||
+ | ##: Please refer to the [[R-Car/Boards/Yocto-Gen3##Build_SDK]] to install SDK. | ||
+ | ##: <syntaxhighlight lang=bash> | ||
+ | source /opt/poky/x.y.z/environment-setup-aarch64-poky-linux | ||
+ | </syntaxhighlight> | ||
+ | ## Using other cross compiler(ex. [https://releases.linaro.org/components/toolchain/binaries/ linaro], [https://mirrors.edge.kernel.org/pub/tools/crosstool/ kernel.org] and so on) | ||
+ | ##: Set environment variable "CROSS_COMPILE" and "ARCH": | ||
+ | ##: <syntaxhighlight lang=bash> | ||
+ | export CROSS_COMPILE=<path/to/compiler>/<compiler_prefix> | ||
+ | export ARCH=arm64 | ||
+ | </syntaxhighlight> | ||
+ | # Build kernel | ||
+ | ## Build kernel of linus's repository | ||
+ | ##: <syntaxhighlight lang=bash> | ||
+ | git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git | ||
cd linux | cd linux | ||
− | + | make defconfig | |
− | make | + | make |
− | make | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | # | + | ## Build linux stable kernel |
− | #:<syntaxhighlight lang=bash> | + | ##: <syntaxhighlight lang=bash> |
− | git clone git://git.kernel.org/pub/scm/linux/kernel/git/ | + | 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 | + | make |
− | make | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 03:32, 18 September 2020
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.
- Preparing aarch64 cross-compiler
- It is enough to execute one of the following:
- Using gcc-aarch64-linux-gnu
sudo apt install g++-aarch64-linux-gnu export CROSS_COMPILE=aarch64-linux-gnu- export ARCH=arm64
- 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
- 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
- Build kernel
- 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
- 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
- Build kernel of linus's repository
See also: