Upgrading NOR Flash on a Vizio XWR100 router.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Spork Schivago
    Badcaps Legend
    • Mar 2012
    • 4734
    • United States of America

    #1

    Upgrading NOR Flash on a Vizio XWR100 router.

    Hi,

    Not sure if this is the proper thread to post in, but I figured because it's a question involve flash, it was the right place to be.

    I have a Vizio XWR100 wireless router. It's a bit limited with the stock firmware and I want to put a custom firmware on there. The issue is there isn't very much space available. It comes with a 64Mbit NOR flash chip (8MB). The flash chip is a 16-pin SOIC (M25P64-VMF6P). I've attached the datasheet for it.

    What I wanted to know if it was possible to replace this with a larger NOR flash chip? I was looking for the largest I could find that's an 16-SOIC. I found a 1Gbit (128MB) NOR flash chip (S70FL01GSAGMFB013). I've attached the datasheet for that as well.

    If I had some sort of device to program these flash chips and I were able to extract the contents from the 8MB NOR flash chip and write it to the 128MB NOR flash chip, could I just solder that in with no problems and everything would just work?

    The pinouts, from what I can see, seem to be right. Also, the working voltages are the same. There's some speed differences. The 8MB NOR Flash has a 75 MHz clock rate (maximum). The 128MB one has an SCK Clock Frequency for READ and 4READ instructions that's listed as 50MHz max, and it shows 133MHz max for the SCK Clock Frequency for single commands.

    I'd really like to put the largest flash chip in there that I can just solder in and have work.

    Is this possible?

    Thanks!
    Attached Files
    -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full
  • stj
    Great Sage 齊天大聖
    • Dec 2009
    • 30979
    • Albion

    #2
    Re: Upgrading NOR Flash on a Vizio XWR100 router.

    you must have the same sector size & layout or the o.s. may not know how to write to it.
    other than that, it may work.

    you would have to copy the rom data over,
    then after you boot it up, you need a serial console to try to change the size of the last partition, or create a new one.
    i have no idea if it can be done - you need to investigate the options in your boot code.

    Comment

    • goontron
      5000!
      • Dec 2011
      • 4108
      • US

      #3
      Re: Upgrading NOR Flash on a Vizio XWR100 router.

      ^ As STJ said, OS dependant. If its some Linux based OS, you'll be fine, if its VxWorks, expect breakage!
      Things I've fixed: anything from semis to crappy Chinese $2 radios, and now an IoT Dildo....

      "Dude, this is Wyoming, i hopped on and sent 'er. No fucking around." -- Me

      Excuse me while i do something dangerous


      You must have a sad, sad boring life if you hate on people harmlessly enjoying life with an animal costume.

      Sometimes you need to break shit to fix it.... Thats why my lawnmower doesn't have a deadman switch or engine brake anymore

      Follow the white rabbit.

      Comment

      • Spork Schivago
        Badcaps Legend
        • Mar 2012
        • 4734
        • United States of America

        #4
        Re: Upgrading NOR Flash on a Vizio XWR100 router.

        I believe it's a Linux based OS. The OpenWRT wiki page I found links to the GPL source code on Vizio's website for it. I'm compiling OpenWRT for it now, even though technically, it's not supported.

        The idea was to first remove the current flash, dump it, write it to the new chip, solder the new chip on....the OS would still see the old size, but I figured if I installed OpenWRT just right, because I'm going from stock firmware to OpenWRT, it'd repartition the Nor, if that's the correct word. I don't know a lot about flash.

        But the clock speeds don't matter? If one says it can handle a max clock of 50MHz, and another says it can handle a max of 133MHz, that won't matter at all? The faster one will just run at a lower speed?

        If this is the case, now I need to find a way to hook a reader / writer up to it. I'll either try to adapt my SPI 8-pin reader / writer to hook up to the 16-pin SOIC, or I'll have to purchase a new reader / writer made for the 16-pin chips.

        I was also thinking, if I get this Nor to work right, maybe upgrading the RAM would be the next step. Nor, RAM, and who knows, maybe the world!
        -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

        Comment

        • stj
          Great Sage 齊天大聖
          • Dec 2009
          • 30979
          • Albion

          #5
          Re: Upgrading NOR Flash on a Vizio XWR100 router.

          sector size is the key,
          because when flash is written, the o.s. must erase and then write an entire sector at a time.
          if the old chip is mostly 4k sectors and the new chip is 64k then your probably in trouble.

          now it gets interesting - dump the original flash - or find a FULL dump online.
          you want the bootloader.
          look at it with a hex editor to see the strings, they often list the chips they support!

          Comment

          • stj
            Great Sage 齊天大聖
            • Dec 2009
            • 30979
            • Albion

            #6
            Re: Upgrading NOR Flash on a Vizio XWR100 router.

            btw, vizio dont make shit - so who really makes this re-badge??

            Comment

            • ratdude747
              Black Sheep
              • Nov 2008
              • 17136
              • USA

              #7
              Re: Upgrading NOR Flash on a Vizio XWR100 router.

              Originally posted by stj
              btw, vizio dont make shit - so who really makes this re-badge??
              My parents run one (not sure if it's this) that's a rebadged unreleased Linksys model (made while Cisco owned Linksys). Runs OpenWRT quite well actually.
              sigpic

              (Insert witty quote here)

              Comment

              • Spork Schivago
                Badcaps Legend
                • Mar 2012
                • 4734
                • United States of America

                #8
                Re: Upgrading NOR Flash on a Vizio XWR100 router.

                Originally posted by stj
                sector size is the key,
                because when flash is written, the o.s. must erase and then write an entire sector at a time.
                if the old chip is mostly 4k sectors and the new chip is 64k then your probably in trouble.

                now it gets interesting - dump the original flash - or find a FULL dump online.
                you want the bootloader.
                look at it with a hex editor to see the strings, they often list the chips they support!
                Okay. When you were saying sector size was the key, I originally thought you meant the flash needed to be the same physical size. I don't understand why the sector size matters. So long as the kernel has support for the Nor chip that I want to add, wouldn't the module handle all of that? Wouldn't the sector size not matter at all at that point? Are you talking just if the kernel doesn't support the Nor I want to add?

                I was lucky enough to find this: https://wiki.openwrt.org/toh/vizio/xwr100

                If you look through it, they say there's a serial header at location JP1 and they give the pinouts.

                I'm guessing this is for serial console access. If I were to create a serial connection there, during bootup (or using dmesg), would I be able to obtain the information you say I need?

                Just so we're on the right page, taking the stock firmware as having a Linux kernel, the Nor chip would have to be either compiled in the kernel or as a module, right? I am compiling the OpenWRT for this router. It, obviously, includes the toolchain to cross compile the various binary packages. Could I use the serial console to replace the kernel on the current Nor with a newer kernel that supports the various Nor chips, in particular, the one that's currently in there, and the one that I want to add?

                Now what's preventing me from using a NAND type flash chip? Minus the kernel probably not having support compiled in and no modules, is the pinouts different?
                -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                Comment

                • Spork Schivago
                  Badcaps Legend
                  • Mar 2012
                  • 4734
                  • United States of America

                  #9
                  Re: Upgrading NOR Flash on a Vizio XWR100 router.

                  Originally posted by stj
                  btw, vizio dont make shit - so who really makes this re-badge??
                  How would I tell? Crack it open? It's got the Atheros AR7161 and all the WNIC / NICs are Atheros as well....the stock firmware is kinda garbage. Ever run one of those setup CDs to configure a router? That's kinda what the stock firmware is like. Fancy graphics, confusing menus....I think the menu's are meant to "simplify" things, but it kinda has the opposite effect. I'll give an example....

                  I'm not talking about this router in particular right here, but some routers support repeater mode. But when you go to the configuration page, it says bridge mode. In the real world, bridge mode requires an ethernet cable, repeater mode is for wirelessly repeating the signal. There's been more times than once where we seen these consumer grade routers calling repeater mode bridge mode. That confuses us sometimes. We think certain routers only support bridge mode, but in reality, they're supporting repeater mode.
                  -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                  Comment

                  • diif
                    Badcaps Legend
                    • Feb 2014
                    • 6978
                    • England

                    #10
                    Re: Upgrading NOR Flash on a Vizio XWR100 router.

                    They look to be made by a company called Gemtek.

                    Comment

                    • Per Hansson
                      Super Moderator
                      • Jul 2005
                      • 5895
                      • Sweden

                      #11
                      Re: Upgrading NOR Flash on a Vizio XWR100 router.

                      The Kernel has nothing to do with it.
                      The CFE (bootloader) needs to support the flash memory.
                      "The one who says it cannot be done should never interrupt the one who is doing it."

                      Comment

                      • Spork Schivago
                        Badcaps Legend
                        • Mar 2012
                        • 4734
                        • United States of America

                        #12
                        Re: Upgrading NOR Flash on a Vizio XWR100 router.

                        The CFE (bootloader) would be replaced with one by OpenWRT, wouldn't it? I have the OpenWRT tool to build the firmware. I see sizes and locations in there for the flash that's supposed to be on there....

                        If the kernel has nothing to do with it, do you know why I see options in OpenWRT's make menuconfig for NAND support? I had three options, Generic (which it's currently set to), Generic Devices with NAND Flash, and then Mikrotik Devices with NAND Flash.

                        This isn't meant to sound condescending. I'm trying to understand it a bit more.

                        On my OpenSuSE box, grub2 is the bootloader, and that bootloader loads the kernel. Is it the same with all types of flash? There's a bootloader and it has some sort of module to support the filesystem type (whether it's a hard drive with Ext3 support, Ext4, JFS, etc, or a Nor flash chip, or a NAND flash chip) and boot the kernel?
                        -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                        Comment

                        • Spork Schivago
                          Badcaps Legend
                          • Mar 2012
                          • 4734
                          • United States of America

                          #13
                          Re: Upgrading NOR Flash on a Vizio XWR100 router.

                          The tool to create the firmware image that is recognizable as a valid firmware for this specific router has a typedef structure that holds the entry point to the kernel that gets passed to something called RedBoot. Is RedBoot the CFE (bootloader)?

                          **EDIT: I was looking at a capture of the bootlog (via serial) from the stock firmware, and I think the bootloader is uboot. I'm thinking I could cross-compile uboot and modify it to support the flash, if it doesn't already support it, or maybe find another bootloader to use.

                          I had assumed the bootloader was built into the firmware. But this might not be the case. If I can get my hands on the source to the bootloader and properly configure it, and if I extract the calibration data from the current flash chip, I wouldn't need to dump the old flash at all. I could write it directly to the new flash chip and solder it on, right?
                          Last edited by Spork Schivago; 08-07-2017, 07:10 PM.
                          -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                          Comment

                          • stj
                            Great Sage 齊天大聖
                            • Dec 2009
                            • 30979
                            • Albion

                            #14
                            Re: Upgrading NOR Flash on a Vizio XWR100 router.

                            the bootloader is not usually replaced, it starts the box up, and loads the firmware into ram.
                            so it must know the layout of the memory.

                            redboot,uboot and cfe are all different bootloaders btw.
                            redboot is 3rd party - i think redhat made it.
                            cfe is from broadcom afaik.
                            not sure about uboot - but it could be vxworks

                            Comment

                            • stj
                              Great Sage 齊天大聖
                              • Dec 2009
                              • 30979
                              • Albion

                              #15
                              Re: Upgrading NOR Flash on a Vizio XWR100 router.

                              looked at the spec, it wont work.
                              you usually need atleast twice as much ram as you have flash,
                              because the bootloader will usually try to copy the flash to ram - 128meg wont fit into 32meg!

                              the only way i see around that is to change the number of partitions so the boot-stuff is not larger than 16meg, and the rest is used as an extra "user" partition.

                              Comment

                              • Spork Schivago
                                Badcaps Legend
                                • Mar 2012
                                • 4734
                                • United States of America

                                #16
                                Re: Upgrading NOR Flash on a Vizio XWR100 router.

                                Originally posted by stj
                                the bootloader is not usually replaced, it starts the box up, and loads the firmware into ram.
                                so it must know the layout of the memory.

                                redboot,uboot and cfe are all different bootloaders btw.
                                redboot is 3rd party - i think redhat made it.
                                cfe is from broadcom afaik.
                                not sure about uboot - but it could be vxworks
                                I didn't realize cfe was an actual bootloader. I thought CFE was the name for bootloaders in general with these embedded devices. Thanks for the clarification!

                                RedBoot is made by RedHat. I've seen uboot on other devices. The NES Classic (that really small-fits-in-your-hand NES with 20 or 25 built-in games) has it. When we hacked it, we had to download uboot and compile it.

                                OpenWRT normally doesn't support this router. I found a github repository where a guy created three patches to support it. I cloned the newest version of OpenWRT ( https://github.com/openwrt/openwrt.git ) then I went to his repository

                                ( https://github.com/cmtsij/openwrt/tr...100%4020160725 )

                                I downloaded the three commits that cmtsij created that adds support for the XWR100 and implemented them into the newest version of OpenWRT. The very first time, I just downloaded his repository. I can compile everything just fine, unless I pick some packages. Then it fails to compile.

                                So I figured maybe the newest version of OpenWRT would fix this. But it doesn't. I can still compile, so long as I don't actually select any packages. but the moment I select a package, it refuses to compile. The first issue is it's trying to compile gpsd-3.14 and I can see it's using the cross-compiler that I successfully built that comes with OpenWRT. It errors out about not being able to find ncurses/ncurses_dll.h, which ncurses.h is including.

                                So I check my system to make sure I have the dev files for ncurses installed, and I do. There's the /usr/include/ncurses/ncurses.h file and there's the /usr/include/ncurses/ncurses_dll.h file. When the cross-compiler is trying to compile gpsd, it's using pkg-config to figure out where the header locations are. It passes -I/usr/include/ncurses to the compiler. If I create a symbolic link:
                                /usr/include/ncurses/ncurses -> /usr/include/ncurses it will compile, but later on, the build fails, because of missing symbols (ncurses symbols).

                                I think this is wrong though. I don't think it should be using the /usr/include/ncurses files at all. Shouldn't it be using the toolchain's cross-compiler header files? Something like /home/spork/src/vizio_xwr100/staging_dir/target-mips_34kc_musl-1.1.16/usr/include/ncurses.h?

                                Shouldn't it only be using my system headers when it's actually compiling the cross-compiler, and not the actual packages? I look at the libncurses.so and libncurses.a files using ar. I have to use the cross-compiler's ar utility to see the object files. Obviously, it only works for the .a file and not the so. But am I supposed to have dynamic libraries? I dunno. I tried using ldd to look at the exports, but it seems the cross-compiler didn't create an ldd utility.

                                Very frustrating.
                                -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                                Comment

                                • Spork Schivago
                                  Badcaps Legend
                                  • Mar 2012
                                  • 4734
                                  • United States of America

                                  #17
                                  Re: Upgrading NOR Flash on a Vizio XWR100 router.

                                  Originally posted by stj
                                  looked at the spec, it wont work.
                                  you usually need atleast twice as much ram as you have flash,
                                  because the bootloader will usually try to copy the flash to ram - 128meg wont fit into 32meg!

                                  the only way i see around that is to change the number of partitions so the boot-stuff is not larger than 16meg, and the rest is used as an extra "user" partition.
                                  Thank you for looking at this. But couldn't I just upgrade the RAM at the same time? You're right, it does copy the flash to RAM. I saw that but didn't put the pieces together.
                                  -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                                  Comment

                                  • Spork Schivago
                                    Badcaps Legend
                                    • Mar 2012
                                    • 4734
                                    • United States of America

                                    #18
                                    Re: Upgrading NOR Flash on a Vizio XWR100 router.

                                    Also, it's cgps.o that complains about the undefinied symbols (_nc_COLS), etc. I believe cgps.o gets compiled when gpsd gets compiled. I really think gpsd is pulling in the wrong ncurses.pc pkg-config file and should be actually pulling in the pkg-config .pc file from the cross-compiled ncurses library.

                                    What's a bit odd though, I've checked my system libncurses for the _nc_COLS export, using nm, and I don't see that being exported anywhere. I checked the cross-compiler's libncurses files as well, and don't see it being exported anywheres. I ran grep -R "_nc_COLS" in the /home/spork/src/vizio_wxr100 directory, and there are references to _nc_COLS in the libncurses-5.9 directory....it just never gets compiled into the actual library. Maybe because the cross-compiler's been using some system files instead of the cross-compilers files? I dunno.

                                    I went to the OpenWRT page and saw the required dependencies to compile. They had a command to pull them all in for OpenSuSE 13.2 or something like that. I'm running OpenSuSE Tumbleweed, but installed the dependencies anyways. They said not all packages (feeds) use git, some use subversion and mercurial or whatever it's called and they should be installed in order to update the various feeds. Maybe I should run the ./scripts/feeds update -a and ./scripts/feeds install -a commands again, now that I have subversion and mercurial installed.
                                    -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                                    Comment

                                    • stj
                                      Great Sage 齊天大聖
                                      • Dec 2009
                                      • 30979
                                      • Albion

                                      #19
                                      Re: Upgrading NOR Flash on a Vizio XWR100 router.

                                      you may be able to change the ram chip(s) if the extra address lines are on the board - sometimes they are - sometimes not.

                                      Comment

                                      • Spork Schivago
                                        Badcaps Legend
                                        • Mar 2012
                                        • 4734
                                        • United States of America

                                        #20
                                        Re: Upgrading NOR Flash on a Vizio XWR100 router.

                                        What do you mean by the extra address lines? Large sized RAM requires extra lines? If this is the case, then the NAND and CPU would require them as well, I'd think.

                                        If i'm not going for a super increase (ie, increasing it from 32 MB to 64MB vs 32 MB to 1GB), I might be okay?

                                        How do I determine how many address lines are required based on the size of the stick of RAM? Would it be something like:
                                        Code:
                                        32 MB = 32 * 1024KB = 32 * 1024 * 1024 bytes = 2^5 * 2^10 * 2^10 = 2^25
                                        25 address bits?

                                        How do you easily find the 2^5? I never really got into logarithms (I only took up to pre-calc but dropped out of pre-calc).

                                        Is it something like log(x) / log(2), where x is the size of the memory, in this case, 32?
                                        Code:
                                        log(32) = 1.5051499783199059760686944736225
                                        log(2) = 0.30102999566398119521373889472449
                                        
                                        log(32) / log(2) = 5
                                        If that's correct (checks out on the calc, but might just be a coincidence), then for 64MB, we'd need:
                                        Code:
                                        log(64) / log(2) = 6
                                        
                                        address_lines = (2^6) * (2^10) * (2^10)
                                        (2^6) * (2^10) * (2^10) = 67,108,864
                                        
                                        address_lines = log(67,108,864) / log(2) = 26
                                        
                                        address_lines = 26?
                                        
                                        **check**
                                        2^26 = 67,108,864
                                        Is that right?
                                        -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                                        Comment

                                        Related Topics

                                        Collapse

                                        • testaccgta
                                          Unable to verify IC or write/erase/flash BIOS file to XMC QH128AHIG SPI chip using NeoProgrammer/AsProgrammer
                                          by testaccgta
                                          Hi, everyone!

                                          I've recently acquired two brand new SPI chips to replace the one currently in my Acer A514-54G laptop MB (FH5AT LA-K092P). The reason why I'm replacing the current SPI chip is because I had some difficulties with a third-party IT assistant who pretty much lacked the soldering skills and ended up destroying the current SPI chip soldered to my MB from factory.

                                          I've decided to do this on my own because I spent the past month or so learning some soldering skills and BIOS modding through Badcaps and WinRaid forums, hence the attempt. I've also chosen to buy...
                                          09-01-2024, 08:24 PM
                                        • acedogblast
                                          Guide to transplant MEC1503 EC chip and EEPROM reprogamming for T14s gen 2 and X13 gen 2
                                          by acedogblast
                                          This is a guide that I am writing for helping others to replace their MEC1503 EC chip if it breaks (or to get around an inconvenient prompt to the BIOS). This forum has been extremely helpful to me so I would like to contribute to help others. I will tell you right now that this task is very difficult to do. You MUST have experience and tools to do precision micro-soldering, BGA reballing, trace repair, and general laptop repair skills.

                                          There are some specialty tools needed to do this task. The replacement MEC1503 chips can be acquired from Aliexpress. Do not buy the bare chips as...
                                          11-02-2024, 05:13 PM
                                        • BMCappelletti
                                          Asus Chromebox CN62 - wrong chip put on BIOS reader
                                          by BMCappelletti
                                          Long story short:
                                          - dad converted Asus Chromebox CN62 into Windows compatible, with mrchromebox BIOS, years and years ago
                                          - gave the computer to his son a couple years later
                                          - son now decided to revert it to Chrome OS, to sell it as original (re-writing BIOS with the backup one created by his dad)
                                          - too lazy to remove the board from the case, thought a voltage regulator was the BIOS chip (you know... it has 8 legs)
                                          (seems like the story was not that short)

                                          He used alligator clips to read the chip. No luck reading it. Removed chip and placed on a SOC-8...
                                          01-08-2025, 07:27 PM
                                        • Troystain
                                          Help EZP2023+ updated chip database for w25q256jveq?
                                          by Troystain
                                          Hello, anyone here have updated ezp2023+ chip database in .dat file format.

                                          I need to add w25q256jveq chip but I do not know what data should I type.

                                          I'm using the ezp chip dabase editor posted from here https://www.badcaps.net/forum/troubl...ro-programmers

                                          The currenty unit model that I am trying to detect is HP elitebook 640 g9 which is currently locked on admin bios....
                                          11-25-2024, 12:53 AM
                                        • grimacelord
                                          ASUS TUF GAMING Z790-PLUS WIFI - BIOS Help
                                          by grimacelord
                                          Hello,

                                          I have spent the last hour on this and I guess this is just over my head, so here I am.

                                          I have an ASUS TUF GAMING Z790-PLUS WIFI motherboard here that needs to have the BIOS updated in order to accept the latest CPUs.

                                          The BIOS chips seem to come as a set of two: GD25B64ESIG and GD25B128ESIG. My guess is one of them is a fail-safe for the main BIOS? I really don't know. Or one of them is ME and other is BIOS? I don't know.

                                          Anyway, I took dumps of both chips and then downloaded the latest update for this motherboard from ASUS's website...
                                          07-10-2025, 02:52 PM
                                        • Loading...
                                        • No more items.
                                        Working...