How to set up build environment for building kernel ?

Dear Sir,
I have installed ubuntu14.04 -64bit on virtual machine, would you please tell me how to set up the build
environment for kernel building , is there any guide document? Thanks!

I want build kernel driver on TX2 board, the OS in TX2 is using

L4T document -> Kernel Customization

Beware that a VM is usually a problem when flashing or using it for package install. You may have to spend a lot of time figuring out how to configure the VM.

Thanks a lot!

I have built kernel and dtb success ,but I don’t know which dtb will be used on TX2 board, the dtb files are as follows:

ddot tegra186-quill-p3310-1000-a00-00-dsi-hdmi-dp.dtb
tegra186-quill-p3310-1000-a00-00-ape-cam.dtb tegra186-quill-p3310-1000-a00-00-edp.dtb
tegra186-quill-p3310-1000-a00-00-base.dtb tegra186-quill-p3310-1000-a00-00-imx274.dtb
tegra186-quill-p3310-1000-a00-00-base-mods-display.dtb tegra186-quill-p3310-1000-a00-00-no-rtcpu.dtb
tegra186-quill-p3310-1000-a00-00-dsi-dp.dtb tegra186-quill-p3310-1000-c03-00-base.dtb

Which one is for TX2 ?

tegra186-quill-p3310-1000-c03-00-base.dtb for default board configuration.

I want to delete sdmmc card write protect feature , where to change in dtsi file?