Building U-boot 2014 on FreeBSD

I’m upgrading the U-boot version used for Wandboard by Crochet-BSD.    The first step is to upgrade the Device Tree Compiler (DTC); there are instructions here.

Once you have the U-boot 2014 source, the build is trivial:

gmake SED=gsed HOSTCC=cc CROSS_COMPILE=armv6-freebsd- wandboard_quad_config
gmake SED=gsed HOSTCC=cc CROSS_COMPILE=armv6-freebsd-

 

Similar Posts

6 Comments

  1. true, the build is trivial, but there is am error with enabled SMP support. With kern.smp.disabled=1 in /boot/loader.conf it boots fine.
    The logfile:

    (…)
    IMX6 arm
    FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
    CPU: Cortex A9-r2 rev 10 (Cortex-A core)
    Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext
    WB disabled EABT branch prediction enabled
    LoUU:2 LoC:1 LoUIS:2
    Cache level 1:
    32KB/32B 4-way data cache WB Read-Alloc Write-Alloc
    32KB/32B 4-way instruction cache Read-Alloc
    real memory = 2147483648 (2048 MB)
    avail memory = 2093891584 (1996 MB)
    WARNING: Some AP’s failed to start
    FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
    random device not loaded; using insecure entropy
    panic: Built bad topology at 0xc2510fb4. CPU mask (f) != (1)
    cpuid = 0
    KDB: enter: panic

    1. I had the same problem. I’ll check and see if I had found a way to resolve it. There was a suggestion on the mailing list that flushing the dcache might help, like this:

      “dcache off ; dcache flush”

  2. i do not think that this problem is caused by the new dtc. I played with the sources of u-boot and never build a new up-to-date dtc (or fdt) and received the same error.

  3. i disabled dcache and icache and my wandboard boots! As far as i understand, there will be a longer boottime, nothing else. Thank you for the hint!

    include/configs/wandboard.h:

    #define CONFIG_SYS_ICACHE_OFF
    #define CONFIG_SYS_DCACHE_OFF

    1. I’ve got the start of code to update u-boot for Wandboard for Crochet on a host at home. I’ll add this change as a patchset and then commit it to github.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.