element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
MicroZed Hardware Design Rebuilding exisiting linux kernel on hardware(microzed zynq)
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 3 replies
  • Subscribers 328 subscribers
  • Views 589 views
  • Users 0 members are here
Related

Rebuilding exisiting linux kernel on hardware(microzed zynq)

100bobdxcool
100bobdxcool over 10 years ago

I have xillinux OS (based on ubunutu 12.04.LTS) installed on my hardware (microzed Board). I will add UART Lite IP Core(after removing xillybus lite core IP in device tree)  using vivado after which I need to rebuild my kernel after editing the config-3.12.0-xillinux-1.3 file in /boot folder. 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 observe the changes ?

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 in nano 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 ?

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

  • Sign in to reply
  • Cancel
Parents
  • Former Member
    0 Former Member over 10 years ago

    Have you looked at the documentation on the XillyBus website: http://xillybus.com/xillinux ?

     

    -Gary

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • 100bobdxcool
    0 100bobdxcool over 10 years ago in reply to Former Member

    I'm new to this platform, and so kindly request your help.

    I am using a different IP core (UART Lite) and removing the pipe drivers in the .dts file and recompiling it to .dtb. I am removing the following two structures from the .dts file

    xillybus_lite@50002000 {
    interrupt-parent = <0x2>;
    interrupts = <0x0 0x3a 0x1>;
    reg = <0x50002000 0x1000>;
    compatible = "xillybus,xillybus_lite_of-1.00.a";
    };
    xillybus@50000000 {
    dma-coherent;
    interrupt-parent = <0x2>;
    interrupts = <0x0 0x3b 0x1>;
    reg = <0x50000000 0x1000>;
    compatible = "xillybus,xillybus-1.00.a";
    };

    And add two serial ports to device tree
    uartlite_0@42C00000 {
                compatible = "xlnx,axi-uartlite-1.02.a";
                reg = <0x42C00000 0x10000>;
                interrupt-parent = <&gic>;
                interrupts = <0 59 4>;
                clock = <100000000>;
            };

            uartlite_1@42C10000 {
                compatible = "xlnx,axi-uartlite-1.02.a";
                reg = <0x42C10000 0x10000>;
                interrupt-parent = <&gic>;
                interrupts = <0 59 4>;
                clock = <100000000>;
            };

    recompile to .dtb and copy this .dtb to the boot folder.

    Now in order for me to detect these ports on linux, I have to modify the .config file in the /boot folder as given in this link, http://www.wiki.xilinx.com/Uartlite+Driver

    Now I need to rebuild the (entire kernel) I believe as they say in the link above.

    But as per xillinux documentation, http://xillybus.com/downloads/doc/xillybus_getting_started_zynq.pdf , in section 6.3, they say The Xillinux distribution comes with the running kernelu2019s compilation headers. This
    is not enough to compile the kernel itself, but allows kernel modules to be compiled
    natively on the platform.

    So,

    1.) I cannot use the method in 6.3 to compile the entire kernel. But the changes I made to .config file require a full kernel compile and rebuild, right ? Not just modules ?

    So, I asked if I could use the instructions in this link, http://www.thegeekstuff.com/2013/06/compile-linux-kernel/ to compile and rebuild ? It seems to be pretty easy to do as well. Also, here do i need to download any header files for compiling entire module ?

    2.) If you think I dont need to compile the entire kernel, then I can use the commands in section 6.3 of the xillybus document ?

    So, I just need to modify the .config file(config-3.12-.0-xillinux-1.3) with nano, save it, and from the same folder (/boot) run the command below (makefile already exists as per xillinux 1.3 documentation)

    # make
    make -C /lib/modules/3.12.0-xillinux-1.3/build SUBDIRS=/root/sample modules

    And then install them as

    make modules_install

    and then,

    make install (or should I skip this step ?)

    Then reboot.

    Is this right ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • 100bobdxcool
    0 100bobdxcool over 10 years ago in reply to Former Member

    I'm new to this platform, and so kindly request your help.

    I am using a different IP core (UART Lite) and removing the pipe drivers in the .dts file and recompiling it to .dtb. I am removing the following two structures from the .dts file

    xillybus_lite@50002000 {
    interrupt-parent = <0x2>;
    interrupts = <0x0 0x3a 0x1>;
    reg = <0x50002000 0x1000>;
    compatible = "xillybus,xillybus_lite_of-1.00.a";
    };
    xillybus@50000000 {
    dma-coherent;
    interrupt-parent = <0x2>;
    interrupts = <0x0 0x3b 0x1>;
    reg = <0x50000000 0x1000>;
    compatible = "xillybus,xillybus-1.00.a";
    };

    And add two serial ports to device tree
    uartlite_0@42C00000 {
                compatible = "xlnx,axi-uartlite-1.02.a";
                reg = <0x42C00000 0x10000>;
                interrupt-parent = <&gic>;
                interrupts = <0 59 4>;
                clock = <100000000>;
            };

            uartlite_1@42C10000 {
                compatible = "xlnx,axi-uartlite-1.02.a";
                reg = <0x42C10000 0x10000>;
                interrupt-parent = <&gic>;
                interrupts = <0 59 4>;
                clock = <100000000>;
            };

    recompile to .dtb and copy this .dtb to the boot folder.

    Now in order for me to detect these ports on linux, I have to modify the .config file in the /boot folder as given in this link, http://www.wiki.xilinx.com/Uartlite+Driver

    Now I need to rebuild the (entire kernel) I believe as they say in the link above.

    But as per xillinux documentation, http://xillybus.com/downloads/doc/xillybus_getting_started_zynq.pdf , in section 6.3, they say The Xillinux distribution comes with the running kernelu2019s compilation headers. This
    is not enough to compile the kernel itself, but allows kernel modules to be compiled
    natively on the platform.

    So,

    1.) I cannot use the method in 6.3 to compile the entire kernel. But the changes I made to .config file require a full kernel compile and rebuild, right ? Not just modules ?

    So, I asked if I could use the instructions in this link, http://www.thegeekstuff.com/2013/06/compile-linux-kernel/ to compile and rebuild ? It seems to be pretty easy to do as well. Also, here do i need to download any header files for compiling entire module ?

    2.) If you think I dont need to compile the entire kernel, then I can use the commands in section 6.3 of the xillybus document ?

    So, I just need to modify the .config file(config-3.12-.0-xillinux-1.3) with nano, save it, and from the same folder (/boot) run the command below (makefile already exists as per xillinux 1.3 documentation)

    # make
    make -C /lib/modules/3.12.0-xillinux-1.3/build SUBDIRS=/root/sample modules

    And then install them as

    make modules_install

    and then,

    make install (or should I skip this step ?)

    Then reboot.

    Is this right ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube