RPi2 20180426 image, as downloaded, fails to boot. This problem also appears when kernel+world is installed from -CURRENT obtained on 4/27. An earlier version, dated 03/29, was able to boot successfully on the same hardware. image file: FreeBSD-12.0-CURRENT-arm-armv7-RPI2-20180426-r333017.img 1. downloaded and transferred image to SD card with dd 2. booted SD card on RPi 2B with bcm2836 CPU 3. observed the following output on the serial port: U-Boot 2018.03 (Apr 26 2018 - 16:58:25 +0000) DRAM: 948 MiB RPI 2 Model B (0xa01041) MMC: sdhci@7e300000: 0 Loading Environment from FAT... *** Warning - bad CRC, using default environment Failed (-5) In: serial Out: vidconsole Err: vidconsole Net: No ethernet found. starting USB... USB0: Core Release: 2.80a scanning bus 0 for devices... 3 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Found U-Boot script /boot.scr 199 bytes read in 9 ms (21.5 KiB/s) ## Executing script at 02000000 238896 bytes read in 31 ms (7.3 MiB/s) ## Starting application at 0x01000000 ... Consoles: U-Boot console Compatible U-Boot API signature found @0x3af56a90 FreeBSD/armv7 U-Boot loader, Revision 1.2 (Thu Apr 26 18:25:40 UTC 2018 root@releng3.nyi.freebsd.org) DRAM: 948MB Number of U-Boot devices: 1 U-Boot env: loaderdev not set, will probe all devices. Found U-Boot device: disk Probing all disk devices... Checking unit=0 slice=<auto> partition=<auto>... good. Booting from disk0s2a: Loading /boot/defaults/loader.conf /boot/kernel/kernel data=0x8bf97c+0x1dc684 syms=[0x4+0x99d30+0x4+0xdf5b5] | Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel]... /boot/dtb/bcm2836-rpi-2-b.dtb size=0x4c49 Loaded DTB from file 'bcm2836-rpi-2-b.dtb'. Kernel entry at 0x1200100... Kernel args: (null) KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2018 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 12.0-CURRENT #0 r333017: Thu Apr 26 18:37:21 UTC 2018 root@releng3.nyi.freebsd.org:/usr/obj/usr/src/arm.armv7/sys/GENERIC arm FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0) WARNING: WITNESS option enabled, expect reduced performance. VT: init without driver. module_register: cannot register simplebus/ahci from kernel; already loaded from kernel Module simplebus/ahci failed to register: 17 module_register: cannot register simplebus/ehci from kernel; already loaded from kernel Module simplebus/ehci failed to register: 17 module_register: cannot register simplebus/pcib from kernel; already loaded from kernel Module simplebus/pcib failed to register: 17 module_register: cannot register simplebus/ehci from kernel; already loaded from kernel Module simplebus/ehci failed to register: 17 CPU: ARM Cortex-A7 r0p5 (ECO: 0x00000000) CPU Features: Multiprocessing, Thumb2, Security, Virtualization, Generic Timer, VMSAv7, PXN, LPAE, Coherent Walk Optional instructions: SDIV/UDIV, UMULL, SMULL, SIMD(ext) LoUU:2 LoC:3 LoUIS:2 Cache level 1: 32KB/64B 4-way data cache WB Read-Alloc Write-Alloc 32KB/32B 2-way instruction cache Read-Alloc Cache level 2: 512KB/64B 8-way unified cache WB Read-Alloc Write-Alloc real memory = 994045952 (947 MB) avail memory = 955293696 (911 MB) FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs arc4random: no preloaded entropy cache random: entropy device external interface kbd0 at kbdmux0 ofwbus0: <Open Firmware Device Tree> simplebus0: <Flattened device tree simple bus> on ofwbus0 ofw_clkbus0: <OFW clocks bus> on ofwbus0 clk_fixed0: <Fixed clock> on ofw_clkbus0 clk_fixed1: <Fixed clock> on ofw_clkbus0 local_intc0: <BCM2836 Interrupt Controller> mem 0x40000000-0x400000ff on simplebus0 intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 25 on simplebus0 intc0: another root already set intc0: could not set PIC as a root device_attach: intc0 attach returned 6 intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 25 on simplebus0 intc0: could not allocate memory resource device_attach: intc0 attach returned 6 intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 25 on simplebus0 intc0: could not allocate memory resource device_attach: intc0 attach returned 6 gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 27,28,29,30 on simplebus0 gpio0: cannot allocate resources gpio0: bcm_gpio_pic_detach: not implemented yet device_attach: gpio0 attach returned 6 intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 25 on simplebus0 intc0: could not allocate memory resource device_attach: intc0 attach returned 6 gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 27,28,29,30 on simplebus0 device_attach: gpio0 attach returned 6 intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 25 on simplebus0 intc0: could not allocate memory resource device_attach: intc0 attach returned 6 gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 27,28,29,30 on simplebus0 device_attach: gpio0 attach returned 6 intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 25 on simplebus0 intc0: could not allocate memory resource device_attach: intc0 attach returned 6 gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 27,28,29,30 on simplebus0 device_attach: gpio0 attach returned 6 intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 25 on simplebus0 intc0: could not allocate memory resource device_attach: intc0 attach returned 6 gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 27,28,29,30 on simplebus0 device_attach: gpio0 attach returned 6 generic_timer0: <ARMv7 Generic Timer> irq 1,2,3,4 on ofwbus0 generic_timer0: could not allocate resources device_attach: generic_timer0 attach returned 6 intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 25 on simplebus0 intc0: could not allocate memory resource device_attach: intc0 attach returned 6 gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 27,28,29,30 on simplebus0 device_attach: gpio0 attach returned 6 generic_timer0: <ARMv7 Generic Timer> irq 1,2,3,4 on ofwbus0 generic_timer0: could not allocate resources device_attach: generic_timer0 attach returned 6 intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 25 on simplebus0 intc0: could not allocate memory resource device_attach: intc0 attach returned 6 gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 27,28,29,30 on simplebus0 device_attach: gpio0 attach returned 6 generic_timer0: <ARMv7 Generic Timer> irq 1,2,3,4 on ofwbus0 generic_timer0: could not allocate resources device_attach: generic_timer0 attach returned 6 intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 25 on simplebus0 intc0: could not allocate memory resource device_attach: intc0 attach returned 6 gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 27,28,29,30 on simplebus0 device_attach: gpio0 attach returned 6 generic_timer0: <ARMv7 Generic Timer> irq 1,2,3,4 on ofwbus0 generic_timer0: could not allocate resources device_attach: generic_timer0 attach returned 6 intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 25 on simplebus0 intc0: could not allocate memory resource device_attach: intc0 attach returned 6 gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 27,28,29,30 on simplebus0 device_attach: gpio0 attach returned 6 generic_timer0: <ARMv7 Generic Timer> irq 1,2,3,4 on ofwbus0 generic_timer0: could not allocate resources device_attach: generic_timer0 attach returned 6 intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 25 on simplebus0 intc0: could not allocate memory resource device_attach: intc0 attach returned 6 gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 27,28,29,30 on simplebus0 device_attach: gpio0 attach returned 6 generic_timer0: <ARMv7 Generic Timer> irq 1,2,3,4 on ofwbus0 generic_timer0: could not allocate resources device_attach: generic_timer0 attach returned 6 intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 25 on simplebus0 intc0: could not allocate memory resource device_attach: intc0 attach returned 6 gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 27,28,29,30 on simplebus0 device_attach: gpio0 attach returned 6 generic_timer0: <ARMv7 Generic Timer> irq 1,2,3,4 on ofwbus0 generic_timer0: could not allocate resources device_attach: generic_timer0 attach returned 6 intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 25 on simplebus0 intc0: could not allocate memory resource device_attach: intc0 attach returned 6 gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 27,28,29,30 on simplebus0 device_attach: gpio0 attach returned 6 generic_timer0: <ARMv7 Generic Timer> irq 1,2,3,4 on ofwbus0 generic_timer0: could not allocate resources device_attach: generic_timer0 attach returned 6 bcm_dma0: <BCM2835 DMA Controller> mem 0x7e007000-0x7e007eff irq 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24 on simplebus0 bcm_dma0: cannot allocate interrupt device_attach: bcm_dma0 attach returned 6 intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 25 on simplebus0 intc0: could not allocate memory resource device_attach: intc0 attach returned 6 bcmwd0: <BCM2708/2835 Watchdog> mem 0x7e100000-0x7e100027 on simplebus0 bcmrng0: <Broadcom BCM2835 RNG> mem 0x7e104000-0x7e10400f on simplebus0 mbox0: <BCM2835 VideoCore Mailbox> mem 0x7e00b880-0x7e00b8bf irq 26 on simplebus0 mbox0: could not allocate interrupt resource device_attach: mbox0 attach returned 6 gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq 27,28,29,30 on simplebus0 device_attach: gpio0 attach returned 6 uart0: <PrimeCell UART (PL011)> mem 0x7e201000-0x7e201fff irq 31 on simplebus0 uart0: console (115200,n,8,1) spi0: <BCM2708/2835 SPI controller> mem 0x7e204000-0x7e204fff irq 33 on simplebus0 spi0: cannot allocate interrupt device_attach: spi0 attach returned 6 iichb0: <BCM2708/2835 BSC controller> mem 0x7e205000-0x7e205fff irq 34 on simplebus0 iichb0: cannot allocate interrupt device_attach: iichb0 attach returned 6 sdhci_bcm0: <Broadcom 2708 SDHCI controller> mem 0x7e300000-0x7e3000ff irq 41 on simplebus0 device_attach: sdhci_bcm0 attach returned 6 iichb0: <BCM2708/2835 BSC controller> mem 0x7e804000-0x7e804fff irq 44 on simplebus0 iichb0: cannot allocate interrupt device_attach: iichb0 attach returned 6 iichb0: <BCM2708/2835 BSC controller> mem 0x7e805000-0x7e805fff irq 45 on simplebus0 iichb0: cannot allocate interrupt device_attach: iichb0 attach returned 6 bcm283x_dwcotg0: <DWC OTG 2.0 integrated USB controller (bcm283x)> mem 0x7e980000-0x7e98ffff irq 50 on simplebus0 bcm283x_dwcotg0: failed to set power state, err=6 device_attach: bcm283x_dwcotg0 attach returned 6 vchiq0: <BCM2835 VCHIQ> mem 0x7e00b840-0x7e00b84e irq 52 on simplebus0 vchiq0: could not allocate interrupt resource device_attach: vchiq0 attach returned 6 fb0: <BCM2835 VT framebuffer driver> on simplebus0 device_attach: fb0 attach returned 6 pmu0: <Performance Monitoring Unit> irq 0 on ofwbus0 pmu0: could not allocate resources device_attach: pmu0 attach returned 6 generic_timer0: <ARMv7 Generic Timer> irq 1,2,3,4 on ofwbus0 generic_timer0: could not allocate resources device_attach: generic_timer0 attach returned 6 cpulist0: <Open Firmware CPU Group> on ofwbus0 cpu0: <Open Firmware CPU> on cpulist0 bcm2835_cpufreq0: <CPU Frequency Control> on cpu0 cpu1: <Open Firmware CPU> on cpulist0 cpu2: <Open Firmware CPU> on cpulist0 cpu3: <Open Firmware CPU> on cpulist0 gpioled0: <GPIO LEDs> on ofwbus0 gpioled0: <ACT> failed to map pin gpioled0: <PWR> failed to map pin cryptosoft0: <software crypto> panic: No usable event timer found! cpuid = 0 time = 1 KDB: stack backtrace: db_trace_self() at db_trace_self pc = 0xc05e23a0 lr = 0xc00cf92c (db_trace_self_wrapper+0x30) sp = 0xc0d13ce0 fp = 0xc0d13df8 db_trace_self_wrapper() at db_trace_self_wrapper+0x30 pc = 0xc00cf92c lr = 0xc02e3338 (vpanic+0x16c) sp = 0xc0d13e00 fp = 0xc0d13e20 r4 = 0x00000100 r5 = 0x00000001 r6 = 0xc0771ef8 r7 = 0xc09cbfa8 vpanic() at vpanic+0x16c pc = 0xc02e3338 lr = 0xc02e33d0 (kproc_shutdown) sp = 0xc0d13e28 fp = 0xc0d13e2c r4 = 0xc0a453b4 r5 = 0xc0a453d8 r6 = 0x00000001 r7 = 0xc0a4957c r8 = 0x7fffffff r9 = 0xffffffff r10 = 0xc2eb0d80 kproc_shutdown() at kproc_shutdown pc = 0xc02e33d0 lr = 0xc061240c (timercb) sp = 0xc0d13e34 fp = 0xc0d13e60 r4 = 0xc02e33d0 r5 = 0xc0d13e34 timercb() at timercb pc = 0xc061240c lr = 0xc028307c (initclocks+0x2c) sp = 0xc0d13e68 fp = 0xc0d13e68 r4 = 0xc0a48b6c r5 = 0x00000001 r6 = 0xc08b3c38 r7 = 0x00000000 r8 = 0xc0a48b68 r9 = 0xc08b4d78 r10 = 0xc0a48a70 initclocks() at initclocks+0x2c pc = 0xc028307c lr = 0xc027fb68 (mi_startup+0x18c) sp = 0xc0d13e70 fp = 0xc0d13e90 mi_startup() at mi_startup+0x18c pc = 0xc027fb68 lr = 0xc0000244 (_start+0x144) sp = 0xc0d13e98 fp = 0x00000000 r4 = 0xc0000378 r5 = 0xc0a98000 r6 = 0x0000000e r7 = 0x00c52078 r8 = 0xc0c21000 r9 = 0x3ebfa800 r10 = 0x00000040 _start() at _start+0x144 pc = 0xc0000244 lr = 0xc0000244 (_start+0x144) sp = 0xc0d13e98 fp = 0x00000000 KDB: enter: panic [ thread pid 0 tid 100000 ] Stopped at $d.3: ldrb r15, [r15, r15, ror r15]! db>
tested FreeBSD-12.0-CURRENT-arm-armv7-RPI2-20180412-r332432.img this image appears to work properly
may have found the cause at the first failure in the boot log. failed boot has this: intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 25 on simplebus0 4/12 boot has this: intc0: <BCM2835 Interrupt Controller> mem 0x7e00b200-0x7e00b3ff irq 24 on simplebus0 different irq - so where is the '25' coming from? That might be the cause.
A commit references this bug: Author: gonzo Date: Wed May 2 20:04:25 UTC 2018 New revision: 333177 URL: https://svnweb.freebsd.org/changeset/base/333177 Log: Unbreak RaspberryPi 2 boot after r332839 r332839 changed number of cells per interrupt for local_intc from 1 to 2 to pass type of IRQ. Driver expected only 1 cell so after r332839 all interrupt children of local_intc failed to allocate IRQ resource. Fix this regression by relaxing check for number of cells in interrupt property to be either 1 or 2. PR: 227904 Changes: head/sys/arm/broadcom/bcm2835/bcm2836.c
thanks all, looks like it is fixed. 1) obtained latest -CURRENT source, build world+kernel for armv7 and RPI2 kernel 2) transferred 4/26 RPI2 armv7 image file onto SD card 3) mounted SD card UFS partition, installed world+kernel for armv7 and RPI2 kernel 4) ran mergemaster for the SD card image. 5) unmounted SD card, installed in RPi2B (bcm2836 model) and booted. The only observed problems were some irritating messages regarding checksum mismatches in the SD card image. these went away after I edited a few things (rc.conf, /boot/loader.rc.local, added a user changed root password) and after a subsequent boot, where I ran FSCK in single-user mode prior to going into multi-user, everything 'fixed' and it's now working as expected. (recommend closing, appears to be resolved)