Date: Fri, 06 May 2016 10:40:45 +0000 From: Tom Vijlbrief <tvijlbrief@gmail.com> To: freebsd-arm@freebsd.org Subject: FreeBSD on the ODroid-C2 (arm64 AMLogic S905) Message-ID: <CAOQrpVd=J=HhCW5g0aPtLd049T62dxx9Dwx9kH6Hd=p__gZSWQ@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
I've been hacking to see if I can get FreeBSD to boot on this little device, and I got to this: Using Meson_Ethernet device TFTP from server 192.168.0.171; our IP address is 192.168.0.32 Filename 'kernel'. Load address: 0x20000000 Loading: duplex 1000m ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ### 2.9 MiB/s done Bytes transferred = 4811936 (496ca0 hex) ## Starting application at 0x20001000 ... size 7f000000 pmap_bootstrap ffff000000004000 20000000 800000 ffff000000004000 0 platform_devmap_init (cbus) Early printf yielding control to the real console. KDB: debugger backends: ddb KDB: current backend: ddb Found 1 CPUs in the device tree Copyright (c) 1992-2016 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 11.0-CURRENT #478 01606fb(tc2): Fri May 6 12:17:26 CEST 2016 tom@bsd11.v7f.eu: /usr/home/tom/obj/arm64.aarch64/media/swan/github/freebsd/s ys/ODROIDC2 arm64 FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0 ) WARNING: WITNESS option enabled, expect reduced performance. Amlogic aml-s905 SoC FreeBSD/SMP: Multiprocessor System Detected: 1 CPUs ULE: setup cpu 0 null: <full device, null device, zero device> openfirm: <Open Firmware control device> mem: <memory> random: harvesting attach, 8 bytes (4 bits) from nexus0 ofwbus0: <Open Firmware Device Tree> simplebus0: <Flattened device tree simple bus> on ofwbus0 random: harvesting attach, 8 bytes (4 bits) from simplebus0 clk_fixed0: <Fixed clock> on ofwbus0 random: harvesting attach, 8 bytes (4 bits) from clk_fixed0 random: harvesting attach, 8 bytes (4 bits) from ofwbus0 clkmsr0: <Amlogic aml8726 clkmsr> mem 0xc1108758-0xc1108767 on simplebus0 clkmsr0: bus clock 167 MHz random: harvesting attach, 8 bytes (4 bits) from clkmsr0 scu0: <ARM Snoop Control Unit> mem 0xc4300000-0xc4300fff on simplebus0 random: harvesting attach, 8 bytes (4 bits) from scu0 cpuconfig0: <Amlogic CPU Config> mem 0xd901ff80-0xd901ff8f on simplebus0 random: harvesting attach, 8 bytes (4 bits) from cpuconfig0 ccm0: <Amlogic aml8726 ccm> mem 0xc1104140-0xc1104153 on simplebus0 random: harvesting attach, 8 bytes (4 bits) from ccm0 gic0: <ARM Generic Interrupt Controller> mem 0xc4301000-0xc4301fff,0xc4302000-0x c4303fff,0xc4304000-0xc4305fff,0xc4306000-0xc4307fff irq 41 on ofwbus0 arm_gic_fdt_attach gic0: pn 0x20, arch 0x2, rev 0x1, implementer 0x43b irqs 256 random: harvesting attach, 8 bytes (4 bits) from gic0 generic_timer0: <ARMv7 Generic Timer> irq 16,19,18 on ofwbus0 ofwbus0: no default resources for rid = 3, type = 1 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 ofwbus0: <l2-cache-controller@c4200000> mem 0xc4200000-0xc4200fff irq 175 compat arm,pl310-cache (no driver attached) ofwbus0: <timer@c1109990> mem 0xc1109990-0xc11099a7 irq 92 compat amlogic,meson6 -timer (no driver attached) simplebus0: <watchdog@c1109900> mem 0xc1109900-0xc1109907 irq 32 disabled compat amlogic,meson6-wdt (no driver attached) uart0: <Amlogiwart0: RTS iflow, CTS oflow uart0: fast interrupt uart0: PPS capture mode: DCDinvalid random: harvesting attach, 8 bytes (4 bits) from uart0 simplebus0: <serial@c11084c0> mem 0xc11084c0-0xc11084d7 irq 58 disabled compat a mlogic,meson-uart (no driver attached) simplebus0: <serial@c11084dc> mem 0xc11084dc-0xc11084f3 irq 107 disabled compat amlogic,meson-uart (no driver attached) simplebus0: <serial@c1108700> mem 0xc1108700-0xc1108717 irq 125 disabled compat amlogic,meson-uart (no driver attached) simplebus0: <i2c@c8100500> mem 0xc8100500-0xc810051f irq 124 disabled compat aml ogic,meson6-i2c (no driver attached) simplebus0: <i2c@c1108500> mem 0xc1108500-0xc110851f irq 53 disabled compat amlo gic,meson6-i2c (no driver attached) simplebus0: <i2c@c11087c0> mem 0xc11087c0-0xc11087df irq 160 disabled compat aml ogic,meson6-i2c (no driver attached) simplebus0: <ir-receiver@c8100480> mem 0xc8100480-0xc810049f irq 47 disabled com pat amlogic,meson6-ir (no driver attached) simplebus0: <spi@c1108c80> mem 0xc1108c80-0xc1108cff disabled compat amlogic,mes on6-spifc (no driver attached) simplebus0: <ethernet@c9410000> mem 0xc9410000-0xc941ffff,0xc1108108-0xc110810b irq 40 disabled compat amlogic,meson6-dwmac (no driver attached) simplebus0: <pinctrl@c11080b0> mem 0xc11080b0-0xc11080d7,0xc11080e8-0xc11080ff,0 xc1108120-0xc1108137,0xc8100014-0xc8100017,0xc810002c-0xc810002f,0xc810002c-0xc8 10002f compat amlogic,aml8726-pinctrl (no driver attached) rtc0: <Amlogic aml8726 RTC> mem 0xc8100740-0xc8100753 irq 104 on simplebus0 rtc0: unsupported SoC device_attach: rtc0 attach returned 6 gpio0: <Amlogic aml8726 GPIO> mem 0xc8100024-0xc8100027,0xc8100024-0xc8100027,0x c8100028-0xc810002b on simplebus0 gpiobus0: <OFW GPIO bus> on gpio0 random: harvesting attach, 8 bytes (4 bits) from gpiobus0 gpioc0: <GPIO controller> on gpio0 random: harvesting attach, 8 bytes (4 bits) from gpioc0 random: harvesting attach, 8 bytes (4 bits) from gpio0 gpio1: <Amlogic aml8726 GPIO> mem 0xc1108054-0xc1108057,0xc1108058-0xc110805b,0x c110805c-0xc110805f on simplebus0 gpiobus1: <OFW GPIO bus> on gpio1 random: harvesting attach, 8 bytes (4 bits) from gpiobus1 gpioc1: <GPIO controller> on gpio1 random: harvesting attach, 8 bytes (4 bits) from gpioc1 random: harvesting attach, 8 bytes (4 bits) from gpio1 gpio2: <Amlogic aml8726 GPIO> mem 0xc110806c-0xc110806f,0xc1108070-0xc1108073,0x c1108074-0xc1108077 on simplebus0 gpiobus2: <OFW GPIO bus> on gpio2 random: harvesting attach, 8 bytes (4 bits) from gpiobus2 gpioc2: <GPIO controller> on gpio2 random: harvesting attach, 8 bytes (4 bits) from gpioc2 random: harvesting attach, 8 bytes (4 bits) from gpio2 simplebus0: <mmc@c1108c20> mem 0xc1108c20-0xc1108c3f irq 60 disabled compat amlo gic,aml8726-mmc (no driver attached) simplebus0: <sdxc@c1108e00> mem 0xc1108e00-0xc1108e3b irq 110 disabled compat am logic,aml8726-sdxc-m8 (no driver attached) simplebus0: <rng@c1108100> mem 0xc1108100-0xc1108107 disabled compat amlogic,aml 8726-rng (no driver attached) simplebus0: <usb-phy@c1108800> mem 0xc1108800-0xc110881f disabled compat amlogic ,aml8726-m8-usb-phy (no driver attached) simplebus0: <usb-phy@c1108820> mem 0xc1108820-0xc110883f disabled compat amlogic ,aml8726-m8-usb-phy (no driver attached) simplebus0: <usb@c9040000> mem 0xc9040000-0xc907ffff irq 62 disabled compat syno psys,designware-hs-otg2 (no driver attached) simplebus0: <usb@c90c0000> mem 0xc90c0000-0xc90fffff irq 63 disabled compat syno psys,designware-hs-otg2 (no driver attached) simplebus0: <eth@c9410000> mem 0xc9410000-0xc9411fff irq 40 disabled compat amlo gic,meson6-dwmac (no driver attached) simplebus0: <fb@c8006020> mem 0xc8006048-0xc8006053,0xc1106800-0xc1106bff,0xc110 7400-0xc11077ff irq 34,35,44,45 disabled type display compat Xamlogic,aml8726-fb (no driver attached) cpulist0: <Open Firmware CPU Group> on ofwbus0 cpu0: <Open Firmware CPU> on cpulist0 arm64_cpu0: register <200> random: harvesting attach, 8 bytes (4 bits) from arm64_cpu0 random: harvesting attach, 8 bytes (4 bits) from cpu0 random: harvesting attach, 8 bytes (4 bits) from cpulist0 ofwbus0: <leds> compat Xgpio-leds (no driver attached) Device configuration finished. procfs registered Timecounters tick every 1.000 msec tcp_init: net.inet.tcp.tcbhashsize auto tuned to 16384 ===== This is my github: https://github.com/tomtor/freebsd/tree/tc2 which contains also some commits from Andrew Turner (his early RPI3 port) and some preliminary Pine64 work (waiting for a board). A script to build an image: https://github.com/tomtor/image-freebsd-c2/blob/master/build/mkc2image.sh I'm currently stuck because I cannot get a working Timer, interrupts are for some reason not generated or get lost, so the boot hangs on an msleep late in the boot process. I have no S905 documentation, only S805 docu, which looks valid, except for the 64bit arm difference. The guys at http://www.hardkernel.com/main/products/prdt_info.php?g_code=G145457216438&tab_idx=2 are still waiting for the datasheet :-/ What I noticed is that Timer-E is somehow not running, Timer-A works as expected (I can see it counting in the debugger), except perhaps for the interrupts. If someone has suggestions how to fix this, cq hints how to proceed, that would be very nice!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOQrpVd=J=HhCW5g0aPtLd049T62dxx9Dwx9kH6Hd=p__gZSWQ>