FreeBSD for Clusterboard (V1.1) [*WIP]
#1
Hi,

I made an image of an almost complete world of FreeBSD for the SoPine including all my patches.


Latest version with timecounter replacement
Code:
KDB: debugger backends: ddb
KDB: current backend: ddb
                  Type     Physical      Virtual   #Pages Attr
    ConventionalMemory 000040000000     40000000 00008000 WB
   RuntimeServicesData 000048000000     48000000 00000008 WB RUNTIME
    ConventionalMemory 000048009000     40000000 00068e8a WB
            LoaderData 0000b0e93000     b0e93000 00000001 WB
            LoaderData 0000b0e94000     b0e94000 00004000 WB
            LoaderData 0000b4e94000     b4e94000 00004000 WB
            LoaderCode 0000b8e94000     b8e94000 00000074 WB
   RuntimeServicesData 0000b8f08000     b8f08000 00000001 WB RUNTIME
              Reserved 0000b8f09000     b8f09000 00000001 WB
              Reserved 0000b8f0a000     b8f0a000 00000001 WB
              Reserved 0000b8f0b000     b8f0b000 00000001 WB
              Reserved 0000b8f0c000     b8f0c000 00000001 WB
              Reserved 0000b8f0d000     b8f0d000 00000001 WB
              Reserved 0000b8f0e000     b8f0e000 00000001 WB
              Reserved 0000b8f0f000     b8f0f000 00000001 WB
              Reserved 0000b8f10000     b8f10000 00000001 WB
              Reserved 0000b8f11000     b8f11000 00000001 WB
              Reserved 0000b8f12000     b8f12000 00000001 WB
              Reserved 0000b8f13000     b8f13000 00000001 WB
              Reserved 0000b8f14000     b8f14000 00000001 WB
              Reserved 0000b8f15000     b8f15000 00000001 WB
              Reserved 0000b8f16000     b8f16000 00000001 WB
              Reserved 0000b8f17000     b8f17000 00000001 WB
              Reserved 0000b8f18000     b8f18000 00000001 WB
              Reserved 0000b8f19000     b8f19000 00000001 WB
              Reserved 0000b8f1a000     b8f1a000 00000001 WB
              Reserved 0000b8f1b000     b8f1b000 00000001 WB
              Reserved 0000b8f1c000     b8f1c000 00000001 WB
              Reserved 0000b8f1d000     b8f1d000 00000001 WB
              Reserved 0000b8f1e000     b8f1e000 00000001 WB
              Reserved 0000b8f1f000     b8f1f000 00000001 WB
              Reserved 0000b8f20000     b8f20000 00000001 WB
              Reserved 0000b8f21000     b8f21000 00000001 WB
              Reserved 0000b8f22000     b8f22000 00000001 WB
              Reserved 0000b8f23000     b8f23000 00000001 WB
              Reserved 0000b8f24000     b8f24000 00000001 WB
              Reserved 0000b8f25000     b8f25000 00000001 WB
              Reserved 0000b8f26000     b8f26000 00000001 WB
              Reserved 0000b8f27000     b8f27000 00000001 WB
              Reserved 0000b8f28000     b8f28000 00000001 WB
              Reserved 0000b8f29000     b8f29000 00000001 WB
              Reserved 0000b8f2a000     b8f2a000 00000001 WB
              Reserved 0000b8f2b000     b8f2b000 00000001 WB
              Reserved 0000b8f2c000     b8f2c000 00000001 WB
            LoaderData 0000b8f2d000     b8f2d000 0000508e WB
   RuntimeServicesCode 0000bdfbb000     bdfbb000 00000001 WB RUNTIME
            LoaderData 0000bdfbc000     b8f2d000 00002044 WB
Physical memory chunk(s):
 0x40000000 - 0x48007fff,   128 MB (  32776 pages)
 0x48009000 - 0xb8f08fff,  1807 MB ( 462592 pages)
 0xb8f2d000 - 0xbdfbafff,    80 MB (  20622 pages)
 0xbdfbc000 - 0xbfffffff,    32 MB (   8260 pages)
Excluded memory regions:
 0x48000000 - 0x48007fff,     0 MB (      8 pages) NoAlloc
 0xb1000000 - 0xb25bcfff,    21 MB (   5565 pages) NoAlloc
 0xb8f08000 - 0xb8f2cfff,     0 MB (     37 pages) NoAlloc
 0xbdfbb000 - 0xbdfbbfff,     0 MB (      1 pages) NoAlloc
Found 4 CPUs in the device tree
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 #173 4347b60bdbb(master)-dirty: Sat Aug  4 15:43:58 CEST 2018
FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1)
WARNING: WITNESS option enabled, expect reduced performance.
Preloaded elf kernel "/boot/kernel/kernel" at 0xffff000001397000.
Preloaded boot_entropy_cache "/boot/entropy" at 0xffff0000013a02b8.
Preloaded mfs_root "/boot/pgcv1.uzip" at 0xffff0000013a0310.
Starting CPU 1 (1)
Starting CPU 2 (2)
Starting CPU 3 (3)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
random: read 3840 bytes from preloaded cache
random: unblocking device.
arc4random: read 32 bytes from preloaded cache
VIMAGE (virtualized network stack) enabled
ULE: setup cpu 0
ULE: setup cpu 1
ULE: setup cpu 2
ULE: setup cpu 3
random: entropy device external interface
MAP 48000000 mode 2 pages 8
MAP b8f08000 mode 2 pages 1
MAP bdfbb000 mode 2 pages 1
mem: <memory>
null: <full device, null device, zero device>
openfirm: <Open Firmware control device>
nfslock: pseudo-device
crypto: <crypto core>
random: harvesting attach, 8 bytes (4 bits) from nexus0
ofwbus0: <Open Firmware Device Tree>
clk_fixed0: <Fixed clock> on ofwbus0
random: harvesting attach, 8 bytes (4 bits) from clk_fixed0
clk_fixed1: <Fixed clock> on ofwbus0
random: harvesting attach, 8 bytes (4 bits) from clk_fixed1
clk_fixed2: <Fixed clock> on ofwbus0
random: harvesting attach, 8 bytes (4 bits) from clk_fixed2
simplebus0: <Flattened device tree simple bus> on ofwbus0
ccu_a64ng0: <Allwinner A64 Clock Control Unit NG> mem 0x1c20000-0x1c203ff on simplebus0
ccu_a64ng0: Setting pll_periph0 as parent for ahb1
ccu_a64ng0: Setting pll_periph0 as parent for ahb2
ccu_a64ng0: Setting pll_ddr0 as parent for dram
Clock: pll_cpux, parent: osc24M(0), freq: 816000000
Clock: pll_audio, parent: osc24M(0), freq: 24571428
Clock: pll_periph0_2x, parent: osc24M(0), freq: 600000000
Clock: pll_periph1_2x, parent: osc24M(0), freq: 600000000
Clock: pll_ddr0, parent: osc24M(0), freq: 408000000
Clock: pll_ddr1, parent: osc24M(0), freq: 1104000000
Clock: pll_video0, parent: osc24M(0), freq: 30303
Clock: pll_video1, parent: osc24M(0), freq: 30303
Clock: pll_ve, parent: osc24M(0), freq: 30303
Clock: pll_gpu, parent: osc24M(0), freq: 30303
Clock: pll_de, parent: osc24M(0), freq: 30303
Clock: pll_hsic, parent: osc24M(0), freq: 1200000
Clock: apb2, parent: osc24M(1), freq: 24000000
Clock: nand, parent: osc24M(0), freq: 12000000
Clock: mmc0, parent: osc24M(0), freq: 400000
Clock: mmc1, parent: osc24M(0), freq: 24000000
Clock: mmc2, parent: osc24M(0), freq: 400000
Clock: ts, parent: osc24M(0), freq: 24000000
Clock: ce, parent: osc24M(0), freq: 24000000
Clock: spi0, parent: osc24M(0), freq: 24000000
Clock: spi1, parent: osc24M(0), freq: 24000000
Clock: spdif, parent: pll_audio(0), freq: 24571428
Clock: dram, parent: pll_ddr0(0), freq: 408000000
Clock: de, parent: pll_periph0_2x(0), freq: 600000000
Clock: deinterlace, parent: pll_periph0(0), freq: 300000000
Clock: csi-sclk, parent: pll_periph0(0), freq: 300000000
Clock: csi-mclk, parent: osc24M(0), freq: 24000000
Clock: ve, parent: pll_ve(0), freq: 30303
Clock: hdmi, parent: pll_video0(0), freq: 30303
Clock: mbus, parent: pll_periph0_2x(1), freq: 200000000
Clock: gpu, parent: pll_gpu(0), freq: 30303
Clock: ths, parent: osc24M(0), freq: 24000000
Clock: ahb1, parent: pll_periph0(3), freq: 300000000
Clock: ahb2, parent: pll_periph0(1), freq: 150000000
Clock: cpux, parent: pll_cpux(2), freq: 816000000
Clock: i2s0mux, parent: pll_audio-8x(0), freq: 196571424
Clock: i2s1mux, parent: pll_audio-8x(0), freq: 196571424
Clock: i2s2mux, parent: pll_audio-8x(0), freq: 196571424
Clock: axi, parent: cpux(0), freq: 204000000
Clock: apb1, parent: ahb1(0), freq: 75000000
Clock: apb, parent: cpux(0), freq: 272000000
Clock: osc12M, parent: osc24M(0), freq: 12000000
Clock: pll_periph0, parent: pll_periph0_2x(0), freq: 300000000
Clock: pll_periph1, parent: pll_periph1_2x(0), freq: 300000000
Clock: pll_audio-2x, parent: pll_audio(0), freq: 49142856
Clock: pll_audio-4x, parent: pll_audio(0), freq: 98285712
Clock: pll_audio-8x, parent: pll_audio(0), freq: 196571424
Clock: bus-mipi-dsi, parent: ahb1(0), freq: 300000000
Clock: bus-ce, parent: ahb1(0), freq: 300000000
Clock: bus-dma, parent: ahb1(0), freq: 300000000
Clock: bus-mmc0, parent: ahb1(0), freq: 300000000
Clock: bus-mmc1, parent: ahb1(0), freq: 300000000
Clock: bus-mmc2, parent: ahb1(0), freq: 300000000
Clock: bus-nand, parent: ahb1(0), freq: 300000000
Clock: bus-dram, parent: ahb1(0), freq: 300000000
Clock: bus-emac, parent: ahb2(0), freq: 150000000
Clock: bus-ts, parent: ahb1(0), freq: 300000000
Clock: bus-hstimer, parent: ahb1(0), freq: 300000000
Clock: bus-spi0, parent: ahb1(0), freq: 300000000
Clock: bus-spi1, parent: ahb1(0), freq: 300000000
Clock: bus-otg, parent: ahb1(0), freq: 300000000
Clock: bus-ehci0, parent: ahb1(0), freq: 300000000
Clock: bus-ehci1, parent: ahb2(0), freq: 150000000
Clock: bus-ohci0, parent: ahb1(0), freq: 300000000
Clock: bus-ohci1, parent: ahb2(0), freq: 150000000
Clock: bus-ve, parent: ahb1(0), freq: 300000000
Clock: bus-tcon0, parent: ahb1(0), freq: 300000000
Clock: bus-tcon1, parent: ahb1(0), freq: 300000000
Clock: bus-deinterlace, parent: ahb1(0), freq: 300000000
Clock: bus-csi, parent: ahb1(0), freq: 300000000
Clock: bus-hdmi, parent: ahb1(0), freq: 300000000
Clock: bus-de, parent: ahb1(0), freq: 300000000
Clock: bus-gpu, parent: ahb1(0), freq: 300000000
Clock: bus-msgbox, parent: ahb1(0), freq: 300000000
Clock: bus-spinlock, parent: ahb1(0), freq: 300000000
Clock: bus-codec, parent: apb1(0), freq: 75000000
Clock: bus-spdif, parent: apb1(0), freq: 75000000
Clock: bus-pio, parent: apb1(0), freq: 75000000
Clock: bus-ths, parent: apb1(0), freq: 75000000
Clock: bus-i2s0, parent: apb1(0), freq: 75000000
Clock: bus-i2s1, parent: apb1(0), freq: 75000000
Clock: bus-i2s2, parent: apb1(0), freq: 75000000
Clock: bus-i2c0, parent: apb2(0), freq: 24000000
Clock: bus-i2c1, parent: apb2(0), freq: 24000000
Clock: bus-i2c2, parent: apb2(0), freq: 24000000
Clock: bus-src, parent: apb2(0), freq: 24000000
Clock: bus-uart0, parent: apb2(0), freq: 24000000
Clock: bus-uart1, parent: apb2(0), freq: 24000000
Clock: bus-uart2, parent: apb2(0), freq: 24000000
Clock: bus-uart3, parent: apb2(0), freq: 24000000
Clock: bus-uart4, parent: apb2(0), freq: 24000000
Clock: bus-dbg, parent: ahb1(0), freq: 300000000
Clock: usb-phy0, parent: osc24M(0), freq: 24000000
Clock: usb-phy1, parent: osc24M(0), freq: 24000000
Clock: usb-hsic, parent: pll_hsic(0), freq: 1200000
Clock: usb-hsic-12M, parent: osc12M(0), freq: 12000000
Clock: usb-ohci0, parent: osc12M(0), freq: 12000000
Clock: usb-ohci1, parent: usb-ohci0(0), freq: 12000000
Clock: dram-ve, parent: dram(0), freq: 408000000
Clock: dram-csi, parent: dram(0), freq: 408000000
Clock: dram-deinterlace, parent: dram(0), freq: 408000000
Clock: dram-ts, parent: dram(0), freq: 408000000
Clock: csi-misc, parent: osc24M(0), freq: 24000000
Clock: ac-dig, parent: pll_audio(0), freq: 24571428
Clock: ac-dig-4x, parent: pll_audio-4x(0), freq: 98285712
Clock: avs, parent: osc24M(0), freq: 24000000
Clock: hdmi-ddc, parent: osc24M(0), freq: 24000000
random: harvesting attach, 8 bytes (4 bits) from ccu_a64ng0
random: harvesting attach, 8 bytes (4 bits) from simplebus0
regfix0: <Fixed Regulator> on ofwbus0
random: harvesting attach, 8 bytes (4 bits) from regfix0
random: harvesting attach, 8 bytes (4 bits) from ofwbus0
ccu_sun8i_r0: <Allwinner SUN8I_R Clock Control Unit NG> mem 0x1f01400-0x1f014ff on simplebus0
Clock: ar100, parent: osc32k(0), freq: 32768
Clock: apb0, parent: ahb0(0), freq: 32768
Clock: ahb0, parent: ar100(0), freq: 32768
Clock: ir, parent: osc32k(0), freq: 32768
Clock: apb0-pio, parent: apb0(0), freq: 32768
Clock: apb0-ir, parent: apb0(0), freq: 32768
Clock: apb0-timer, parent: apb0(0), freq: 32768
Clock: apb0-rsb, parent: apb0(0), freq: 32768
Clock: apb0-uart, parent: apb0(0), freq: 32768
Clock: apb0-i2c, parent: apb0(0), freq: 32768
Clock: apb0-twd, parent: apb0(0), freq: 32768
random: harvesting attach, 8 bytes (4 bits) from ccu_sun8i_r0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
psci0: PSCI version 0.2 compatible
random: harvesting attach, 8 bytes (4 bits) from psci0
iichb0: <Allwinner RSB> mem 0x1f03400-0x1f037ff irq 35 on simplebus0
iicbus0: <OFW I2C bus> on iichb0
random: harvesting attach, 8 bytes (4 bits) from iicbus0
random: harvesting attach, 8 bytes (4 bits) from iichb0
gic0: <ARM Generic Interrupt Controller> mem 0x1c81000-0x1c81fff,0x1c82000-0x1c83fff,0x1c84000-0x1c85fff,0x1c86000-0x1c87fff irq 30 on simplebus0
gic0: pn 0x2, arch 0x2, rev 0x1, implementer 0x43b irqs 224
random: harvesting attach, 8 bytes (4 bits) from gic0
gpio0: <Allwinner GPIO/Pinmux controller> mem 0x1c20800-0x1c20bff irq 13,14,15 on simplebus0
gpiobus0: <OFW GPIO bus> on gpio0
random: harvesting attach, 8 bytes (4 bits) from gpiobus0
Processing 1 pin-config node(s) in pinctrl-0 for serial@1c28000
Processing 1 pin-config node(s) in pinctrl-0 for ethernet@1c30000
Processing 1 pin-config node(s) in pinctrl-0 for rsb@1f03400
Processing 1 pin-config node(s) in pinctrl-0 for serial@1c28000
Processing 1 pin-config node(s) in pinctrl-0 for ethernet@1c30000
Processing 1 pin-config node(s) in pinctrl-0 for rsb@1f03400
random: harvesting attach, 8 bytes (4 bits) from gpio0
aw_nmi0: <Allwinner NMI Controller> mem 0x1f00c00-0x1f00fff irq 33 on simplebus0
random: harvesting attach, 8 bytes (4 bits) from aw_nmi0
gpio1: <Allwinner GPIO/Pinmux controller> mem 0x1f02c00-0x1f02fff irq 34 on simplebus0
gpiobus1: <OFW GPIO bus> on gpio1
random: harvesting attach, 8 bytes (4 bits) from gpiobus1
Processing 1 pin-config node(s) in pinctrl-0 for serial@1c28000
Processing 1 pin-config node(s) in pinctrl-0 for ethernet@1c30000
Processing 1 pin-config node(s) in pinctrl-0 for rsb@1f03400
Processing 1 pin-config node(s) in pinctrl-0 for serial@1c28000
Processing 1 pin-config node(s) in pinctrl-0 for ethernet@1c30000
Processing 1 pin-config node(s) in pinctrl-0 for rsb@1f03400
random: harvesting attach, 8 bytes (4 bits) from gpio1
axp8xx_pmu0: <X-Powers AXP803 Power Management Unit> at addr 0x746 irq 48 on iicbus0
axp8xx_pmu0: chip ID 0x51
gpiobus2: <OFW GPIO bus> on axp8xx_pmu0
random: harvesting attach, 8 bytes (4 bits) from gpiobus2
random: harvesting attach, 8 bytes (4 bits) from axp8xx_pmu0
generic_timer0: <ARMv8 Generic Timer> irq 0,1,2,3 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 24000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 24000000 Hz quality 1000
random: harvesting attach, 8 bytes (4 bits) from generic_timer0
rtc0: <Allwinner RTC> mem 0x1f00000-0x1f00220 irq 31,32 on simplebus0
rtc0: Using external oscillator
rtc0: VDD Regulator state 4
rtc0: registered as a time-of-day clock, resolution 1.000000s
random: harvesting attach, 8 bytes (4 bits) from rtc0
a64_hstimer0: <Allwinner A64HS timer> mem 0x1c60000-0x1c60023 irq 38 on simplebus0
Timecounter "A64 HS Timer" frequency 1000 Hz quality 999
a64_hstimer0: clock: hz=1000 stathz = 0
a64_hstimer0: event timer clock frequency 150000000
random: harvesting attach, 8 bytes (4 bits) from a64_hstimer0
efirtc0: cannot read EFI realtime clock
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
arm64_cpu0: register <0>
random: harvesting attach, 8 bytes (4 bits) from arm64_cpu0
cpufreq_dt0: <Generic cpufreq driver> on cpu0
cpufreq_dt0: 1248.000 MHz, 1300000 uV
cpufreq_dt0: 1200.000 MHz, 1260000 uV
cpufreq_dt0: 1008.000 MHz, 1200000 uV
cpufreq_dt0: 816.000 MHz, 1200000 uV
cpufreq_dt0: 528.000 MHz, 1040000 uV
random: harvesting attach, 8 bytes (4 bits) from cpufreq0
random: harvesting attach, 8 bytes (4 bits) from cpufreq_dt0
random: harvesting attach, 8 bytes (4 bits) from cpu0
cpu1: <Open Firmware CPU> on cpulist0
arm64_cpu1: register <1>
random: harvesting attach, 8 bytes (4 bits) from arm64_cpu1
random: harvesting attach, 8 bytes (4 bits) from cpu1
cpu2: <Open Firmware CPU> on cpulist0
arm64_cpu2: register <2>
random: harvesting attach, 8 bytes (4 bits) from arm64_cpu2
random: harvesting attach, 8 bytes (4 bits) from cpu2
cpu3: <Open Firmware CPU> on cpulist0
arm64_cpu3: register <3>
random: harvesting attach, 8 bytes (4 bits) from arm64_cpu3
random: harvesting attach, 8 bytes (4 bits) from cpu3
random: harvesting attach, 8 bytes (4 bits) from cpulist0
ofwbus0: <sound_spdif> compat simple-audio-card (no driver attached)
ofwbus0: <spdif-out> compat linux,spdif-dit (no driver attached)
syscon_generic0: <syscon> mem 0x1c00000-0x1c00033 on simplebus0
random: harvesting attach, 8 bytes (4 bits) from syscon_generic0
a31dmac0: <Allwinner DMA controller> mem 0x1c02000-0x1c02fff irq 4 on simplebus0
random: harvesting attach, 8 bytes (4 bits) from a31dmac0
simplebus0: <mmc@1c0f000> mem 0x1c0f000-0x1c0ffff irq 5 disabled compat allwinner,sun50i-a64-mmc (no driver attached)
simplebus0: <mmc@1c10000> mem 0x1c10000-0x1c10fff irq 6 disabled compat allwinner,sun50i-a64-mmc (no driver attached)
simplebus0: <mmc@1c11000> mem 0x1c11000-0x1c11fff irq 7 disabled compat allwinner,sun50i-a64-emmc (no driver attached)
simplebus0: <usb@1c19000> mem 0x1c19000-0x1c193ff irq 8 disabled compat allwinner,sun8i-a33-musb (no driver attached)
simplebus0: <phy@1c19400> mem 0x1c19400-0x1c19413,0x1c1a800-0x1c1a803,0x1c1b800-0x1c1b803 disabled compat allwinner,sun50i-a64-usb-phy (no driver attached)
simplebus0: <usb@1c1a000> mem 0x1c1a000-0x1c1a0ff irq 9 disabled compat allwinner,sun50i-a64-ehci (no driver attached)
simplebus0: <usb@1c1a400> mem 0x1c1a400-0x1c1a4ff irq 10 disabled compat allwinner,sun50i-a64-ohci (no driver attached)
simplebus0: <usb@1c1b000> mem 0x1c1b000-0x1c1b0ff irq 11 disabled compat allwinner,sun50i-a64-ehci (no driver attached)
simplebus0: <usb@1c1b400> mem 0x1c1b400-0x1c1b4ff irq 12 disabled compat allwinner,sun50i-a64-ohci (no driver attached)
gpioc0: <GPIO controller> on gpio0
random: harvesting attach, 8 bytes (4 bits) from gpioc0
simplebus0: <spdif@1c21000> mem 0x1c21000-0x1c213ff irq 16 disabled compat allwinner,sun50i-a64-spdif (no driver attached)
simplebus0: <i2s@1c22000> mem 0x1c22000-0x1c223ff irq 17 disabled compat allwinner,sun50i-a64-i2s (no driver attached)
simplebus0: <i2s@1c22400> mem 0x1c22400-0x1c227ff irq 18 disabled compat allwinner,sun50i-a64-i2s (no driver attached)
uart0: <16750 or compatible> mem 0x1c28000-0x1c283ff irq 19 on simplebus0
uart0: console (115384,n,8,1)
uart0: fast interrupt
uart0: PPS capture mode: DCD
random: harvesting attach, 8 bytes (4 bits) from uart0
simplebus0: <serial@1c28400> mem 0x1c28400-0x1c287ff irq 20 disabled compat snps,dw-apb-uart (no driver attached)
simplebus0: <serial@1c28800> mem 0x1c28800-0x1c28bff irq 21 disabled compat snps,dw-apb-uart (no driver attached)
simplebus0: <serial@1c28c00> mem 0x1c28c00-0x1c28fff irq 22 disabled compat snps,dw-apb-uart (no driver attached)
simplebus0: <serial@1c29000> mem 0x1c29000-0x1c293ff irq 23 disabled compat snps,dw-apb-uart (no driver attached)
simplebus0: <i2c@1c2ac00> mem 0x1c2ac00-0x1c2afff irq 24 disabled compat allwinner,sun6i-a31-i2c (no driver attached)
simplebus0: <i2c@1c2b000> mem 0x1c2b000-0x1c2b3ff irq 25 disabled compat allwinner,sun6i-a31-i2c (no driver attached)
simplebus0: <i2c@1c2b400> mem 0x1c2b400-0x1c2b7ff irq 26 disabled compat allwinner,sun6i-a31-i2c (no driver attached)
simplebus0: <spi@1c68000> mem 0x1c68000-0x1c68fff irq 27 disabled compat allwinner,sun8i-h3-spi (no driver attached)
simplebus0: <spi@1c69000> mem 0x1c69000-0x1c69fff irq 28 disabled compat allwinner,sun8i-h3-spi (no driver attached)
awg0: <Allwinner Gigabit Ethernet> mem 0x1c30000-0x1c3ffff irq 29 on simplebus0
simplebus0: no default resources for rid = 1, type = 3
awg0: PHY type: rgmii, conf mode: reg
awg0: EMAC clock: 0x00000806
axp8xx_pmu0: Enable vcc-phy (dc1sw)
awg0: AHB frequency 150000000 Hz, MDC div: 0x2
reset
miibus0: <MII bus> on awg0
rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 0 on miibus0
rgephy0: OUI 0x00e04c, model 0x0011, rev. 5
rgephy0:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flowrandom: harvesting attach, 8 bytes (4 bits) from rgephy0
rgephy1: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus0
rgephy1: OUI 0x00e04c, model 0x0011, rev. 5
rgephy1:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flowrandom: harvesting attach, 8 bytes (4 bits) from rgephy1
random: harvesting attach, 8 bytes (4 bits) from miibus0
awg0: bpf attached
awg0: Ethernet address: 02:ba:0b:87:36:64
random: harvesting attach, 8 bytes (4 bits) from awg0
gpioc1: <GPIO controller> on gpio1
random: harvesting attach, 8 bytes (4 bits) from gpioc1
gpioc2: <GPIO controller> on axp8xx_pmu0
random: harvesting attach, 8 bytes (4 bits) from gpioc2
iic0: <I2C generic I/O> on iicbus0
random: harvesting attach, 8 bytes (4 bits) from iic0
aw_wdog0: <Allwinner A31 Watchdog> mem 0x1c20ca0-0x1c20cbf irq 36 on simplebus0
random: harvesting attach, 8 bytes (4 bits) from aw_wdog0
simplebus0: <pwm@1c21400> mem 0x1c21400-0x1c21407 irq 37 disabled compat allwinner,sun50i-a64-pwm (no driver attached)
simplebus0: <dai@1c22c00> mem 0x1c22c00-0x1c22dff irq 39 disabled compat allwinner,sun50i-a64-acodec-i2s (no driver attached)
simplebus0: <codec@1c22e00> mem 0x1c22e00-0x1c233ff irq 40 disabled compat allwinner,sun50i-a64-codec (no driver attached)
aw_thermal0: <Allwinner Thermal Sensor Controller> mem 0x1c25000-0x1c253ff irq 41 on simplebus0
aw_thermal0: #0: cur 253C alarm 85C hyst 58C shut 106C
aw_thermal0: #1: cur 253C alarm 85C hyst 58C shut 106C
aw_thermal0: #2: cur 253C alarm 85C hyst 58C shut 106C
random: harvesting attach, 8 bytes (4 bits) from aw_thermal0
simplebus0: <codec-analog@1f015c0> mem 0x1f015c0-0x1f015c3 disabled compat allwinner,sun50i-a64-codec-analog (no driver attached)
simplebus0: <gpu@1c40000> mem 0-0x1c3ffff,0-0xffff irq 42,43,44,45,46,47 disabled type gpu_mali400_0 compat arm,mali-400 (no driver attached)
ofwbus0: <sound> disabled compat simple-audio-card (no driver attached)
cryptosoft0: <software crypto>
crypto: assign cryptosoft0 driver id 0, flags 0x6000000
crypto: cryptosoft0 registers alg 1 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 2 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 3 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 4 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 5 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 16 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 6 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 7 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 32 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 18 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 19 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 20 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 8 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 15 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 9 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 10 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 13 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 14 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 34 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 35 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 36 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 37 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 11 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 22 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 23 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 25 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 24 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 26 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 27 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 28 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 21 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 17 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 29 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 30 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 31 flags 0 maxoplen 0
random: harvesting attach, 8 bytes (4 bits) from cryptosoft0
Found SMCCC version 1.0
Device configuration finished.
procfs registered
Timecounters tick every 1.000 msec
lo0: bpf attached
vlan: initialized, using hash tables with chaining
arc4random: read 32 bytes from preloaded cache
arc4random: read 32 bytes from preloaded cache
arc4random: read 32 bytes from preloaded cache
tcp_init: net.inet.tcp.tcbhashsize auto tuned to 16384
IPsec: Initialized Security Association Processing.
md0: Preloaded image </boot/pgcv1.uzip> 3024384 bytes at 0xffff0000010ac848
Release APs...done
CPU  0: ARM Cortex-A53 r0p4Trying to mount root from ufs:/dev/ufs/ROOTFS []...
affinity:  0
Instruction Set Attributes 0 = <g_uzip_lzma_decompress: ibp=0xfffffd00006c9734, obp=0xffff00005c144000, in_pos=0, out_pos=0, in_size=204, out_size=8192
AES+PMULLg_uzip_lzma_decompress: ibp=0xfffffd000074f934, obp=0xffff00005c144000, in_pos=0, out_pos=0, in_size=204, out_size=8192
,SHA1g_uzip_lzma_decompress: ibp=0xfffffd000074f734, obp=0xffff00005c144000, in_pos=0, out_pos=0, in_size=204, out_size=8192
,SHA2,CRC32>
g_uzip_lzma_decompress: ibp=0xfffffd000074f534, obp=0xffff00005c144000, in_pos=0, out_pos=0, in_size=204, out_size=8192
Instruction Set Attributes 1 = <g_uzip_lzma_decompress: ibp=0xfffffd000074f334, obp=0xffff00005c144000, in_pos=0, out_pos=0, in_size=204, out_size=8192
>
        Processor Features 0 = <g_uzip_lzma_decompress: ibp=0xfffffd000074f134, obp=0xffff00005c144000, in_pos=0, out_pos=0, in_size=204, out_size=8192
AdvSIMD,Float,EL3 32,EL2 32,EL1 32g_uzip_lzma_decompress: ibp=0xfffffd000074e734, obp=0xffff00005c144000, in_pos=0, out_pos=0, in_size=204, out_size=8192
,EL0 32g_uzip_lzma_decompress: ibp=0xfffffd000074e534, obp=0xffff00005c144000, in_pos=0, out_pos=0, in_size=204, out_size=8192
>
g_uzip_lzma_decompress: ibp=0xfffffd000074e334, obp=0xffff00005c144000, in_pos=0, out_pos=0, in_size=204, out_size=8192
        Processor Features 1 = <0>
g_uzip_lzma_decompress: ibp=0xfffffd000074e134, obp=0xffff00005c144000, in_pos=0, out_pos=0, in_size=204, out_size=8192
     Memory Model Features 0 = <g_uzip_lzma_decompress: ibp=0xfffffd00006c9d34, obp=0xffff00005c144000, in_pos=0, out_pos=0, in_size=204, out_size=8192
4k Granuleg_uzip_lzma_decompress: ibp=0xfffffd00006c9b34, obp=0xffff00005c144000, in_pos=0, out_pos=0, in_size=204, out_size=8192
,64k Granuleg_uzip_lzma_decompress: ibp=0xfffffd00006c9934, obp=0xffff00005c144000, in_pos=0, out_pos=0, in_size=204, out_size=8192
,MixedEndiang_uzip_lzma_decompress: ibp=0xfffffd0000798b34, obp=0xffff00005c144000, in_pos=0, out_pos=0, in_size=204, out_size=8192
,S/NS Memg_uzip_lzma_decompress: ibp=0xfffffd0000798934, obp=0xffff00005c144000, in_pos=0, out_pos=0, in_size=204, out_size=8192
,16bit ASIDg_uzip_lzma_decompress: ibp=0xfffffd0000798734, obp=0xffff00005c144000, in_pos=0, out_pos=0, in_size=204, out_size=8192
,1TB PA>
     Memory Model Features 1 = <>
     Memory Model Features 2 = <32b CCIDX,48b VA>
            Debug Features 0 = <2 CTX Breakpoints,4 Watchpoints,6 Breakpoints,PMUv3,Debug v8>
            Debug Features 1 = <0>
rtc0:          Auxiliary Features 0 = <0>
providing initial system time
        Auxiliary Features 1 = <0>
start_init: trying /sbin/init
CPU  1: ARM Cortex-A53 r0p4 affinity:  1
CPU  2: ARM Cortex-A53 r0p4 affinity:  2
CPU  3: ARM Cortex-A53 r0p4 affinity:  3
WARNING: WITNESS option enabled, expect reduced performance.
regulator: shutting down vcc1v8
regulator: shutting down dcdc3
axp8xx_pmu0: Disable dcdc3 (dcdc3)
regulator: shutting down dcdc4
axp8xx_pmu0: Disable dcdc4 (dcdc4)
regulator: shutting down vcc-hdmi
axp8xx_pmu0: Disable vcc-hdmi (dldo1)
regulator: shutting down vcc-mipi
axp8xx_pmu0: Disable vcc-mipi (dldo2)
regulator: shutting down avdd-csi
axp8xx_pmu0: Disable avdd-csi (dldo3)
regulator: shutting down vcc-wifi
axp8xx_pmu0: Disable vcc-wifi (dldo4)
regulator: shutting down eldo2
axp8xx_pmu0: Disable eldo2 (eldo2)
regulator: shutting down eldo3
axp8xx_pmu0: Disable eldo3 (eldo3)
regulator: shutting down vcc-1v2-hsic
axp8xx_pmu0: Disable vcc-1v2-hsic (fldo1)
regulator: shutting down vcc-phy

Code:
# ubench -c -t 30
Ubench CPU:   471403
# ubench -m -t 30
Ubench MEM:   131312
# ntpdate ntp.xs4all.nl
4 Aug 00:00:25 ntpdate[634]: adjust time server 194.109.6.2 offset 0.032592 sec

Code:
last pid:   670;  load averages:  0.08,  0.07,  0.02                                                                                                                                                                 up 0+08:35:00  14:28:29
11 processes:  1 running, 10 sleeping
CPU:  0.0% user,  0.0% nice,  0.1% system,  0.0% interrupt, 99.9% idle
Mem: 1M Active, 15M Inact, 81M Wired, 32M Buf, 2G Free
Swap:

 PID USERNAME    THR PRI NICE  SIZE   RES STATE    C   TIME    WCPU COMMAND
 670 root          1  20    0   14M    4M CPU0     0   0:00   0.73% top
 166 root          4  20    0   21M    5M nanslp   3   0:17   0.00% clusternode
 363 root          1  20    0   11M  840K select   3   0:00   0.00% syslogd
 294 root          1  20    0   13M  636K select   1   0:00   0.00% devd
 605 root          1  20    0   13M    4M pause    3   0:00   0.00% csh
 601 freebsd       1  20    0   20M    2M select   2   0:00   0.00% sshd
 599 root          1  34    0   20M    7M select   0   0:00   0.00% sshd
 602 freebsd       1  29    0   13M    2M pause    1   0:00   0.00% csh
 604 freebsd       1  26    0   13M    3M wait     3   0:00   0.00% su
 598 root          1  46    0   11M    2M ttyin    0   0:00   0.00% getty
 562 root          1  20    0   19M    1M select   1   0:00   0.00% sshd



For clusterboards only! 

** It's not and official FreeBSD build! It's from head ~3 weeks ago and I patched/hacked stuff together to make it work more stable for my use our clusterboards at work to avoid using Linux.  Big Grin
*** I'm just a FreeBSD user that is trying to install FreeBSD on about every device I can get my hands on. 
-- It's a almost complete buildworld so there should be no problem with compatibility. It's almost a complete FreeBSD aarch64 base with modified drivers in the kernel and a modified DTB. (some already in the process of getting in the next FreeBSD version)

* What works (build-in modules and patched some stuff to work)
- Can boot from eMMC(*patched) and should boot from SD. (didn't test but already should work)
- Can boot with MFS (not in this image but you can change the boot.scr or push settings with dhcp)
- Can boot from PXE(*patched loader.efi to not crash if there is no disk at all -- I think base also already fixed this bug)
- CPU Frequency settings (1248Mhz, 1200Mhz, 1008Mhz, 816Mhz (DEFAULT), 528Mhz) (Fixed in DTB)
- Thermal sensor (Fixed in DTB and added weird factor clock) -- Getting pached in base soon
- DMA Controller (DTB and patched some kernel files)
- SRAM Controller for ethernet only (DTB Mappings)
- SD, eMMC both work but may spit out messages at boot only depending on what you have inserted. (I use PXE+MFS+NFS so less prio)
- Patched ethernet if_awg and rgephy and now only does 1000baseT/full because on the clusterboard that's all we have and we don't need al the extra code anyway. :-)

v1.1 patches
* HS Timer is now usable as kernel timecounter (not active by default)
      You can configure countdown with debug dev.a64_hstimer.0.magic-clock (if your osc is out of wack)
      Still working on improving it, it now generates 1k interrupts next version I will try and cut it down by a lot. 

* Fixed a time jump issue / workaround for main timer hardware bug when it rolls-over not all bits end up as expected.
       This workaround also fixes threads hanging randomly on _nanosleep()
       If you notice time jumps on a node: enable this with: sysctl kern.timecounter.hardware="A64 HS Timer"
        -- also you may want to tweak this for time keeping: sysctl dev.a64_hstimer.0.magic-clock=100004

* Solved the ethernet link dropping issue
* Added gdb from ports. (needed to troubleshoot the thread hanging issue)
* Removed some debug messages I had put in the kernel to find some issues.
* Enabled Invariants, Witness and deadlock resolver in the kernel for troubleshooting. (worthless if you have clock issues but was handy to notice how bad locking in filesystem currently is and made me go to a much simpler PXE boot setup using a more stable MFS as root)
* Completely removed USB support. It's not working anyway.


