element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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
  • About Us
  • 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 Issues building Linux kernel
  • 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 332 subscribers
  • Views 949 views
  • Users 0 members are here
Related

Issues building Linux kernel

Former Member
Former Member over 12 years ago

I'm having issues building a Linux kernel for the MicroZed.  I think my issues are related to the kernel because I can use the kernel and DTB from QSPI with a NFS root filesystem (Ubuntu core arm hf) and it seems stable.  But with my own kernel and the DTB from QSPI it's very unstable.

My development machine is ubuntu 12.04.3 x86_64

To get the kernel I do the following:

git clone git://github.com/Xilinx/linux-xlnx.git

One of the AvNet tutorials suggest that I do the following, but Xilinx doesn't have it in their build instructions.  I've tried it both ways, currently not in my latest kernel though:

git checkout -b xilinx-14.2-build1-trd

Here is my kernel build script:

# Clean environment
make distclean

# Setup environment variables for the kernel build
export INSTALL_MOD_PATH=../rootfs
export ARCH=arm

# Ubuntu provided ARM hard float toolchain
export CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf-

# Xilinx Vivado Toolchain
# export CROSS_COMPILE=~/Xilinx/SDK/2013.2/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi-

# Updates the .config file
make xilinx_zynq_defconfig

# We would make menuconfig here if we needed to customize build options, but I'm not customizing yet

### **** Steps to make kernel and convert to u-boot format manually ****
### This step will compile both the kernel and modules
### make -j8
##
### Convert the Image to a uImage (U-Boot format image)
### cd arch/arm/boot
### mkimage -A arm -O linux -T kernel -C none -a 0x8000 -e 0x8000 -n ZynqKernel -d Image uImage
### cd ../../..
### **** End steps to make kernel and convert to u-boot format manually ****

# Make the kernel and automatically convert it into a u-boot image
# mkimage will need to be in the path for this to work
make -j8 UIMAGE_LOADADDR=0x8000 uImage
make -j8 modules

# Install modules
make modules_install
sudo cp -R ../rootfs/lib/modules/* /media/media2/nfs_export/zynqroot/lib/modules/

# Copy kernel to tftp server storage folder
sudo cp arch/arm/boot/uImage /srv/tftp/uImage-hf

U-boot configuration:
baudrate=115200
bootargs=console=ttyPS0,115200 root=/dev/nfs nfsroot=192.168.1.26:/media/media2/nfs_export/zynqroot, tcp ip=192.168.1.20:192.168.1.26:192.168.1.1:255.255.255.0::eth0:off rw
devicetree_size=0x20000
ethact=Gem.e000b000
ethaddr=##:##:##:##:##:##
kernel_image=uImage-hf
kernel_size=0x500000
loadbit_addr=0x100000
modeboot=qspiboot
qspiboot=echo Copying Linux from QSPI flash to RAM... && sf probe 0 0 0 && sf read ${loadbit_addr} 0xC00000 ${bitstream_size} && mw 0xF8007080 0x30800100 0x4 && fpga load 0 ${loadbit_addr} ${bitstream_size} && sf read 0x3000000 0x100000 ${kernel_size} && sf read 0x2A00000 0x600000 ${devicetree_size} && echo Copying ramdisk... && sf read 0x2000000 0x620000 ${ramdisk_size} && bootm 0x3000000 0x2000000 0x2A00000
ramdisk_image=uramdisk.image.gz
ramdisk_size=0x5E0000
serverip=192.168.1.26
stderr=serial
stdin=serial
stdout=serial
testboot=sf probe 0 0 0; sf read 0x2A00000 0x600000 0x20000; tftpboot 0x3000000 ${serverip}:${kernel_image}

To boot it, I do the following in u-boot
run testboot
bootm 0x3000000 - 0x2A00000


It boots up, I can SSH into the system, maybe run a few commands, but the console will become unresponsive within a minute or two.

If I use the AvNet provided kernel, it runs fine (following u-boot commands):
zynq-uboot> sf probe 0 0 0
SF: Detected S25FL129P_64K with page size 64 KiB, total 16 MiB
zynq-uboot>  sf read 0x3000000 0x100000 ${kernel_size}
zynq-uboot> sf read 0x2A00000 0x600000 ${devicetree_size}
zynq-uboot>  bootm 0x3000000 - 0x2a00000

I can run openssl speed aes-256-cbc, ping, apt-get, etc.  runs great.

This is one of my first embedded linux projects, so I've tried to verbose as to what I'm doing.  I've really been struggling to figure this out...  Can anyone point to something I'm doing wrong here?

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

    I'm using a ZC706 board now at work, and I was able to build FSBL, U-Boot, and a Linux kernel.  I used a DTB that was in the Linux kernel build output.  I was then able to put an ext3 partition on SD card and boot into Ubuntu Core 12.04.3 without any problems and it ran for hours.  I had 0 problems, worked first try.

    I'm having much less success with the MicroZed from some reason.

    Is there any difference in a MicroZed Linux Kernel than the kernel I would have built for ZC706.  I would like to use my custom built uImage for ZC706 on MicroZed to eliminate a kernel build issue.

    Because if that is true my problem would have to be either a PS configuration issue embedded in my FSBL(boot.bin) or in my DTB correct?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • zedhed
    0 zedhed over 12 years ago

    Hi mwales,

    Is your end goal to get Ubuntu running on your MicroZed as well as your ZC706 board?  If so, we will be releasing an Ubuntu tutorial for our new display kit running on MicroZed in the next few days.  You could leverage some of this material for building the 14.4 kernel release:

    http://www.wiki.xilinx.com/Zynq+Release+14.4

    In any case, I would strongly recommend updating your U-Boot and Linux kernel to the 14.4 release or later.

    If you follow the Vivado Tutorials 1-4, that should get you a stable PS configuration and an up to date FSBL that you can tie up to your U-Boot for booting Linux on MicroZed.

    http://www.microzed.org/design/1519/10

    Regards,

    -Kevin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • bpwilliams
    0 bpwilliams over 11 years ago in reply to zedhed

    The zip file for the Ubuntu/MicroZed tutorial is bad. Check?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
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