0

I have xillinux OS (based on ubunutu 12.04.LTS) installed on my hardware (ZYNQ FPGA Board). I have done some hardware reconfiguration and I need to rebuild my kernel after editing the config-3.12.0-xillinux-1.3 file. My question is how do I rebuild the existing kernel on the hardware after making changes to the config file

http://www.wiki.xilinx.com/Uartlite+Driver

This is the page above that I am referring to where they say that:

To enable the uartlite driver in the linux kernel you either have to integrate it or build it as kernel module (.ko). You can enable it with:

make menuconfig
---> Device Drivers ---> Character devices ---> Serial drivers ---> Xilinx uartlite serial port support

make menuconfig - I have to enter this command on the OS running on my hardware in the /root/boot/.config folder to enable it ?

What does , ---> Device Drivers ---> Character devices ---> Serial drivers ---> Xilinx uartlite serial port support THIS MEAN ? I have to change directory ?

The other option as per the link posted above is to add certain lines as below to the config file, for which I would use the nano editor and then save it with ctrl+X and then Y.

# integrate into the kernel
CONFIG_SERIAL_UARTLITE=y
# build as loadable module
CONFIG_SERIAL_UARTLITE=m

But they say that, "After that you of course have to rebuild the kernel and deploy it to your Zynq device."

Where zynq is the hardware I am running my OS on. What commands do I have to use to rebuild the existing kernel on my hardware after making changes to the .config file ?

So, after rebuilding the kernel with the changes above, I just reboot to observer the changes ?

EDIT:

I was referring to this link, http://www.thegeekstuff.com/2013/06/...-linux-kernel/

So, in order to compile the exisiting kernel on the hadrware and build it, I edit the .config file using nano in /boot folder and save it. Then, I type "make" in the same folder as config. Then, I type "make modules" in the same folder Then I type make modules_install Then I type make install Then I reboot the system to see the new kernel installed. Is this the right way of doing it ?

Is this how you recompiled and rebuilt it ?

Currently in my boot directory, there are 4 files. One config file and 3 .dts files. After rebuilding the kernel, this might change ?

bobbydf
  • 183
  • 1
  • 4
  • 13
  • Firstly, you need to download [kernel sources](http://www.wiki.xilinx.com/Fetch+Sources) to some Linux machine, which has compiler. Other steps (configuring: `make menuconfig`, building: `make` and so on) you should perform in the kernel sources top-dir. – Tsyvarev Sep 28 '15 at 20:52
  • @Tsyvarev I dont want to download the kernel sources to a different linux machine. I want to recompile the existing kernel on the existing OS running on the existing hardware, which already has a compiler on it. This way I dont have to install sources or cross compile.The link to my OS, http://xillybus.com/downloads/doc/xillybus_getting_started_zynq.pdf If you see section 6.3 there is the compiling part. I want to modify the .config file in /boot folder, save it. And then use the commands in this link http://www.thegeekstuff.com/2013/06/compile-linux-kernel/ . Does this sound right ? – bobbydf Sep 28 '15 at 21:32
  • For build *out-of-tree module*, it is sufficient to have headers(and some other files), corresponded to the running kernel(section 6.3 describes that). But for *modify kernel itself*, such as change configuration, you need to build kernel from sources. Probably, you can do that on the board itself, but you need to build from sources in any case. – Tsyvarev Sep 28 '15 at 22:44
  • @Tsyvarev SO, I need to do a git clone on the same device of the orginal directory ( git clone git://github.com/), then make. uimage and uboot file generated. – bobbydf Sep 29 '15 at 00:34
  • Directory, which is target for `git clone`, can be any (and better to be **not** under `/boot`). Actually, wiki describes how to [build kernel](http://www.wiki.xilinx.com/Build+kernel), how to [prepare boot image](http://www.wiki.xilinx.com/Prepare+Boot+Image) and some other steps. – Tsyvarev Sep 29 '15 at 08:29
  • If you have your driver built-in before and want to rebuild as a module you have to rebuild kernel as well, and thus all the rest modules. – 0andriy Sep 29 '15 at 17:19

0 Answers0