New to script writing, new to bash, new to firmware modifications, but... enthusiastic as all get out.
Here's the link to my camera's firmware.
I'm trying to edit and replace the bitrate values specific to recording on this camera and I need some help. I've used a hex editor to find the bitrate values but I haven't found them yet. Still looking... In the meantime I'd like to see if I could change the value of the firmware version using the script, just to test it out and see if it actually works.
I believe the firmware version information is stored in the
paramdef file. If you open it in hex and search for the firmware version you'll find it in D0B0 (at the bottom of the hex). I want to change the 3 to a 4 value in a bash file and see if it works in the camera when I boot it with a
test.sh bash script.
- I need to know how to reference the hex line in the bash script
- I need to know how to replace the value in the hex line with my bash script
I'm thinking if I can get some positive traction on this script I'll eventually be able to edit the bitrate values of my camera.
I'm also not able to flash the same firmware to my camera over and over. It'll only flash a new version. I'm wondering if it's something to do with the system script at the beginning of the firmware files:
setenv bootargs 'mem=96M quiet console=ttyAMA0,115200 clk_ignore_unused rw root=/dev/mtdblock5 rootfstype=jffs2 mtdparts=hi_sfc:384K(u-boot-GR01V2_2_2GDDR3.bin),64K(rawparam),64K(rawparambak),2944K(media_app_zip.bin),2560K(uImage),1920K(rootfs.jffs2),8064K(appfs.jffs2)' setenv bootcmd 'sf probe 0;sf read 0x84000000 0x60000 0x10000;sf read 0x84100000 0x70000 0x10000;cread 0x84000000 0x84100000 0x10000 0x80100000;go_cpu1 0x80200000 0x89000000 0x80000 0x2e0000;sf read 0x84000000 0x360000 0x280000;bootm 0x84000000' setenv swverv2 'S2_GR01V2_2_2GDDR3_0303111844'
Edit: I still haven't found what I'm looking for (u2...)... I'm beginning to think it might be found in the U-boot commands? The Config file has the setenv command which I believe is read by the Linux command structure??? I wanted to see if it would just work on boot and I created a bash.sh file that reads: ''' echo 'This is a test' > foo.txt '''