Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
inbox:toh:sagem:f_st3864op [2024/02/19 15:50] – [Installation] rikka0w0inbox:toh:sagem:f_st3864op [2024/10/19 06:51] – [Photos] rikka0w0
Line 1: Line 1:
 ====== Sagem F@ST3864OP ====== ====== Sagem F@ST3864OP ======
-~~NOTOC~~ 
- 
-/* This template is intended to be used via https://openwrt.org/meta/create_new_device_page . */ 
- 
 {{page>meta:infobox:construction&noheader&nofooter&noeditbtn}} {{page>meta:infobox:construction&noheader&nofooter&noeditbtn}}
  
-//Write shortrelevant description of the device. Include technical overviewbut avoid marketing buzzwords/useless stuffTwo to four sentences is about rightA picture is good, too. Edit the page to see how to add pictures.// +[[:toh:hwdata:sagem:sagem_f_st3864op#F@ST3864OP]] is xDSL modem with four 1Gbps LAN ports2.4g+5g Wifi and FXS. It can also work as a normal router which connects to the internet via 1Gbps WAN port. In Australiathis modem was provided by [[https://www.optus.com.au/content/dam/optus/documents/for-you/device-warranties/Sagem%20F3864%20Datasheet.pdf|Optus]] as an NBN modem.
- +
-/*****/ +
-/* How to add images ========> https://openwrt.org/meta/adding_images_to_openwrt_wiki */ +
-/*****/+
  
 {{ media:example:genericrouter1.png?200|Generic Router}} {{ media:example:genericrouter1.png?200|Generic Router}}
Line 17: Line 9:
  <color #ed1c24>**WAN-LAN traffic overloads the CPU, as the hardware NAT offloading is not supported yet. WAN-LAN speed is around 144Mbps.**</color>  <color #ed1c24>**WAN-LAN traffic overloads the CPU, as the hardware NAT offloading is not supported yet. WAN-LAN speed is around 144Mbps.**</color>
 </WRAP> </WRAP>
 +
 +===== Hardware highlights =====
 +^ CPU                            ^ Ram       ^ Flash          ^ Network  ^ WLAN  ^ USB       ^ Serial  ^ JTag  ^
 +| BCM63168D0, Dual-Core @400MHz  |  128 MiB  |  128 MiB NAND  |  4x 1G LAN, 1x 1G WAN    bgn  |  2 x 2.0  |  Yes    |  ?    |
 +
 +
 +/*** if info available: uncomment and fill in
 +===== Installation =====
 +  - → [[:downloads|Obtain firmware]]
 +  - → [[docs:guide-user:installation:generic.flashing|Install OpenWrt]]
 +  - → [[:downloads|Latest OpenWrt release]]
 +
 +==== Installing OpenWrt ====
 +***/
 +
 +
 +/*** if info available: uncomment and fill in
 +===== Debricking =====
 +-> [[docs:guide-user:troubleshooting:generic.debrick]]
 +***/
 +
 ===== OpenWrt support ===== ===== OpenWrt support =====
  
