Skip to content
This repository has been archived by the owner on Mar 7, 2019. It is now read-only.

netmodule/meta-nmrouter

Repository files navigation

This layer depends on:

URI: git://git.yoctoproject.org/poky
branch: jethro
revision: HEAD

URI: git://git.openembedded.org/meta-openembedded
branch: jethro
revision: HEAD
layers: meta-python, meta-oe, meta-networking

To get an image that is compatible with the NetModule router, build an nmrouter-image. Set the MACHINE in conf/local.conf to 
MACHINE = "armada-385-nbhw17" (NB2800),
MACHINE = "armada-385-nbhw14" (NB3800/NB3711/NB3701) or
MACHINE = "am335x-nbhw16" # Internal name for NB800 family
and add the following layers to conf/bblayers.conf:
BBLAYERS ?= " \
  <poky dir>/meta \
  <poky dir>/meta-yocto \
  <poky dir>/meta-nmrouter \
  <poky dir>/meta-openembedded/meta-python \
  <poky dir>/meta-openembedded/meta-oe \
  <poky dir>/meta-openembedded/meta-networking \
  "

NB2800:
    While the NetModule router is running under the original software you have to do the following steps:
        - Find out what boot partition is currently used:
        cat /proc/cmdline
        - The partition layout is mmcblk0p1 => bootpart0, mmcblk0p2 => bootpart1, mmcblk0p3=> overlay/data partition, mmcblk0p4 => user storage
        - Untar the output of the nmrouter-image build to the partition that is not in use (if the above cmd returns mmcblk0p1 then to mmcblk0p2)
        mount /dev/mmcblk0p2 /mnt
        rm -rf /mnt/*
        tar -xjf ./<image>.tar.bz2 -C /mnt
        - reboot the netmodule router
        - in u-boot you have to manually overwrite the bootcmd. Use the correct boot partition (bootpart0 => 0:1, bootpart1 => 0:2)
        setenv bootcmd 'ext4load mmc 0:2 $kernel_addr /boot/zImage && ext4load mmc 0:2 $fdt_addr /boot/armada-385-nbhw17-nb2800.dtb && setenv bootargs root=/dev/mmcblk0p2 rw rootfstype=ext4 console=ttyS0,115200 rootwait && bootz $kernel_addr - $fdt_addr'
        saveenv # save the environment in eeprom (ignore message during bootup)
        - boot to Linux:
        boot

    Do not overwrite the original partition, u-boot will search a valid FPGA there. If you want to overwrite the other partition, make sure you copy the /logic folder from the original partition to the new one!

    To learn how to build an image and to find the build dependencies visit:
    http://www.yoctoproject.org/docs/2.0/ref-manual/ref-manual.html

    Memory Map of the FPGA (to switch SIMs, reset modems):
    Address     Width   Name/Comment
    0x0020      16      LED
    LED Control Register
        Slice    Name        Type    Reset    Description
        0        LED0 green  RW      1        Enable LED 0 (green)
        1        LED0 red    RW      1        Enable LED 0 (red)
        2        LED1 green  RW      0        Enable LED 1 (green)
        3        LED1 red    RW      0        Enable LED 1 (red)
        4        LED2 green  RW      0        Enable LED 2 (green)
        5        LED2 red    RW      0        Enable LED 2 (red)
        6        LED3 green  RW      0        Enable LED 3 (green)
        7        LED3 red    RW      0        Enable LED 3 (red)
        8        LED4 green  RW      0        Enable LED 4 (green)
        9        LED4 red    RW      0        Enable LED 4 (red)
        10       LED5 green  RW      0        Enable LED 5 (green)
        11       LED5 red    RW      0        Enable LED 5 (red)
        12       LED6 green  RW      0        Enable LED 6 (green)
        13       LED6 red    RW      0        Enable LED 6 (red)
        14       LED7 green  RW      0        Enable LED 7 (green)
        15       LED7 red    RW      0        Enable LED 7 (red)

    SIM Card Control
    Address     Width   Name/Comment
    0x0040      16      SIM Ctrl
    SIM Slot Control Register
        Slice   Name        Type        Reset   Description    
        2..0    SIM1_SEL    RW          0       000:  disconnect  
                                                001: Connect Bus 1  
                                                010: Connect Bus 2  
                                                011: Connect Bus 3  
                                                100: Connect Bus 4  
                                                Note:  If no SIM Card is inserted, the power is disable of the corresponding slot.
        3        N/A        R           0       Reserved    
        6..4    SIM2_SEL    RW          0       000:  disconnect  
                                                001: Connect Bus 1  
                                                010: Connect Bus 2  
                                                011: Connect Bus 3  
                                                100: Connect Bus 4  
                                                Note:  If no SIM Card is inserted, the power is disabled of the corresponding slot.
        7        N/A        R           0       Reserved    
        10..8    SIM3_SEL   RW          0       000:  disconnect  
                                                001: Connect Bus 1  
                                                010: Connect Bus 2  
                                                011: Connect Bus 3  
                                                100: Connect Bus 4  
                                                Note:  If no SIM Card is inserted, the power is disable of the corresponding slot.
        11        N/A       R           0       Reserved    
        14..12    SIM4_SE   RW          0       000:  disconnect  
                                                001: Connect Bus 1  
                                                010: Connect Bus 2  
                                                011: Connect Bus 3  
                                                100: Connect Bus 4  
                                                Note:  If no SIM Card is inserted, the power is disabled of the corresponding slot.
        15        N/A       R           0       Reserved    


    PCIe Mini Slot Control:
    Address     Width    Name/Comment
    0x0030      16       PCIe Reset
    PCIe Slot Reset
        Slice    Name           Type    Reset   Description
        0        PCIe1 RST~     RW      0       PCIe Slot 1 Reset
                                                0: reset asserted
        1        PCIe2 RST~     RW      0       PCIe Slot 2 Reset
                                                0: reset asserted
        2        PCIe3 RST~     RW      0       PCIe Slot 3 Reset
                                                0: reset asserted
        3        PCIe4 RST~     RW      0       PCIe Slot 4 Reset
                                                0: reset asserted
        4..15    n/a            R       0        

    The FPGA Base address is at 0xfd000000, to enable for example LED0:red write 0x2 to 0xfd000020:
    devmem2 0xfd000020 hw 0x02

NB800:
Coming from NetModule Software:
    - Use the same steps as for NB2800 to install a custom rootfs
    - You don't need to modify the u-boot environment, the NB800 automatically tries to load the correct dtb and the kernel /boot/zImage
    - There is no FPGA available necessary for the NB800

Coming from an older Yocto image:
    - To update the software you can do a sw-update.sh -l <rootfs.tar.gz>
    - To read and write to the board descriptor use bd read/read-all/write
    - To connect configure the modem and network interface use mmcli and nmcli (ModemManager and NetworkManager)

For questions, send an email to <stefan.eichenberger@netmodule.com>

About

Yocto layer for NetModule Router BSP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published