1 | | {{{#!html |
2 | | <div id="wikipage" class="trac-content"><p> |
3 | | </p><div class="wiki-toc"> |
4 | | <ol> |
5 | | <li> |
6 | | <a href="#OpenWrtsysupgradesupport">OpenWrt sysupgrade support</a> |
7 | | <ol> |
8 | | <li> |
9 | | <a href="#Sysupgradeviacommandline">Sysupgrade via command line</a> |
10 | | </li> |
11 | | <li> |
12 | | <a href="#UsingLuCIWeb-Admin">Using LuCI Web-Admin</a> |
13 | | </li> |
14 | | <li> |
15 | | <a href="#ProductFamilyNotes">Product Family Notes</a> |
16 | | <ol> |
17 | | <li> |
18 | | <a href="#Ventana">Ventana</a> |
19 | | </li> |
20 | | <li> |
21 | | <a href="#Avila">Avila</a> |
22 | | </li> |
23 | | </ol> |
24 | | </li> |
25 | | </ol> |
26 | | </li> |
27 | | </ol> |
28 | | </div><p> |
29 | | </p> |
30 | | <h1 id="OpenWrtsysupgradesupport"><a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> sysupgrade support</h1> |
31 | | <p> |
32 | | <tt>sysupgrade</tt> is an <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> invention that allows the rootfs to be updated to another firmware. |
33 | | </p> |
34 | | <p> |
35 | | The <tt>sysupgrade</tt> script for the Gateworks products provides: |
36 | | </p> |
37 | | <ul><li>the <tt>/sbin/sysupgrade</tt> script on the target will flash the kernel/rootfs contained in a specified image |
38 | | </li><li>the image contents will be validated via an md5 checksum in the image header |
39 | | </li><li>the kernel and rootfs will be updated (squashfs+jffs2, jffs2 supported, or ubi) |
40 | | </li><li>standard system config files will be retained (saved, then restored) (unless the <tt>-n</tt> cmdline option is provided) |
41 | | </li><li>the <tt>-c</tt> command-line argument will save all files on the overlay filesystem |
42 | | </li></ul><p> |
43 | | A standard <tt>make</tt> in the <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> buildroot tree will create a <tt>sysupgrade</tt> image for your target by default named: |
44 | | </p> |
45 | | <ul><li>avila/cambria/laguna: <tt>bin/<target>/*-sysupgrade.bin</tt>. |
46 | | </li><li>ventana: <tt>bin/imx6/*-squashfs-nand_*.ubi</tt> |
47 | | </li></ul><p> |
48 | | You can find more information about sysupgrade on the <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> wiki <a class="ext-link" href="http://wiki.openwrt.org/doc/howto/generic.sysupgrade"><span class="icon"></span>here</a> |
49 | | </p> |
50 | | <p> |
51 | | <span class="wikianchor" id="cmdline"></span> |
52 | | </p> |
53 | | <h2 id="Sysupgradeviacommandline">Sysupgrade via command line</h2> |
54 | | <p> |
| 1 | [[PageOutline]] |
| 2 | |
| 3 | |
| 4 | = OpenWrt sysupgrade support |
| 5 | {{{sysupgrade}}} is an OpenWrt invention that allows the rootfs to be updated to another firmware. |
| 6 | |
| 7 | The {{{sysupgrade}}} script for the Gateworks products provides: |
| 8 | * the {{{/sbin/sysupgrade}}} script on the target will flash the kernel/rootfs contained in a specified image |
| 9 | * the image contents will be validated via an md5 checksum in the image header |
| 10 | * the kernel and rootfs will be updated (squashfs+jffs2, jffs2 supported, or ubi) |
| 11 | * standard system config files will be retained (saved, then restored) (unless the {{{-n}}} cmdline option is provided) |
| 12 | * the {{{-c}}} command-line argument will save all files on the overlay filesystem |
| 13 | |
| 14 | A standard make in the OpenWrt buildroot tree will create a sysupgrade image for your target by default named: |
| 15 | * avila/cambria/laguna: bin/<target>/*-sysupgrade.bin. |
| 16 | * ventana: bin/imx6/*-squashfs-nand_*.ubi |
| 17 | |
| 18 | You can find more information about sysupgrade on the OpenWrt wiki [http://wiki.openwrt.org/doc/howto/generic.sysupgrade here] |
| 19 | |
| 20 | |
| 21 | == Sysupgrade via command line |
| 22 | |
81 | | </p> |
82 | | <div class="code"><pre>Switching to ramdisk... |
83 | | <span class="o">[</span> 447.449487<span class="o">]</span> UBIFS: background thread <span class="s2">"ubifs_bgt0_0"</span> stops |
84 | | <span class="o">[</span> 447.519016<span class="o">]</span> UBIFS: un-mount UBI device 0, volume 0 |
85 | | <span class="o">[</span> 447.585743<span class="o">]</span> UBI: detaching mtd2 from ubi0 |
86 | | <span class="o">[</span> 447.591108<span class="o">]</span> UBI: mtd2 is detached from ubi0 |
87 | | ubiformat: mtd2 <span class="o">(</span>nand<span class="o">)</span>, size 250609664 bytes <span class="o">(</span>239.0 MiB<span class="o">)</span>, 1912 eraseblocks of 131072 bytes <span class="o">(</span>128.0 KiB<span class="o">)</span>, min. I/O size 2048 bytes |
88 | | libscan: scanning eraseblock 1911 -- 100 % <span class="nb">complete |
89 | | </span>ubiformat: 1912 eraseblocks have valid erase counter, mean value is 1 |
90 | | ubiformat: flashing eraseblock 154 -- 100 % <span class="nb">complete |
91 | | </span>ubiformat: formatting eraseblo<span class="o">[</span> 467.802383<span class="o">]</span> UBI: attaching mtd2 to ubi0 |
92 | | ubiformat: formatting eraseblock 1911 -- 100 % <span class="nb">complete</span> |
93 | | <span class="o">[</span> 468.505882<span class="o">]</span> UBI: scanning is finished |
94 | | <span class="o">[</span> 468.525333<span class="o">]</span> UBI: volume 0 <span class="o">(</span><span class="s2">"rootfs"</span><span class="o">)</span> re-sized from 153 to 1868 LEBs |
95 | | <span class="o">[</span> 468.532619<span class="o">]</span> UBI: attached mtd2 <span class="o">(</span>name <span class="s2">"rootfs"</span>, size 239 MiB<span class="o">)</span> to ubi0 |
96 | | <span class="o">[</span> 468.539101<span class="o">]</span> UBI: PEB size: 131072 bytes <span class="o">(</span>128 KiB<span class="o">)</span>, LEB size: 126976 bytes |
97 | | <span class="o">[</span> 468.545937<span class="o">]</span> UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048 |
98 | | <span class="o">[</span> 468.552783<span class="o">]</span> UBI: VID header offset: 2048 <span class="o">(</span>aligned 2048<span class="o">)</span>, data offset: 4096 |
99 | | <span class="o">[</span> 468.559702<span class="o">]</span> UBI: good PEBs: 1912, bad PEBs: 0, corrupted PEBs: 0 |
100 | | <span class="o">[</span> 468.565719<span class="o">]</span> UBI: user volume: 1, internal volumes: 1, max. volumes count: 128 |
101 | | <span class="o">[</span> 468.572885<span class="o">]</span> UBI: max/mean erase counter: 4/2, WL threshold: 4096, image sequence number: 250308913 |
102 | | <span class="o">[</span> 468.581878<span class="o">]</span> UBI: available PEBs: 0, total reserved PEBs: 1912, PEBs reserved <span class="k">for </span>bad PEB handling: 40 |
103 | | <span class="o">[</span> 468.591156<span class="o">]</span> UBI: background thread <span class="s2">"ubi_bgt0d"</span> started, PID 4603 |
104 | | UBI device number 0, total 1912 LEBs <span class="o">(</span>242778112 bytes, 231.5 MiB<span class="o">)</span>, available 0 LEBs <span class="o">(</span>0 bytes<span class="o">)</span>, LEB size 126976 bytes <span class="o">(</span>124.0 KiB<span class="o">)</span> |
105 | | <span class="o">[</span> 468.666681<span class="o">]</span> UBIFS: background thread <span class="s2">"ubifs_bgt0_0"</span> started, PID 4621 |
106 | | <span class="o">[</span> 468.686194<span class="o">]</span> UBIFS: start fixing up free space |
107 | | <span class="o">[</span> 469.759179<span class="o">]</span> UBIFS: free space fixup <span class="nb">complete</span> |
108 | | <span class="o">[</span> 469.782548<span class="o">]</span> UBIFS: mounted UBI device 0, volume 0, name <span class="s2">"rootfs"</span> |
109 | | <span class="o">[</span> 469.788572<span class="o">]</span> UBIFS: LEB size: 126976 bytes <span class="o">(</span>124 KiB<span class="o">)</span>, min./max. I/O unit sizes: 2048 bytes/2048 bytes |
110 | | <span class="o">[</span> 469.797786<span class="o">]</span> UBIFS: FS size: 235794432 bytes <span class="o">(</span>224 MiB, 1857 LEBs<span class="o">)</span>, journal size 9023488 bytes <span class="o">(</span>8 MiB, 72 LEBs<span class="o">)</span> |
111 | | <span class="o">[</span> 469.807805<span class="o">]</span> UBIFS: reserved <span class="k">for </span>root: 0 bytes <span class="o">(</span>0 KiB<span class="o">)</span> |
112 | | <span class="o">[</span> 469.812924<span class="o">]</span> UBIFS: media format: w4/r0 <span class="o">(</span>latest is w4/r0<span class="o">)</span>, UUID 58020D53-74F0-4A4C-83AA-B2FB6B08508F, small LPT model |
113 | | <span class="o">[</span> 469.877200<span class="o">]</span> UBIFS: un-mount UBI device 0, volume 0 |
114 | | <span class="o">[</span> 469.882090<span class="o">]</span> UBIFS: background thread <span class="s2">"ubifs_bgt0_0"</span> stops |
| 43 | {{{#!bash |
| 44 | Switching to ramdisk... |
| 45 | [ 447.449487] UBIFS: background thread "ubifs_bgt0_0" stops |
| 46 | [ 447.519016] UBIFS: un-mount UBI device 0, volume 0 |
| 47 | [ 447.585743] UBI: detaching mtd2 from ubi0 |
| 48 | [ 447.591108] UBI: mtd2 is detached from ubi0 |
| 49 | ubiformat: mtd2 (nand), size 250609664 bytes (239.0 MiB), 1912 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes |
| 50 | libscan: scanning eraseblock 1911 -- 100 % complete |
| 51 | ubiformat: 1912 eraseblocks have valid erase counter, mean value is 1 |
| 52 | ubiformat: flashing eraseblock 154 -- 100 % complete |
| 53 | ubiformat: formatting eraseblo[ 467.802383] UBI: attaching mtd2 to ubi0 |
| 54 | ubiformat: formatting eraseblock 1911 -- 100 % complete |
| 55 | [ 468.505882] UBI: scanning is finished |
| 56 | [ 468.525333] UBI: volume 0 ("rootfs") re-sized from 153 to 1868 LEBs |
| 57 | [ 468.532619] UBI: attached mtd2 (name "rootfs", size 239 MiB) to ubi0 |
| 58 | [ 468.539101] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes |
| 59 | [ 468.545937] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048 |
| 60 | [ 468.552783] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096 |
| 61 | [ 468.559702] UBI: good PEBs: 1912, bad PEBs: 0, corrupted PEBs: 0 |
| 62 | [ 468.565719] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128 |
| 63 | [ 468.572885] UBI: max/mean erase counter: 4/2, WL threshold: 4096, image sequence number: 250308913 |
| 64 | [ 468.581878] UBI: available PEBs: 0, total reserved PEBs: 1912, PEBs reserved for bad PEB handling: 40 |
| 65 | [ 468.591156] UBI: background thread "ubi_bgt0d" started, PID 4603 |
| 66 | UBI device number 0, total 1912 LEBs (242778112 bytes, 231.5 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB) |
| 67 | [ 468.666681] UBIFS: background thread "ubifs_bgt0_0" started, PID 4621 |
| 68 | [ 468.686194] UBIFS: start fixing up free space |
| 69 | [ 469.759179] UBIFS: free space fixup complete |
| 70 | [ 469.782548] UBIFS: mounted UBI device 0, volume 0, name "rootfs" |
| 71 | [ 469.788572] UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes |
| 72 | [ 469.797786] UBIFS: FS size: 235794432 bytes (224 MiB, 1857 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs) |
| 73 | [ 469.807805] UBIFS: reserved for root: 0 bytes (0 KiB) |
| 74 | [ 469.812924] UBIFS: media format: w4/r0 (latest is w4/r0), UUID 58020D53-74F0-4A4C-83AA-B2FB6B08508F, small LPT model |
| 75 | [ 469.877200] UBIFS: un-mount UBI device 0, volume 0 |
| 76 | [ 469.882090] UBIFS: background thread "ubifs_bgt0_0" stops |