moore

Members
  • Content Count

    3
  • Joined

  • Last visited


Reputation Activity

  1. Like
    moore reacted to chwe in BananaPi R2 (.csc mt7623 as new boardfamily)   
    Proposal to introduce a new BOARDFAMILY based on MT7623n SoCs. The only (widely) available board currently is the BananaPi R2 build by Sinovoip. I 'tried' to clean and split their BSP into different repos to make it usable for armbians Buildscript. The 'initial' work is done and built images boot up (with some additional work).
     

    (found one on http://www.banana-pi.org/r2.html - hidden in the 'gallery photos' which looks like the revision I have)
     
     
    Some specs (and just to be clear here, this is not a in-depth description about performance of those interfaces, there are more experienced people for benchmarking interfaces etc. don't hang me when there's a mistake in the description ):
    MT7623n (ARM Cortex-A7 quad core) GbE over MTK7530 (1x "wan" 4x "lan") 2x USB 3.0 and 1 USB 2.0 otg port 2x SATA over asm1061 (up to) 2 mPCIE interfaces (one populated as mPCIe, the other is muxed with USB3 - you've to disable USB if you want to use it - never tested) Hardware NAT & cryptoDEV (also none of them is tested in my builds made with armbians Buildscript) wifi/bluetooth combo-chip (b/g/n / 4.1) HDMI Powering over 12V barrel jack  
    Pros:
    relatively cheap (~90$ Aliexpress) Metal case and 4G modem available (I dont' own both - so must be considered as 'not working' at the moment) 2x2 MIMO WiFi should be possible over mPCIE (as before I didn't test it) MT7623 gets relatively good upstream support by Mediatek in mainline There is a 4.14.y Kernel (currently at 4.14.42 - so it seems to be quite up-to-date) maintained by 'Frank-W' which gets frequently updates and patches from upstream are back-ported (more experienced kernelhacker have to decide if he does it in a sane way or not, that's over my skills)  See https://forum.armbian.com/topic/7296-bananapi-r2-csc/?do=findComment&comment=55245  the board has some nice features either as a NAS or a routerboard (I know about the concerns of mixing router with NAS capabilities and I didn't benchmark one of this features - better let people benchmark it which know what they're doing ). It seems that Sinovoip starts to clean up their GitBook mess by switching to a wiki. There are still things wrong inside (e.g. the board-picture shows a battery connector but it was removed in the newer revisions of the board, still a lot of stuff linked to sources not provided by them self e.g. description of 'how network is implemented), but at least it's not that messy than their former 'gitbook' documentation. Frank-W provides a independent wiki where he documents his efforts and what works with his builds.  U-Boot patches for this SoC are under review for upstream   
    Cons:
    u-boot is based on a v2014.04 rc1 together with some Mediatek additional stuff with further modification by Sinovoip (and in the end by me which doesn't make things much better). Some cleanup is done (not pushed to github since it's early WIP and I only push it when it works 'somehow' reliable, it fools me quite often cause I'm definitively not a 'experienced' u-boot hacker - cause it's a bit outdated a lot of things changed to upstream and I've to google a lot of stuff to get things working). There are 3 binary blobs needed to boot into U-boot (see picture) and I still don't understand fully what they're doing (as said I'm not a u-boot hacker ) http://fw-web.de/dokuwiki/lib/exe/detail.php?id=en%3Abpi-r2%3Astorage&media=bpi-r2:boot-structure.png  the 'Preloader' differs between eMMC and SD-card, so this needs for sure some 'additional work' for something like nand-sata-install. The 'Headers' are in fact two files (one seems to have he size it should, the other one is to big and get's partly overwritten by the 'preloader', so no idea how sane this is) and it seems that they set some variables to env in u-boot (I simply overwrite them to ensure that they don't do insane things and the board is booted with a bootscript sitting in /boot/boot.scr (currently wip - doesn't work every-time) During compilation of u-boot there are some warnings (I didn't care cause in the end the board boots into u-boot so this warnings are of minor interest to me - it would be possible to build u-boot based on v2014.04 upstream with huge patching, as it is done for a yocto-build by Wolfgang Tolkien here, but his is currently adjusted to yocto and will need some rework to make it usable for Armbian - nevertheless, without the help of Wolfgang, this thread would never came up he gave me a lot of hints here and there to deal with u-boot) There is no kernel defconfig for the R2 nor mt7623n SoC upstream (as far as I understand frank-w made a defconfig based on a 4.9 kernel, based on the evb board - so give him the credits for doing a lot of the hard work ), nevertheless an 'mt7623n-next/dev.config' needs some adjustments.  I think, I pickt more or less all of the SoC relevant drivers after 'a few attempts'...  Currently load a kernel with 'Flattened Device Tree blob' (CONFIG_OF_LIBFDT) does not work (Wolfgang reported similar problems for his yocto builds with the R2, but it should/does work with his evb board) and only 'appended device tree blob to zImage' (I didn't care about the drawbacks yet) works yet. Probably this needs some adjustments in builddebb (at the moment this is done by hand with 'cat zImage *.dtb > zImage-dtb ). U-boot 'should' be capable of booting a with a separate dtb file but it doesn't...   The EVB can also be booted with FIT images but this seems also not work on the BPi, maybe it's related to the binaries, maybe I got fooled by u-boot once again (it happened a lot). I simply don't know. From a support point of view: This board has a bunch of features which people will mix together (from router/NAS/'home cloud' up to HDMI capabilities) for a relative affordable price, so 'less experienced' people will buy it, will mess with it and will ask here a bunch of questions when we decide to build images or have it as .csc in armbians repo. Cause it will introduce a new boardfamily (probably *.csc only at the moment) this board doesn't get any kernel updates until the maintainers decide to add it to armbians apt server and if we do, it's more than csc and people will expect 'some support'. I only did the 'initial work' so, a lot of kernel module adjustments, u-boot cleanup and enhancements are needed to build useful 'Armbian images' and to be clear: I'm not willing nor able to do all this work alone. In case no serious developer is willing to join this 'clean up' party, we should not add this board to .csc cause it will end similar to the OPi-2g-IoT where people ask from time to time for support whereas nobody works actively to enhance the Images.  No LTS-Kernel due to 4.14 has a lot of back-ports inside which might mess up things in case a other member of the same SoC will join the boardfamily. 4.19 will be the first LTS which we might use for this board Edit: just in case somebody asks, as far as I know HDMI is not working yet on 4.14 and only usable with the 4.4 BSP kernel, I played some days with it, tried to fix things, I failed, I got headache from the BSP-Kernel and decided to drop it fully. From my side, there will be no efforts in the BSP Kernel to get it working. If someone wants to deal with it, there's a 'kernel only' repo on my github fully 'unmaintained' not patched and currently not available as buildoption. I think people who are able to fix issues for this kernel are able to add it as buildoption but I decided to not deal with it.  
    So to summarize, what's done, what works and what's not working (everything not mentioned here must be considered as not working!):
    Next Kernel (4.14.y) builds without issues, the devicetree blob is attached after its manually (mount image --> cat zImage *dtb > zImage-dtb) Will not longer be supported by my builds. U-Boot was slightly adjusted so that it is capable of booting zImages, is able to handle ext4 FS & getting it's bootscript from /boot/boot.scr. This needs still some rework for accessing eMMC due to not working 100% reliable with freshly built Images (the first boot is done by manual u-boot commands, probably due to something gone wrong with the bootscript, after recompilation of boot.cmd onboard, the board boots up automatically without manual u-boot hacking) SATA devices are recognized, ETH was only tested once and didn't work (I guess, some adjustments in NM are needed or I missed something, cause the board is mostly connected only via UART during testing I didn't spend much attention to it (this might be a goal as soon as the board boots up reliable even on the first run). Onboard wifi will for sure not work, cause I don't pack the driver binaries to it (I don't care about wifi yet, and there are IMO more important things to fix before I even set onboard wifi to my 'issues list'). Will most likely never be supported due to 'mainline only' and I will not implement an android wifi driver into the mainline kernel. dmesg (for next) spies some errors related to USB (xhci-mtk 1a1c0000.usb: fail to get vbus), this was solved upstream, from what I see frank-w applied the patch too for his 4.14-main branch but it seems to not work properly yet on my builds. Maybe I missed some 'USB quirks' for a kernelcommand, maybe I missed a module or something else - I didn't read all the posts related to it and I don't follow all the stuff on BPis forum to get informations. Keep in mind, I'm not super experienced and this is early WIP (I fully understand why the maintainers don't want to waste much time with new SoCs, it's a bunch of work and if it's not well documented things are even worse). Dev (Linus master branch) will not be properly packed due to changes in builddebb (a slightly adjusted mt7623n-dev.config based on frank-w 4.16 defconfig is there but completely untested, it build's without fails but I never booted a dev image - wouldn't be surprised that it will not boot). 4.17.0-rc7 based on multi_v7_defconfig slightly adjusted to bring up the device but still a lot of 'clean up' needed.  
    Disclaimer: 
    If you're smart enough, you'll find part of this initial work on GitHub (if not, it's probably better that you don't play with it, cause it's only initial, and Images built with this configuration must be expected as early experimental, for testing purposes only). Some of the adjustments living only on my buildmachine as patches and aren't pushed upstream yet (call it lazy, call it I want avoid that unexperienced people clone the repo build images and complain that they don't work as expected, I don't care)...  Every support question related to 'why is *random feature* not working' will be happily ignored. I'll share my experience only with people who want to contribute to enhance things at the moment not to use it for 'home' ore 'productive' use-cases (it's a way to early for that). 
     
    It's not armbian, it's just a Image created with armbians buildscript at the moment:  
     
     
    This thread should give the maintainers and interested people a clue what's needed to get this board up with armbian. Some Initial work is done (we don't need any FAT partition anymore, we can start the board with bootscripts) and some current limitations (appended device tree blob, binary blobs for boot, u-boot needs cleanup etc.). I think with the initial work I did, a new 'board bring up' (as the socialists in germany would say `Ergebnisoffen`  open-ended) make sense. In case it ends like the last BPi R2 board bring up thread, where people were more focused on personal insults, and people start to throw dirt to each other, I'll remove all the work I did on GitHub and close this thread! You've been warned! Some initial work is done but more is needed before I'll even consider to send a PR to Armbians repo. I would be really disappointed when somebody fork my initial work and puts then 'Armbian for BPi R2' on some services like google-drive or mega (if you want to enhance the support for it, just send PRs to the repo, it helps nobody if you make some 'experimental' builds based on the initial work and give them to inexperienced users to test, the images are simply not ready yet).
     
    So happy discussion (with valid arguments)... 
  2. Like
    moore got a reaction from Ryder.Lee in BPI-R2 Board Bring-up   
    Hi all,
     
    I tried to share my experience about how to burn preloader/uboot/OpenWRT image, and then boot from eMMC on BPI-R2...
     
    1.Download flash tool from https://spflashtool.com/
    windows: https://spflashtool.com/download/SP_Flash_Tool_v5.1628_Win.zip 
    linux: https://spflashtool.com/download/SP_Flash_Tool_exe_Linux_64Bit_v5.1520.00.100.zip
     
    2. Install MT65xx drivers for your windows PC. You need to install drivers in order to connect your device properlyhttps://spflashtool.com/download/MediaTek_USB_VCOM_drivers.zip
     

    3. Hardware setup before starting up hacking the board
     
      1) use 12v power adaptor
    2) use micro usb to supply extra power when developing on the board that would help reload the images through flash tool (will be introduced in section 4 as the following) just by power off/on to the board manually after images are all selected done.
    3) use console to retrieve the log for debugging purpose
    4) that is wan port
    5) that is lan3 port, so the intermediate ports are listed as lan0, lan1, lan2, and lan3 reviewing from wan port
     
    4.Flash tool configuration
     
      1) download agent: MTK_AllInOne_DA.bin
    2) BPI-R2_OpenWRT_scatter.txt ( https://drive.google.com/open?id=0B6wnb6XNnEQVUXFYWXNUVlFTbnpWVGNPV2NnaEZjX2xjRTZv )
    3) Images
        - Preloader: preloader_iotg7623Np1_emmc.bin ( https://drive.google.com/open?id=0B6wnb6XNnEQVTHZiazNzaGduZVh3VkxBQVRBOFRRYmN1MWt3 )
        - GPT (named MBR here): MBR ( https://drive.google.com/open?id=0B6wnb6XNnEQVcEhDWTJ3NnZ5V3ZiTVlBQl81VkZtRndKeXFJ )
        - Uboot: mt7623_lzma.uboot ( https://drive.google.com/open?id=0B6wnb6XNnEQVVWdDa0FGTGlQUnNWNmg1OENzRkplN1JVeWxV )
        - BOOTIMG: lede-mediatek-32-uImage-mt7623n-bananapi-bpi-r2-initramfs ( https://drive.google.com/open?id=0B6wnb6XNnEQVMXRJV1ZLZkVqYl9td3FlTWR0bERJeEtoRFlZ )
    4) press download button on Flash tool
    5) power off BPI-R2
    6) power on BPI-R2, and then flash tool will update image automatically.
    5 system hang here after upgrading images.
     
      6 try to power off BPI-R2, and on. finally, you can boot from eMMC and see uboot menu. please choose 1 to download OpenWRT FW via TFTP server (e.g., Tftpd64)
     
  3. Like
    moore got a reaction from Ryder.Lee in BPI-R2 Board Bring-up   
    Hi all,
     
    I tried to share my experience about how to burn preloader/uboot/OpenWRT image, and then boot from eMMC on BPI-R2...
     
    1.Download flash tool from https://spflashtool.com/
    windows: https://spflashtool.com/download/SP_Flash_Tool_v5.1628_Win.zip 
    linux: https://spflashtool.com/download/SP_Flash_Tool_exe_Linux_64Bit_v5.1520.00.100.zip
     
    2. Install MT65xx drivers for your windows PC. You need to install drivers in order to connect your device properlyhttps://spflashtool.com/download/MediaTek_USB_VCOM_drivers.zip
     

    3. Hardware setup before starting up hacking the board
     
      1) use 12v power adaptor
    2) use micro usb to supply extra power when developing on the board that would help reload the images through flash tool (will be introduced in section 4 as the following) just by power off/on to the board manually after images are all selected done.
    3) use console to retrieve the log for debugging purpose
    4) that is wan port
    5) that is lan3 port, so the intermediate ports are listed as lan0, lan1, lan2, and lan3 reviewing from wan port
     
    4.Flash tool configuration
     
      1) download agent: MTK_AllInOne_DA.bin
    2) BPI-R2_OpenWRT_scatter.txt ( https://drive.google.com/open?id=0B6wnb6XNnEQVUXFYWXNUVlFTbnpWVGNPV2NnaEZjX2xjRTZv )
    3) Images
        - Preloader: preloader_iotg7623Np1_emmc.bin ( https://drive.google.com/open?id=0B6wnb6XNnEQVTHZiazNzaGduZVh3VkxBQVRBOFRRYmN1MWt3 )
        - GPT (named MBR here): MBR ( https://drive.google.com/open?id=0B6wnb6XNnEQVcEhDWTJ3NnZ5V3ZiTVlBQl81VkZtRndKeXFJ )
        - Uboot: mt7623_lzma.uboot ( https://drive.google.com/open?id=0B6wnb6XNnEQVVWdDa0FGTGlQUnNWNmg1OENzRkplN1JVeWxV )
        - BOOTIMG: lede-mediatek-32-uImage-mt7623n-bananapi-bpi-r2-initramfs ( https://drive.google.com/open?id=0B6wnb6XNnEQVMXRJV1ZLZkVqYl9td3FlTWR0bERJeEtoRFlZ )
    4) press download button on Flash tool
    5) power off BPI-R2
    6) power on BPI-R2, and then flash tool will update image automatically.
    5 system hang here after upgrading images.
     
      6 try to power off BPI-R2, and on. finally, you can boot from eMMC and see uboot menu. please choose 1 to download OpenWRT FW via TFTP server (e.g., Tftpd64)