1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

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

    Code:
    $ md5sum FW/PVC2300.bin 
    6cf094b2d74a60f67c874333d4e0d412  FW/PVC2300.bin
    $ du -k FW/PVC2300.bin 
    8204	FW/PVC2300.bin
    
    my host is debian
    Code:
    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)

    unpack

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

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

    Code:
    sudo aptitude install flex gettext zlib1g-dev
    build the tool chain
    Code:
    cd /opt/toolchain/src
    sudo make
    set the environment ( which also configures $PATH )
    Code:
    cd ~/GPL_PACKAGE/GPL_SOURCE/
    source setenv PVC2300
    build the firmware
    Code:
    make
    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.
    http://[ipaddress]/pt/irisctrl.cgi?Level=5

    Alternatively hardwiring the src to override those options. Settings in these files seem promising
    /src/kernel/linux/drivers/usb/pwc-ctrl.c
    static inline int pwc_set_awb
    /src/kmods/tp6830_lnx_951026/pwc-ctrl.c
    AutoWhiteBalance=1;

    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?
    /src/sysapps/apps/cgi2/pond/bulk/bulk_ops/image/image_bulk_ops.h
    VDO_AWB_AUTO=0,
    VDO_AWB_INDOOR,
    VDO_AWB_FL_WHITE,
    VDO_AWB_FL_YELLOW,
    VDO_AWB_OUTDOOR,
    VDO_AWB_BLACKWHITE,

    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
    Code:
    /src/kmods/tp6830_lnx_951026/pwc-ctrl.c
    
    hardcoding the awb mode here

    Code:
     /*
      * 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;
    [/B]
    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

    Hi,

    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

    Martin
     

Share This Page