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
  • 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
Software Application Development recompile 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 49 replies
  • Subscribers 318 subscribers
  • Views 2229 views
  • Users 0 members are here
Related

recompile linux kernel

Former Member
Former Member over 12 years ago

Hi,
  where is possible to find the uboot and linux kernel source code for your device? I can refer me to the xilinx git repos? In case yes do I need any additional patch for zedboard? Where I can find the right defconfigs?

Thanks in advance!

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

    Hi,

    can the xilinx_zynq_defconfig kernel and the zynq-zc702.dts device tree configuration from the linux-xlnx.git repository be used for the Zedboard as-is, or are any modifications required?  If so, precisely what modifications are required?  Can they be made available in a git repository by any chance?

    I.e.:

    git clone git://git.xilinx.com/linux-xlnx.git
    cd linux-xlnx
    make ARCH=arm xilinx_zynq_defconfig
    make ARCH=arm
    scripts/dtc/dtc -I dts -O dtb -o arch/arm/boot/devicetree_ramdisk.dtb arch/arm/boot/dts/zynq-zc702.dts
    cd arch/arm/boot
    <copy zImage and devicetree_ramdisk.dtb to zedboard>
    <reboot & profit>

    I'm asking because I followed these steps, but the kernel won't boot - It hangs during the boot process (log below).  When I remove the i2c device from the device tree, it goes a bit further but still does not work (i.e. the userland segfaults).

    It would be very helpful if there was a description (and configuration file) that makes it possible to rebuild the kernel as distributed, as starting point.  Also, it would be very nice if there was a description how to rebuild u-boot with the factory default bitstream.  And a description how to rebuild the factory default bitstream with, erm, ISE?  EDK?  I know I'm asking for a lot :)

    Any help would be appreciated.
    -Hans


    U-Boot 2011.03-dirty (Jul 11 2012 - 16:07:00)

    DRAM:  512 MiB
    MMC:   SDHCI: 0
    Using default environment

    In:    serial
    Out:   serial
    Err:   serial
    Net:   zynq_gem
    Hit any key to stop autoboot:  0
    Copying Linux from SD to RAM...
    Device: SDHCI
    Manufacturer ID: 12
    OEM: 3456
    Name: SMI  
    Tran Speed: 25000000
    Rd Block Len: 512
    SD version 1.10
    High Capacity: Yes
    Capacity: 3967811584
    Bus Width: 1-bit
    reading zImage

    2303280 bytes read
    reading devicetree_ramdisk.dtb

    3972 bytes read
    reading ramdisk8M.image.gz

    3699979 bytes read
    ## Starting application at 0x00008000 ...
    Uncompressing Linux... done, booting the kernel.
    Booting Linux on physical CPU 0
    Linux version 3.3.0-14.2-build1-01491-g42fac65 (hans@aspirin) (gcc version 4.5.1 (Sourcery G++ Lite 2010.09-62) ) #1 SMP PREEMPT Thu Sep 6 07:02:02 EDT 2012
    CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
    CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    Machine: Xilinx Zynq Platform, model: Xilinx Zynq ZC702
    bootconsole [earlycon0] enabled
    Memory policy: ECC disabled, Data cache writealloc
    PERCPU: Embedded 7 pages/cpu @c190b000 s5696 r8192 d14784 u32768
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 259840
    Kernel command line: console=ttyPS0,115200 root=/dev/ram rw initrd=0x800000,8M ip=:::::eth0:dhcp earlyprintk
    PID hash table entries: 4096 (order: 2, 16384 bytes)
    Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    Memory: 1024MB = 1024MB total
    Memory: 1025632k/1025632k available, 22944k reserved, 270336K highmem
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
        vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)
        lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)
        pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
        modules : 0xbf000000 - 0xbfe00000   (  14 MB)
          .text : 0xc0008000 - 0xc0412250   (4137 kB)
          .init : 0xc0413000 - 0xc0438640   ( 150 kB)
          .data : 0xc043a000 - 0xc0467ca0   ( 184 kB)
           .bss : 0xc0467cc4 - 0xc0481edc   ( 105 kB)
    Preemptible hierarchical RCU implementation.
    tVerbose stalled-CPUs detection is disabled.
    NR_IRQS:128
    xlnx,ps7-ttc-1.00.a #0 at 0xf0000000, irq=43
    Console: colour dummy device 80x30
    Calibrating delay loop... 1332.01 BogoMIPS (lpj=6660096)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    smp_twd: clock not found: -2
    Calibrating local timer... 333.55MHz.
    hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
    Setting up static identity map for 0x2f9e50 - 0x2f9e84
    CPU1: Booted secondary processor
    CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    Brought up 2 CPUs
    SMP: Total of 2 processors activated (2664.03 BogoMIPS).
    devtmpfs: initialized
    NET: Registered protocol family 16
    L310 cache controller enabled
    l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x72060000, Cache size: 524288 B
    registering platform device 'pl330' id 0
    registering platform device 'arm-pmu' id 0
    hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
    hw-breakpoint: maximum watchpoint size is 4 bytes.
    xslcr xslcr.0: at 0xF8000000 mapped to 0xF0008000
    bio: create slab <bio-0> at 0
    gpiochip_add: registered GPIOs 0 to 245 on device: xgpiops
    xgpiops e000a000.gpio: gpio at 0xe000a000 mapped to 0xf000a000
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    Switching to clocksource xttcpss_timer1
    NET: Registered protocol family 2
    IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
    TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
    TCP bind hash table entries: 65536 (order: 7, 786432 bytes)
    TCP: Hash tables configured (established 131072 bind 65536)
    TCP reno registered
    UDP hash table entries: 512 (order: 2, 16384 bytes)
    UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    NET: Registered protocol family 1
    RPC: Registered named UNIX socket transport module.
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    Trying to unpack rootfs image as initramfs...
    rootfs image is not initramfs (no cpio magic); looks like an initrd
    Freeing initrd memory: 8192K
    xscugtimer xscugtimer.0: ioremap fe00c200 to f000c200 with size 400
    pl330 dev 0 probe success
    highmem bounce pool size: 64 pages
    JFFS2 version 2.2. (NAND) (SUMMARY)  u00A9 2001-2006 Red Hat, Inc.
    msgmni has been set to 1491
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    e00??u037D??[ttyPS0] enabled, bootconsole disabled
    console [ttyPS0] enabled, bootconsole disabled
    xdevcfg f8007000.devcfg: ioremap f8007000 to f0060000 with size 100
    brd: module loaded
    loop: module loaded
    m25p80 spi1.0: found s25fl256s1, expected n25q128
    m25p80 spi1.0: s25fl256s1 (32768 Kbytes)
    7 ofpart partitions found on MTD device spi1.0
    Creating 7 MTD partitions on "spi1.0":
    0x000000000000-0x000000080000 : "qspi-fsbl"
    0x000000080000-0x000000100000 : "qspi-u-boot"
    0x000000100000-0x000000600000 : "qspi-linux"
    0x000000600000-0x000000620000 : "qspi-device-tree"
    0x000000620000-0x000000700000 : "qspi-user"
    0x000000700000-0x000000800000 : "qspi-scratch"
    0x000000800000-0x000001000000 : "qspi-rootfs"
    xqspips e000d000.spi: at 0xE000D000 mapped to 0xF0062000, irq=51
    GEM: BASEADDRESS hw: e000b000 virt: f0064000
    XEMACPS mii bus: probed
    mdio_bus e000b000: error probing PHY at address 7
    eth0, pdev->id -1, baseaddr 0xe000b000, irq 54
    ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    xusbps-ehci xusbps-ehci.0: Xilinx PS USB EHCI Host Controller
    xusbps-ehci xusbps-ehci.0: new USB bus registered, assigned bus number 1
    xusbps-ehci xusbps-ehci.0: irq 53, io mem 0x00000000
    xusbps-ehci xusbps-ehci.0: USB 2.0 started, EHCI 1.00
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    Initializing USB Mass Storage driver...
    usbcore: registered new interface driver usb-storage
    USB Mass Storage support registered.
    Xilinx PS USB Device Controller driver (Apr 01, 2011)
    mousedev: PS/2 mouse device common for all mice
    i2c /dev entries driver
    xi2cps e0004000.i2c: 100 kHz mmio e0004000 irq 57
    (hangs here)

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

    To answer my own question:  I picked the required pieces and information from various Web pages and with that, I was able to configure and build a kernel and a device tree.  I added a new device tree generation file for the zedboard (arch/arm/boot/dts/zynq-zedboard.dts) to my kernel repository (https://github.com/hanshuebner/linux-xlnx). Now in theory, this should work:

    git clone https://github.com/hanshuebner/linux-xlnx.git
    cd linux-xlnx
    make ARCH=arm xilinx_zynq_defconfig
    make ARCH=arm
    scripts/dtc/dtc -I dts -O dtb -o arch/arm/boot/devicetree_ramdisk.dtb arch/arm/boot/dts/zynq-zedboard.dts
    cd arch/arm/boot
    <copy zImage and devicetree_ramdisk.dtb to zedboard>
    <reboot & profit>

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

    The original source for the device tree configuration is here: http://zynqlab.blogspot.com.au/

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

    hans,

    Have you confirmed this boots on hardware?

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

    hans,

    Have you confirmed this boots on hardware?

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

    Sure, I've done all my experiments with the real Zedboard so far.

    • 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