From: Linus Walleij Date: Mon, 20 May 2024 20:05:13 +0000 (+0200) Subject: ixp4xx: Add back support for Freecom FSG-3 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=869bbdb8f68cb22096c78f38eac2f15081574199;p=openwrt%2Fstaging%2Fnbd.git 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 --- diff --git a/target/linux/ixp4xx/base-files/etc/board.d/02_network b/target/linux/ixp4xx/base-files/etc/board.d/02_network index 96d7b31282..7f75a2e20d 100644 --- a/target/linux/ixp4xx/base-files/etc/board.d/02_network +++ b/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" diff --git a/target/linux/ixp4xx/image/Makefile b/target/linux/ixp4xx/image/Makefile index 14d74cfb70..15f40821eb 100644 --- a/target/linux/ixp4xx/image/Makefile +++ b/target/linux/ixp4xx/image/Makefile @@ -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