* Doesn't work
- No framebuffer (can't use/test it on clusterboard) -- It's even removed from the devicetree so don't even try soldering a HDMI connector to your clusterboard! :-)
- USB doesn't seem to be working but I doubt the connection didn't get it working in Linux either. (disabled in dtb and kernel)
- No MALI support what so ever.. regulators for MALI and other stuff are off.
- There is still lots of stuff in the kernel we don't use on the sopine cluster I'd like to remove making the kernel a bit smaller.

* Issues
- Ethernet is fast but not yet 100% stable.. there are a few link drops for a millisecond or so **FIXED in 1.1
- Be careful with mounting stuff on top of other stuff, nullfs, tmpfs and NFS have some weird locking issue (i think only on aarch64?! / FreeBSD 12) a.t.m. However witness will freak out at boot on it a.t.m. which is a bit better then unexpected hangs/deadlocks while in production. :-)

* Image
You can use stuff like pkg install and portsnap but you need to remove the /var (and maybe) /tmp ramdisks first.
-- ports tested: I installed glusterfs from ports with somewhat same build as this so it should work!
-- pkg install: I installed nano from pkg install nano

I have it running on 7 nodes myself using PXE/MFS and NFS and it's getting more stable with every patch. :-)

Next version (v1.2) I hope to also include configs and stuff I use for DHCP/PXE booting the modules so you could use the first node as master sharing eMMS with the 6 other nodes via NFS.. Need to compile stuff like dhcpd first for ARM.

* Login
Login via SSH: sopine/sopine (sopine is in wheel)
Root has no password

https://pastebin.com/fTBxnRBS <- dmesg (little dated)
https://drive.google.com/open?id=1r_J36Z...teieYH08PF <- Image V1.1
#2
(07-31-2018, 03:09 PM)paradise Wrote: Hi,

I made an image of an almost complete world of FreeBSD for the SoPine including all my patches.

