[OpenWrt-Devel] [PATCH] Build 8M image for 7Links PX-4885

Cezary Jackiewicz cezary.jackiewicz at gmail.com
Thu Oct 9 16:57:16 EDT 2014


7Links PX-4885 (clones) can also be purchased with 8MB flash. Creating images for these routers.

Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz at gmail.com>
---

diff --git a/target/linux/ramips/dts/PX4885-4M.dts b/target/linux/ramips/dts/PX4885-4M.dts
new file mode 100644
index 0000000..2bea444
--- /dev/null
+++ b/target/linux/ramips/dts/PX4885-4M.dts
@@ -0,0 +1,90 @@
+/dts-v1/;
+
+/include/ "rt5350.dtsi"
+
+/ {
+	compatible = "PX4885", "ralink,rt5350-soc";
+	model = "7Links PX-4885";
+
+	palmbus at 10000000 {
+		spi at b00 {
+			status = "okay";
+			m25p80 at 0 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				compatible = "mx25l3205d";
+				reg = <0 0>;
+				linux,modalias = "m25p80", "mx25l3205d";
+				spi-max-frequency = <10000000>;
+
+				partition at 0 {
+					label = "u-boot";
+					reg = <0x0 0x20000>;
+					read-only;
+				};
+
+				partition at 20000 {
+					label = "devdata";
+					reg = <0x20000 0x20000>;
+					read-only;
+				};
+
+				factory: partition at 40000 {
+					label = "devconf";
+					reg = <0x40000 0x10000>;
+					read-only;
+				};
+
+				partition at 50000 {
+					label = "firmware";
+					reg = <0x50000 0x3b0000>;
+				};
+			};
+		};
+	};
+
+	pinctrl {
+		state_default: pinctrl0 {
+			gpio {
+				ralink,group = "i2c", "jtag", "uartf";
+				ralink,function = "gpio";
+			};
+		};
+	};
+
+	ethernet at 10100000 {
+		mtd-mac-address = <&factory 0x28>;
+	};
+
+	esw at 10110000 {
+		ralink,portmap = <0x3f>;
+	};
+
+	wmac at 10180000 {
+		ralink,mtd-eeprom = <&factory 0>;
+	};
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		reset {
+			label = "reset";
+			gpios = <&gpio0 10 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+		orange {
+			label = "7links:orange:wifi";
+			gpios = <&gpio0 18 1>;
+		};
+		blue {
+			label = "7links:blue:storage";
+			gpios = <&gpio0 19 1>;
+		};
+	};
+};
diff --git a/target/linux/ramips/dts/PX4885-8M.dts b/target/linux/ramips/dts/PX4885-8M.dts
new file mode 100644
index 0000000..01d7a8a
--- /dev/null
+++ b/target/linux/ramips/dts/PX4885-8M.dts
@@ -0,0 +1,90 @@
+/dts-v1/;
+
+/include/ "rt5350.dtsi"
+
+/ {
+	compatible = "PX4885", "ralink,rt5350-soc";
+	model = "7Links PX-4885";
+
+	palmbus at 10000000 {
+		spi at b00 {
+			status = "okay";
+			m25p80 at 0 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				compatible = "mx25l3205d";
+				reg = <0 0>;
+				linux,modalias = "m25p80", "mx25l3205d";
+				spi-max-frequency = <10000000>;
+
+				partition at 0 {
+					label = "u-boot";
+					reg = <0x0 0x20000>;
+					read-only;
+				};
+
+				partition at 20000 {
+					label = "devdata";
+					reg = <0x20000 0x20000>;
+					read-only;
+				};
+
+				factory: partition at 40000 {
+					label = "devconf";
+					reg = <0x40000 0x10000>;
+					read-only;
+				};
+
+				partition at 50000 {
+					label = "firmware";
+					reg = <0x50000 0x7b0000>;
+				};
+			};
+		};
+	};
+
+	pinctrl {
+		state_default: pinctrl0 {
+			gpio {
+				ralink,group = "i2c", "jtag", "uartf";
+				ralink,function = "gpio";
+			};
+		};
+	};
+
+	ethernet at 10100000 {
+		mtd-mac-address = <&factory 0x28>;
+	};
+
+	esw at 10110000 {
+		ralink,portmap = <0x3f>;
+	};
+
+	wmac at 10180000 {
+		ralink,mtd-eeprom = <&factory 0>;
+	};
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		reset {
+			label = "reset";
+			gpios = <&gpio0 10 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+		orange {
+			label = "7links:orange:wifi";
+			gpios = <&gpio0 18 1>;
+		};
+		blue {
+			label = "7links:blue:storage";
+			gpios = <&gpio0 19 1>;
+		};
+	};
+};
diff --git a/target/linux/ramips/dts/PX4885.dts b/target/linux/ramips/dts/PX4885.dts
deleted file mode 100644
index 2bea444..0000000
--- a/target/linux/ramips/dts/PX4885.dts
+++ /dev/null
@@ -1,90 +0,0 @@
-/dts-v1/;
-
-/include/ "rt5350.dtsi"
-
-/ {
-	compatible = "PX4885", "ralink,rt5350-soc";
-	model = "7Links PX-4885";
-
-	palmbus at 10000000 {
-		spi at b00 {
-			status = "okay";
-			m25p80 at 0 {
-				#address-cells = <1>;
-				#size-cells = <1>;
-				compatible = "mx25l3205d";
-				reg = <0 0>;
-				linux,modalias = "m25p80", "mx25l3205d";
-				spi-max-frequency = <10000000>;
-
-				partition at 0 {
-					label = "u-boot";
-					reg = <0x0 0x20000>;
-					read-only;
-				};
-
-				partition at 20000 {
-					label = "devdata";
-					reg = <0x20000 0x20000>;
-					read-only;
-				};
-
-				factory: partition at 40000 {
-					label = "devconf";
-					reg = <0x40000 0x10000>;
-					read-only;
-				};
-
-				partition at 50000 {
-					label = "firmware";
-					reg = <0x50000 0x3b0000>;
-				};
-			};
-		};
-	};
-
-	pinctrl {
-		state_default: pinctrl0 {
-			gpio {
-				ralink,group = "i2c", "jtag", "uartf";
-				ralink,function = "gpio";
-			};
-		};
-	};
-
-	ethernet at 10100000 {
-		mtd-mac-address = <&factory 0x28>;
-	};
-
-	esw at 10110000 {
-		ralink,portmap = <0x3f>;
-	};
-
-	wmac at 10180000 {
-		ralink,mtd-eeprom = <&factory 0>;
-	};
-
-	gpio-keys-polled {
-		compatible = "gpio-keys-polled";
-		#address-cells = <1>;
-		#size-cells = <0>;
-		poll-interval = <20>;
-		reset {
-			label = "reset";
-			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
-		};
-	};
-
-	gpio-leds {
-		compatible = "gpio-leds";
-		orange {
-			label = "7links:orange:wifi";
-			gpios = <&gpio0 18 1>;
-		};
-		blue {
-			label = "7links:blue:storage";
-			gpios = <&gpio0 19 1>;
-		};
-	};
-};
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index c365d9d..9dcb577 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -466,7 +466,7 @@ Image/Build/Profile/PSR-680W=$(call BuildFirmware/Default4M/$(1),$(1),psr-680w,P
 
 Image/Build/Profile/PWH2004=$(call BuildFirmware/Default8M/$(1),$(1),pwh2004,PWH2004)
 
-Image/Build/Profile/PX4885=$(call BuildFirmware/Default4M/$(1),$(1),px4885,PX4885)
+Image/Build/Profile/PX4885=$(call BuildFirmware/DefaultDualSize/$(1),$(1),px4885,PX4885)
 
 Image/Build/Profile/RTG32B1=$(call BuildFirmware/Default4M/$(1),$(1),rt-g32-b1,RT-G32-B1)
 


-- 
Pozdrawiam,
 Cezary Jackiewicz
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list