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-


6 Responses to "Building U-boot 2014 on FreeBSD"

  • jub
    August 29, 2014 - 4:11 am Reply

    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

      August 29, 2014 - 8:17 am Reply

      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”

  • jub
    August 29, 2014 - 11:46 am Reply

    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.

  • jub
    August 29, 2014 - 2:00 pm Reply

    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!



Leave a Reply