* What works
- Can boots from eMMC and should boot from SD. (didn't test)
- Can boot with MFS (not in this image but you can change the boot.scr or push settings with dhcp)
- Can boot from PXE
- CPU Frequency settings (1248Mhz, 1200Mhz, 1008Mhz, 816Mhz (DEFAULT), 528Mhz)
- Thermal sensor
- DMA Controller
- SRAM Controller for ethernet only
- SD, eMMC both work but may spit out messages at boot only depending on what you have inserted. (I use PXE+MFS+NFS so less prio)
- pkg install / portsnap (ports - I installed glusterfs from ports with somewhat same build as this so it should work!)

* Doesn't work
- No framebuffer (can't use/test it on clusterboard)
- USB doesn't seem to be working but I doubt the connection didn't get it working in Linux either.
- No MALI support what so ever.. regulators for MALI and other stuff are off.

* Issues
- Ethernet is fast but not yet 100% stable.. there are a few link drops for a millisecond or so
   I use MFS as root to prevent NFS from freaking out on that if it's the rootfs.


This is only a beta and it's version 1;
I have it running on 7 nodes myself using PXE/MFS and NFS and it's getting more stable with every patch. :-)

Next version I'll also include configs and stuff I use for DHCP/PXE booting the other 6 modules of the 1'st.. Need to compile it first for ARM.

You can use pkg install and portsnap to install stuff.

Login via SSH: sopine/sopine (sopine is in wheel)
Root has no password

https://drive.google.com/open?id=1i7MbXJ...me-Jrl25Lp

Hi,

manu@FreeBSD here.

You talk about patches, where are they ?
For SD boot I know that andrew@ booted some sopine module from sdcard on the clusterboard so it should definitely work.
Framebuffer works (well EFIFB work), on pine64-lts and Pinebook.
USB should work, it work on Pine64/-LTS/Book so I don't see why it doesn't here.
#3
(07-31-2018, 03:47 PM)manu Wrote:
(07-31-2018, 03:09 PM)paradise Wrote: Hi,

I made an image of an almost complete world of FreeBSD for the SoPine including all my patches.

* What works
- Can boots from eMMC and should boot from SD. (didn't test)
- Can boot with MFS (not in this image but you can change the boot.scr or push settings with dhcp)
- Can boot from PXE
- CPU Frequency settings (1248Mhz, 1200Mhz, 1008Mhz, 816Mhz (DEFAULT), 528Mhz)
- Thermal sensor
- DMA Controller
- SRAM Controller for ethernet only
- SD, eMMC both work but may spit out messages at boot only depending on what you have inserted. (I use PXE+MFS+NFS so less prio)
- pkg install / portsnap (ports - I installed glusterfs from ports with somewhat same build as this so it should work!)

* Doesn't work
- No framebuffer (can't use/test it on clusterboard)
- USB doesn't seem to be working but I doubt the connection didn't get it working in Linux either.
- No MALI support what so ever.. regulators for MALI and other stuff are off.

* Issues
- Ethernet is fast but not yet 100% stable.. there are a few link drops for a millisecond or so
   I use MFS as root to prevent NFS from freaking out on that if it's the rootfs.


This is only a beta and it's version 1;
I have it running on 7 nodes myself using PXE/MFS and NFS and it's getting more stable with every patch. :-)

Next version I'll also include configs and stuff I use for DHCP/PXE booting the other 6 modules of the 1'st.. Need to compile it first for ARM.

You can use pkg install and portsnap to install stuff.

Login via SSH: sopine/sopine (sopine is in wheel)
Root has no password

https://drive.google.com/open?id=1i7MbXJ...me-Jrl25Lp

Hi,

manu@FreeBSD here.

You talk about patches, where are they ?
For SD boot I know that andrew@ booted some sopine module from sdcard on the clusterboard so it should definitely work.
Framebuffer works (well EFIFB work), on pine64-lts and Pinebook.
USB should work, it work on Pine64/-LTS/Book so I don't see why it doesn't here.

Patches are on the nas at work and a tiny bit I tried to put on github but that was a pain.
Will release all patches for the kernel soon most are minor but make it crash less often (removing unsupported hardware features from settings)

The most important thing to get it to boot from eMMC I made this quick and dirty patch in aw_mmc.c to remove unsupported hardware features on the eMMC controller.

Code:
        if (bus_width >= 8){
                sc->aw_host.caps |= MMC_CAP_8_BIT_DATA;
                sc->aw_host.caps &= ~(MMC_CAP_MMC_DDR52 | MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR25);
                sc->aw_host.f_max = 52000000;
        }

One of the biggest patches is a NetBSD DTS file decompiled, edit and recompile for like 4 ever and get stuff working with existing devices (I then hacked in the kernel build files a bit to include those modules because I was too lazy to find out why they didn't want to compile by default haha).

In other words. it works for what I do with it but I need it to get fixed in base to make update not a pain in my but. :-)

One of the next steps will be get a clean head and get a diff but then I changed many code formatting so I don't think base will accept. (I hate real long lines yes but I hate splitting if(a==b && b == c) up into multiple lines more especially if they are short, they mess up my view of the code)
So importing it will be a bit of work. :-(

For me it was important to get it up and running for our Cluster or else I'm stuck with Linux. haha
#4
(07-31-2018, 03:47 PM)manuHi, Wrote: manu@FreeBSD here.

You talk about patches, where are they ?
For SD boot I know that andrew@ booted some sopine module from sdcard on the clusterboard so it should definitely work.
Framebuffer works (well EFIFB work), on pine64-lts and Pinebook.
USB should work, it work on Pine64/-LTS/Book so I don't see why it doesn't here.

eMMC boot you need the patch or it will crash.
Thermal patched so it works (needed for our cluster)
CPU Freq also fixed needed more then 800Mhz and need it for stats and monitoring/thermal control. 
DMA and SRAM patched a little so it works with the ethernet controller and get more speed
Famebuffer don't need it on the cluster so currently removed from the DTB because of errors at boot and early fitting issue with the DTB in the SPL version of the kernel but that's on hold until more bugs are fixed. (Kernel gets placed into SPL and almost instant boots the kernel when you power up the node)
USB on clusterboard I tested 2 nodes can plug-in stuff but nothing happens, didn't check into it that much, don't need USB.

Just inserted USB key in this node;

Code:
# usbconfig list
ugen0.1: <Allwinner EHCI root HUB> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.1: <Generic OHCI root HUB> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen3.1: <Generic OHCI root HUB> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen2.1: <Allwinner EHCI root HUB> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)

* Looks like nothing to me * :-)
#5
(07-31-2018, 04:05 PM)paradise Wrote:
(07-31-2018, 03:47 PM)manu Wrote:
(07-31-2018, 03:09 PM)paradise Wrote: Hi,

I made an image of an almost complete world of FreeBSD for the SoPine including all my patches.

* What works
- Can boots from eMMC and should boot from SD. (didn't test)
- Can boot with MFS (not in this image but you can change the boot.scr or push settings with dhcp)
- Can boot from PXE
- CPU Frequency settings (1248Mhz, 1200Mhz, 1008Mhz, 816Mhz (DEFAULT), 528Mhz)
- Thermal sensor
- DMA Controller
- SRAM Controller for ethernet only
- SD, eMMC both work but may spit out messages at boot only depending on what you have inserted. (I use PXE+MFS+NFS so less prio)
- pkg install / portsnap (ports - I installed glusterfs from ports with somewhat same build as this so it should work!)

* Doesn't work
- No framebuffer (can't use/test it on clusterboard)
- USB doesn't seem to be working but I doubt the connection didn't get it working in Linux either.
- No MALI support what so ever.. regulators for MALI and other stuff are off.

* Issues
- Ethernet is fast but not yet 100% stable.. there are a few link drops for a millisecond or so
   I use MFS as root to prevent NFS from freaking out on that if it's the rootfs.


This is only a beta and it's version 1;
I have it running on 7 nodes myself using PXE/MFS and NFS and it's getting more stable with every patch. :-)

Next version I'll also include configs and stuff I use for DHCP/PXE booting the other 6 modules of the 1'st.. Need to compile it first for ARM.

You can use pkg install and portsnap to install stuff.

Login via SSH: sopine/sopine (sopine is in wheel)
Root has no password

https://drive.google.com/open?id=1i7MbXJ...me-Jrl25Lp

Hi,

manu@FreeBSD here.

You talk about patches, where are they ?
For SD boot I know that andrew@ booted some sopine module from sdcard on the clusterboard so it should definitely work.
Framebuffer works (well EFIFB work), on pine64-lts and Pinebook.
USB should work, it work on Pine64/-LTS/Book so I don't see why it doesn't here.

Patches are on the nas at work and a tiny bit I tried to put on github but that was a pain.
Will release all patches for the kernel soon most are minor but make it crash less often (removing unsupported hardware features from settings)

The most important thing to get it to boot from eMMC I made this quick and dirty patch in aw_mmc.c to remove unsupported hardware features on the eMMC controller.

Code:
        if (bus_width >= 8){
                sc->aw_host.caps |= MMC_CAP_8_BIT_DATA;
                sc->aw_host.caps &= ~(MMC_CAP_MMC_DDR52 | MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR25);
                sc->aw_host.f_max = 52000000;
        }

One of the biggest patches is a NetBSD DTS file decompiled, edit and recompile for like 4 ever and get stuff working with existing devices (I then hacked in the kernel build files a bit to include those modules because I was too lazy to find out why they didn't want to compile by default haha).

In other words. it works for what I do with it but I need it to get fixed in base to make update not a pain in my but. :-)

One of the next steps will be get a clean head and get a diff but then I changed many code formatting so I don't think base will accept. (I hate real long lines yes but I hate splitting if(a==b && b == c) up into multiple lines more especially if they are short, they mess up my view of the code)
So importing it will be a bit of work. :-(

For me it was important to get it up and running for our Cluster or else I'm stuck with Linux. haha

The eMMC patch make no sense, why removing those caps ?
For upstreaming, yes I will not accept patches with code not style(9) compliant.

(07-31-2018, 06:09 PM)paradise Wrote:
(07-31-2018, 03:47 PM)manuHi, Wrote: manu@FreeBSD here.

You talk about patches, where are they ?
For SD boot I know that andrew@ booted some sopine module from sdcard on the clusterboard so it should definitely work.
Framebuffer works (well EFIFB work), on pine64-lts and Pinebook.
USB should work, it work on Pine64/-LTS/Book so I don't see why it doesn't here.

eMMC boot you need the patch or it will crash.
Thermal patched so it works (needed for our cluster)
CPU Freq also fixed needed more then 800Mhz and need it for stats and monitoring/thermal control. 
DMA and SRAM patched a little so it works with the ethernet controller and get more speed
Famebuffer don't need it on the cluster so currently removed from the DTB because of errors at boot and early fitting issue with the DTB in the SPL version of the kernel but that's on hold until more bugs are fixed. (Kernel gets placed into SPL and almost instant boots the kernel when you power up the node)
USB on clusterboard I tested 2 nodes can plug-in stuff but nothing happens, didn't check into it that much, don't need USB.

Just inserted USB key in this node;

Code:
# usbconfig list
ugen0.1: <Allwinner EHCI root HUB> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.1: <Generic OHCI root HUB> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen3.1: <Generic OHCI root HUB> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen2.1: <Allwinner EHCI root HUB> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)

* Looks like nothing to me * :-)

What's the crash you are seeing for eMMC ?
For the thermal driver I'm currently finishing my patch to upstream the dts binding for it and will commit FreeBSD code soon.
The ethernet controller have it's own DMA controller iirc, is that what you have talking about ?
For USB iirc one of the port is configured as OTG and we don't support this (there is a review with patch)
What do you mean by "kernel is placed into SPL" ???
#6
[quote pid='39500' dateline='1533109973']
What's the crash you are seeing for eMMC ?
For the thermal driver I'm currently finishing my patch to upstream the dts binding for it and will commit FreeBSD code soon.
The ethernet controller have it's own DMA controller iirc, is that what you have talking about ?
For USB iirc one of the port is configured as OTG and we don't support this (there is a review with patch)
What do you mean by "kernel is placed into SPL" ???
[/quote]


* eMMC crashes on a protocol issue;
Code:
Allwinner datasheet;
* "SMHC Controller support up to MMC5.0"
  -- 52 is activated in the features.

* Thermal is nice I cannot do without!
  - by the way: CPUFreq is also mostly a DTB patch I think. (it was pretty easy for me)
* USB didn't even try the host port yet haha, didn't even think remotely it would work.
* Ethernet did 7MB/s when I first started testing FreeBSD on the clusterboard.
  The syscons in the DTB was not correct and also I think I needed to change some small 
  other stuff making it work more stable. 
  And removed some stuff to get it going up to 92MB/s on the clusterboard (at peak), ~80MB/s steady.

* I was experimenting with flashing the entire kernel to SPL and loading it from there.
 It does fit/work it will make kernel upgrades a pain for now. 
  But then you don't need u-boot to fetch the kernel from NFS anymore and can 'almost' directly start it.


FreeBSD boot from eMMC without the patch
Code:
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
mmc0: No compatible cards found on bus
aw_mmc0: Spurious interrupt - no active request, rint: 0x00000004

AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_DATA_END_BIT_ERR
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
AW_MMC_INT_RESP_TIMEOUT
mmc1: Failed to set VCCQ for card at relative address 2
AW_MMC_INT_DATA_CRC_ERR
AW_MMC_INT_DATA_CRC_ERR
AW_MMC_INT_DATA_CRC_ERR
AW_MMC_INT_DATA_CRC_ERR
uhub1: 1 port with 1 removable, self powered
mmcsd0: Error reading EXT_CSD Failed
device_attach: mmcsd0 attach returned 6
Release APs...arc4random: no preloaded entropy cache
done
Trying to mount root from ufs:/dev/ufs/rootfs [rw,noatime]...
Root mount waiting for:CPU  0: ARM Cortex-A53 r0p4 affinity: usbus3  0
usbus2 usbus0
Instruction Set Attributes 0 = <AES+PMULL,SHA1,SHA2,CRC32>
Instruction Set Attributes 1 = <>
        Processor Features 0 = <AdvSIMD,Float,EL3 32,EL2 32,EL1 32,EL0 32>
        Processor Features 1 = <0>
     Memory Model Features 0 = <4k Granule,64k Granule,MixedEndian,S/NS Mem,16bit ASID,1TB PA>
     Memory Model Features 1 = <>
     Memory Model Features 2 = <32b CCIDX,48b VA>
            Debug Features 0 = <2 CTX Breakpoints,4 Watchpoints,6 Breakpoints,PMUv3,Debug v8>
            Debug Features 1 = <0>
        Auxiliary Features 0 = <0>
        Auxiliary Features 1 = <0>
CPU  1: ARM Cortex-A53 r0p4 affinity:  1
CPU  2: ARM Cortex-A53 r0p4 affinity:  2
CPU  3: ARM Cortex-A53 r0p4 affinity:  3
uhub3: 1 port with 1 removable, self powered
uhub0: 1 port with 1 removable, self powered
uhub2: 1 port with 1 removable, self powered
mountroot: waiting for device /dev/ufs/rootfs...
Mounting from ufs:/dev/ufs/rootfs failed with error 19.

Loader variables:
 vfs.root.mountfrom=ufs:/dev/ufs/rootfs
 vfs.root.mountfrom.options=rw,noatime

Manual root filesystem specification:
 <fstype>:<device> [options]
     Mount <device> using filesystem <fstype>
     and with the specified (optional) option list.

   eg. ufs:/dev/da0s1a
       zfs:tank
       cd9660:/dev/cd0 ro
         (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /)

 ?               List valid disk boot devices
 .               Yield 1 second (for background tasks)
 <empty line>    Abort manual input

mountroot>
Edit:
I just noticed I used the wrong DTB. I was still testing stuff the lazy way and forgot about it until I rechecked the boot messages.
I'll upload the new DTB you can place in the MSDOS partition /sopine.dtb to fix the syscon driver.
Doesn't seem to make much of a difference still peaking at ~92MB/s and CPU stays pretty low (<8%) while utilizing network.
It does get HOT fast when doing lots of traffic 
'dd if=/dev/urandom bs=1m | ssh node dd of=/dev/null' and without a fan it will throttle down to 500Mhz in a couple of minutes.
Still trying to pinpoint the link dropping issue (you notice the most in log messages) I think it's something rgephy is doing.. (don't mind the time, this node cannot access a NTP server atm because I'm too lazy to fix my firewall or install ntp)
Code:
# dd if=FreeBSD-aarch64-12-sopine-SoPine.img.orig of=/dev/null bs=1M
2384+1 records in
2384+1 records out
2499999744 bytes transferred in 26.997205 secs (92602168 bytes/sec)
# df -h .
Filesystem          Size    Used   Avail Capacity  Mounted on
10.90.90.166:/pi    129G     71G     58G    55%    /mnt/nfs
# tail /var/log/messages
Jan  1 00:08:33 NODE001 kernel: awg0: link state changed to DOWN
Jan  1 00:08:33 NODE001 kernel: awg0: link state changed to UP
Jan  1 00:08:33 NODE001 kernel: awg0: link state changed to DOWN
Jan  1 00:08:33 NODE001 kernel: awg0: link state changed to UP
*edit 2:
The syscon fix and delay to 0,2 are looking to have fixed the link drop issue.
None of the 7 nodes have dropped link in the last 20 minutes or so this is looking promising. 


If all is stable I'll make a diff, check all modifications (aka ugly hacks) and post them.
#7
You're talking about eMMC but Sopine module doesn't have eMMC, neither the clusterboard.
DDR52 is not MMC5.2
"I was experimenting with flashing the entire kernel to SPL and loading it from there." What do you mean ? SPL is secondary program loader. Are you talking about the SPI flash ?
#8
https://www.pine64.org/?product=clusterb...dule-slots
On the left, it's connected to node slot 1 it's using SD-MMC controller 3 check the Allwinner A64 PDF

Yes.. Loading it in SPI (I use SPL because you merge it with loader.efi) and place it in SPI flash indeed.

I use SPI less because it's confusing if you also have Serial Peripheral Interface's. :-)
#9
(08-01-2018, 04:50 AM)paradise Wrote: https://www.pine64.org/?product=clusterb...dule-slots
On the left, it's connected to node slot 1 it's using SD-MMC controller 3 check the Allwinner A64 PDF

Yes.. Loading it in SPI (I use SPL because you merge it with loader.efi) and place it in SPI flash indeed.

I use SPI less because it's confusing if you also have Serial Peripheral Interface's. :-)

Wow, hard to see the eMMC zif connetor.
But still I don't understand your patch, it should work fine with latest HEAD, it does on the Pine64-LTS
So for SPI did you make a u-boot driver for it ?
#10
(08-01-2018, 05:07 AM)manu Wrote:
(08-01-2018, 04:50 AM)paradise Wrote: https://www.pine64.org/?product=clusterb...dule-slots
On the left, it's connected to node slot 1 it's using SD-MMC controller 3 check the Allwinner A64 PDF

Yes.. Loading it in SPI (I use SPL because you merge it with loader.efi) and place it in SPI flash indeed.

I use SPI less because it's confusing if you also have Serial Peripheral Interface's. :-)

Wow, hard to see the eMMC zif connetor.
But still I don't understand your patch, it should work fine with latest HEAD, it does on the Pine64-LTS
So for SPI did you make a u-boot driver for it ?

I found a u-boot that can access the SPI I flash my own u-boot to SPI flash with that. 
Yesterday I flashed the last 35 nodes with the patched u-boot. (added the patch to fix the realtek bug so I can boot from PXE)

I'll try head.. I started this project couple of weeks ago and I didn't update the tree sinds.


I think I have it 100% stable now .. Ethernet is no longer dropping link. (I messed up the syscon while testing other stuff)
Code:
Jan  1 00:08:52 NODE001 kernel: Jan  1 00:08:52 NODE001 su[671]: freebsd to root on /dev/pts/0
Jan  1 00:54:50 NODE001 freebsd[712]: test
Jan  1 00:55:07 NODE001 kernel:
Jan  1 00:55:09 NODE001 syslogd: last message repeated 3 times
Jan  1 01:49:50 NODE001 freebsd[752]: here we are

kernel:  (nothing) message is my boot is tricky because my rootfs is only 16mb the real root is chrooted and I should not dare to touch the console like I do. ;-)
As topic mentions it's still [WIP*]

You did make a few good points and i'll try and be more direct in what the patches are.. I just started hacking the code until stuff started working and I'm like hyper focused on it so I test patches at a rate you will not believe.
I test on 7 nodes (can tell my cluster master to reboot all nodes to test a new kernel)
In a few minutes I can reproduce a weird bug.

Also I use stuff to compile the kernel faster.. the only slow-down is currently getting the new kernel from the NAS at work to a machine that can talk to my machine at home and then getting it here and on the right NFS location.. :-)

Code:
# ./cluster -Q iamsure
You asked for it and now you have done it! -- All nodes will do an instant reboot now!
{"result":"ok, 6 nodes responded"}
:-)


Possibly Related Threads…
Thread Author Replies Views Last Post
  Upper USB slot not working on FreeBSD Pbowen 4 10,647 03-22-2020, 06:40 AM
Last Post: Pbowen

Forum Jump:


Users browsing this thread: 4 Guest(s)