-<color red>**Not supported.**</color>+<color red>**W.I.P.**</color> 
 + 
 +=== Whats working === 
 +  - All ethernet ports. 
 +  - VLAN tagging of both internal (SoC) and external switches(BCM53124SKMMLG). 
 +  - All USB ports. 
 +  - Most LEDs, except for the Wifi indicator, the amber and the green LEDs near the WAN port.
  
 +=== Whats NOT working ===
 +  - WAN-LAN hardware acceleration does not work at the moment, NAT speed is limited to around 144Mbps at full CPU load.
 +  - Some LEDs (gpio-leds, see dts).
 +  - WAN LEDs control needs improvement.
 +  - PCIe, ''lspci'' shows no device attached but the root PCIEe bridge. There should be some PCIe device attached by looking at the stock boot log.
 +  - WiFi does not work at the moment.
 +  - xDSL and FXS are unlikely to get supported.
  
 /*** if info available: uncomment and fill in /*** if info available: uncomment and fill in
Line 43: Line 69:
  
  
-===== Hardware highlights ===== 
-^ CPU                            ^ Ram       ^ Flash          ^ Network  ^ WLAN  ^ USB       ^ Serial  ^ JTag  ^ 
-| BCM63168D0, Dual-Core @400MHz  |  128 MiB  |  128 MiB NAND  |  4x 1G    bgn  |  2 x 2.0  |  Yes    |  ?    | 
- 
- 
-/*** if info available: uncomment and fill in 
-===== Installation ===== 
-  - → [[:downloads|Obtain firmware]] 
-  - → [[docs:guide-user:installation:generic.flashing|Install OpenWrt]] 
-  - → [[:downloads|Latest OpenWrt release]] 
- 
-==== Installing OpenWrt ==== 
-***/ 
- 
- 
-/*** if info available: uncomment and fill in 
-===== Debricking ===== 
--> [[docs:guide-user:troubleshooting:generic.debrick]] 
-***/ 
  
  
Line 110: Line 117:
 ***/ ***/
  
 +==== Boot OpenWrt in RAM ====
  
 +  - Open the case and connect the [[:inbox:toh:sagem:f_st3864op#serial|internal serial headers]] to a PC via a USB-Serial adapter.
 +  - Power on the device, keep pressing any key until you see the CFE prompt appears.
 +  - Set the IPv4, netmask, and gateway of your PC to ''192.168.1.100'', ''255.255.255.0'', and ''192.168.1.1'', respectively.
 +  - Connect any of the router LAN ports to your PC.
 +  - Setup a TFTP server on your PC to serve the ''openwrt-bmips-bcm63268-sagem_fast-3864op-initramfs.elf'' OpenWrt image.
 +  - Use command ''openwrt-bmips-bcm63268-sagem_fast-3864op-initramfs.elf'' to boot an OpenWrt instance in RAM.
 +
 +Use this command to safely browse the stock firmware files:
 +
 +''mount -t jffs2 -o ro /dev/mtdblock1 /mnt/mtd1/''
 +
 +==== Installation ====
 +<WRAP center round alert 60%>
 + <color #ed1c24>**Flashing via CFE's 192.168.1.1 has not been tested and could brick your device!!!**</color>
 +
 +Any help or information on this are welcomed.
 +</WRAP>
 +<WRAP center round important 60%>
 + <color #ed1c24>**Using LuCI sysupgrade to install on a fresh OEM device bricks it, use the following steps to install or recover.**</color>
 +</WRAP>
 +
 +This section explains a safer way of installing OpenWrt to a F@ST3864OP device. This method does not touch the CFE bootloader, and it is less likely to brick the router.
 +
 +  - You would need to prepare a USB-TTL serial adapter, open the case of the router, and solder the serial headers.
 +  - Follow the [[:inbox:toh:sagem:f_st3864op#boot_openwrt_in_ram|Boot OpenWrt in RAM]] section until you get an OpenWrt (run in RAM) shell.
 +  - Setup a web server (e.g. ''python3 -m http.server'') on your PC that serves the OpenWrt firmware ''openwrt-bmips-bcm63268-sagem_fast-3864op-squashfs-cfe.bin''.
 +  - On the OpenWrt shell, download the OpenWrt firmware to ramdisk ''/tmp'': ''cd /tmp && wget http://192.168.1.100:8000/openwrt-bmips-bcm63268-sagem_fast-3864op-squashfs-cfe.bin''
 +  - Use sha256sum to check if the firmware file is intact.
 +  - **Up to this step, you still can reboot the router with the stock firmware untouched.**
 +  - Wipe the stock firmware and create a clean JFF2: ''flash_erase -j /dev/mtd6 0 982'', where ''/dev/mtd6'' is the 'wfi' partition. You can find out which mtd is the wfi partition by using command ''cat /proc/mtd''. After this step, the stock firmware is gone.
 +  - Install OpenWrt firmware permanently to the NAND flash: ''nandwrite -p /dev/mtd6 /tmp/openwrt-bmips-bcm63268-sagem_fast-3864op-squashfs-cfe.bin''
 +  - Now reboot. If everything goes well, you will get a OpenWrt shell.
 +  - **LuCI sysupgrade can be used from now on.**
 +
 +Reference: [[:toh:huawei:hg253s_v2]]
 ===== Hardware ===== ===== Hardware =====
 ==== Info ==== ==== Info ====
Line 118: Line 161:
 ^ System-On-Chip  | BCM63168D0                                                              | ^ System-On-Chip  | BCM63168D0                                                              |
 ^ CPU/Speed       | Core 400MHz, DDR: 400MHz, Bus: 200MHz                                   | ^ CPU/Speed       | Core 400MHz, DDR: 400MHz, Bus: 200MHz                                   |
-^ Flash-Chip      | W29N01HVSINA, TSOP1 package                                             |+^ Flash-Chip      | [[https://au.mouser.com/datasheet/2/949/w29n01hvxina_revc-1489886.pdf|W29N01HVSINA]], TSOP1 package                                             |
 ^ Flash size      | 128MiB, blocksize: 64 pages, page size: 2048 bytes + 64-byte OOB data.  | ^ Flash size      | 128MiB, blocksize: 64 pages, page size: 2048 bytes + 64-byte OOB data.  |
-^ RAM             | NT5CC64M16GP-DI, DDR3 128MiB                                            |+^ RAM             [[https://www.nanya.com/en/Product/3747/NT5CC64M16GP-DI|NT5CC64M16GP-DI]], DDR3 128MiB                                            |
 ^ Wireless        | built-in? Need more investigation                                       | ^ Wireless        | built-in? Need more investigation                                       |
 ^ Ethernet        | 1x WAN, 4x LAN, all support 10/100/1000                                 | ^ Ethernet        | 1x WAN, 4x LAN, all support 10/100/1000                                 |
Line 128: Line 171:
 ^ JTAG            | ???                                                                     | ^ JTAG            | ???                                                                     |
  
-Datasheets+Other ICs on the board
-  * NT5CC64M16GP-DI: https://www.nanya.com/en/Product/3747/NT5CC64M16GP-DI +  * [[https://assets.nexperia.com/documents/data-sheet/74HC_HCT164.pdf|74HC164D]] 
-  * W29N01HVSINA: https://au.mouser.com/datasheet/2/949/w29n01hvxina_revc-1489886.pdf+  * [[https://www.renesas.com/in/en/products/interface-connectivity/wireless-communications/dect/lmx4181-high-frequency-dect-transceiver-standard-cmos-technology|LMX4181]] 
 +  * [[https://au.mouser.com/datasheet/2/472/Si32260_61-2507288.pdf|SI32260-C-FM1]] 
 +  * [[https://www.digikey.co.uk/en/products/detail/broadcom-limited/BCM6302KMLG/6147288|BCM6302]]
  
-Other ICs on board+CPU Pinout
-  * 74HC164Dhttps://assets.nexperia.com/documents/data-sheet/74HC_HCT164.pdf +[[:docs:techref:hardware:soc:soc.broadcom.bcm63xx#bcm63168_pinout]] 
-  * LMX4181https://www.renesas.com/in/en/products/interface-connectivity/wireless-communications/dect/lmx4181-high-frequency-dect-transceiver-standard-cmos-technology + 
-  * SI32260-C-FM1: https://au.mouser.com/datasheet/2/472/Si32260_61-2507288.pdf +==== Network ==== 
-  BCM6302: https://www.digikey.co.uk/en/products/detail/broadcom-limited/BCM6302KMLG/6147288+This router has 2 switches! The BCM63168D0 SOC has 8 internet interfaces, 3xFE, 1xGE, and 4xRGMII, all from a built-in switchIn this router, the GE port (id=3) is used for WAN RJ45 connection, and the first RGMII (id=4) goes to an external switch (BCM53125?) which then powers all accessible LAN ports. **Why didn't they just simply connect 4 PHYs at the RGMIIs to make 4xGE LAN ports?**
  
 Note: Note:
-  * CFE reports the external switch as 53125, but the boot log of the stock firmware shows that it forces to use a 53115 driver.+  * CFE reports the external switch (BCM53124SKMMLG) as [[https://www.mouser.com/datasheet/2/678/broadcom_limited_avgo-s-a0007199287-1-1747746.pdf|53125]], but the boot log of the stock firmware shows that it forces to use a 53115 driver.
  
-===== Flash Layout =====+==== Serial ==== 
 +-> [[docs:techref:hardware:port.serial]] general information about the serial port, serial port cable, etc.
  
 +There is an unsoldered 4-pin header (J708) near the power jack, which provides an interactive console. You can interrupt the boot process and enter the CFE bootloader console by pressing any key repeatedly, or wait for it boots and then login to the management console using the following credentials:
 +
 +^ Credential of an Australian Optus OEM F@ST3864OP ||
 +^ user | admin |
 +^ password | 0ptU%1M5 |
 +
 +If the above does not work, then try the other keys:
 +
 +https://github.com/mattimustang/optus-sagemcom-fast-3864-hacks
 +
 +The management console offers a very limited set of commands, the sh command will drop you to a BusyBox Linux shell.
 +
 +^ Serial parameters for Sagem F@ST3864OP ||
 +^ Baudrate | 115200 |
 +^ Setup| 8N1 |
 +^ Voltage | 3.3V TTL|
 +
 +==== LEDs and buttons ====
 +There are three types of LEDs on this device:
 +  - Connected to a serial LED driver which then drives up to 8 LEDs via a 74HC164D.
 +  - Connected to a SoC pin and controlled by a hardware LED control register.
 +  - Connected to a SoC pin and controlled by Linux via gpio-leds.
 +
 +LED and Button connections:
 +  * WAN Port: Yellow(460+6, gpio38), Green(460+7, gpio39)
 +  * WLAN Led (D12): (460+4, gpio36) Logic XOR (460+5, gpio37), this is weird!
 +  * Internet Led (D17): Green(480+8, gpio8), Red(74HC164D@Q2)
 +  * DSL Bonding Led (D17): Green(480+9, gpio9)
 +  * Power Led (D15): Green(480+20, gpio20), Red(480+15, gpio15)
 +  * DSL (D7): Green(74HC164D@Q3)
 +  * FXS (D11, Foreign Exchange Station, the phone ports, not to be confused with the xDSL port): Green(74HC164D@Q4), Red(74HC164D@Q5)
 +  * WPS Led (D13): Green(74HC164D@Q0), Red(74HC164D@Q1)
 +  * Reset button (SW5): (460+0, gpio32)
 +  * WPS button (SW3): (460+1, gpio33)
 +  * WLAN button (SW2): (460+2, gpio34)
 +  * Some LEDs are driven by 74HC164D:
 +  * Clock (CP) = gpio0 (/sys/class/gpio/gpio480), serial_led_clk
 +  * DSA (Data input) = gpio1 (/sys/class/gpio/gpio481), serial_led_data
 +  * DSB (AND with DSA), MR(Output Async Reset) are pulled high.
 +
 +===== Flash Layout =====
 +Stock firmware dump:
 +https://github.com/rikka0w0/fast3864op-hacks
 ==== Stock ==== ==== Stock ====
 From OEM Bootlog: From OEM Bootlog:
Line 157: Line 246:
  
  
-^  F@ST3864OP Flash Layout                                                                                                                                                                                                                                                              ||||||| +^  F@ST3864OP Flash Layout                                                                                                                                                                                                                                                               ||||||| 
-^ Hardware                      128MiB NAND W29N01HVSINA                                                                                                                                                                                                                               |||||| +^ Hardware                      128MiB NAND W29N01HVSINA                                                                                                                                                                                                                                |||||| 
-^ Stock Label                  |  **//nvram//**              |  **//rootfs//**                                                                                 |  **//rootfs_update//**             |  **//hidden1//**             | **//data//**              | **//hidden2//**              +^ Stock Label                  |  **//nvram//**              |  **//rootfs//** jffs2 filesystem                                                                |  **//rootfs_update//** empty jffs2  |  **//hidden1//**              **//data//** jffs2 filesystem       **//hidden2//**             
-^ Stock mtd device name        |  mtd3                        mtd0 (mtd4)                                                                                    |  mtd1 (mtd5)                       |  -                            mtd2                      -                           | +^ Stock mtd device name        |  mtd3                        mtd0 (mtd4)                                                                                    |  mtd1 (mtd5)                        |  -                            mtd2                      -                           | 
-| Start                        |  0x0000000                  |  0x0020000                                                                                      |  0x3D80000                         |  0x7AE0000                   | 0x7B00000                 | 0x7F00000                    | +| Start                        |  0x0000000                  |  0x0020000                                                                                      |  0x3D80000                          |  0x7AE0000                   | 0x7B00000                 | 0x7F00000                    | 
-| <color magenta>Size</color>  |  0x0020000                  |  0x3D60000                                                                                      |  0x3D60000                         |  0x0020000                   | 0x0400000                 | 0x0100000                    | +| <color magenta>Size</color>  |  0x0020000                  |  0x3D60000                                                                                      |  0x3D60000                          |  0x0020000                   | 0x0400000                 | 0x0100000                    | 
-| :::                          | :::                         | :::                                                                                             | :::                                |  0x0520000                                                                            ||| +| :::                          | :::                         | :::                                                                                             | :::                                 |  0x0520000                                                                            ||| 
-| End                          |  0x0020000                  |  0x3D80000                                                                                      |  0x7AE0000                         |  0x7B00000                   | 0x7F00000                 | 0x8000000                    | +| End                          |  0x0020000                  |  0x3D80000                                                                                      |  0x7AE0000                          |  0x7B00000                   | 0x7F00000                 | 0x8000000                    | 
-^ OpenWrt Layer1                mtd0 **//cferom_nvram//**  |  mtd1 **//stock_rootfs//**                                                                      |  mtd2 **//stock_rootfs_update//**  |  mtd3 **//stock_hidden1//**  |  mtd4 **//stock_data//**  |  mtd5 **//stock_hidden2//** +^ OpenWrt Layer1                mtd0 **//cferom_nvram//**  |  mtd1 **//stock_rootfs//**                                                                      |  mtd2 **//stock_rootfs_update//**   |  mtd3 **//stock_hidden1//**  |  mtd4 **//stock_data//**  |  mtd5 **//stock_hidden2//** 
-^ OpenWrt Layer2               | :::                          mtd6 **//wfi//**                                                                                                                   || :::                          | :::                       | :::                          | +^ OpenWrt Layer2               | :::                          mtd6 **//wfi//**                                                                                                                    || :::                          | :::                       | :::                          | 
-| Filesystem                    CFE Bootloader              **//wfi-split//**, OpenWrt firmware, contains part of the CFE bootloader, kernel, and rootfs.                                      ||  ?                            JFFS2                    |  ?                           |+| Filesystem                    CFE Bootloader              **//wfi-split//**, OpenWrt firmware, contains part of the CFE bootloader, kernel, and rootfs.                                       ||  ?                            JFFS2                    |  ?                           |
  
  
Line 191: Line 280:
 </code> </code>
 ==== Photos ==== ==== Photos ====
-/* =====>>>>> Standard size for photosadd ?400 to the medialink                                */ +=== PCB === 
-/* When uploading photos, **name them** intelligently. Nobody knows what 20100930_000602.jpg is! */ +{{:media:sagem:sagem_f_st3864_front_pcb.jpg?400|}} 
-/* e.g. {{:media:yourbrand:yourbrand_yourmodel_front.jpg?400|}}                                  */ +{{:media:sagem:sagem_f_st3864_back_pcb.jpg?400|}}
-/* Thanks, your wiki administration - Oct. 2015 */ +
- +
-**Insert photo of front of the casing** +
- +
-**Insert photo of back of the casing** +
- +
-**Insert photo of backside label** +
- +
-**Insert photo of PCB** +
 ==== Opening the case ==== ==== Opening the case ====
  
Line 210: Line 289:
 </WRAP> </WRAP>
  
-==== Serial ==== 
--> [[docs:techref:hardware:port.serial]] general information about the serial port, serial port cable, etc. 
  
-There is an unsoldered 4-pin header (J708) near the power jack, which provides an interactive console. You can interrupt the boot process and enter the CFE bootloader console by pressing any key repeatedly, or wait for it boots and then login to the management console using the following credentials: 
  
-^ Credential of an Australian Optus OEM F@ST3864OP || 
-^ user | admin | 
-^ password | 0ptU%1M5 | 
  
-If the above does not work, then try the other keys: 
  
-https://github.com/mattimustang/optus-sagemcom-fast-3864-hacks+===== Hardware Mods ===== 
 +This may apply: 
 +[[:toh:sercomm:ad1018]]
  
-The management console offers a very limited set of commands, the sh command will drop you to a BusyBox Linux shell.+==== Spare SPI Flash ====
  
-^ Serial parameters for Sagem F@ST3864OP || +There's an unsoldered SPI Flash (SOIC16) on the bottom of the board that connects to ''HSSPI.CS0''. It is known that a SOIC8 Winbond "W25Q64" soldered with jumper wires works with ''spidev'' driver. Custom firmware compilation is required with the following appended to the dts: 
-^ Baudrate | 115200 | +<WRAP bootlog><nowiki>&hsspi { 
-^ Setup| 8N1 | + status = "okay";
-^ Voltage | 3.3V TTL|+
  
-==== JTAG ==== + mydev@0{ 
--> [[docs:techref:hardware:port.jtag]] general information about the JTAG portJTAG cableetc.+ compatible "rohm,dh2228fv"; 
 + reg <0>; 
 + spi-max-frequency = <781000>
 + }; 
 +};</nowiki></WRAP> 
 +To use the ''spidev'' driver in the latest kernel (6.6 as of Sep 192024)one has to use a specific device name ("rohm,dh2228fv" in this case), the old "linux, spidev" no longer works. Not sure if it is a kernel bug or not.
  
-How to connect to the JTAG Port of this specific device:\\ +The SPI Flash can be accessed with ''flashrom-spi'' and ''spi-tools'' (available in the OpenWRT opkg repo):
-**Insert photo of PCB with markings for JTAG port**+
  
-===== Boot OpenWrt in RAM ======+<WRAP bootlog><nowiki>root@OpenWrt:/# flashrom-spi -p linux_spi:dev=/dev/spidev1.0 
 +flashrom v1.2 on Linux 5.4.188 (mips) 
 +flashrom is free software, get the source code at https://flashrom.org
  
-  - Open the case and connect serial console to a PC. +Using clock_gettime for delay loops (clk_id: 1resolution: 1ns)
-  - Power on the devicekeep pressing any key until you see the CFE prompt appears+Using default 2000kHz clockUse 'spispeedparameter to override. 
-  - Set the IPv4, netmask, and gateway of your PC to ''192.168.1.100'', ''255.255.255.0''and ''192.168.1.1'', respectively. +Found Winbond flash chip "W25Q64.V" (8192 kBSPI) on linux_spi
-  - Connect any of the router LAN ports to your PC. +No operations were specified.
-  - Setup a TFTP server on your PC to serve the ''openwrt-bmips-bcm63268-sagem_fast-3864op-initramfs.elf'' OpenWrt image+
-  - Use command ''openwrt-bmips-bcm63268-sagem_fast-3864op-initramfs.elf'' to boot an OpenWrt instance in RAM.+
  
-Use this command to safely browse the stock firmware files:+root@OpenWrt:/# echo -n -e \\x9F\\xFF\\xFF\\xFF | spi-pipe -d /dev/spidev1.0 -b4 -n1 | hexdump -C 
 +00000000  ff ef 40 17                                       |..@.| 
 +00000004</nowiki></WRAP>
  
-''mount -t jffs2 -o ro /dev/mtdblock1 /mnt/mtd1/''+==== PCIe ==== 
 +It is believed that the SOC has PCI or PCIE buses and devices attached. The following came from the shell of the stock firmware:
  
-===== Installation ====== +<WRAP bootlog><nowiki> 
-<WRAP center round alert 60%> +cd /sys/bus/pci 
- <color #ed1c24>**Flashing via CFE's 192.168.1.1 has not been tested and could brick your device!!!**</color>+# ls devices/ -al 
 +drwxr-xr-x    2 admin    root             0 Jul 10 04:02 . 
 +drwxr-xr-x    5 admin    root             0 Jul 10 04:00 .. 
 +lrwxrwxrwx    1 admin    root             0 Jul 10 04:02 0000:00:00.0 -> ../../../devices/pci0000:00/0000:00:00.0 
 +lrwxrwxrwx    admin    root             0 Jul 10 04:02 0000:00:09.0 -> ../../../devices/pci0000:00/0000:00:09.0 
 +lrwxrwxrwx    admin    root             0 Jul 10 04:02 0000:00:0a.0 -> ../../../devices/pci0000:00/0000:00:0a.0 
 +lrwxrwxrwx    1 admin    root             0 Jul 10 04:02 0000:01:00.0 -../../../devices/pci0000:01/0000:01:00.0 
 +# ls drivers -al 
 +drwxr-xr-x    6 admin    root             0 Jul 10 04:02 . 
 +drwxr-xr-x    5 admin    root             0 Jul 10 04:00 .. 
 +drwxr-xr-x    2 admin    root             0 Jul 10 04:03 ehci_hcd 
 +drwxr-xr-x    2 admin    root             0 Jul 10 04:03 ohci_hcd 
 +drwxr-xr-x    2 admin    root             0 Jul 10 04:03 pcieport 
 +drwxr-xr-x    2 admin    root             0 Jul 10 04:03 wl 
 +# cd /sys/devices/ 
 +# ls 
 +pci0000:00  pci0000:01  platform    system      virtual 
 +# cd /sys/module 
 +# ls 
 +8021q                   l2tp_core               pwrmngtd 
 +adsldd                  l2tp_ppp                qcserial 
 +bcm_bpm                 nciTMSkmod              rcutree 
 +bcm_enet                nf_conntrack            sch_htb 
 +bcm_ingqos              nf_conntrack_ftp        scsi_mod 
 +bcmarl                  nf_conntrack_h323       spurious 
 +bcmfap                  nf_conntrack_ipv4       tcp_cubic 
 +bcmvlan                 nf_conntrack_irc        ubi 
 +bcmxtmcfg               nf_conntrack_pptp       ubifs 
 +block                   nf_conntrack_proto_gre  usb_storage 
 +bridge                  nf_conntrack_rtsp       usb_wwan 
 +chipinfo                nf_conntrack_tftp       usbcore 
 +dect                    nf_defrag_ipv4          usblp 
 +dectshim                nf_nat                  usbserial 
 +ehci_hcd                nf_nat_ftp              wl 
 +endpointdd              nf_nat_h323             xt_DSCP 
 +fuse                    nf_nat_irc              xt_LOG 
 +ip6_tables              nf_nat_pptp             xt_SKIPLOG 
 +ip6table_mangle         nf_nat_proto_gre        xt_TCPMSS 
 +ip_gre                  nf_nat_rtsp             xt_conntrack 
 +ip_tables               nf_nat_tftp             xt_dscp 
 +ipt_MASQUERADE          nfnetlink               xt_limit 
 +ipt_REDIRECT            nfnetlink_queue         xt_mac 
 +iptable_filter          option                  xt_mark 
 +iptable_mangle          p8021ag                 xt_multiport 
 +iptable_nat             pcie_aspm               xt_state 
 +ipv6                    pcmshim                 xz_dec 
 +ipw                     pktflow 
 +kernel                  printk
  
-Any help or information on this are welcomed. +# cat /proc/iomem 
-</WRAP> +00000000-07ecdfff : System RAM 
-<WRAP center round important 60%> +  00010000-003f111f : Kernel code 
- <color #ed1c24>**Using LuCI sysupgrade to install on a fresh OEM device bricks it, use the following steps to install or recover.**</color> +  003f1120-004e897f : Kernel data 
-</WRAP>+10000200-10000383 : brcmnand 
 +10002500-100025ff : ehci_hcd 
 +10002600-100026ff : ohci_hcd 
 +11000000-11efffff : bcm63xx pcie memory space 
 +a0f00000-a0ffffff : bcm63xx pci memory space 
 +# cat /proc/ioports 
 +a2000000-a200ffff : bcm63xx pci IO space 
 +</nowiki></WRAP>
  
-This section explains safer way of installing OpenWrt to a F@ST3864OP deviceThis method does not touch the CFE bootloader, and it is less likely to brick the router.+The following came from the ''lspci'' command on OpenWRT port (old target bcm63xx): 
 +<WRAP bootlog><nowiki> 
 +root@OpenWrt:/sys/class/gpio# lspci -v 
 +00:00.0 PCI bridge: Broadcom Inc. and subsidiaries Device 6326 (rev 80) (prog-if 00 [Normal decode]) 
 +        Flags: fast devsel, IRQ 48 
 +        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0 
 +        I/O behind bridge: 00000000-00000fff [size=4K] 
 +        Memory behind bridge: [disabled] 
 +        Prefetchable memory behind bridge: [disabled] 
 +        Capabilities: [48] Power Management version 3 
 +        Capabilities: [ac] Express Root Port (Slot-), MSI 00 
 +        Capabilities: [100] Advanced Error Reporting 
 +        Kernel driver in use: pcieport 
 +lspci: Unable to load libkmod resources: error -12
  
-  - You would need to prepare a USB-TTL serial adapter, open the case of the router, and solder the serial headers. +root@OpenWrt:/sys/bus/pci# ls devices/ -al 
-  - Follow the ''Boot OpenWrt in RAM'' section until you get an OpenWrt (run in RAM) shell. +drwxr-xr-x    2 root     root             0 Jan  1  1970 
-  - Setup a web server (e.g. ''python3 -m http.server'') on your PC that serves the OpenWrt firmware ''openwrt-bmips-bcm63268-sagem_fast-3864op-squashfs-cfe.bin''+drwxr-xr-x    5 root     root             0 Jan  1  1970 .
-  - On the OpenWrt shell, download the OpenWrt firmware to ramdisk ''/tmp''''cd /tmp && wget http://192.168.1.100:8000/openwrt-bmips-bcm63268-sagem_fast-3864op-squashfs-cfe.bin'' +lrwxrwxrwx    1 root     root             0 Jan  1  1970 0000:00:00.0 -> ../../../devices/pci0000:00/0000:00:00.0
-  Use sha256sum to check if the firmware file is intact. +
-  - **Up to this step, you still can reboot the router with the stock firmware untouched.** +
-  - Wipe the stock firmware and create a clean JFF2''flash_erase -j /dev/mtd6 982'', where ''/dev/mtd6'' is the 'wfi' partitionYou can find out which mtd is the wfi partition by using command ''cat /proc/mtd''After this step, the stock firmware is gone. +
-  - Install OpenWrt firmware permanently to the NAND flash: ''nandwrite -p /dev/mtd6 /tmp/openwrt-bmips-bcm63268-sagem_fast-3864op-squashfs-cfe.bin'' +
-  - Now reboot. If everything goes well, you will get a OpenWrt shell. +
-  - **LuCI sysupgrade can be used from now on.**+
  
-Reference[[:toh:huawei:hg253s_v2]] +root@OpenWrt:/sys/bus/pci# ls drivers/ -al 
-===== Hardware Mods ===== +drwxr-xr-x    6 root     root             0 Jul 11 10:51 . 
-This may apply+drwxr-xr-x    5 root     root             0 Jan  1  1970 .. 
-[[:toh:sercomm:ad1018]]+drwxr-xr-x    2 root     root             0 Jul 11 10:52 b43-pci-bridge 
 +drwxr-xr-x    2 root     root             0 Jul 11 10:52 bcma-pci-bridge 
 +drwxr-xr-x    2 root     root             0 Jul 11 10:52 brcmfmac 
 +drwxr-xr-x    2 root     root             0 Jul 11 10:52 pcieport
  
-CPU Pinout+root@OpenWrt:/# cat /proc/iomem 
-[[:docs:techref:hardware:soc:soc.broadcom.bcm63xx]]+00000000-07ffffff System RAM 
 +  00010000-006327f3 Kernel code 
 +  006327f4-00731c3f Kernel data 
 +  01610000-01644757 Kernel bss 
 +100000b0-100000bf 10000200.nand nand-int-base 
 +100000c0-100000c7 : 100000c0.pin-controller dirout 
 +100000c8-100000cf : 100000c0.pin-controller dat 
 +100000d0-100000d3 : 100000c0.pin-controller led 
 +100000d8-100000db : 100000c0.pin-controller mode 
 +100000dc-100000df : 100000c0.pin-controller ctrl 
 +100000f8-100000fb : 100000c0.pin-controller basemode 
 +10000180-10000197 : 10000180.serial serial@10000180 
 +10000200-1000037f : 10000200.nand nand 
 +10000600-100007ff : 10000200.nand nand-cache 
 +10000800-10000f0b : 10000800.spi spi@10000800 
 +10001000-100015ff : 10001000.spi spi@10001000 
 +10001900-10001923 : 10001900.led-controller led-controller@10001900 
 +11000000-11efffff : bcm63xx PCIe memory space 
 +b000009c-b00000a7 : bcm63xx-wdt 
 +b0002500-b00025ff : ehci-platform 
 +  b0002500-b00025ff : ehci-platform ehci-platform 
 +b0002600-b00026ff : ohci-platform 
 +  b0002600-b00026ff : ohci-platform ohci-platform 
 +b000d800-b000d8ff : bcm63xx_enet_shared.0 
 +  b000d800-b000d8ff : bcm63xx_enet_shared.0 bcm63xx_enet_shared.0 
 +b000da00-b000dbff : bcm63xx_enet_shared.0 
 +  b000da00-b000dbff : bcm63xx_enet_shared.0 bcm63xx_enet_shared.0 
 +b000dc00-b000ddff : bcm63xx_enet_shared.0 
 +  b000dc00-b000ddff : bcm63xx_enet_shared.0 bcm63xx_enet_shared.0 
 +b0700000-b070ffff : bcm63xx_enetsw.0 
 +</nowiki></WRAP>
  
  
Line 1262: Line 1436:
 Source code: Source code:
  
-https://github.com/rikka0w0/openwrt-fast3864op/tree/fast3864_master_20240213+https://github.com/rikka0w0/openwrt-fast3864op/tree/fast3864_master_20240315
  
 Before the cferam.000 is merged into ''https://github.com/openwrt/bcm63xx-cfe.git'', we need to supply our cferam.000 manually: Before the cferam.000 is merged into ''https://github.com/openwrt/bcm63xx-cfe.git'', we need to supply our cferam.000 manually:
Line 1279: Line 1453:
 ===== Tags ===== ===== Tags =====
 [[meta:tags|How to add tags]] [[meta:tags|How to add tags]]
-{{tag>EXAMPLETAG unsupported}}+{{tag>MIPS BCM63168 BCM63268 128nand 128ram wip unsupported}}
  • Last modified: 2024/10/19 06:56
  • by rikka0w0