2 LuCI - Lua Configuration Interface
3 Copyright
2008 Steven Barth
<steven@midlink.org
>
4 Copyright
2008-
2009 Jo-Philipp Wich
<xm@subsignal.org
>
6 Licensed under the Apache License, Version
2.0 (the
"License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-
2.0
18 <h2><a id=
"content" name=
"content"><%:system%
></a></h2>
19 <h3><%:admin_upgrade Flash Firmware%
></h3>
21 <% if step ==
1 then %
>
22 <% if supported then %
>
23 <form method=
"post" action=
"<%=REQUEST_URI%>" enctype=
"multipart/form-data">
25 <%:admin_upgrade_desc Upload an OpenWrt image file to reflash the device.%
>
26 <% if bad_image then %
>
28 <div class=
"error"><%:admin_upgrade_badimage The uploaded image file does not
29 contain a supported format. Make sure that you choose the generic
30 image format for your platform. %
></div>
34 <%:admin_upgrade_fwimage Firmware image%
>:
<br />
35 <input type=
"hidden" name=
"step" value=
"2" />
36 <input type=
"file" size=
"30" name=
"image" />
39 <% if keepavail then -%
>
40 <input type=
"checkbox" name=
"keepcfg" value=
"1" checked=
"checked" />
41 <span class=
"bold"><%:admin_upgrade_keepcfg Keep configuration files%
></span>
45 <input class=
"cbi-button cbi-button-apply" type=
"submit" value=
"<%:admin_upgrade_upload Upload image%>" />
49 <div class=
"error"><%:admin_upgrade_nosupport Sorry.
50 OpenWrt does not support a system upgrade on this platform.
<br />
51 You need to manually flash your device. %
></div>
53 <% elseif step ==
2 then %
>
55 <%:admin_upgrade_uploaded The flash image was uploaded.
56 Below is the checksum and file size listed,
57 compare them with the original file to ensure data integrity.
<br />
58 Click
"Proceed" below to start the flash procedure. %
>
60 <% if flashsize
> 0 and filesize
> flashsize then %
>
62 <div class=
"error"><%:admin_upgrade_toolarge It appears that you try to
63 flash an image that does not fit into the flash memory, please verify
64 the image file! %
></div>
69 <li><%:admin_upgrade_checksum Checksum%
>:
<code><%=checksum%
></code></li>
70 <li><%:admin_upgrade_filesize Size%
>: <%
71 local w = require
"luci.tools.webadmin"
72 write(w.byte_format(filesize))
75 write(luci.i18n.translatef(
76 "admin_upgrade_spaceavail",
78 w.byte_format(flashsize)
84 <div class=
"cbi-page-actions right">
85 <form style=
"display:inline">
86 <input type=
"hidden" name=
"step" value=
"3" />
87 <input type=
"hidden" name=
"keepcfg" value=
"<%=keepconfig and "1" or "0"%>" />
88 <input class=
"cbi-button cbi-button-apply" type=
"submit" value=
"<%:proceed Proceed%>" />
90 <form style=
"display:inline">
91 <input type=
"hidden" name=
"step" value=
"1" />
92 <input type=
"hidden" name=
"keepcfg" value=
"<%=keepconfig and "1" or "0"%>" />
93 <input class=
"cbi-button cbi-button-reset" type=
"submit" value=
"<%:cancel Cancel%>" />
96 <% elseif step ==
3 then %
>
97 <p><%:admin_upgrade_running The system is flashing now.
<br />
98 DO NOT POWER OFF THE DEVICE!
<br />
99 Wait a few minutes until you try to reconnect.
100 It might be necessary to renew the address of your computer to reach the device
101 again, depending on your settings. %
></p>
103 <iframe src=
"<%=REQUEST_URI%>?step=4&keepcfg=<%=keepconfig and "1" or "0"%>" style=
"border:1px solid black; width:100%; height:150px"></iframe>