Browse Source

ixp4xx: Add back support for Freecom FSG-3

OpenWrt supported the Freecom FSG-3 in the past. It has
64 MB of RAM so will run fine, but the bare 4 MB of flash
makes it a non-default target. The generated compressed
image is currently below 4MB (just 3.3 MB) though, so it
should be possible to flash just fine with a rootfs on
a harddrive or USB stick, which is what the FSG-3 used
in the past as well.

The device has a WAN port on eth0 and three LAN ports on
eth1. The LAN ports are probably a DSA switch but the
old OpenWrt base never activated that, instead it relies
on boot defaults.

Due to questionable usablity without tweaking and further
work this image is not built by default, but made available
for developers who know what they are doing.

The TAR+CRC image generation is a rewritten version of the
earlier support code.

Signed-off-by: Linus Walleij <[email protected]>
Linus Walleij 1 year ago
parent
commit
869bbdb8f6

+ 1 - 0
target/linux/ixp4xx/base-files/etc/board.d/02_network

@@ -4,6 +4,7 @@
 board_config_update
 
 case "$(board_name)" in
+freecom,fsg-3|\
 gateworks,gw2348|\
 gateworks,gw2358)
 	ucidef_set_interfaces_lan_wan "eth0" "eth1"

+ 24 - 0
target/linux/ixp4xx/image/Makefile

@@ -12,6 +12,16 @@ define Build/linksys-ixp425-image
 	mv [email protected] $@
 endef
 
+define Build/freecom-image
+	mkdir -p [email protected]
+	# Add kernel
+	cp $@ [email protected]/zImage
+	cd [email protected] && tar -c -j -f [email protected] --numeric-owner --owner=0 --group=0 *
+	rm -rf [email protected]
+	encode_crc [email protected] $@
+	rm -f [email protected]
+endef
+
 # Build sysupgrade image
 define BuildFirmware/Generic
 	dd if=$(KDIR)/zImage of=$(KDIR)/zImage.pad bs=64k conv=sync; \
@@ -36,6 +46,20 @@ define Device/Default
 	BLOCKSIZE := 128k
 endef
 
+define Device/freecom_fsg_3
+	DEVICE_VENDOR := Freecom
+	DEVICE_MODEL := FSG-3
+	DEVICE_PACKAGES := ixp4xx-microcode-ethernet kmod-rtc-isl1208 kmod-ath5k wpad-basic-mbedtls
+	# Only 4 MB of Flash so not building by default
+	DEFAULT := n
+	DEVICE_DTS := intel-ixp42x-freecom-fsg-3
+	KERNEL := kernel-bin | append-dtb
+	IMAGES := factory.bin
+	# This has to boot from harddisk so just append the kernel
+	IMAGE/factory.bin := append-kernel | freecom-image
+endef
+TARGET_DEVICES += freecom_fsg_3
+
 define Device/gateworks_avila
 	DEVICE_VENDOR := Gateworks
 	DEVICE_MODEL := Avila GW2348-4