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><%:a_s_flash%></h3>
21 <% if step == 1 then %>
22 <form method="post" action="<%=REQUEST_URI%>" enctype="multipart/form-data">
24 <%:admin_upgrade Upload an OpenWrt image file to reflash the device.%>
25 <% if bad_image then %>
27 <div class="error"><%:admin_upgrade_badimage The uploaded image file does not
28 contain a supported format. Make sure that you choose the generic
29 image format for your platform. %></div>
33 <%:admin_upgrade_fwimage Firmware image%>:<br />
34 <input type="hidden" name="step" value="2" />
35 <input type="file" size="30" name="image" />
38 <% if keepavail then -%>
39 <input type="checkbox" name="keepcfg" value="1" checked="checked" />
40 <span class="bold"><%:a_s_flash_keepcfg%></span>
44 <input class="cbi-button cbi-button-apply" type="submit" value="<%:admin_upgrade_upload Upload image%>" />
47 <% elseif step == 2 then %>
49 <%:admin_upgrade_uploaded The flash image was uploaded.
50 Below is the checksum and file size listed,
51 compare them with the original file to ensure data integrity.<br />
52 Click "Proceed" below to start the flash procedure. %>
54 <% if filesize > flashsize then %>
56 <div class="error"><%:admin_upgrade_toolarge It appears that you try to
57 flash an image that does not fit in the flash memory, please verify
58 the image file! %></div>
63 <li><%:admin_upgrade_checksum Checksum%>: <code><%=checksum%></code></li>
64 <li><%:admin_upgrade_filesize Size%>: <%
65 local w = require "luci.tools.webadmin"
66 write(w.byte_format(filesize))
69 write(luci.i18n.translatef(
70 "admin_upgrade_spaceavil",
72 w.byte_format(flashsize)
78 <div class="cbi-page-actions right">
79 <form style="display:inline">
80 <input type="hidden" name="step" value="3" />
81 <input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
82 <input class="cbi-button cbi-button-apply" type="submit" value="<%:proceed Proceed%>" />
84 <form style="display:inline">
85 <input type="hidden" name="step" value="1" />
86 <input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
87 <input class="cbi-button cbi-button-reset" type="submit" value="<%:cancel Cancel%>" />
90 <% elseif step == 3 then %>
91 <p><%:admin_upgrade_running The system is flashing now.<br />
92 DO NOT POWER OFF THE DEVICE!<br />
93 Wait a few minutes until you try to reconnect.
94 It might be necessary to renew the address of your computer to reach the device
95 again, depending on your settings. %></p>
97 <iframe src="<%=REQUEST_URI%>?step=4&keepcfg=<%=keepconfig and "1" or "0"%>" style="border:1px solid black; width:100%; height:150px"></iframe>