Compiling firmware notes and request for advice.

Discussion in 'Linksys Official Firmware' started by Queenvictoria, Oct 17, 2008.

  1. Queenvictoria

    Queenvictoria Addicted to LI Member

    dear people . thanks all for contributing to such a fantastic resource .

    i have been trying to compile firmware for a linksys device ( my first attempt at cross compiling ) . i have successfully created a .bin image ( notes below ) .

    unfortunately it bears no resemblance to the linksys distributed one ( and i believe it should ) . my intention was to create a match before i make a change to the firmware as the device belongs to a friend and it is rather expensive .

    the device is the PVC2300 ip camera . the camera has firmware v1.0.0 installed . i have downloaded the binary and sources for that version, installed the toolkit and compiled it .

    the binary is

    $ md5 PVC2300_V100R47.bin 
    MD5 (PVC2300_V100R47.bin) = f00b4ff6e14f37ba91d15802a1f3e947
    $ du -k PVC2300_V100R47.bin 
    8192	PVC2300_V100R47.bin
    the build binary is

    $ md5sum FW/PVC2300.bin 
    6cf094b2d74a60f67c874333d4e0d412  FW/PVC2300.bin
    $ du -k FW/PVC2300.bin 
    8204	FW/PVC2300.bin
    my host is debian
    gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
    my questions are
    a) what could cause the differences ? the revision ?
    b) how can i discover the revision of the built binary ?
    c) is it safe to use ? can i figure out if its good without bricking the device ?

    thanks all in advance .

    here are my notes for the build under debian .

    download source (PVC2300 1.0.0)


    tar zxf PVC2300_v1.0.0.tgz
    move toolchain to /opt

    mv ~/GPL_PACKAGE/GPL_SOURCE/toolchain/* /opt/
    install extra packages

    sudo aptitude install flex gettext zlib1g-dev
    build the tool chain
    cd /opt/toolchain/src
    sudo make
    set the environment ( which also configures $PATH )
    source setenv PVC2300
    build the firmware
    firmware is built into ~/GPL_PACKAGE/GPL_SOURCE/FW/PVC2300.bin
  2. mstombs

    mstombs Network Guru Member

    md5 sums will not match because the filesystem has dates and times before squashing. The kernel will also have a boot line with date/time/user.
  3. Queenvictoria

    Queenvictoria Addicted to LI Member

    Hi there. Thanks for your advice, I went ahead and uploaded the new firmware, all seems fine.

    Unfortunately after re-reading the src I think I won't be able to do what I need to do. I wonder if anyone has any suggestions ?

    Basically the PVC2300 only allows auto white balance or black and white from its admin page. Neither of these suit the purpose for which the camera was purchased. I'd be happy with anything else (I think) - off, outdoor, indoor, white or yellow fluro are some of the options that seem to be available.

    Ideally I'd set this without changing the firmware, perhaps similarly to this switch I found by examining the source.

    Alternatively hardwiring the src to override those options. Settings in these files seem promising
    static inline int pwc_set_awb

    Does anyone have any sense as to whether changing the pwc-ctrl.c files has any effect on a non-usb camera ?

    Or where the following variables might be used?

    Thanks again for all assistance.
  4. Queenvictoria

    Queenvictoria Addicted to LI Member

    dear people . i'm just reporting on my progress .

    i modified this file
    hardcoding the awb mode here

      * the camera recognizes modes from 0 to 4:
      * 00: indoor (incandescant lighting)
    [B]  * 01: outdoor (sunlight)
    [/B]  * 02: fluorescent lighting
      * 03: manual
      * 04: auto
    static inline int pwc_set_awb(struct pwc_device *pdev, int mode)
    	char buf;
    	int ret;
    	//	changed queenvictoria 20081104 1125 use outdoor lighting
    [B]	mode = 1;
    compiled and uploaded . camera working beautifully and no longer auto balancing .
  5. mstombs

    mstombs Network Guru Member

    Good to hear - you are brave to risk making changes on such a device!
  6. Speed Baron

    Speed Baron Addicted to LI Member


    one question - what is plan b if the device doesn't reboot with my "homebrew" image???

    I have also some things I will fix in the image but I see no way to flash the camera by tftp or ftp?

    Any ideas? Must I solder out the flash and put it in an programmer when something goes the wrong way???

    Thanks for any ideas

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice