You can apply the change if you login again or import
to apply this change, login again or evaluate $HOME/.bashrc with source command.

$ source ~/.bashrc

You can check if the toolchain installed above works properly while checking the version of toolchain. If you can find gcc version 6.3.1 20170109 at the end of the line, the toolchain is well installed.

Please delete the last line as below in 'drivers/amlogic/wifi/Kconfig' file if you will build only Android Linux kernel.

source “../hardware/wifi/realtek/drivers/8192cu/rtl8xxx_CU/Kconfig”

You must do kernel configuration for ODROID-N2, then start to build. Adding -j option on make command will help you to finish compiling faster.

$ make odroidn2_defconfig
$ make[-j4] Image modules dtbs

You have done to compile the Linux kernel (Image), the device tree file (.dtb) and kernel modules (.ko).

Custom Kernel Build

If you have some kernel drivers wish to include for your custom build, you can select the drivers easily in Linux kernel tree. make menuconfig will show you text based menus help you to select kernel drivers.

$ make menuconfig

Once you done selecting the drivers, exit from the menu screen. Then you can start kernel build with make again.

$ make[-j4] Image modules

When you exit from kernel menu screen, you will have .config in the current directory what have changes for your custom build. You can back up this as a file, my_kernel.config for example, or can make a patch if you manage your own git.

Installation

There are different instructions to install Linux kernel image and device tree for Android and Linux. Since Android loads both from a boot partition, we have to use fastboot to install into the dedicated partition. Please refer the partition table from here. In contrast, Linux boots by the instructions described in boot.ini the 1st FAT partition.

Android

This is the instruction to install kernel image, Image, to the boot card.
You should build boot image via android repo because boot iamge consist of root ramdisk and kernel image.
On the android build root directory.

$ make bootimage

This is to install boot image that include kernel image.

$ fastboot flash boot out/target/product/odroidn2/boot.img

This is to install a device tree file, meson64_odroidn2.dtb.

$ fastboot flash dtb <path/of/your/meson64_odroidn2.dtb>

Linux

This explanation assume that your USB memory CARD reader is assigned at /dev/sdc. Be careful!