%#
SPDX-FileCopyrightText: 2008 Steven Barth
SPDX-FileCopyrightText: 2008-2009 Jo-Philipp Wich
SPDX-License-Identifier: Apache-2.0
-%>
<%:Upgrade firmware%>
<%:The firmware image has been transmitted. Please ensure the SHA-256 checksum and image size are correct and click "continue".%>
<% if flashsize > 0 and filesize > flashsize then %>
<%:The firmware is too big for your device's storage.%>
<% end %>
- sha256sum:
<%=checksum%>
- <%:Size%>: <%
function byte_format(byte)
local suff = {"B", "KB", "MB", "GB", "TB"}
for i=1, 5 do
if byte > 1024 and i < 5 then
byte = byte / 1024
else
return string.format("%.2f %s", byte, suff[i])
end
end
end
write(byte_format(filesize))
if flashsize > 0 then
write(translatef(
" (%s available)",
byte_format(flashsize)
))
end
%>