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><%:Flash Firmware%
></h3>
21 <% if step ==
1 then %
>
22 <% if supported then %
>
23 <form method=
"post" action=
"<%=REQUEST_URI%>" enctype=
"multipart/form-data">
25 <%:Upload an OpenWrt image file to reflash the device.%
>
26 <% if bad_image then %
>
28 <div class=
"error"><%: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 <%: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"><%:Keep configuration files%
></span>
45 <input class=
"cbi-button cbi-button-apply" type=
"submit" value=
"<%:Upload image%>" />
49 <div class=
"error"><%_ 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 <%_ 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"><%:It appears that you are trying to
63 flash an image that does not fit into the flash memory, please verify
64 the image file! %
></div>
69 <li><%:Checksum%
>:
<code><%=checksum%
></code></li>
71 local w = require
"luci.tools.webadmin"
72 write(w.byte_format(filesize))
75 write(luci.i18n.translatef(
77 w.byte_format(flashsize)
83 <div class=
"cbi-page-actions right">
84 <form style=
"display:inline">
85 <input type=
"hidden" name=
"step" value=
"3" />
86 <input type=
"hidden" name=
"keepcfg" value=
"<%=keepconfig and "1" or "0"%>" />
87 <input class=
"cbi-button cbi-button-apply" type=
"submit" value=
"<%:Proceed%>" />
89 <form style=
"display:inline">
90 <input type=
"hidden" name=
"step" value=
"1" />
91 <input type=
"hidden" name=
"keepcfg" value=
"<%=keepconfig and "1" or "0"%>" />
92 <input class=
"cbi-button cbi-button-reset" type=
"submit" value=
"<%:Cancel%>" />
95 <% elseif step ==
3 then %
>
96 <p><%_ The system is flashing now.
<br />
97 DO NOT POWER OFF THE DEVICE!
<br />
98 Wait a few minutes before you try to reconnect.
99 It might be necessary to renew the address of your computer to reach the device
100 again, depending on your settings. %
></p>
102 <iframe src=
"<%=REQUEST_URI%>?step=4&keepcfg=<%=keepconfig and "1" or "0"%>" style=
"border:1px solid black; width:100%; height:150px"></iframe>