openwrtv3/target/linux
John Crispin 24a0269b71 ar71xx: qihoo-c301: reset imageNtrynum after each successful boot.
Qihoo C301 has 2 flash chips of which one is used as primary and the
other is used as backup.  OEM U-Boot will try to boot an activeregion N
with imageNstatus=0 and imageNtrynum <= imagemaxtry.  If such a region
is found, bootloader will try to increment imageNtrynum and boot it.

This patch tries to reset imageNtrynum after each successful boot (if
the boot process reaches the execution of /etc/init.d/done).

	root@OpenWrt:/# hexdump -C -n 128 /dev/mtdblock9
	00000000  9e f3 63 91 61 63 74 69  76 65 72 65 67 69 6f 6e  |..c.activeregion|
	00000010  3d 31 00 69 6d 61 67 65  31 73 74 61 74 75 73 3d  |=1.image1status=|
	00000020  30 00 69 6d 61 67 65 32  73 74 61 74 75 73 3d 30  |0.image2status=0|
	00000030  00 69 6d 61 67 65 32 74  72 79 6e 75 6d 3d 30 00  |.image2trynum=0.|
	00000040  69 6d 61 67 65 6d 61 78  74 72 79 3d 33 00 69 6d  |imagemaxtry=3.im|
	00000050  61 67 65 31 74 72 79 6e  75 6d 3d 30 00 00 00 00  |age1trynum=0....|
	00000060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

SVN-Revision: 42914
2014-10-14 12:21:36 +00:00
..
adm5120 network: Unbind DHCPv6 from underlying interfaces 2014-10-08 13:08:05 +00:00
adm8668 network: Unbind DHCPv6 from underlying interfaces 2014-10-08 13:08:05 +00:00
amazon target: don't build jffs2 nor images by default 2013-06-05 20:58:59 +00:00
ar7 ar7: remove 972-cpmac_fixup patch 2014-08-16 17:32:46 +00:00
ar71xx ar71xx: qihoo-c301: reset imageNtrynum after each successful boot. 2014-10-14 12:21:36 +00:00
at91 at91: fix at91-adc dependencies 2014-10-13 19:45:31 +00:00
atheros atheros: refresh config 2014-09-12 06:54:16 +00:00
au1000 kernel: update to 3.10.49 Signed-off-by: John Crispin <blogic@openwrt.org> 2014-07-20 17:31:11 +00:00
avr32 targets: remove useless quotes around KERNELNAME 2014-10-05 20:17:19 +00:00
bcm53xx bcm53xx: fix hangs in PCIe2 host driver 2014-10-14 08:06:15 +00:00
brcm47xx scripts: fix wrong usage of '==' operator 2014-10-14 12:21:11 +00:00
brcm63xx brcm63xx: fix wrong fixups pointer 2014-10-03 11:03:58 +00:00
brcm2708 scripts: fix wrong usage of '==' operator 2014-10-14 12:21:11 +00:00
cns3xxx cns3xxx: Adopt irq_domain support for cns3xxx gpio driver 2014-10-08 10:28:10 +00:00
cns21xx targets: remove useless quotes around KERNELNAME 2014-10-05 20:17:19 +00:00
cobalt cobalt: add support for kernel 3.10 2014-07-18 19:03:16 +00:00
ep93xx targets: remove useless quotes around KERNELNAME 2014-10-05 20:17:19 +00:00
gemini targets: remove useless quotes around KERNELNAME 2014-10-05 20:17:19 +00:00
generic generic: fix yaffs compilation on 3.14 2014-10-14 11:32:48 +00:00
imx6 targets: remove useless quotes around KERNELNAME 2014-10-05 20:17:19 +00:00
iop32x targets: remove useless quotes around KERNELNAME 2014-10-05 20:17:19 +00:00
ipq806x targets: remove useless quotes around KERNELNAME 2014-10-05 20:17:19 +00:00
ixp4xx scripts: fix wrong usage of '==' operator 2014-10-14 12:21:11 +00:00
kirkwood image.mk: clean up and parallelize mkfs calls 2014-10-12 15:00:49 +00:00
lantiq lantiq: allow pcie to be disabled by dts + vgv7519 fix pci irq + disable pcie by dts 2014-10-14 11:04:25 +00:00
malta target/linux/*/image/Makefile: eliminate more LINUX_DIR users 2014-07-21 18:42:11 +00:00
mcs814x network: Unbind DHCPv6 from underlying interfaces 2014-10-08 13:08:05 +00:00
mpc52xx targets: remove useless quotes around KERNELNAME 2014-10-05 20:17:19 +00:00
mpc83xx targets: remove useless quotes around KERNELNAME 2014-10-05 20:17:19 +00:00
mpc85xx mpc85xx: use wpad-mini in WDR4900 profile instead of wpad 2014-10-14 10:30:56 +00:00
mvebu targets: remove useless quotes around KERNELNAME 2014-10-05 20:17:19 +00:00
mxs targets: remove useless quotes around KERNELNAME 2014-10-05 20:17:19 +00:00
octeon octeon: add patches which are not upstreamed yet 2014-10-06 20:06:06 +00:00
omap targets: remove useless quotes around KERNELNAME 2014-10-05 20:17:19 +00:00
omap24xx image.mk: clean up and parallelize mkfs calls 2014-10-12 15:00:49 +00:00
orion network: Unbind DHCPv6 from underlying interfaces 2014-10-08 13:08:05 +00:00
ppc40x targets: remove useless quotes around KERNELNAME 2014-10-05 20:17:19 +00:00
ppc44x targets: remove useless quotes around KERNELNAME 2014-10-05 20:17:19 +00:00
pxa targets: remove useless quotes around KERNELNAME 2014-10-05 20:17:19 +00:00
ramips scripts: fix wrong usage of '==' operator 2014-10-14 12:21:11 +00:00
rb532 rb532: switch to 3.14 and ath5k 2014-10-14 11:32:57 +00:00
realview targets: remove useless quotes around KERNELNAME 2014-10-05 20:17:19 +00:00
sibyte build: unify mips target cflags 2013-09-26 17:53:14 +00:00
sparc kernel: update to 3.10.49 Signed-off-by: John Crispin <blogic@openwrt.org> 2014-07-20 17:31:11 +00:00
sunxi scripts: fix wrong usage of '==' operator 2014-10-14 12:21:11 +00:00
uml kernel: update 3.14 to 3.14.18 2014-09-10 21:40:19 +00:00
x86 x86: remove old soekris config hacks, install a more appropriate default /etc/config/network with lan+wan 2014-10-12 20:25:30 +00:00
x86_64 scripts: fix wrong usage of '==' operator 2014-10-14 12:21:11 +00:00
xburst target/linux/*/image/Makefile: eliminate more LINUX_DIR users 2014-07-21 18:42:11 +00:00
Makefile Add kernel_nconfig make target 2010-08-06 21:36:35 +00:00