# ls -l
total 159908
-rwxr-xr-x 1 root root 163738914 Dec 26 16:16 sys_update_file
-rw-r--r-- 1 root root 3920 Dec 26 16:17 sys_update_file_extract.c
# gcc -o sys_update_file_extract sys_update_file_extract.c
# ./sys_update_file_extract
sys_update_file version: 339
uboot:
sys offset: 260
length: 1035504
sd offset: 0
kernel1:
sys offset: 1035764
length: 1818209
sd offset: 4194304
kernel2:
sys offset: 2853973
length: 3598537
sd offset: 8388608
root fs:
sys offset: 6452510
length: 0
sd offset: 12582912
app fs:
sys offset: 6452510
length: 136314880
sd offset: 515899392
cfg fs:
sys offset: 142767390
length: 20971520
sd offset: 652214272
# ls -l
total 319832
-rw-r--r-- 1 root root 136314880 Dec 26 16:30 appfs.bin
-rw-r--r-- 1 root root 20971520 Dec 26 16:30 cfgfs.bin
-rw-r--r-- 1 root root 1818209 Dec 26 16:30 kernel1.bin
-rw-r--r-- 1 root root 3598537 Dec 26 16:30 kernel2.bin
-rw-r--r-- 1 root root 0 Dec 26 16:30 rootfs.bin
-rwxr-xr-x 1 root root 163738914 Dec 26 16:16 sys_update_file
-rwxr-xr-x 1 root root 13036 Dec 26 16:17 sys_update_file_extract
-rw-r--r-- 1 root root 4215 Dec 26 16:26 sys_update_file_extract.c
-rw-r--r-- 1 root root 1035504 Dec 26 16:30 uboot.bin
# file *.bin
appfs.bin: Linux rev 1.0 ext3 filesystem data, UUID=f9807242-e205-49d7-a491-6f49116e2156
cfgfs.bin: Linux rev 1.0 ext3 filesystem data, UUID=7337b556-d6e6-4eea-9adb-e08e3b9a0804
kernel1.bin: u-boot legacy uImage, Linux-2.6.31.3-g0ddfdb5-dirty, Linux/MIPS, OS Kernel Image (gzip), 1818145 bytes, Sun Nov 18 17:51:30 2012, Load Address: 0x80010000, Entry Point: 0x800155E0, Header CRC: 0xF7FECB1A, Data CRC: 0xEC839D02
kernel2.bin: u-boot legacy uImage, Linux-2.6.31.3-g9ab1374-dirty, Linux/MIPS, OS Kernel Image (gzip), 3598473 bytes, Sun Nov 18 17:54:47 2012, Load Address: 0x80010000, Entry Point: 0x80015860, Header CRC: 0xDFE1F97B, Data CRC: 0x2478BB0D
rootfs.bin: empty
uboot.bin: x86 boot sector; partition 1: ID=0x83, starthead 0, startsector 24576, 983040 sectors; partition 2: ID=0x83, starthead 0, startsector 1007616, 266240 sectors; partition 3: ID=0x83, starthead 0, startsector 1273856, 40960 sectors; partition 4: ID=0xb, starthead 0, startsector 1314816, 2097152 sectors, code offset 0x0