Recent Linux/OpenWrt on the Inteno XG6846
(Last boot 2024-04-26 with the v6.1 kernel, using OpenWRT as rootfs)

BCM96328avng PCB

The Inteno Broadband Technology (now Genexis) XG6846[-R1,-R2,-R3...] is a Broadcom BCM6328 (BCM63281) MIPS big endian-based fiber modem. It can clearly do more, but is delivered locked down as a fiber modem-only product. In default configuration it just bridges physical ethernet frames on the SFP (fiber) input to physical frames on the LAN1 TP output.

This is actually just a Broadcom reference design board named BCM96328avng that has been modified by an ODM vendor named XAVI and that in turn was OEM:ed to use this name by Inteno AB.

This is the primary gateway "fiber modem" in my household and many many thousands of other Swedish households. I found an extra device in the trash! So I ported OpenWrt over to run on it. It makes it possible to use the device not just as a media converter, but as a proper router, providing DHCP on all the ethernet ports. Images with LuCI web administration are included. I have based this port on the OpenWrt "bleeding edge" v6.1 Linux kernel.

A UART is available on the top of the modem, in the two slits to the left of the WAN fiber modem slot, or on the same place on the PCB. It has the following layout:

  TX   RX
  o    o
  o    o
  +5V  GND
XG6846 UART layout

This UART uses 115200n8.

Files

Getting OpenWRT up on it

Installing OpenWrt currently requires UART serial console access and a two-stage initramfs installation as follows:

  1. Download the file openwrt-bmips-bcm6328-inteno_xg6846-initramfs.elf and place this in the root directory of your TFTP server (such as /var/lib/tftpboot)
  2. Download the file openwrt-bmips-bcm6328-inteno_xg6846-squashfs-sysupgrade.bin and place it in some easily accessable location like /tmp
  3. Set up a TFTP server on your host computer
  4. Connect the router to your computer using one of the LAN ports
  5. Set a static IP of 192.168.1.2/255.255.255.0 on your host computer so the router and your host now share a 192.168.1.0 network
  6. Make sure sshd is running on your host so you can download files to your router using scp
  7. Activate your UART console, power on the device and break into CFE by hammering ENTER a few times
  8. Download and boot the RAM-resident initramfs kernel with: r 192.168.1.2:openwrt-bmips-bcm6328-inteno_xg6846-initramfs.elf
  9. The kernel should boot and is now running exclusively in the RAM of the device. Wait until the DSA network comes up, which is indicated by a few messages on the screen like mv88e6085 mdio_mux-0.1:00 lan1: configuring for phy/gmii link mode etc, this can take a minute or so.
  10. This is a good opportunity to check if you ISPs network supports this OpenWrt firmware. If you get IP and can connect to the Internet as usual through the fiber uplink, yay! This firmware works and you can dare to flash it. I think most just want your MAC address to stay the same and we make sure it does so it should work just fine.
LuCI running on the XG6846

The next step gets serious: we start to erase the flash and install OpenWrt instead, so it's a little dangerous. Make sure you know what you are doing and you understand the consequences.

  1. Erase the flash used for the U-Boot, kernel and root file system:
    mtd unlock /dev/mtd1
    mtd erase /dev/mtd1
    This will remove any messages about a secondary boot image: there will be just one image in the flash (OpenWrt) and the whole remaining flash up until the NVRAM will be used for a JFFS2 root filesystem.
  2. Enter the command line, and download the system upgrade into /tmp on the router and execute the system upgrade:
    cd /tmp
    scp user@192.168.1.2:/tmp/openwrt-bmips-bcm6328-inteno_xg6846-squashfs-sysupgrade.bin
    sysupgrade openwrt-bmips-bcm6328-inteno_xg6846-squashfs-sysupgrade.bin
  3. After reboot, wait for this message on the console:
    [ 92.588978] jffs2: notice: (2176) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
    this means that the JFFS2 filesystem in the flash is fully initialized.
  4. plug device into your host and configure like any OpenWrt router

The fiber link will be used as WAN (if you have one) but you can also use WAN/EXT1 ethernet if you want.

Status

  • 2024-04-26 I rebased and sent out the remaining patches to OpenWrt after a delay, hopefully we can merge the base support soon.
  • 2024-01-25 Some of the basic patches have started to land in OpenWrt. Reworked the patch set a bit.
  • 2023-09-19 The rescue web server method isn't quite working so I am describing and using the initramfs method for the moment, compiled an sysupgrade image including LuCI.
  • 2023-09-17 Managed to create a first self-sustained booting image using U-Boot as an intermediate step and mounting root with OpenWrt from flash. Flashing from the web rescue mode works!

Links