Neufbox 5

Adrien RICCIARDI edited this page Mar 27, 2017 · 29 revisions

Connecting to the serial port

You have to connect to the internal serial port to access the bootloader command line.

  1. Disassemble the Neufbox 5 case (there are 4 screws located under the 4 rubber pads).
  2. Find J11 pin header, it is located near to the USB ports. Here is the pinout, starting from the pin nearer from the PCB edge (the upper pin if the USB ports are on your right). Pins use 3.3V TTL voltage levels.
    • Vcc
    • RX (you must connect your cable TX here)
    • TX (you must connect your cable RX here)
    • GND
  3. Configure your serial port console (like picocom or minicom on UNIX, or putty on Windows) to the following baud rate :
    • 115200 bit/s
    • no parity
    • 1 stop bit

Generating image

Clone the neufbox5 branch :

git clone https://github.com/sfr-cpe/openwrt.git -b neufbox5
cd openwrt/

Configure the following items in the menuconfig :

Target System --->
  (X) Cavium Networks Octeon
Target Profile --->
  (X) SFR Neufbox 5
Target Images  --->
  [*] squashfs --->
     (64) Block size (in KiB)

Compile the firmware

make -j$(cat /proc/cpuinfo|grep processor|wc -l)

Upgrading firmware

Warning : flashing the OpenWRT firmware will prevent your Neufbox 5 to connect to the SFR network.

Upgrade from bootloader

Default SFR firmware is not able to flash this firmware, so you have to flash the OpenWRT firmware from the bootloader on the first time.
Execute the following commands from the OpenWRT repository to put the rootfs in the /tftpboot directory :

tar -xf bin/octeon/openwrt-octeon-neufbox5-squashfs-sysupgrade.tar -C /tmp && mv /tmp/sysupgrade-neufbox5/kernel /tftpboot && mv /tmp/sysupgrade-neufbox5/root /tftpboot

Execute the following commands from U-Boot :
Flash the kernel :

tftpboot 100000 kernel; protect off 0xbec80000 0xbef7ffff; erase 0xbec80000 0xbef7ffff; cp.b $(fileaddr) 0xbec80000 $(filesize)

Flash the rootfs :

tftpboot 100000 root; protect off 0xbef80000 0xbfafffff; erase 0xbef80000 0xbfafffff; cp.b $(fileaddr) 0xbef80000 $(filesize)

To run the newly flashed firmware, you can reboot using the reset command or type run bootcmd to immediately load and start the kernel.

Upgrade from Linux

When you have flashed the firmware once from the bootloader, you can use easier ways to upgrade it.
You can either use OpenWRT sysupgrade tool to upgrade the router firmware from command line or the Luci web interface Backup/Flash Firmware page.

Hardware information

Buttons

How to access to a button from shell code :

  1. Export the GPIO the button is connected to by writing the desired GPIO number to /sys/class/gpio.
  2. Read /sys/class/gpio/gpio<GPIO number>/value file to get the button value. Buttons are active low, so a value of 0 tells that the button is pressed and a value of 1 tells that the button is released.

For instance, if you want to access to the WiFi button (connected to GPIO 11), execute the following command :

echo 11 > /sys/class/gpio/export

A subdirectory called gpio11 must appear in the /sys/class/gpio directory. You can now read /sys/class/gpio11/value.

Here are all available buttons :

Button name GPIO number
WiFi 11
Reset 12
Service 13

Leds

Service led (the RGB one) is directly connected to the SoC through GPIOs. All three leds are active low. Below are the GPIOs the leds are connected to :

Led GPIO number
Red 0
Green 1
Blue 2

Status leds (the white ones) are connected to a shift register (74HC164). The shift register is controlled by bit-banging. Below are shift register signals connection to SoC GPIOs :

Shift register signal GPIO number
Data 3
Clock 4

Status leds are connected as following to the shift register :

Led Shift register output
Internet (aka WAN) QA
Traffic QB
Phone QC
TV QD
WiFi QE
Alarm QF

QG and QH outputs are not connected.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.