1 (edited by rak[1] 2015-05-02 02:12:23)

Topic: my kernel compilation experience

upon playing with my novena i realized there is something i ought to do.

-my goal-

set up nat with iptables to connect to usbamrory module over usb0 through ssh

-my discovery-

ip_tables module does not exist, need to compile in to kernel as module

-my steps-

git clone https://github.com/xobs/novena-linux
cd novena-linux
git checkout v3.17-rc5-novena-vivante
zcat /proc/config.gz > .config
make menuconfig
make
make modules_install
cp arch/arm/boot/zImage /boot/zimage
cp arch/arm/boot/dts/imx6q-novena.dtb /boot/novena.dtb

----------------------------------------------
|git clone #see url above|
----------------------------------------------
^ clone xobs's repository for novena-linux kernel
---------------
|cd novena-linux|
---------------
^ change current path to novena-linux directory
-------------------------------------
|git checkout v3.17-rc5-novena-vivante|
-------------------------------------
^ switch to stable branch ;asked xobs in #kosagi, this was known stable branch
------------------------------
|zcat /proc/config.gz > .config|
------------------------------
^ copy the contents of the current running kernel's configuration file and pipe it to .config
---------------
|make menuconfig|
---------------
^ use ncurses interface editing adding kernel configuration ;added modules for ip_tables/nat
----
|make|
----
^ compile all the things ;kernel, modules, and device-tree
--------------------
|make modules_install|
--------------------
^ install kernel modules
------------------------------------
|cp arch/arm/boot/zImage /boot/zimage|
------------------------------------
^ install kernel image
------------------------------------------------------
|cp arch/arm/boot/dts/imx6q-novena.dtb /boot/novena.dtb|
------------------------------------------------------
^ install device tree

-my reboot-

successful boot && able to connect to usbarmory over usb0 through ssh

-my summary-

all in all, the process was fun. i learned a few new things and experienced great help from the community.
hopefully in time i can give back much more.
this post is intended to give insight to others whom may be interested in reconfiguration of their kernel.

-my postscript-

    the kernel source branches, find a stable one
    if you need help, ask in irc or on forums
    make a backup of your kernel configuraton and kernel and device-tree
    the user button will boot the recovery image in case of a borked kernel reconfiguration

Re: my kernel compilation experience

Thanks for the post, and concise explanations. A couple hours, a hotter novena and I have my BTRFS support compiled in.

3 (edited by honos 2015-04-27 18:34:46)

Re: my kernel compilation experience

NATing is now working.
USBArmory can *now* get to the Net via the Novena.

Thanks for sharing the recipe.

Re: my kernel compilation experience

An update: To get the kernel config that we ship with, run "make novena_defconfig" instead of taking /proc/config.gz.  Either way will work, though.

If cross-compiling, add "ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-" to the "make" commands.