Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c52725d611 | ||
|
4a6a3b696b | ||
|
70d586c3bd | ||
|
35922740e6 | ||
|
34d45986b5 | ||
|
59ab532be7 | ||
|
04fc018006 | ||
|
dfd5d7bdff | ||
|
6a6eb6282f | ||
|
4b213277f6 | ||
|
6daacdd484 | ||
|
40f3251f61 | ||
|
8f7deca01e | ||
|
48c7039d53 | ||
|
a155149601 | ||
|
44bdf37e3c |
2
Makefile
2
Makefile
@ -236,7 +236,7 @@ $(early_prepared_stamp):
|
||||
|
||||
$(GLUON_OPKG_KEY): $(early_prepared_stamp) FORCE
|
||||
[ -s $(GLUON_OPKG_KEY) -a -s $(GLUON_OPKG_KEY).pub ] || \
|
||||
mkdir -p $$(dirname $(GLUON_OPKG_KEY)) && $(STAGING_DIR_HOST)/bin/usign -G -s $(GLUON_OPKG_KEY) -p $(GLUON_OPKG_KEY).pub -c "Gluon opkg key"
|
||||
( mkdir -p $$(dirname $(GLUON_OPKG_KEY)) && $(STAGING_DIR_HOST)/bin/usign -G -s $(GLUON_OPKG_KEY) -p $(GLUON_OPKG_KEY).pub -c "Gluon opkg key" )
|
||||
|
||||
$(GLUON_OPKG_KEY).pub: $(GLUON_OPKG_KEY)
|
||||
|
||||
|
@ -16,7 +16,7 @@ our mailinglist to discuss it first.
|
||||
|
||||
Please refrain from using the `master` branch for anything else but development purposes!
|
||||
Use the most recent release instead. You can list all relaseses by running `git branch -a`
|
||||
and switch to one by running `git checkout v2016.1 && make update`.
|
||||
and switch to one by running `git checkout v2016.1.1 && make update`.
|
||||
|
||||
If you're using the autoupdater, do not autoupdate nodes with anything but releases.
|
||||
If you upgrade using random master commits the nodes *will break* eventually.
|
||||
|
@ -54,9 +54,9 @@ copyright = '2015, Project Gluon'
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '2016.1'
|
||||
version = '2016.1.1'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '2016.1'
|
||||
release = '2016.1.1'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
@ -60,6 +60,7 @@ Releases
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
releases/v2016.1.1
|
||||
releases/v2016.1
|
||||
releases/v2015.1.2
|
||||
releases/v2015.1.1
|
||||
@ -106,12 +107,17 @@ ar71xx-generic
|
||||
- WNDR3800
|
||||
- WNDRMAC (v2)
|
||||
|
||||
* Onion
|
||||
|
||||
- Omega
|
||||
|
||||
* TP-Link
|
||||
|
||||
- CPE210 (v1.0, v1.1)
|
||||
- CPE220 (v1.0, v1.1)
|
||||
- CPE510 (v1.0, v1.1)
|
||||
- CPE520 (v1.0, v1.1)
|
||||
- TL-MR13U (v1)
|
||||
- TL-MR3020 (v1)
|
||||
- TL-MR3040 (v1, v2)
|
||||
- TL-MR3220 (v1, v2)
|
||||
|
64
docs/releases/v2016.1.1.rst
Normal file
64
docs/releases/v2016.1.1.rst
Normal file
@ -0,0 +1,64 @@
|
||||
Gluon 2016.1.1
|
||||
==============
|
||||
|
||||
Added hardware support
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
ar71xx-generic
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
* Onion Omega
|
||||
* TP-Link TL-MR13U v1
|
||||
|
||||
|
||||
Bugfixes
|
||||
~~~~~~~~
|
||||
|
||||
Build
|
||||
^^^^^
|
||||
|
||||
Don't overwrite the opkg repository key on each build.
|
||||
|
||||
AirOS 5.6.x compatiblity
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Downgrading to AirOS 5.5.x before flashing Gluon on Airmax M XM/XW devices
|
||||
(NanoStation, Bullet, ...) is not necessary anymore.
|
||||
|
||||
Status page
|
||||
^^^^^^^^^^^
|
||||
|
||||
* Fix purging of disappered neighbours from the list
|
||||
* Don't clear the signal graphs when scrolling in mobile browsers
|
||||
* Improve browser compability (don't assume the Internationalization API is available,
|
||||
fixes the display of numbers in Firefox for Android)
|
||||
|
||||
Config mode
|
||||
^^^^^^^^^^^
|
||||
|
||||
* Strip trailing whitespace from number input fields (LuCI's validator doesn't catch this)
|
||||
* Don't allow negative bandwidth limits
|
||||
|
||||
Failsafe mode
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
* Fix entering the failsafe mode on the TL-WDR4900.
|
||||
|
||||
Known Issues
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Default TX power on many Ubiquiti devices is too high, correct offsets are unknown (`#94 <https://github.com/freifunk-gluon/gluon/issues/94>`_)
|
||||
|
||||
Reducing the TX power in the Expert Mode is recommended.
|
||||
|
||||
* The MAC address of the WAN interface is modified even when Mesh-on-WAN is disabled (`#496 <https://github.com/freifunk-gluon/gluon/issues/496>`_)
|
||||
|
||||
This may lead to issues in environments where a fixed MAC address is expected (like VMware when promicious mode is disallowed).
|
||||
|
||||
* Inconsistent respondd/announced API (`#522 <https://github.com/freifunk-gluon/gluon/issues/522>`_)
|
||||
|
||||
The current API is inconsistent and will be replaced eventually. The old API will still be supported for a while.
|
||||
|
||||
* Nondeterministic production of broken images for some (very old) hardware (`#669 <https://github.com/freifunk-gluon/gluon/issues/669>`_)
|
||||
|
||||
At the moment it seems like only the TL-WR841N v5 is affected.
|
@ -1,4 +1,4 @@
|
||||
-- This is an example site configuration for Gluon v2016.1
|
||||
-- This is an example site configuration for Gluon v2016.1.1
|
||||
--
|
||||
-- Take a look at the documentation located at
|
||||
-- http://gluon.readthedocs.org/ for details.
|
||||
|
@ -8,7 +8,7 @@ Gluon's releases are managed using `Git tags`_. If you are just getting
|
||||
started with Gluon we recommend to use the latest stable release of Gluon.
|
||||
|
||||
Take a look at the `list of gluon releases`_ and notice the latest release,
|
||||
e.g. *v2016.1*. Always get Gluon using git and don't try to download it
|
||||
e.g. *v2016.1.1*. Always get Gluon using git and don't try to download it
|
||||
as a Zip archive as the archive will be missing version information.
|
||||
|
||||
Please keep in mind that there is no "default Gluon" build; a site configuration
|
||||
@ -42,7 +42,7 @@ Building the images
|
||||
-------------------
|
||||
|
||||
To build Gluon, first check out the repository. Replace *RELEASE* with the
|
||||
version you'd like to checkout, e.g. *v2016.1*.
|
||||
version you'd like to checkout, e.g. *v2016.1.1*.
|
||||
|
||||
::
|
||||
|
||||
|
3
modules
3
modules
@ -8,7 +8,8 @@ PACKAGES_OPENWRT_COMMIT=f8a70fc188673d0ae8739b0a3095f7f61335fc10
|
||||
PACKAGES_OPENWRT_BRANCH=for-15.05
|
||||
|
||||
PACKAGES_GLUON_REPO=git://github.com/freifunk-gluon/packages.git
|
||||
PACKAGES_GLUON_COMMIT=fd06c7d67da69713f0361dadab16393c26cb609b
|
||||
PACKAGES_GLUON_COMMIT=3a3048849f6d6c6c285fd552d4abc1e748d854dc
|
||||
PACKAGES_GLUON_BRANCH=v2016.1.x
|
||||
|
||||
PACKAGES_ROUTING_REPO=git://github.com/openwrt-routing/packages.git
|
||||
PACKAGES_ROUTING_COMMIT=ae65d4fe027592652376f8dbd3ff2ef37f5a84bc
|
||||
|
@ -45,10 +45,10 @@ function M.handle(data)
|
||||
|
||||
uci:set("gluon-node-info", sname, "share_location", data._location)
|
||||
if data._location and data._latitude ~= nil and data._longitude ~= nil then
|
||||
uci:set("gluon-node-info", sname, "latitude", data._latitude)
|
||||
uci:set("gluon-node-info", sname, "longitude", data._longitude)
|
||||
uci:set("gluon-node-info", sname, "latitude", data._latitude:trim())
|
||||
uci:set("gluon-node-info", sname, "longitude", data._longitude:trim())
|
||||
if data._altitude ~= nil then
|
||||
uci:set("gluon-node-info", sname, "altitude", data._altitude)
|
||||
uci:set("gluon-node-info", sname, "altitude", data._altitude:trim())
|
||||
else
|
||||
uci:delete("gluon-node-info", sname, "altitude")
|
||||
end
|
||||
|
@ -28,13 +28,13 @@ function M.section(form)
|
||||
o:depends("_limit_enabled", "1")
|
||||
o.value = uci:get("simple-tc", "mesh_vpn", "limit_ingress")
|
||||
o.rmempty = false
|
||||
o.datatype = "integer"
|
||||
o.datatype = "uinteger"
|
||||
|
||||
o = s:option(cbi.Value, "_limit_egress", i18n.translate("Upstream (kbit/s)"))
|
||||
o:depends("_limit_enabled", "1")
|
||||
o.value = uci:get("simple-tc", "mesh_vpn", "limit_egress")
|
||||
o.rmempty = false
|
||||
o.datatype = "integer"
|
||||
o.datatype = "uinteger"
|
||||
end
|
||||
|
||||
function M.handle(data)
|
||||
@ -49,11 +49,11 @@ function M.handle(data)
|
||||
uci:set("simple-tc", "mesh_vpn", "ifname", "mesh-vpn")
|
||||
|
||||
if data._limit_ingress ~= nil then
|
||||
uci:set("simple-tc", "mesh_vpn", "limit_ingress", data._limit_ingress)
|
||||
uci:set("simple-tc", "mesh_vpn", "limit_ingress", data._limit_ingress:trim())
|
||||
end
|
||||
|
||||
if data._limit_egress ~= nil then
|
||||
uci:set("simple-tc", "mesh_vpn", "limit_egress", data._limit_egress)
|
||||
uci:set("simple-tc", "mesh_vpn", "limit_egress", data._limit_egress:trim())
|
||||
end
|
||||
|
||||
uci:commit("simple-tc")
|
||||
|
@ -99,9 +99,9 @@ function f.handle(self, state, data)
|
||||
if state == FORM_VALID then
|
||||
uci:set("network", "wan", "proto", data.ipv4)
|
||||
if data.ipv4 == "static" then
|
||||
uci:set("network", "wan", "ipaddr", data.ipv4_addr)
|
||||
uci:set("network", "wan", "netmask", data.ipv4_netmask)
|
||||
uci:set("network", "wan", "gateway", data.ipv4_gateway)
|
||||
uci:set("network", "wan", "ipaddr", data.ipv4_addr:trim())
|
||||
uci:set("network", "wan", "netmask", data.ipv4_netmask:trim())
|
||||
uci:set("network", "wan", "gateway", data.ipv4_gateway:trim())
|
||||
else
|
||||
uci:delete("network", "wan", "ipaddr")
|
||||
uci:delete("network", "wan", "netmask")
|
||||
@ -110,8 +110,8 @@ function f.handle(self, state, data)
|
||||
|
||||
uci:set("network", "wan6", "proto", data.ipv6)
|
||||
if data.ipv6 == "static" then
|
||||
uci:set("network", "wan6", "ip6addr", data.ipv6_addr)
|
||||
uci:set("network", "wan6", "ip6gw", data.ipv6_gateway)
|
||||
uci:set("network", "wan6", "ip6addr", data.ipv6_addr:trim())
|
||||
uci:set("network", "wan6", "ip6gw", data.ipv6_gateway:trim())
|
||||
else
|
||||
uci:delete("network", "wan6", "ip6addr")
|
||||
uci:delete("network", "wan6", "ip6gw")
|
||||
|
@ -198,11 +198,11 @@ function (Helper, SignalGraph, Signal) {
|
||||
notUpdated.delete(id)
|
||||
}
|
||||
|
||||
for (id in notUpdated) {
|
||||
notUpdated.forEach(function (id) {
|
||||
managedNeighbours[id].views.forEach( function (d) { d.destroy() })
|
||||
colors.push(managedNeighbours[id].color)
|
||||
delete managedNeighbours[id]
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
@ -110,7 +110,7 @@ define(function () {
|
||||
function resize() {
|
||||
var newWidth = canvas.parentNode.clientWidth
|
||||
|
||||
if (newWidth === 0)
|
||||
if (newWidth === 0 || newWidth === canvas.width)
|
||||
return
|
||||
|
||||
var lastImage = ctx.getImageData(0, 0, newWidth, canvas.height)
|
||||
|
@ -171,28 +171,32 @@ define(["lib/helper"], function (Helper) {
|
||||
}
|
||||
|
||||
function prettyPackets(d) {
|
||||
var v = new Intl.NumberFormat("de-DE", {maximumFractionDigits: 0}).format(d)
|
||||
var v = Helper.formatNumberFixed(d, 0)
|
||||
return v + " Pakete/s"
|
||||
}
|
||||
|
||||
function prettyPrefix(prefixes, step, d) {
|
||||
var prefix = 0
|
||||
|
||||
while (d > step && prefix < 4) {
|
||||
while (d > step && prefix < prefixes.length - 1) {
|
||||
d /= step
|
||||
prefix++
|
||||
}
|
||||
|
||||
d = new Intl.NumberFormat("de-DE", {maximumSignificantDigits: 3}).format(d)
|
||||
d = Helper.formatNumber(d, 3)
|
||||
return d + " " + prefixes[prefix]
|
||||
}
|
||||
|
||||
function prettySize(d) {
|
||||
return prettyPrefix([ "", "k", "M", "G", "T" ], 1024, d)
|
||||
}
|
||||
|
||||
function prettyBits(d) {
|
||||
return prettyPrefix([ "bps", "kbps", "Mbps", "Gbps" ], 1024, d * 8)
|
||||
return prettySize(d * 8) + "bps"
|
||||
}
|
||||
|
||||
function prettyBytes(d) {
|
||||
return prettyPrefix([ "B", "kB", "MB", "GB", "TB" ], 1024, d)
|
||||
return prettySize(d) + "B"
|
||||
}
|
||||
|
||||
function prettyUptime(seconds) {
|
||||
@ -220,11 +224,11 @@ define(["lib/helper"], function (Helper) {
|
||||
}
|
||||
|
||||
function prettyNVRAM(usage) {
|
||||
return new Intl.NumberFormat("de-DE", {maximumSignificantDigits: 3}).format(usage * 100) + "% belegt"
|
||||
return Helper.formatNumber(usage * 100, 3) + "% belegt"
|
||||
}
|
||||
|
||||
function prettyLoad(load) {
|
||||
return new Intl.NumberFormat("de-DE", {maximumSignificantDigits: 3}).format(load)
|
||||
return Helper.formatNumberFixed(load, 2)
|
||||
}
|
||||
|
||||
function prettyRAM(memory) {
|
||||
|
@ -51,6 +51,25 @@ define([ "bacon" ], function (Bacon) {
|
||||
return dictGet(dict[k], key)
|
||||
}
|
||||
|
||||
function localizeNumber(d) {
|
||||
var sep = ','
|
||||
return d.replace('.', sep)
|
||||
}
|
||||
|
||||
function formatNumberFixed(d, digits) {
|
||||
return localizeNumber(d.toFixed(digits))
|
||||
}
|
||||
|
||||
function formatNumber(d, digits) {
|
||||
digits--
|
||||
|
||||
for (var v = d; v >= 10 && digits > 0; v /= 10)
|
||||
digits--
|
||||
|
||||
// avoid toPrecision as it might produce strings in exponential notation
|
||||
return formatNumberFixed(d, digits)
|
||||
}
|
||||
|
||||
function haversine() {
|
||||
var radians = Array.prototype.map.call(arguments, function(deg) { return deg / 180.0 * Math.PI })
|
||||
var lat1 = radians[0], lon1 = radians[1], lat2 = radians[2], lon2 = radians[3]
|
||||
@ -66,6 +85,8 @@ define([ "bacon" ], function (Bacon) {
|
||||
, request: request
|
||||
, getJSON: getJSON
|
||||
, dictGet: dictGet
|
||||
, formatNumber: formatNumber
|
||||
, formatNumberFixed: formatNumberFixed
|
||||
, haversine: haversine
|
||||
}
|
||||
})
|
||||
|
@ -0,0 +1,19 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sun, 28 Feb 2016 02:29:56 +0100
|
||||
Subject: brcm2708-gpu-fw: move pkg build dir to kernel build dir to fix rebuild bugs after cleaning the kernel tree
|
||||
|
||||
Backport of r48732
|
||||
|
||||
diff --git a/package/kernel/brcm2708-gpu-fw/Makefile b/package/kernel/brcm2708-gpu-fw/Makefile
|
||||
index eee85e0..286984b 100644
|
||||
--- a/package/kernel/brcm2708-gpu-fw/Makefile
|
||||
+++ b/package/kernel/brcm2708-gpu-fw/Makefile
|
||||
@@ -16,7 +16,7 @@ PKG_SOURCE:=$(PKG_REV).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/Hexxeh/rpi-firmware/archive/
|
||||
PKG_MD5SUM:=f5683c1dcb255714942f7c9fd61b3a0a
|
||||
|
||||
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV)
|
||||
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
@ -0,0 +1,21 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sun, 28 Feb 2016 03:42:29 +0100
|
||||
Subject: kernel/gpio_keys: load module on pre-init
|
||||
|
||||
fix rescue mode on wdr4900
|
||||
|
||||
Backport of r48793
|
||||
|
||||
diff --git a/package/kernel/linux/modules/input.mk b/package/kernel/linux/modules/input.mk
|
||||
index 86ff33c..eed9aa2 100644
|
||||
--- a/package/kernel/linux/modules/input.mk
|
||||
+++ b/package/kernel/linux/modules/input.mk
|
||||
@@ -75,7 +75,7 @@ define KernelPackage/input-gpio-keys
|
||||
CONFIG_KEYBOARD_GPIO \
|
||||
CONFIG_INPUT_KEYBOARD=y
|
||||
FILES:=$(LINUX_DIR)/drivers/input/keyboard/gpio_keys.ko
|
||||
- AUTOLOAD:=$(call AutoProbe,gpio_keys)
|
||||
+ AUTOLOAD:=$(call AutoProbe,gpio_keys,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/input-gpio-keys/description
|
@ -0,0 +1,36 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sun, 28 Feb 2016 04:49:51 +0100
|
||||
Subject: ar71xx/lzma-loader: fix O32 ABI conformance
|
||||
|
||||
According to the calling convention of the o32 ABI the caller
|
||||
function must reserve stack space for $a0-$a3 registers in case
|
||||
the callee needs to save its arguments.
|
||||
|
||||
The assembly code of the loader does not reserve stack space for
|
||||
these registers thus when the 'loader_main' function needs to save
|
||||
its arguments, those will be stored in the 'workspace' area instead
|
||||
of the stack.
|
||||
|
||||
Because the workspace area is also used by other part of the code, the
|
||||
saved register values gets overwritten and this often leads to failed
|
||||
kernel boots.
|
||||
|
||||
Fix the code to reserve stack space for the registers to avoid this
|
||||
error.
|
||||
|
||||
Backport of r48279
|
||||
|
||||
diff --git a/target/linux/ar71xx/image/lzma-loader/src/head.S b/target/linux/ar71xx/image/lzma-loader/src/head.S
|
||||
index 543996a..47a7c9b 100644
|
||||
--- a/target/linux/ar71xx/image/lzma-loader/src/head.S
|
||||
+++ b/target/linux/ar71xx/image/lzma-loader/src/head.S
|
||||
@@ -109,6 +109,9 @@ __bss_check:
|
||||
/* Setup new "C" stack */
|
||||
la sp, _stack
|
||||
|
||||
+ /* reserve stack space for a0-a3 registers */
|
||||
+ subu sp, 16
|
||||
+
|
||||
/* jump to the decompressor routine */
|
||||
la t0, loader_main
|
||||
jr t0
|
@ -0,0 +1,64 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 25 Feb 2016 21:39:03 +0100
|
||||
Subject: firmware-utils: mkfwimage: add -Wall, fix obvious bugs causing compile warnings
|
||||
|
||||
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
|
||||
diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
|
||||
index bd69cb4..6d88845 100644
|
||||
--- a/tools/firmware-utils/Makefile
|
||||
+++ b/tools/firmware-utils/Makefile
|
||||
@@ -32,7 +32,7 @@ define Host/Compile
|
||||
$(call cc,mkzynfw)
|
||||
$(call cc,lzma2eva,-lz)
|
||||
$(call cc,mkcasfw)
|
||||
- $(call cc,mkfwimage,-lz)
|
||||
+ $(call cc,mkfwimage,-lz -Wall)
|
||||
$(call cc,mkfwimage2,-lz)
|
||||
$(call cc,imagetag imagetag_cmdline cyg_crc32)
|
||||
$(call cc,add_header)
|
||||
diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c
|
||||
index e3a03c1..00bf439 100644
|
||||
--- a/tools/firmware-utils/src/mkfwimage.c
|
||||
+++ b/tools/firmware-utils/src/mkfwimage.c
|
||||
@@ -104,8 +104,6 @@ typedef struct part_data {
|
||||
|
||||
#define OPTIONS "B:hv:m:o:r:k:"
|
||||
|
||||
-static int debug = 0;
|
||||
-
|
||||
typedef struct image_info {
|
||||
char magic[16];
|
||||
char version[256];
|
||||
@@ -236,9 +234,9 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c
|
||||
fw_layout_t* p;
|
||||
|
||||
p = &fw_layout_data[0];
|
||||
- while ((strlen(p->name) != 0) && (strncmp(p->name, board_name, sizeof(board_name)) != 0))
|
||||
+ while (*p->name && (strcmp(p->name, board_name) != 0))
|
||||
p++;
|
||||
- if (p->name == NULL) {
|
||||
+ if (!*p->name) {
|
||||
printf("BUG! Unable to find default fw layout!\n");
|
||||
exit(-1);
|
||||
}
|
||||
@@ -247,7 +245,7 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c
|
||||
strcpy(kernel->partition_name, "kernel");
|
||||
kernel->partition_index = 1;
|
||||
kernel->partition_baseaddr = p->kern_start;
|
||||
- if ( (kernel->partition_length = filelength(kernelfile)) < 0) return (-1);
|
||||
+ if ( (kernel->partition_length = filelength(kernelfile)) == (u_int32_t)-1) return (-1);
|
||||
kernel->partition_memaddr = p->kern_entry;
|
||||
kernel->partition_entryaddr = p->kern_entry;
|
||||
strncpy(kernel->filename, kernelfile, sizeof(kernel->filename));
|
||||
@@ -263,8 +261,8 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c
|
||||
rootfs->partition_entryaddr = 0x00000000;
|
||||
strncpy(rootfs->filename, rootfsfile, sizeof(rootfs->filename));
|
||||
|
||||
-printf("kernel: %d 0x%08x\n", kernel->partition_length, kernel->partition_baseaddr);
|
||||
-printf("root: %d 0x%08x\n", rootfs->partition_length, rootfs->partition_baseaddr);
|
||||
+ printf("kernel: %d 0x%08x\n", kernel->partition_length, kernel->partition_baseaddr);
|
||||
+ printf("root: %d 0x%08x\n", rootfs->partition_length, rootfs->partition_baseaddr);
|
||||
im->part_count = 2;
|
||||
|
||||
return 0;
|
@ -0,0 +1,39 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 25 Feb 2016 21:40:19 +0100
|
||||
Subject: ar71xx, firmware-utils: split ubdev01 flash layout from XM
|
||||
|
||||
The ubdev01 profile defines its own MTDPARTS with smaller firmware
|
||||
partition, so give it its own UBNT_BOARD in mkfwimage.
|
||||
|
||||
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
|
||||
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
|
||||
index 4b29d9c..0806f15 100644
|
||||
--- a/target/linux/ar71xx/image/Makefile
|
||||
+++ b/target/linux/ar71xx/image/Makefile
|
||||
@@ -2031,7 +2031,7 @@ $(eval $(call SingleProfile,TPLINK-SAFELOADER,64kraw,CPE510,cpe210-220-510-520,C
|
||||
$(eval $(call SingleProfile,UAPPRO,64k,UAPPRO,ubnt-uap-pro,UAP-PRO,ttyS0,115200,BZ,BZ,ar934x))
|
||||
$(eval $(call SingleProfile,UAPPRO,64k,UBNTUNIFIOUTDOORPLUS,ubnt-unifi-outdoor-plus,UBNT-UOP,ttyS0,115200,BZ,BZ,ar7240))
|
||||
|
||||
-$(eval $(call SingleProfile,UBDEV,64kraw,UBDEV01,ubdev01,UBNT-UF,ttyS0,115200,XM,XM,ar7240))
|
||||
+$(eval $(call SingleProfile,UBDEV,64kraw,UBDEV01,ubdev01,UBNT-UF,ttyS0,115200,UBDEV01,XM,ar7240))
|
||||
|
||||
$(eval $(call SingleProfile,UBNT,64k,UBNTRS,ubnt-rs,UBNT-RS,ttyS0,115200,RS,RSx,ar7100))
|
||||
$(eval $(call SingleProfile,UBNT,64k,UBNTRSPRO,ubnt-rspro,UBNT-RSPRO,ttyS0,115200,RSPRO,RSPRO,ar7100pro))
|
||||
diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c
|
||||
index 00bf439..5dae284 100644
|
||||
--- a/tools/firmware-utils/src/mkfwimage.c
|
||||
+++ b/tools/firmware-utils/src/mkfwimage.c
|
||||
@@ -81,6 +81,12 @@ fw_layout_t fw_layout_data[] = {
|
||||
.kern_entry = 0x80002000,
|
||||
.firmware_max_length= 0x006A0000,
|
||||
},
|
||||
+ {
|
||||
+ .name = "UBDEV01",
|
||||
+ .kern_start = 0x9f050000,
|
||||
+ .kern_entry = 0x80002000,
|
||||
+ .firmware_max_length= 0x006A0000,
|
||||
+ },
|
||||
{ .name = "",
|
||||
},
|
||||
};
|
@ -0,0 +1,45 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 25 Feb 2016 21:42:14 +0100
|
||||
Subject: firmware-utils: mkfwimage: fix firmware_max_length for XM layout
|
||||
|
||||
The new u-boot version bundled with the 5.6.x firmwares from Ubiquiti gets
|
||||
confused by the smaller rootfs partition size; this can lead to various
|
||||
issues:
|
||||
|
||||
1. We've gotten reports that flashing from the 5.6.x stock firmware to
|
||||
OpenWrt will brick devices; I wasn't able to reproduce this myself
|
||||
2. Flashing from 5.5.x stock firmware to OpenWrt and back to stock (via
|
||||
TFTP recovery), following by an update to 5.6.x via web interface can
|
||||
yield a bricked device with the following properties:
|
||||
- It can't be booted without entering commands over a serial console, as
|
||||
u-boot supplies the wrong MTD layout
|
||||
- The web interface won't accept any image with the original flash
|
||||
layout, so stock firmware upgrades are impossible
|
||||
- As the TFTP recovery doesn't update u-boot, returning to the old
|
||||
u-boot from firmware 5.5.x is impossible
|
||||
|
||||
To recover from 2., creating an OpenWrt image which doesn't set u-boot as
|
||||
read-only and flashing a backup of the old u-boot from there is the only
|
||||
way known to me. (Fixing the mtdparts variable in u-boot-env from OpenWrt
|
||||
might also work; settings this from u-boot over serial didn't have
|
||||
any permanent effect.)
|
||||
|
||||
Fix all of this by setting the correct flash layout also used by the stock
|
||||
firmware. Flashing has been tested from both firmware 5.5.x and 5.6.x. The
|
||||
fixed layout also matches the mtdparts defined by OpenWrt.
|
||||
|
||||
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
|
||||
diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c
|
||||
index 5dae284..d8d5239 100644
|
||||
--- a/tools/firmware-utils/src/mkfwimage.c
|
||||
+++ b/tools/firmware-utils/src/mkfwimage.c
|
||||
@@ -79,7 +79,7 @@ fw_layout_t fw_layout_data[] = {
|
||||
.name = "XM",
|
||||
.kern_start = 0x9f050000,
|
||||
.kern_entry = 0x80002000,
|
||||
- .firmware_max_length= 0x006A0000,
|
||||
+ .firmware_max_length= 0x00760000,
|
||||
},
|
||||
{
|
||||
.name = "UBDEV01",
|
@ -0,0 +1,22 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Fri, 26 Feb 2016 04:24:06 +0100
|
||||
Subject: kernel: disable software protection bits for macronix flash chips at init
|
||||
|
||||
Backport of r47626
|
||||
|
||||
diff --git a/target/linux/generic/patches-3.18/465-m25p80-mx-disable-software-protection.patch b/target/linux/generic/patches-3.18/465-m25p80-mx-disable-software-protection.patch
|
||||
new file mode 100644
|
||||
index 0000000..d7d7eec
|
||||
--- /dev/null
|
||||
+++ b/target/linux/generic/patches-3.18/465-m25p80-mx-disable-software-protection.patch
|
||||
@@ -0,0 +1,10 @@
|
||||
+--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
++++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
+@@ -962,6 +962,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
+
|
||||
+ if (JEDEC_MFR(info->jedec_id) == CFI_MFR_ATMEL ||
|
||||
+ JEDEC_MFR(info->jedec_id) == CFI_MFR_INTEL ||
|
||||
++ JEDEC_MFR(info->jedec_id) == CFI_MFR_MACRONIX ||
|
||||
+ JEDEC_MFR(info->jedec_id) == CFI_MFR_SST) {
|
||||
+ write_enable(nor);
|
||||
+ write_sr(nor, 0);
|
@ -117,6 +117,10 @@ $(eval $(call GluonModel,TLWA901,tl-wa901nd-v1,tp-link-tl-wa901n-nd-v1))
|
||||
$(eval $(call GluonModel,TLWA901,tl-wa901nd-v2,tp-link-tl-wa901n-nd-v2))
|
||||
$(eval $(call GluonModel,TLWA901,tl-wa901nd-v3,tp-link-tl-wa901n-nd-v3))
|
||||
|
||||
# TL-MR13U v1
|
||||
$(eval $(call GluonProfile,TLMR13U))
|
||||
$(eval $(call GluonModel,TLMR13U,tl-mr13u-v1,tp-link-tl-mr13u-v1))
|
||||
|
||||
# TL-MR3020 v1
|
||||
$(eval $(call GluonProfile,TLMR3020))
|
||||
$(eval $(call GluonModel,TLMR3020,tl-mr3020-v1,tp-link-tl-mr3020-v1))
|
||||
@ -257,3 +261,9 @@ $(eval $(call GluonModel,MYNETN600,mynet-n600,wd-my-net-n600))
|
||||
# WD MyNet N750
|
||||
$(eval $(call GluonProfile,MYNETN750))
|
||||
$(eval $(call GluonModel,MYNETN750,mynet-n750,wd-my-net-n750))
|
||||
|
||||
## Onion
|
||||
|
||||
# Omega
|
||||
$(eval $(call GluonProfile,OMEGA))
|
||||
$(eval $(call GluonModel,OMEGA,onion-omega,onion-omega))
|
||||
|
Loading…
Reference in New Issue
Block a user