Banana Pi



  • Hello all,

    as far I see there is no Banana Pi thread started yet.
    Banana Pi is similar to Raspberry Pi, but is more powerful:
    About: http://www.bananapi.org/p/product.html
    ARM Cortex-A7 A20 dual-core, 1GHz, Mali400MP2 GPU, 1GB RAM, Gigabit Ethernet, 2 x USB 2.0
    CPU: http://www.allwinnertech.com/en/clq/processora/A20.html

    I know there is no pfSense port to ARM, but.. what if we could emulate i386 on ARM??!
    There are several projects about this:
    http://systems.cs.columbia.edu/archive/pub/2010/07/kvm-for-arm/
    http://www.virtualopensystems.com/en/solutions/guides/kvm-on-arm/
    http://columbia.github.io/linux-kvm-arm/

    So I've started experiments, right now I have:

    • running working Raspbian OS,
    • installed qemu and libvirt-bin, due lack of dependencies (python-spice-client-gtk) there's no way to install virt-manager so I've managing VMs from another station over SSH,
    • pfSense i386 is starting in normal or safe mode, but stops on:

    ppc0: parallel port not found.

    I'm stuck here because I don't know what OS should load next.

    What I don't have:

    • bridged adapter not ready yet (for WAN and LAN connections) but this isn't problem since bridge-utils are already installed,
    • no fully accelerated VM, just emulation (poor performance).











  • Few more issues later..
    The point is to avoid modifing original pfSense OS, since things may mess up during later upgrades.
    So I'm just modifing host OS on Banana Pi to allow booting pfSense (As far I know there is no way to run it on bare metal).

    1. Printer port issue

    • add Parallel device with file pointing to, as example: /dev/printer0.ps
      2. VGA card stuck
    • during booting OS stuck again, so replace currius driver with vmvga video type in QEMU settings
      3. Slow install
    • my microSD card is REALLY SLOW, only 15MB/s read and 1MB/s write, so for installation I've used cache mode "writeback" for IDE disk to speed it up during writes (note this is UNSAFE if power fails!),
    • it was even so slow that guest OS reported couple LBA timeouts (!)
      4. Enable NIC offload features on host
      /etc/rc.local
    #Enable offload for onboard Gigabit NIC
    ethtool -K eth0 rx on tx on sg on gso on gro on
    #tcp-segmentation-offload and large-receive-offload are not supported for this hardware!
    

    5. Enable other "HA solutions"
    /etc/rc.local

    #Reboot on kernel panic
    echo "1" > /proc/sys/kernel/panic
    

    6. Create bridge for QEMU
    /etc/network/interfaces

    auto lo
    
    iface lo inet loopback
    
    #Manual mode for Gigabit NIC
    auto eth0
    iface eth0 inet manual
    
    # Bridge for VM traffic
    auto br0
    iface br0 inet static
        address 10.20.20.222
        netmask 255.255.255.0
        network 10.20.20.0
        broadcast 10.20.20.255
        gateway 10.20.20.1
        dns-nameservers 10.20.20.1 8.8.8.8
        bridge-ports  eth0
        bridge-fd     9
        bridge-hello  2
        bridge-maxage 12
        bridge-stp    off
    
    allow-hotplug wlan0
    iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
    iface default inet dhcp
    

    7. Not booting after install
    Boot loader just shows:

    F1 pfSense
    F6 PXE
    Boot: F1 #
    Read error

    4.26. Why does FreeBSD's boot loader display ``Read error'' and stop after the BIOS screen?
    FreeBSD's boot loader is incorrectly recognizing the hard drive's geometry. This must be manually set within fdisk when creating or modifying FreeBSD's slice.
    The correct drive geometry values can be found within the machine's BIOS. Look for the number of cylinders, heads and sectors for the particular drive.
    Within sysinstall(8)'s fdisk, hit G to set the drive geometry.
    A dialog will pop up requesting the number of cylinders, heads and sectors. Type the numbers found from the BIOS separates by forward slashes.
    5000 cylinders, 250 sectors and 60 sectors would be entered as 5000/250/60
    Press enter to set the values, and hit W to write the new partition table to the drive.

    • so I've run fdisk on host and it shows:

    Disk /var/lib/libvirt/images/pfSense.img: 8589 MB, 8589934592 bytes
    16 heads, 63 sectors/track, 16644 cylinders, total 16777216 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes

    • and compared this to fresh image:
      qemu-img create -f raw test.img 8G
      size match!
    • so that pointed me there must be something else.. regarding VM BIOS.
      So, I've switched to different Boot Loader - GAG
      http://gag.sourceforge.net/
    • after running it under Linux I was still not able to start it.. GAG stucks at "1".
      And I'm stuck there, again.






















  • Erm, well - about non-bootable image. I will try to explain from datarecovery point of view.

    Exact answer is - "Wrong" geometry of image.

    Bootloader treats image considering it has 48bit LBA address translation, but since the image has 8Gb of data (am I correct about sizing?) the blocks are allocated unexpectedly for boot loader to see the data.

    My recommendation is

    Stripe down HDD size to the one SD card uses utilizing HPA. (reversible change)

    repeat your steps once more.



  • Hello, sorry for very long response.
    The problem was indeed in VM BIOS.
    I've created VM with only available option "Other OS" instead of "FreeBSD 8.x" in creator, this caused unbootable state.
    Raspbian is missing some important packages, while Lubuntu even has virt-manager available, so I was able to use it to manage my VM. Newer packages also contains more options specific for booting.
    However, pfSense stuck at VGA again (changing model doesn't help), it starts only in Fail-safe mode.
    When I try to access GUI on this VM all I get is: login screen and after typing password:

    CSRF check failed. Either your session has expired, this page has been inactive too long, or you need to enable cookies.
    Debug: sid:1bb48302acef38e0c9b4d5d97244925cbc514c18,1410555529
    

    I was looking into different BSD projects, some of them are for ARM (NetBSD), however doesn't seem to support Allwinner CPUs.. so it doesn't seem to run pfSense on Banana PI any way :(

    But to let You know how Banana Pi performs networking here is result from iperf (Banana as server, connected by crossover cable to Gigabit client). Networking setup as described before (offload engines enabled, bridged to onboard NIC, etc..)

    iperf-2.0.5-2-win32>iperf -c 192.168.137.222

    ------------------------------------------------------------
    Client connecting to 192.168.137.222, TCP port 5001
    TCP window size: 64.0 KByte (default)
    ------------------------------------------------------------
    [  3] local 192.168.137.1 port 55946 connected with 192.168.137.222 port 5001
    [ ID] Interval       Transfer     Bandwidth
    [  3]  0.0-10.0 sec   429 MBytes   360 Mbits/sec
    

    iperf-2.0.5-2-win32>iperf -c 192.168.137.222 -P 10

    ------------------------------------------------------------
    Client connecting to 192.168.137.222, TCP port 5001
    TCP window size: 64.0 KByte (default)
    ------------------------------------------------------------
    [ 12] local 192.168.137.1 port 55957 connected with 192.168.137.222 port 5001
    [  9] local 192.168.137.1 port 55954 connected with 192.168.137.222 port 5001
    [ 11] local 192.168.137.1 port 55956 connected with 192.168.137.222 port 5001
    [  8] local 192.168.137.1 port 55953 connected with 192.168.137.222 port 5001
    [ 10] local 192.168.137.1 port 55955 connected with 192.168.137.222 port 5001
    [  4] local 192.168.137.1 port 55949 connected with 192.168.137.222 port 5001
    [  7] local 192.168.137.1 port 55952 connected with 192.168.137.222 port 5001
    [  6] local 192.168.137.1 port 55951 connected with 192.168.137.222 port 5001
    [  5] local 192.168.137.1 port 55950 connected with 192.168.137.222 port 5001
    [  3] local 192.168.137.1 port 55948 connected with 192.168.137.222 port 5001
    [ ID] Interval       Transfer     Bandwidth
    [  9]  0.0-10.0 sec  94.2 MBytes  79.0 Mbits/sec
    [ 11]  0.0-10.0 sec   103 MBytes  86.3 Mbits/sec
    [  8]  0.0-10.0 sec   115 MBytes  96.6 Mbits/sec
    [  4]  0.0-10.0 sec   111 MBytes  93.0 Mbits/sec
    [  6]  0.0-10.0 sec   122 MBytes   102 Mbits/sec
    [  5]  0.0-10.0 sec   106 MBytes  89.1 Mbits/sec
    [  3]  0.0-10.0 sec   113 MBytes  94.6 Mbits/sec
    [ 12]  0.0-10.0 sec   119 MBytes  99.3 Mbits/sec
    [ 10]  0.0-10.0 sec  97.0 MBytes  81.1 Mbits/sec
    [  7]  0.0-10.0 sec   126 MBytes   105 Mbits/sec
    [SUM]  0.0-10.0 sec  1.08 GBytes   925 Mbits/sec
    

    It just looks so promising for a low power router.. shame :(
    EDIT: Banana Pi seems to better network device even than HummingBoards, if You read carefuly at:
    http://www.solid-run.com/products/hummingboard/linux-sbc-specifications/

    (*) Note that due to internal i.MX6 buses the 1000Mbps interface speed is limited to 470Mbps.

    And if You see the screenshots there is no such network bandwidth limit on Banana Pi.








  • I'm doing some progress with support pfSense on Banana Pi.
    Current Lubuntu from Lemarker's image runs kernel version 3.4.90.
    Latest available development version is 3.16-rc7.

    Please see attached screenshots from kernel config menu.
    After enabling LPAE new options in Virtualization menu are available for.. ARM arch.
    One of them is: "KVM host support for ARM cpus". Sounds like what we need!

    Right now my Banana is compiling kernel as .DEB package, will see if it works..

    EDIT: keeping You updated.
    Right now Banana Pi is running kernel 3.4.90, latest available is 3.4.93. However, KVM on ARM feature has been added at least in 3.9 branch, latest available is 3.16-rc7.
    http://kernelnewbies.org/Linux_3.9#head-a914c539db462d70e9119fc436e97351070337d9
    Since pfSense requires fully supported KVM to run optimal I have to wait until patches supporting this platform will become available.




















  • @TooMeeK:

    I'm doing some progress with support pfSense on Banana Pi.

    […]

    Since pfSense requires fully supported KVM to run optimal I have to wait until patches supporting this platform will become available.

    • you can't call the result "pfSense", since it's not.

    • we are interested in the ARM devices market.  Netgate is about to pick-up the Beaglebone Black.



  • I have no access to the sources.. if I would have then I could do cross-compilation..
    but still don't know is kernel supporting Allwinner SoCs. So far it's not:
    http://www.freebsd.org/relnotes/CURRENT/hardware/proc.html
    but there is limited information about Allwinner A20:
    https://wiki.freebsd.org/FreeBSD/arm
    Anyway, Cubieboard's kernel will not work, it probably will boot without networking support since it needs GMAC:
    https://wiki.freebsd.org/FreeBSD/arm/Cubieboard

    UPDATE:
    Cubieboard's 2 image starts on Banana, however stuck at kernel load, there is no error message, just 2 penquens - Linux logo.
    So I belive it FreeBSD image built for Cubieboard 2 won't work too.

    UPDATE2:
    As I see:
    2.1.4-RELEASE runs FreeBSD 8.3-RELEASE-p16
    while
    2.2-ALPHA (amd64) runs FreeBSD 10.0-STABLE
    I'll focus on Allwinner config supporting kernel from 10.0.

    Where I can find pfSense kernel config file?
    According to this:
    http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
    it should be at /usr/src/sys/amd64/conf
    but there is no such directory, also no similar config locations.

    UPDATE3:
    Found ARM images for Beaglebone boards:
    ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/10.0

    UPDATE 2014-09-02:
    I have good news and bad news.
    Good is FreeBSD 10.0 runs on Banana Pi (reached login prompt), so it's likely able to run bare-metal pfSense.
    Bad news is that there is no support for:

    • SD card reader as storage for main OS, only for booting
    • no HDMI output
    • and the worst: no 1Gbit driver available (GMAC).
      So in this stage it's useless for base box for pfSense.

    Additionally, there is no ARM-hardware Virtualization support in current Linux kernel (3.4.x), since it's available at least from 3.9.x branch.
    So current versions of Bananian, Lubuntu or Raspbian have no capabilities to provide satisfactory performance.



  • Hello,

    do you see the new upcomming Banana Pi Router board?

    With 5 Gbit Ethernet and Wifi + SATA support…

    http://www.banana-pi.com/eacp_view.asp?id=64

    It would be great to see this board with pfsense support!

    KR



  • no price.


  • Netgate Administrator

    Looks interesting though, as Jim says, without a price it's hard to judge.
    I can't see how the network ports are connected, via a switch IC SOHO router style?

    Steve





  • @stephenw10:

    via a switch IC SOHO router style?

    I belive here is Your answer:
    Diese sind über einen Broadcom BCM53125 miteinander verbunden. = These are interconnected by a Broadcom BCM53125.
    http://www.broadcom.com/products/Switching/Home-and-Small-Business/BCM53125



  • Yes, it's a Broadcom switch, Realtek radio.

    Sample price is $70 (FOB China, no case, etc.)

    I'm guessing $99-ish by the time there is a case, power supply, microSD card, etc.

    The question is if the community is interested at that price (or even a little more).


  • Netgate Administrator

    I would have thought a market exists for a device that can replace a SOHO style router directly but runs pfSense. There have to be loads of admins out there who would like to use such a device for telecommuters.
    It would have to have usefully functioning wifi and something to make setting up a VPN very easy (even easier!). You might have to use some new install type though I guess there are plenty of devices that would meet the requirements for Nano these days.
    I'm not sure this is it though. Do you really need an HDMI port on your router?

    Steve



  • @stephenw10:

    … Do you really need an HDMI port on your router?
    Steve

    Steve,

    It's funny that you've mentioned that! Recently I was prospecting SoC specs for a new project and I was marvelling how far the ARM technology came. This A20 is a real powerhouse… but for video and graphics! Almost 3/4 of the die is for video bitmap, compression/decompression handling. 90% of its microcode is for h264.

    Why on earth anyone would want to build a network router around A20 is beyond me. The worst part is that all design optimizations and new low level code is for video/graphics. Not a bit of new code was developed for basic, general purpose computational tasks which in the case of products like routers remain the cornerstone.

    So, for all intents and purposes running pfSense on an A20 would be like running it on a Zilog Z80 of the 1970's except for the clock speed. And no, even the 8/16/32 bit aspect would be irrelevant! Algorithmics-wise they are the same generation.

    How about porting pfSense on CP/M (ok for good measure let's say MP/M) and putting it back on an Intel 8008 (ok a bit more generous, how about 8085)? Any taker? (Ok, I am taking out my Sinclair ZX-80 and dusting it off  ;D )

    It's amazing how people do (crazy) things just because hardware is now dirt cheap...  :-X

    Halea


  • Netgate Administrator

    Ha! If you get an IP stack running running on your ZX80 let me know and I'll dust off my ZX81. Pretty sure I have the RAM expansion pack here too so it should be no problem!
    Your comments are interesting though, I guess the phone/tablet market is driving a lot of IC development. There are plenty of specific 'network processors' that are presumably far more suitable. Are they more expensive though.
    I wouldn't want to discourage anyone from trying to make a thing run some OS it didn't before. I've spent many happy hours failing to get OpenWRT running on various hardware and leant a lot along the way. I had to laugh at that guy who got Doom running on his printer.  :)

    Don't let us put you off TooMeeK. Also apologies for somewhat hijacking your thread.

    Steve



  • @stephenw10:

    I would have thought a market exists for a device that can replace a SOHO style router directly but runs pfSense. There have to be loads of admins out there who would like to use such a device for telecommuters.
    It would have to have usefully functioning wifi and something to make setting up a VPN very easy (even easier!). You might have to use some new install type though I guess there are plenty of devices that would meet the requirements for Nano these days.
    I'm not sure this is it though. Do you really need an HDMI port on your router?

    Steve

    No, you don't need (nor want) an HDMI port on your router.  The issue is that most of the cost of having that port (and the audio port, and camera port) have already been paid for (all the gates are already in the SoC).  The BPI router makes me grouchy because it has a 10/100 port and a 10/100/1000 port (guess which one is attached to the switch!).  Even, then, I've ordered a couple.

    We had the Hackathon last week, and have most of pfSense working on the Beaglebone Black.  It's not a big stretch to make it work on the BPI router.  There are a lot of reasons for my push onto FreeBSD 10 (pfSense 2.2 will be based on FreeBSD 10.1-RELEASE), and getting to more platforms is one.



  • @gonzopancho:

    … have most of pfSense working on the Beaglebone Black. ...

    That's awesome news. I've been running RasPBX on BBB at home for a couple of months now. Prior to that it was an Raspberry Pi for more than a year (maybe two).
    I would love to put my hands on a cookbook to run pfSense on BBB. Any attempts I made with a couple of colleagues to run it on BBB miserably failed although at one point we got FreeBSD to work for a while (then we messed something and we couldn't go back on our steps).
    So, is there any notes you can share?
    Halea



  • when it's ready



  • Erm.. well.. long time since first post.
    I see You're digging my topic :>

    Anyway Beaglebone Black runs 100Mbit Ethernet, while BPi is 1Gbit which can be saturated easily,
    but there is no GMAC driver for it in FreeBSD head yet.
    My dream would be working tagged VLANs over GMAC driver that can handle at least 250Mbit up/down speeds on this small device..





  • I have two on my desk.  8) 8)


  • Netgate Administrator

    What's your opinion of them?  :)

    Steve



  • so far?  Meh.



  • OK, so Banana Pi's A7 ARM processor isn't ideal for pfSense, but nonetheless, I very much support the idea pfSense being able to run on something smaller than a netbook. Something pocket-portable and battery powered would be perfect for me to ensure I always have pfSense between me and the wild internet, wherever I am. Not being able to function on routers and other small devices like the Raspberry Pi greatly limits the usefulness of pfSense, despite the fact that pfSense is otherwise ideally suited to them. Instead, the best we can get is OpenWRT and DD-WRT, which simply isn't pfSense.



  • @gonzopancho:

    we are interested in the ARM devices market.  Netgate is about to pick-up the Beaglebone Black.



  • Might be useful, list of ARM boards which support to some degree freebsd.

    https://www.freebsd.org/platforms/arm.html

    The architecture of the ARM CPU's make it ideal for multi threading programs compared to the Intel/AMD chips when considering the CPU delays caused by the L1/L2 misses but who spots their L2 cache misses except when compiling perhaps?

    Considering how ARM is used pervasively for things like routers, set top tv boxes and smart phones which now out number pc's, personally I'd say pfsense would well suited to ARM boards.



  • I'm hoping to see something assembled and tested from Netgate that has 2 ethernet ports. So far, they only have the kits. If we're lucky, maybe someday ARM will move up from Tier 2 to Tier 1 in FreeBSD. Since pfSense is updating to FreeBSD 10.1, maybe we'll get some extra ARM support from that.



  • Maybe



  • @firewalluser:

    The architecture of the ARM CPU's make it ideal for multi threading programs compared to the Intel/AMD chips when considering the CPU delays caused by the L1/L2 misses but who spots their L2 cache misses except when compiling perhaps?

    What are you trying to say?



  • Still waiting for the board of my dream to become reality



  • The L1 & L2 cache misses for things like Out of Loop prefetches can add a 15% delay to proceeding according to a paper I read.



  • Okay TooMeeK.

    You can start up MII interface as separate compile option at Uboot

    CONFIG_CMD_MII



  • Any serious progress with this?
    Gonzo, at https://forum.pfsense.org/index.php?topic=79007.msg465109#msg465109 you mention not being impressed.
    Is this because you have very high standards?
    Personally I'm looking for a decent replacement of a 19" 2U micro ATX box running pfsense for my home and small company.
    IMHO it could easily run on a BPi hardware, since it has nothing to do all day  ;D



  • @DiskWizard:

    Okay TooMeeK.

    You can start up MII interface as separate compile option at Uboot

    CONFIG_CMD_MII

    Thank You for this information and PM. And sorry for delay with response, busy week :(

    I've downloaded both latest U-boot versions from following sources:
    git clone https://github.com/linux-sunxi/u-boot-sunxi.git
    git clone git://git.denx.de/u-boot.git

    Added CONFIG_CMD_MII to:
    boards.cfg in case of Sunxi source
    Configuring for Bananapi - Board: sun7i, Options: BANANAPI,SPL,SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),STATUSLED=244,STATUSLED1=245,FAST_MBUS,CONFIG_CMD_MII
    or
    include/configs/sunxi-common.h entry #define CONFIG_CMD_MII in case of mainline source.

    Compiled it:
    gmake -j4 ARCH=arm CROSS_COMPILE=arm-eabi- HOSTCC=cc USE_PRIVATE_LIBGCC=yes clean
    gmake -j4 ARCH=arm CROSS_COMPILE=arm-eabi- HOSTCC=cc USE_PRIVATE_LIBGCC=yes Bananapi_config
    gmake -j4 ARCH=arm CROSS_COMPILE=arm-eabi- HOSTCC=cc USE_PRIVATE_LIBGCC=yes

    Then tested one by one on my boot image:
    # Cubieboard's 2 / BananaPi U-boot loader
    dd if=u-boot-sunxi-with-spl.bin conv=notrunc of=banana.img bs=1024 seek=8

    Sources used:
    http://linux-sunxi.org/LeMaker_Banana_Pi
    https://github.com/LeMaker/linux-sunxi
    http://linux-sunxi.org/Mainline_U-boot
    http://linux-sunxi.org/U-Boot
    and my own scripts.

    Hardware used:
    BPi
    1 x 4GB USB 2.0
    1 x 32GB microSD card + adapter
    1 x RS232 to USB converter,  pl2303 based, read-only

    Software used:
    FreeBSD 10.0 64-bit VM
    Linux Mint 64-bit OS
    FreeBSD 10.0 64-bit OS for BPi

    Image output summary is:
    banana.img - 940MB - bootable SD card image
    banana_data.img - 1024MB - OS data on USB drive

    STATUS:
    1. Normal booting process with an older U-boot take around 10 minutes to reach login prompt first time (generating RSA keys and so), then 415 seconds during normal boot. It takes 3 minutes to startup sshd service. No networking.
    The output is on the screenshot and full log here:

    U-Boot 2013.07-07794-gc0f3b94 (Aug 15 2013 - 18:01:45) Allwinner Technology
    
    CPU:   Allwinner A20 (SUN7I)
    Board: Cubieboard2
    I2C:   ready
    DRAM:  1 GiB
    MMC:   SUNXI SD/MMC: 0
    *** Warning - bad CRC, using default environment
    
    In:    serial
    Out:   serial
    Err:   serial
    Net:   emac
    Hit any key to stop autoboot:  3  2  1  0 
    reading uEnv.txt
    ** Unable to read file uEnv.txt **
    Failed to mount ext2 filesystem...
    ** Unrecognized filesystem type **
    Failed to mount ext2 filesystem...
    ** Unrecognized filesystem type **
    reading boot.scr
    119 bytes read in 9 ms (12.7 KiB/s)
    Jumping to boot.scr
    ## Executing script at 44000000
    reading kernel
    4868872 bytes read in 215 ms (21.6 MiB/s)
    ## Starting application at 0x40200100 ...
    KDB: debugger backends: ddb
    KDB: current backend: ddb
    Copyright (c) 1992-2014 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 10.0-RELEASE #16: Sun Aug 31 17:38:34 CEST 2014
        root@freebsd:/usr/obj/arm.armv6/usr/src/sys/BANANAPI arm
    FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
    WARNING: WITNESS option enabled, expect reduced performance.
    WARNING: DIAGNOSTIC option enabled, expect reduced performance.
    CPU: Cortex A7 rev 4 (Cortex-A core)
     Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext
     WB disabled EABT branch prediction enabled
    LoUU:2 LoC:2 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: 
     256KB/64B 8-way unified cache WB Read-Alloc Write-Alloc
    real memory  = 1073741824 (1024 MB)
    avail memory = 1043943424 (995 MB)
    random device not loaded; using insecure entropy
    random: <software, yarrow=""> initialized
    simplebus0: <flattened device="" tree="" simple="" bus=""> on fdtbus0
    gic0: <arm generic="" interrupt="" controller=""> mem 0x1c81000-0x1c81fff,0x1c82000-0x1c820ff on simplebus0
    gic0: pn 0x10, arch 0x2, rev 0x1, implementer 0x43b nirqs 160
    a20_cpu_cfg0: <a20 cpu="" configuration="" module=""> mem 0x1c25c00-0x1c25fff on simplebus0
    a10_ccm0: <allwinner clock="" control="" module=""> mem 0x1c20000-0x1c203ff on simplebus0
    a10_timer0: <allwinner a10="" a20="" timer=""> mem 0x1c20c00-0x1c20c8f irq 54 on simplebus0
    Event timer "a10_timer Eventtimer" frequency 24000000 Hz quality 1000
    Timecounter "a10_timer timer0" frequency 24000000 Hz quality 1000
    a10wd0: <allwinner a10="" watchdog=""> mem 0x1c20c90-0x1c20c9f on simplebus0
    gpio0: <allwinner gpio="" controller=""> mem 0x1c20800-0x1c20bff irq 60 on simplebus0
    gpioc0: <gpio controller=""> on gpio0
    gpiobus0: <gpio bus=""> on gpio0
    ehci0: <allwinner integrated="" usb="" 2.0="" controller=""> mem 0x1c14000-0x1c14fff irq 71 on simplebus0
    usbus0: EHCI version 1.0
    usbus0 on ehci0
    ehci1: <allwinner integrated="" usb="" 2.0="" controller=""> mem 0x1c1c000-0x1c1cfff irq 72 on simplebus0
    usbus1: EHCI version 1.0
    usbus1 on ehci1
    uart0: <16750 or compatible> mem 0x1c28000-0x1c283ff irq 33 on simplebus0
    uart0: console (115200,n,8,1)
    Timecounters tick every 10.000 msec
    usbus0: 480Mbps High Speed USB v2.0
    usbus1: 480Mbps High Speed USB v2.0
    ugen1.1: <allwinner> at usbus1
    uhub0: <allwinner 1="" 9="" ehci="" root="" hub,="" class="" 0,="" rev="" 2.00="" 1.00,="" addr=""> on usbus1
    ugen0.1: <allwinner> at usbus0
    uhub1: <allwinner 1="" 9="" ehci="" root="" hub,="" class="" 0,="" rev="" 2.00="" 1.00,="" addr=""> on usbus0
    random: unblocking device.
    WARNING: WITNESS option enabled, expect reduced performance.
    WARNING: DIAGNOSTIC option enabled, expect reduced performance.
    uhub0: 1 port with 1 removable, self powered
    uhub1: 1 port with 1 removable, self powered
    Root mount waiting for: usbus1 usbus0
    ugen0.2: <ralink> at usbus0
    ugen1.2: <mode com=""> at usbus1
    umass0: <mode 0="" 2="" com="" memodrive="" usb2.0,="" class="" 0,="" rev="" 2.00="" 1.10,="" addr=""> on usbus1
    umass0:  SCSI over Bulk-Only; quirks = 0x4100
    umass0:0:0:-1: Attached to scbus0
    da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
    da0: <mode com="" memodrive="" usb2.0="" pmap=""> Removable Direct Access SCSI-0 device 
    da0: Serial Number 90891A001774
    da0: 40.000MB/s transfers
    da0: 3822MB (7827456 512 byte sectors: 255H 63S/T 487C)
    da0: quirks=0x2 <no_6_byte>Trying to mount root from ufs:/dev/da0 []...
    WARNING: / was not properly dismounted
    warning: no time-of-day clock registered, system time will not be set accurately
    Setting hostuuid: f90b367e-3129-11e4-ae46-3f68a54463b5.
    Setting hostid: 0xa395f285.
    Entropy harvesting: interrupts ethernet point_to_point swi.
    Starting file system checks:
    Expensive timeout(9) function: 0xc0263848(0xc3864c78) 0.002801708 s
    Expensive timeout(9) function: 0xc04ad3a8(0) 0.011151875 s
    /dev/da0: 12431 files, 67813 used, 186018 free (818 frags, 23150 blocks, 0.3% fragmentation)
    Mounting local file systems:.
    Writing entropy file:.
    Setting hostname: banana-freebsd.
    Starting Network: lo0.
    lo0: flags=8049 <up,loopback,running,multicast>metric 0 mtu 16384
    	options=600003 <rxcsum,txcsum,rxcsum_ipv6,txcsum_ipv6>inet6 ::1 prefixlen 128 
    	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    	inet 127.0.0.1 netmask 0xff000000 
    	nd6 options=21 <performnud,auto_linklocal>Starting devd.
    route: writing to routing socket: Network is unreachable
    add net default: gateway 192.168.137.1 fib 0: Network is unreachable
    add net fe80::: gateway ::1
    add net ff02::: gateway ::1
    add net ::ffff:0.0.0.0: gateway ::1
    add net ::0.0.0.0: gateway ::1
    Creating and/or trimming log files.
    Starting syslogd.
    ELF ldconfig path: /lib /usr/lib /usr/lib/compat
    Clearing /tmp (X related).
    Updating motd:.
    Mounting late file systems:.
    Performing sanity check on sshd configuration.
    Starting sshd.
    Starting sendmail_submit.
    Starting sendmail_msp_queue.
    Starting cron.
    Starting background file system checks in 60 seconds.
    
    Sun Aug 31 16:30:13 UTC 2014
    
    FreeBSD/arm (banana-freebsd) (ttyu0)
    
    login:</performnud,auto_linklocal></rxcsum,txcsum,rxcsum_ipv6,txcsum_ipv6></up,loopback,running,multicast></no_6_byte></mode></mode></mode></ralink></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></gpio></gpio></allwinner></allwinner></allwinner></allwinner></a20></arm></flattened></software,>
    

    2. U-boot from Denx.de often ends up in kernel panic with CONFIG_CMD_MII, like this:

    U-Boot 2015.04-rc4-00064-gb81bdf6-dirty (Mar 26 2015 - 01:01:52) Allwinner Technology
    
    CPU:   Allwinner A20 (SUN7I)
    I2C:   ready
    DRAM:  1 GiB
    MMC:   SUNXI SD/MMC: 0
    *** Warning - bad CRC, using default environment
    
    In:    serial
    Out:   serial
    Err:   serial
    SCSI:  SUNXI SCSI INIT
    SATA link 0 timeout.
    AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
    flags: ncq stag pm led clo only pmp pio slum part ccc apst 
    Net:   dwmac.1c50000
    starting USB...
    USB0:   USB EHCI 1.00
    scanning bus 0 for devices... 2 USB Device(s) found
    USB1:   USB EHCI 1.00
    scanning bus 1 for devices... 2 USB Device(s) found
           scanning usb for storage devices... 1 Storage Device(s) found
    Hit any key to stop autoboot:  2  1  0 
    switch to partitions #0, OK
    mmc0 is current device
    Scanning mmc 0:1...
    Found U-Boot script /boot.scr
    reading /boot.scr
    119 bytes read in 26 ms (3.9 KiB/s)
    ## Executing script at 43100000
    reading kernel
    4868872 bytes read in 246 ms (18.9 MiB/s)
    ## Starting application at 0x40200100 ...
    KDB: debugger backends: ddb
    KDB: current backend: ddb
    Copyright (c) 1992-2014 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 10.0-RELEASE #16: Sun Aug 31 17:38:34 CEST 2014
        root@freebsd:/usr/obj/arm.armv6/usr/src/sys/BANANAPI arm
    FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
    WARNING: WITNESS option enabled, expect reduced performance.
    WARNING: DIAGNOSTIC option enabled, expect reduced performance.
    panic: lock "vmem list lock" 0xc05f3500 already initialized
    KDB: enter: panic
    [ thread pid 0 tid 0 ]
    Stopped at      0xc034ef38:     ldrb    r15, [r15, r15, ror r15]!
    db> 
    

    Sometimes it stuck at Starting application at 0x40200100 message. When it boots, there is still no networking or I'm missing the point how FreeBSD recognizes MII devices.
    I've static IP configured for the interface, but it founds nothing. Boot in less than 2 minutes if successful. Here's full log:

    U-Boot SPL 2015.04-rc4-00064-gb81bdf6-dirty (Mar 26 2015 - 01:01:52)
    DRAM: 1024 MiB
    CPU: 960000000Hz, AXI/AHB/APB: 3/2/2
    
    U-Boot 2015.04-rc4-00064-gb81bdf6-dirty (Mar 26 2015 - 01:01:52) Allwinner Technology
    
    CPU:   Allwinner A20 (SUN7I)
    I2C:   ready
    DRAM:  1 GiB
    MMC:   SUNXI SD/MMC: 0
    *** Warning - bad CRC, using default environment
    
    In:    serial
    Out:   serial
    Err:   serial
    SCSI:  SUNXI SCSI INIT
    SATA link 0 timeout.
    AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
    flags: ncq stag pm led clo only pmp pio slum part ccc apst 
    Net:   dwmac.1c50000
    starting USB...
    USB0:   USB EHCI 1.00
    scanning bus 0 for devices... cannot reset port 1!?
    1 USB Device(s) found
    USB1:   USB EHCI 1.00
    scanning bus 1 for devices... 2 USB Device(s) found
           scanning usb for storage devices... 1 Storage Device(s) found
    Hit any key to stop autoboot:  2  1  0 
    switch to partitions #0, OK
    mmc0 is current device
    Scanning mmc 0:1...
    Found U-Boot script /boot.scr
    reading /boot.scr
    119 bytes read in 24 ms (3.9 KiB/s)
    ## Executing script at 43100000
    reading kernel
    4868872 bytes read in 246 ms (18.9 MiB/s)
    ## Starting application at 0x40200100 ...
    KDB: debugger backends: ddb
    KDB: current backend: ddb
    Copyright (c) 1992-2014 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 10.0-RELEASE #16: Sun Aug 31 17:38:34 CEST 2014
        root@freebsd:/usr/obj/arm.armv6/usr/src/sys/BANANAPI arm
    FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
    WARNING: WITNESS option enabled, expect reduced performance.
    WARNING: DIAGNOSTIC option enabled, expect reduced performance.
    CPU: Cortex A7 rev 4 (Cortex-A core)
     Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext
     WB disabled EABT branch prediction enabled
    LoUU:2 LoC:2 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: 
     256KB/64B 8-way unified cache WB Read-Alloc Write-Alloc
    real memory  = 1073741824 (1024 MB)
    avail memory = 1043943424 (995 MB)
    random device not loaded; using insecure entropy
    random: <software, yarrow=""> initialized
    simplebus0: <flattened device="" tree="" simple="" bus=""> on fdtbus0
    gic0: <arm generic="" interrupt="" controller=""> mem 0x1c81000-0x1c81fff,0x1c82000-0x1c820ff on simplebus0
    gic0: pn 0x10, arch 0x2, rev 0x1, implementer 0x43b nirqs 160
    a20_cpu_cfg0: <a20 cpu="" configuration="" module=""> mem 0x1c25c00-0x1c25fff on simplebus0
    a10_ccm0: <allwinner clock="" control="" module=""> mem 0x1c20000-0x1c203ff on simplebus0
    a10_timer0: <allwinner a10="" a20="" timer=""> mem 0x1c20c00-0x1c20c8f irq 54 on simplebus0
    Event timer "a10_timer Eventtimer" frequency 24000000 Hz quality 1000
    Timecounter "a10_timer timer0" frequency 24000000 Hz quality 1000
    a10wd0: <allwinner a10="" watchdog=""> mem 0x1c20c90-0x1c20c9f on simplebus0
    gpio0: <allwinner gpio="" controller=""> mem 0x1c20800-0x1c20bff irq 60 on simplebus0
    gpioc0: <gpio controller=""> on gpio0
    gpiobus0: <gpio bus=""> on gpio0
    ehci0: <allwinner integrated="" usb="" 2.0="" controller=""> mem 0x1c14000-0x1c14fff irq 71 on simplebus0
    usbus0: EHCI version 1.0
    usbus0 on ehci0
    ehci1: <allwinner integrated="" usb="" 2.0="" controller=""> mem 0x1c1c000-0x1c1cfff irq 72 on simplebus0
    usbus1: EHCI version 1.0
    usbus1 on ehci1
    uart0: <16750 or compatible> mem 0x1c28000-0x1c283ff irq 33 on simplebus0
    uart0: console (115200,n,8,1)
    Timecounters tick every 10.000 msec
    usbus0: 480Mbps High Speed USB v2.0
    usbus1: 480Mbps High Speed USB v2.0
    ugen1.1: <allwinner> at usbus1
    uhub0: <allwinner 1="" 9="" ehci="" root="" hub,="" class="" 0,="" rev="" 2.00="" 1.00,="" addr=""> on usbus1
    ugen0.1: <allwinner> at usbus0
    uhub1: <allwinner 1="" 9="" ehci="" root="" hub,="" class="" 0,="" rev="" 2.00="" 1.00,="" addr=""> on usbus0
    random: unblocking device.
    WARNING: WITNESS option enabled, expect reduced performance.
    WARNING: DIAGNOSTIC option enabled, expect reduced performance.
    uhub0: 1 port with 1 removable, self powered
    uhub1: 1 port with 1 removable, self powered
    Root mount waiting for: usbus1 usbus0
    Root mount waiting for: usbus1
    ugen1.2: <mode com=""> at usbus1
    umass0: <mode 0="" 2="" com="" memodrive="" usb2.0,="" class="" 0,="" rev="" 2.00="" 1.10,="" addr=""> on usbus1
    umass0:  SCSI over Bulk-Only; quirks = 0x4100
    umass0:0:0:-1: Attached to scbus0
    da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
    da0: <mode com="" memodrive="" usb2.0="" pmap=""> Removable Direct Access SCSI-0 device 
    da0: Serial Number 90891A001774
    da0: 40.000MB/s transfers
    da0: 3822MB (7827456 512 byte sectors: 255H 63S/T 487C)
    da0: quirks=0x2 <no_6_byte>Trying to mount root from ufs:/dev/da0 []...
    WARNING: / was not properly dismounted
    warning: no time-of-day clock registered, system time will not be set accurately
    Setting hostuuid: f90b367e-3129-11e4-ae46-3f68a54463b5.
    Setting hostid: 0xa395f285.
    Entropy harvesting: interrupts ethernet point_to_point swi.
    Starting file system checks:
    /dev/da0: 12442 files, 67826 used, 186005 free (837 frags, 23146 blocks, 0.3% fragmentation)
    Mounting local file systems:.
    Writing entropy file:.
    Setting hostname: banana-freebsd.
    Starting Network: lo0.
    lo0: flags=8049 <up,loopback,running,multicast>metric 0 mtu 16384
    	options=600003 <rxcsum,txcsum,rxcsum_ipv6,txcsum_ipv6>inet6 ::1 prefixlen 128 
    	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    	inet 127.0.0.1 netmask 0xff000000 
    	nd6 options=21 <performnud,auto_linklocal>Starting devd.
    route: writing to routing socket: Network is unreachable
    add net default: gateway 192.168.137.1 fib 0: Network is unreachable
    add net fe80::: gateway ::1
    add net ff02::: gateway ::1
    add net ::ffff:0.0.0.0: gateway ::1
    add net ::0.0.0.0: gateway ::1
    Creating and/or trimming log files.
    Starting syslogd.
    ELF ldconfig path: /lib /usr/lib /usr/lib/compat
    Clearing /tmp (X related).
    Updating motd:.
    Mounting late file systems:.
    Performing sanity check on sshd configuration.
    Starting sshd.
    Starting sendmail_submit.
    Starting sendmail_msp_queue.
    Starting cron.
    Starting background file system checks in 60 seconds.
    
    Sun Aug 31 16:33:37 UTC 2014
    
    FreeBSD/arm (banana-freebsd) (ttyu0)
    
    login:</performnud,auto_linklocal></rxcsum,txcsum,rxcsum_ipv6,txcsum_ipv6></up,loopback,running,multicast></no_6_byte></mode></mode></mode></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></gpio></gpio></allwinner></allwinner></allwinner></allwinner></a20></arm></flattened></software,>
    

    When I put following commands into boot script: help mii; mii device; mii info 1; then the output is:

    U-Boot 2015.04-rc4-00064-gb81bdf6-dirty (Mar 26 2015 - 01:01:52) Allwinner Technology
    
    CPU:   Allwinner A20 (SUN7I)
    I2C:   ready
    DRAM:  1 GiB
    MMC:   SUNXI SD/MMC: 0
    *** Warning - bad CRC, using default environment
    
    In:    serial
    Out:   serial
    Err:   serial
    SCSI:  SUNXI SCSI INIT
    SATA link 0 timeout.
    AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
    flags: ncq stag pm led clo only pmp pio slum part ccc apst 
    Net:   dwmac.1c50000
    starting USB...
    USB0:   USB EHCI 1.00
    scanning bus 0 for devices... cannot reset port 1!?
    1 USB Device(s) found
    USB1:   USB EHCI 1.00
    scanning bus 1 for devices... 2 USB Device(s) found
           scanning usb for storage devices... 1 Storage Device(s) found
    Hit any key to stop autoboot:  2  1  0 
    switch to partitions #0, OK
    mmc0 is current device
    Scanning mmc 0:1...
    Found U-Boot script /boot.scr
    reading /boot.scr
    106 bytes read in 24 ms (3.9 KiB/s)
    ## Executing script at 43100000
    mii - MII utility commands
    
    Usage:
    mii device                     - list available devices
    mii device <devname>           - set current device
    mii info   <addr>              - display MII PHY info
    mii read   <addr> <reg>        - read  MII PHY <addr> register <reg>
    mii write  <addr> <reg> <data> - write MII PHY <addr> register <reg>
    mii dump   <addr> <reg>        - pretty-print <addr> <reg> (0-5 only)
    Addr and/or reg may be ranges, e.g. 2-7.
    MII devices: 'dwmac.1c50000' 
    Current device: 'dwmac.1c50000'
    PHY 0x01: OUI = 0x0732, Model = 0x11, Rev = 0x05,  10baseT, HDX
    SCRIPT FAILED: continuing...
    Failed to mount ext2 filesystem...
    ** Unrecognized filesystem type **
    scanning bus for devices...
    Found 0 device(s).
    
    SCSI device 0: 
        Device 0: not available
    
    USB device 0: 
        Device 0: Vendor: Mode Com Rev: PMAP Prod: MemoDrive USB2.0
                Type: Removable Hard Disk
                Capacity: 3822.0 MB = 3.7 GB (7827456 x 512)
    ... is now current device
    dwmac.1c50000 Waiting for PHY auto negotiation to complete...... done
    Speed: 1000, full duplex
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    BOOTP broadcast 4
    BOOTP broadcast 5
    BOOTP broadcast 6
    BOOTP broadcast 7
    BOOTP broadcast 8
    BOOTP broadcast 9
    BOOTP broadcast 10
    BOOTP broadcast 11
    BOOTP broadcast 12
    BOOTP broadcast 13
    BOOTP broadcast 14
    BOOTP broadcast 15
    BOOTP broadcast 16
    BOOTP broadcast 17
    
    Retry time exceeded; starting again
    Speed: 1000, full duplex</reg></addr></reg></addr></reg></addr></data></reg></addr></reg></addr></reg></addr></addr></devname>
    

    3. U-boot from Sunxi seems to be stuck on loading kernel command with CONFIG_CMD_MII. Didn't tried other settings.

    UPDATE:
    Well, it seems that I simply missed:

    # PCI Ethernet NICs that use the common MII bus controller code.
    # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
    device          miibus     # MII bus support
    

    in the kernel config. Will try this later.

    UPDATE2:
    Not exacly.. it is here already:
    file: /usr/src/sys/arm/conf/BANANAPI

    # Ethernet
    device          loop
    device          ether
    device          mii
    device          smscphy
    #device         cpsw
    device          bpf
    
    # USB ethernet support, requires miibus
    device          miibus
    device          gem
    

    UPDATE3:
    After reading:

    MII devices: 'dwmac.1c50000' 
    Current device: 'dwmac.1c50000'
    PHY 0x01: OUI = 0x0732, Model = 0x11, Rev = 0x05,  10baseT, HDX
    

    I've found something here:
    http://linux-sunxi.org/Ethernet

    Allwinner's A20, A31, and the upcoming A80 contain a MAC unit called GMAC. The controller supports MII and RGMII modes. On the A20 it is pin compatible with the EMAC in MII mode. The controller is an early version of the Synopsys DWMAC (DesignWare MAC), with some hardware specific glue.
    
    Mainline Kernel driver
    DWMAC is supported by the stmmac driver. Platform glue for sunxi was merged in 3.14\. Device tree patches for supported A20 devices were merged in 3.15.
    

    Then driver docs here:
    http://fxr.watson.org/fxr/source/Documentation/networking/stmmac.txt?v=linux-2.6;im=3
    STMicroelectronics 10/100/1000 Synopsys Ethernet driver
    but I'm unable to locate this for MII config in FreeBSD kernel.




  • I just wanted to add that FreeBSD11 Current now has an image available on the ARMv6 builds page. Just added..

    ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0/



  • I would like to hear anyones experiences with the -CURRENT build. I am wondering if the A20 version Router board works. Also i see an All Winner A31s Quad core version of BPi called M2…Adds extra usb's as well.

    I really need HDMI for an embedded app I am working on so any experiences with that I would be grateful.



  • Hello,

    I'm sorry to say, but.. still no go.
    Tested latest image FreeBSD-11.0-CURRENT-arm-armv6-BANANAPI-20160408-r297692.img.xz.
    Output:

    
    U-Boot SPL 2015.04 (Apr 08 2016 - 06:36:29)
    DRAM: 1024 MiB
    CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
    
    U-Boot 2015.04 (Apr 08 2016 - 06:36:29) Allwinner Technology
    
    CPU:   Allwinner A20 (SUN7I)
    I2C:   ready
    DRAM:  1 GiB
    WARNING: Caches not enabled
    MMC:   SUNXI SD/MMC: 0
    reading u-boot.env
    
    ** Unable to read "u-boot.env" from mmc0:1 **
    Using default environment
    
    HDMI connected: Setting up a 1024x768 hdmi console
    In:    serial
    Out:   vga
    Err:   vga
    SCSI:  SUNXI SCSI INIT
    SATA link 0 timeout.
    AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
    flags: ncq stag pm led clo only pmp pio slum part ccc apst 
    Net:   dwmac.1c50000
    starting USB...
    USB0:   USB EHCI 1.00
    scanning bus 0 for devices... 1 USB Device(s) found
    USB1:   USB EHCI 1.00
    scanning bus 1 for devices... cannot reset port 1!?
    1 USB Device(s) found
           scanning usb for storage devices... 0 Storage Device(s) found
    Hit any key to stop autoboot:  2  1  0 
    Booting from: mmc 0 ubldr
    reading ubldr
    262685 bytes read in 72 ms (3.5 MiB/s)
    ## Starting application at 0x42000094 ...
    Consoles: U-Boot console  
    
    Compatible U-Boot API signature found @0x7f235458
    
    FreeBSD/armv6 U-Boot loader, Revision 1.2
    
    (root@releng2.nyi.freebsd.org, Fri Apr  8 07:03:08 UTC 2016)
    
    DRAM: 1024MB
    
    MMC Device 1 not found
    MMC Device 2 not found
    MMC Device 3 not found
    MMC Device 1 not found
    Number of U-Boot devices: 3
    
    U-Boot env: loaderdev='mmc 0'
    
    Found U-Boot device: disk
    
      Checking unit=1 slice= <auto>partition=<auto>... good.
    
    Booting from disk1s2a:
    
    |/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/boot/kernel/kernel data=0x634ca4+0x12735c /-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|syms=[0x4+0x8acb0/-\|+0x4+0x9eae7/-\|/]
    
    Hit [Enter] to boot immediately, or any other key for command prompt.
    
    Booting [/boot/kernel/kernel] in 9 seconds... 
    Booting [/boot/kernel/kernel] in 8 seconds... 
    Booting [/boot/kernel/kernel] in 7 seconds... 
    Booting [/boot/kernel/kernel] in 6 seconds... 
    Booting [/boot/kernel/kernel] in 5 seconds... 
    Booting [/boot/kernel/kernel] in 4 seconds... 
    Booting [/boot/kernel/kernel] in 3 seconds... 
    Booting [/boot/kernel/kernel] in 2 seconds... 
    Booting [/boot/kernel/kernel] in 1 second... 
    Booting [/boot/kernel/kernel]...               
    
    -\|/-\|/-\|/-\|/-\|/-\/boot/dtb/bananapi.dtb |size=0x80ef
    
    Loaded DTB from file 'bananapi.dtb'.
    
    /-\|/-Kernel entry at 0x0x42200100...
    
    Kernel args: (null)
    
    KDB: debugger backends: ddb
    KDB: current backend: ddb
    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 #0 r297692: Fri Apr  8 07:10:09 UTC 2016
        root@releng2.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/A20 arm
    FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
    WARNING: WITNESS option enabled, expect reduced performance.
    VT: init without driver.
    CPU: Cortex A7 rev 4 (Cortex-A core)
     Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext
     WB enabled LABT branch prediction disabled
    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: 
     256KB/64B 8-way unified cache WB Read-Alloc Write-Alloc
    real memory  = 1073741824 (1024 MB)
    avail memory = 1036029952 (988 MB)
    FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
    random: entropy device external interface
    kbd0 at kbdmux0
    ofwbus0: <open firmware="" device="" tree="">aw_ccu0 on ofwbus0
    aw_oscclk0: <allwinner oscillator="" clock="">mem 0x1c20050-0x1c20053 on aw_ccu0
    clk_fixed0: <fixed clock="">on aw_ccu0
    aw_pll0: <allwinner pll="" clock="">mem 0x1c20000-0x1c20003 on aw_ccu0
    aw_pll1: <allwinner pll="" clock="">mem 0x1c20008-0x1c2000f on aw_ccu0
    aw_pll2: <allwinner pll="" clock="">mem 0x1c20020-0x1c20023 on aw_ccu0
    aw_pll3: <allwinner pll="" clock="">mem 0x1c20028-0x1c2002b on aw_ccu0
    aw_cpuclk0: <allwinner cpu="" clock="">mem 0x1c20054-0x1c20057 on aw_ccu0
    aw_axiclk0: <allwinner axi="" clock="">mem 0x1c20054-0x1c20057 on aw_ccu0
    aw_ahbclk0: <allwinner ahb="" clock="">mem 0x1c20054-0x1c20057 on aw_ccu0
    aw_gate0: <allwinner ahb="" clock="" gates="">mem 0x1c20060-0x1c20067 on aw_ccu0
    aw_apbclk0: <allwinner apb="" clock="">mem 0x1c20054-0x1c20057 on aw_ccu0
    aw_gate1: <allwinner apb0="" clock="" gates="">mem 0x1c20068-0x1c2006b on aw_ccu0
    aw_apbclk1: <allwinner apb="" clock="">mem 0x1c20058-0x1c2005b on aw_ccu0
    aw_gate2: <allwinner apb1="" clock="" gates="">mem 0x1c2006c-0x1c2006f on aw_ccu0
    aw_modclk0: <allwinner module="" clock="">mem 0x1c20080-0x1c20083 on aw_ccu0
    aw_modclk1: <allwinner module="" clock="">mem 0x1c20084-0x1c20087 on aw_ccu0
    aw_mmcclk0: <allwinner mmc="" clock="">mem 0x1c20088-0x1c2008b on aw_ccu0
    aw_mmcclk1: <allwinner mmc="" clock="">mem 0x1c2008c-0x1c2008f on aw_ccu0
    aw_mmcclk2: <allwinner mmc="" clock="">mem 0x1c20090-0x1c20093 on aw_ccu0
    aw_mmcclk3: <allwinner mmc="" clock="">mem 0x1c20094-0x1c20097 on aw_ccu0
    aw_modclk2: <allwinner module="" clock="">mem 0x1c20098-0x1c2009b on aw_ccu0
    aw_modclk3: <allwinner module="" clock="">mem 0x1c2009c-0x1c2009f on aw_ccu0
    aw_modclk4: <allwinner module="" clock="">mem 0x1c200a0-0x1c200a3 on aw_ccu0
    aw_modclk5: <allwinner module="" clock="">mem 0x1c200a4-0x1c200a7 on aw_ccu0
    aw_modclk6: <allwinner module="" clock="">mem 0x1c200a8-0x1c200ab on aw_ccu0
    aw_modclk7: <allwinner module="" clock="">mem 0x1c200ac-0x1c200af on aw_ccu0
    aw_modclk8: <allwinner module="" clock="">mem 0x1c200b0-0x1c200b3 on aw_ccu0
    aw_modclk9: <allwinner module="" clock="">mem 0x1c200b4-0x1c200b7 on aw_ccu0
    aw_modclk10: <allwinner module="" clock="">mem 0x1c200c4-0x1c200c7 on aw_ccu0
    aw_usbclk0: <allwinner usb="" clocks="">mem 0x1c200cc-0x1c200cf on aw_ccu0
    aw_modclk11: <allwinner module="" clock="">mem 0x1c200d4-0x1c200d7 on aw_ccu0
    aw_gate3: <allwinner dram="" clock="" gates="">mem 0x1c20100-0x1c20103 on aw_ccu0
    aw_codecclk0: <allwinner codec="" clock="">mem 0x1c20140-0x1c20143 on aw_ccu0
    clk_fixed1: <fixed clock="">on aw_ccu0
    clk_fixed2: <fixed clock="">on aw_ccu0
    aw_gmacclk0: <allwinner module="" clock="">mem 0x1c20164-0x1c20167 on aw_ccu0
    clk_fixed3: <fixed factor="" clock="">on aw_ccu0
    aw_pll4: <allwinner pll="" clock="">mem 0x1c20010-0x1c20013 on aw_ccu0
    aw_pll5: <allwinner pll="" clock="">mem 0x1c20030-0x1c20033 on aw_ccu0
    aw_hdmiclk0: <allwinner hdmi="" clock="">mem 0x1c20150-0x1c20153 on aw_ccu0
    aw_lcdclk0: <allwinner lcd="" ch0="" clock="">mem 0x1c20118-0x1c2011b on aw_ccu0
    aw_lcdclk1: <allwinner lcd="" ch1="" clock="">mem 0x1c2012c-0x1c2012f on aw_ccu0
    aw_debeclk0: <allwinner display="" engine="" backend="" clock="">mem 0x1c20104-0x1c20107 on aw_ccu0
    simplebus0: <flattened device="" tree="" simple="" bus="">on ofwbus0
    regfix0: <fixed regulator="">on ofwbus0
    regfix1: <fixed regulator="">on ofwbus0
    regfix2: <fixed regulator="">on ofwbus0
    regfix3: <fixed regulator="">on ofwbus0
    regfix4: <fixed regulator="">on ofwbus0
    regfix5: <fixed regulator="">on ofwbus0
    regfix6: <fixed regulator="">on ofwbus0
    gpio0: <allwinner gpio="" pinmux="" controller="">mem 0x1c20800-0x1c20bff irq 10024 on simplebus0
    gpiobus0: <ofw gpio="" bus="">on gpio0
    gic0: <arm generic="" interrupt="" controller="">mem 0x1c81000-0x1c81fff,0x1c82000-0x1c82fff,0x1c84000-0x1c85fff,0x1c86000-0x1c87fff irq 10055 on simplebus0
    gic0: pn 0x10, arch 0x2, rev 0x1, implementer 0x43b irqs 160
    generic_timer0: <armv7 generic="" timer="">irq 10000,10001,10002,10003 on ofwbus0
    Timecounter "ARM MPCore Timecounter" frequency 24000000 Hz quality 1000
    Event timer "ARM MPCore Eventtimer" frequency 24000000 Hz quality 1000
    rtc0: <allwinner rtc="">mem 0x1c20d00-0x1c20d1f irq 10031 on simplebus0
    cpulist0: <open firmware="" cpu="" group="">on ofwbus0
    cpu0: <open firmware="" cpu="">on cpulist0
    cpu1: <open firmware="" cpu="">on cpulist0
    a10_sramc0: <allwinner sramc="" module="">mem 0x1c00000-0x1c0002f on simplebus0
    a10dmac0: <allwinner dma="" controller="">mem 0x1c02000-0x1c02fff irq 10007 on simplebus0
    a10_mmc0: <allwinner integrated="" mmc="" sd="" controller="">mem 0x1c0f000-0x1c0ffff irq 10011 on simplebus0
    mmc0: <mmc sd="" bus="">on a10_mmc0
    awusbphy0: <allwinner usb="" phy="">mem 0x1c13400-0x1c1340f,0x1c14800-0x1c14803,0x1c1c800-0x1c1c803 on simplebus0
    ehci0: <allwinner integrated="" usb="" 2.0="" controller="">mem 0x1c14000-0x1c140ff irq 10016 on simplebus0
    usbus0: EHCI version 1.0
    usbus0 on ehci0
    ahci0: <allwinner integrated="" ahci="" controller="">mem 0x1c18000-0x1c18fff irq 10020 on simplebus0
    ahci0: AHCI v1.10 with 1 3Gbps ports, Port Multiplier not supported
    ahci0: quirks=0x2 <nopmp>ahcich0: <ahci channel="">at channel 0 on ahci0
    ehci1: <allwinner integrated="" usb="" 2.0="" controller="">mem 0x1c1c000-0x1c1c0ff irq 10021 on simplebus0
    usbus1: EHCI version 1.0
    usbus1 on ehci1
    gpioled0: <gpio led="">at pin 149 on gpiobus0
    gpioc0: <gpio controller="">on gpio0
    aw_wdog0: <allwinner a10="" watchdog="">mem 0x1c20c90-0x1c20c9f on simplebus0
    pcm0: <allwinner audio="" codec="">mem 0x1c22c00-0x1c22c3f irq 10035 on simplebus0
    uart0: <16750 or compatible> mem 0x1c28000-0x1c283ff irq 10037 on simplebus0
    uart0: console (115384,n,8,1)
    uart1: <16750 or compatible> mem 0x1c28c00-0x1c28fff irq 10040 on simplebus0
    uart2: <16750 or compatible> mem 0x1c29c00-0x1c29fff irq 10044 on simplebus0
    iichb0: <allwinner integrated="" i2c="" bus="" controller="">mem 0x1c2ac00-0x1c2afff irq 10045 on simplebus0
    iicbus0: <ofw i2c="" bus="">on iichb0
    iic0: <i2c generic="" i="" o="">on iicbus0
    axp209_pmu0: <x-power axp209="" power="" management="" unit="">at addr 0x68 irq 10058 on iicbus0
    iichb1: <allwinner integrated="" i2c="" bus="" controller="">mem 0x1c2b400-0x1c2b7ff irq 10047 on simplebus0
    iicbus1: <ofw i2c="" bus="">on iichb1
    iic1: <i2c generic="" i="" o="">on iicbus1
    dwc0: <a20 gigabit="" ethernet="" controller="">mem 0x1c50000-0x1c5ffff irq 10050 on simplebus0
    dwc0: Can't reset DWC.
    device_attach: dwc0 attach returned 6
    a10hdmi0: <allwinner hdmi="" tx="">mem 0x1c16000-0x1c16fff on simplebus0
    pcm1: <allwinner hdmi="" audio="">on simplebus0
    fb0: <allwinner framebuffer="">mem 0x1e60000-0x1e6ffff,0x1c0c000-0x1c0cfff on simplebus0
    cryptosoft0: <software crypto="">Timecounters tick every 10.000 msec
    usbus0: 480Mbps High Speed USB v2.0
    usbus1: 480Mbps High Speed USB v2.0
    ugen1.1: <allwinner>at usbus1
    uhub0: <allwinner 1="" 9="" ehci="" root="" hub,="" class="" 0,="" rev="" 2.00="" 1.00,="" addr="">on usbus1
    ugen0.1: <allwinner>at usbus0
    uhub1: <allwinner 1="" 9="" ehci="" root="" hub,="" class="" 0,="" rev="" 2.00="" 1.00,="" addr="">on usbus0
    mmcsd0: 17GB <sdhc 29="" 2011="" sd =""  ="" 1.0="" sn="" 21100adb="" mfg="" 06="" by="" ad="">at mmc0 50.0MHz/4bit/65535-block
    fbd0 on fb0
    VT: initialize with new VT driver "fb".
    Release APs
    WARNING: WITNESS option enabled, expect reduced performance.
    Trying to mount root from ufs:/dev/ufs/rootfs [rw]...
    WARNING: /releng/11-armv6-BANANAPI-snap/usr/obj/usr/src/release/ufs was not properly dismounted
    uhub1: 1 port with 1 removable, self powered
    uhub0: 1 port with 1 removable, self powered
    Growing root partition to fill device
    mmcsd0s2 resized
    mmcsd0s2a resized
    growfs: requested size 15GB is not larger than the current filesystem size 15GB
    /etc/rc: WARNING: hostid: unable to figure out a UUID from DMI data, generating a new one
    Setting hostuuid: 2697f859-1dd2-11b2-a3b4-b7bcc1a39a7a.
    Setting hostid: 0x7340ff36.
    No suitable dump device was found.
    Starting file system checks:
    /dev/ufs/rootfs: 20070 files, 199812 used, 3709523 free (211 frags, 463664 blocks, 0.0% fragmentation)
    Mounting local file systems:.
    Setting hostname: a20.
    Setting up harvesting:[UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,NET_ETHER,NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED
    Feeding entropy:random: unblocking device.
    .
    Starting Network: lo0.
    lo0: flags=8049 <up,loopback,running,multicast>metric 0 mtu 16384
    options=600003 <rxcsum,txcsum,rxcsum_ipv6,txcsum_ipv6>inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    inet 127.0.0.1 netmask 0xff000000 
    groups: lo 
    nd6 options=21 <performnud,auto_linklocal>ELF ldconfig path: /lib /usr/lib /usr/lib/compat
    Soft Float compatibility ldconfig path:
    Starting devd.
    add net fe80::: gateway ::1
    add net ff02::: gateway ::1
    add net ::ffff:0.0.0.0: gateway ::1
    add net ::0.0.0.0: gateway ::1
    Generating host.conf.
    Creating and/or trimming log files.
    Starting syslogd.
    Clearing /tmp (X related).
    Updating motd:.
    Mounting late file systems:.
    Configuring vt: blanktime.
    Generating RSA host key.
    2048 SHA256:some-SHA-key-here root@a20 (RSA)
    Generating ECDSA host key.
    256 SHA256:some-SHA-key-here root@a20 (ECDSA)
    Generating ED25519 host key.
    256 SHA256:some-SHA-key-here root@a20 (ED25519)
    Performing sanity check on sshd configuration.
    Could not load host key: /etc/ssh/ssh_host_dsa_key
    Starting sshd.
    Could not load host key: /etc/ssh/ssh_host_dsa_key
    Starting cron.
    Starting background file system checks in 60 seconds.
    lock order reversal:
     1st 0xc40bcb74 ufs (ufs) @ /usr/src/sys/kern/vfs_subr.c:2498
     2nd 0xd9228758 bufwait (bufwait) @ /usr/src/sys/ufs/ffs/ffs_vnops.c:263
     3rd 0xc4694154 ufs (ufs) @ /usr/src/sys/kern/vfs_subr.c:2498
    stack backtrace:
    mount: /dev/ufs/rootfs: Device busy
    
    Thu Jan  1 00:01:28 UTC 1970
    
    FreeBSD/arm (a20) (ttyu0)
    
    login:</performnud,auto_linklocal></rxcsum,txcsum,rxcsum_ipv6,txcsum_ipv6></up,loopback,running,multicast></sdhc></allwinner></allwinner></allwinner></allwinner></software></allwinner></allwinner></allwinner></a20></i2c></ofw></allwinner></x-power></i2c></ofw></allwinner></allwinner></allwinner></gpio></gpio></allwinner></ahci></nopmp></allwinner></allwinner></allwinner></mmc></allwinner></allwinner></allwinner></open></open></open></allwinner></armv7></arm></ofw></allwinner></fixed></fixed></fixed></fixed></fixed></fixed></fixed></flattened></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></fixed></allwinner></fixed></fixed></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></allwinner></fixed></allwinner></open></auto></auto> 
    

    However, some hints:
    1. HDMI output is available until kernel loads, then no output
    2. No need to use SD card and external USB storage, all boots from SD card
    3. GMAC device seems to be detected:

    dwc0: <a20 gigabit="" ethernet="" controller="">mem 0x1c50000-0x1c5ffff irq 10050 on simplebus0
    dwc0: Can't reset DWC.
    device_attach: dwc0 attach returned 6</a20>

    But I cannot do anything more since USB keyboard no longer works in this kernel version.
    I could try putting different commands into files like /boot/loader.conf or /etc/rc.local if You have an idea?


Log in to reply