Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Banana Pi

    Scheduled Pinned Locked Moved Hardware
    38 Posts 9 Posters 41.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      Guest
      last edited by

      @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.

      1 Reply Last reply Reply Quote 0
      • ?
        Guest
        last edited by

        @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

        1 Reply Last reply Reply Quote 0
        • ?
          Guest
          last edited by

          when it's ready

          1 Reply Last reply Reply Quote 0
          • T
            toomeek
            last edited by

            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..

            1 Reply Last reply Reply Quote 0
            • F
              FlashPan
              last edited by

              I just found this:

              5 port banana

              http://www.aliexpress.com/store/product/Newest-arrive-BPI-R1-Opensource-Router-Original-Banana-pi/302756_2045261784.html

              1 Reply Last reply Reply Quote 0
              • ?
                Guest
                last edited by

                I have two on my desk.  8) 8)

                1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  What's your opinion of them?  :)

                  Steve

                  1 Reply Last reply Reply Quote 0
                  • ?
                    Guest
                    last edited by

                    so far?  Meh.

                    1 Reply Last reply Reply Quote 0
                    • B
                      badon
                      last edited by

                      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.

                      1 Reply Last reply Reply Quote 0
                      • B
                        badon
                        last edited by

                        @gonzopancho:

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

                        1 Reply Last reply Reply Quote 0
                        • F
                          firewalluser
                          last edited by

                          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.

                          Capitalism, currently The World's best Entertainment Control System and YOU cant buy it! But you can buy this, or some of this or some of these

                          Asch Conformity, mainly the blind leading the blind.

                          1 Reply Last reply Reply Quote 0
                          • B
                            badon
                            last edited by

                            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.

                            1 Reply Last reply Reply Quote 0
                            • ?
                              Guest
                              last edited by

                              Maybe

                              1 Reply Last reply Reply Quote 0
                              • ?
                                Guest
                                last edited by

                                @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?

                                1 Reply Last reply Reply Quote 0
                                • D
                                  DiskWizard
                                  last edited by

                                  Still waiting for the board of my dream to become reality

                                  1. GA-N3150M-D3P 8Gb RAM

                                  2. GA-C1037EN-EU 4GB RAM

                                  • 2,5 SATA III Solid State Drive SLIM S60
                                  1 Reply Last reply Reply Quote 0
                                  • F
                                    firewalluser
                                    last edited by

                                    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.

                                    Capitalism, currently The World's best Entertainment Control System and YOU cant buy it! But you can buy this, or some of this or some of these

                                    Asch Conformity, mainly the blind leading the blind.

                                    1 Reply Last reply Reply Quote 0
                                    • D
                                      DiskWizard
                                      last edited by

                                      Okay TooMeeK.

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

                                      CONFIG_CMD_MII

                                      1. GA-N3150M-D3P 8Gb RAM

                                      2. GA-C1037EN-EU 4GB RAM

                                      • 2,5 SATA III Solid State Drive SLIM S60
                                      1 Reply Last reply Reply Quote 0
                                      • N
                                        necron
                                        last edited by

                                        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

                                        1 Reply Last reply Reply Quote 0
                                        • T
                                          toomeek
                                          last edited by

                                          @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.

                                          bpi-freebsd-login.png
                                          bpi-freebsd-login.png_thumb

                                          1 Reply Last reply Reply Quote 0
                                          • ?
                                            Guest
                                            last edited by

                                            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/

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.