@@ -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"
@@ -12,6 +12,16 @@ define Build/linksys-ixp425-image
mv $@.new $@
endef
+define Build/freecom-image
+ mkdir -p $@.tmptar
+ # Add kernel
+ cp $@ $@.tmptar/zImage
+ cd $@.tmptar && tar -c -j -f $@.new --numeric-owner --owner=0 --group=0 *
+ rm -rf $@.tmptar
+ encode_crc $@.new $@
+ rm -f $@.new
+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
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 <linus.walleij@linaro.org> --- .../linux/ixp4xx/base-files/etc/board.d/02_network | 1 + target/linux/ixp4xx/image/Makefile | 24 ++++++++++++++++++++++ 2 files changed, 25 insertions(+)