Q : How to Compile Kernel in Ubuntu
Q : Latest Kernel Compilation step's in Ubuntu
Q : Atheros 5Ghz AP Channel Enable
Q : Kernel Compile for Artheros Wifi Card to Allow 5Ghz Frequency on AP Mode
Step 1 Install compulsory packagessudo apt-get updatesudo apt-get install linux-source fakeroot kernel-wedge build-essentialStep 2 Install Dependencysudo apt-get install git-core libncurses5 libncurses5-dev libelf-dev asciidocsudo apt-get install binutils-dev crash kexec-tools makedumpfile kernel-wedgesudo apt-get install libssl-dev bc debhelper kernel-package libc6-dev
Step 3 Download Kernel for kernel.org ( you can download latest kernel )cd /usr/srcwget ftp://ftp.kernel.org/pub/linux/kernel/v4.x/linux-4.8.4.tar.gz tar xvf linux-4.8.4.tar.gzOptional Steps : It's Required a approx 30-60GB disk space, if you don't have just mount external disk by following steps, best to create directory with kernel namemkdir /usr/src/linux-4.8.4mount /dev/sdb2 /usr/src/linux-4.8.4here /dev/sdb2 is external hdd, and extract tar on ittar xvf linux-4.8.4.tar.gz -C /usr/src/linux-4.8.4/Step 4 and 5, if you don’t need 5ghz access point channel for Atheros WIFI
Card, avoid step 4 and 5 Step 4 Download Patch for wifi 5ghz frequencycd /usr/src/linux-4.8.4/drivers/net/wireless/ath/ wget --no-check- certificate https://dev.openwrt.org/export/32952/trunk/ package/mac80211/patches/403-ath_regd_optional.patchStep 5 Apply Patchpatch -Np5 -i 403-ath_regd_optional.patch echo "#define ATH_USER_REGD 1"|cat - regd.c > /tmp/out && mv /tmp/out regd.cStep 6 Create .config file and make oldconfigcd /usr/src/linux-4.8.4/ cp /boot/config-$(uname -r) .config make oldconfig
Note: choose default option just hit the enter on every prompt or choose according your need.. Step 7 Compile, make and create .deb filefakeroot make-kpkg --initrd --append-to-version=-linuxtopic kernel-image kernel-headersOR
fakeroot make -j5 deb-pkg LOCALVERSION=-linuxtopic KDEB_PKGVERSION=1 Note: Wait approx 1 to 10 hour Step 8 check .deb and Install Kernells ../*.deb dpkg -i ../*.deb