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-
August 29, 2014 - 4:11 am
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
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:
August 29, 2014 - 11:46 am
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.
August 29, 2014 - 2:00 pm
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
August 29, 2014 - 2:46 pm
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.
August 29, 2014 - 9:23 pm
There’s a working image with this fix and ELF support here.
http://files.khubla.com/freebsd-wandboard/FreeBSD-armv6-11.0-IMX6-r270438.img.gz
Boot log here.
http://files.khubla.com/freebsd-wandboard/FreeBSD-armv6-11.0-IMX6-r270438.txt