1 # SPDX-License-Identifier: GPL-2.0-only
3 # Copyright (C) 2006-2021 OpenWrt.org
5 include $(TOPDIR
)/rules.mk
6 include $(INCLUDE_DIR
)/image.mk
8 # Cook a Linksys NSLU2 etc image
9 define Build
/linksys-ixp425-image
11 $(TOPDIR
)/scripts
/slugimage.pl
-L
$(STAGING_DIR_IMAGE
)/apex
/apex-
$(1)-armeb.bin
-k
$@
-r
$@.null-initrd
-p
-o
$@.new
15 define Build
/freecom-image
18 cp
$@
$@.tmptar
/zImage
19 cd
$@.tmptar
&& tar -c
-j
-f
$@.new
--numeric-owner
--owner
=0 --group
=0 *
25 # Build sysupgrade image
26 define BuildFirmware
/Generic
27 dd if
=$(KDIR
)/zImage of
=$(KDIR
)/zImage.pad bs
=64k conv
=sync
; \
28 dd if
=$(KDIR
)/root.
$(1) of
=$(KDIR
)/root.
$(1).pad bs
=128k conv
=sync
; \
29 sh
$(TOPDIR
)/scripts
/combined-image.sh \
31 $(KDIR
)/root.
$(1).pad \
32 $(BIN_DIR
)/$(IMG_PREFIX
)-$(patsubst jffs2-
%,jffs2
,$(patsubst squashfs-
%,squashfs
,$(1)))-sysupgrade.bin
36 $(call Image
/Build
/$(1),$(1))
37 $(call BuildFirmware
/Generic
,$(1))
42 DEVICE_DTS_DIR
= $$(DTS_DIR
)/intel
/ixp
43 KERNEL_DEPENDS
= $$(wildcard $(DTS_DIR
)/$$(DEVICE_DTS
).dts
)
45 KERNEL
:= kernel-bin | append-dtb
49 define Device
/dlink_dsm_g600_a
50 DEVICE_VENDOR
:= D-Link
51 DEVICE_MODEL
:= DSM G600 A
52 DEVICE_PACKAGES
:= ixp4xx-microcode-ethernet kmod-rtc-pcf8563 kmod-via-velocity kmod-ata-artop kmod-ath5k wpad-basic-mbedtls
53 DEVICE_DTS
:= intel-ixp42x-dlink-dsm-g600
54 KERNEL
:= kernel-bin | append-dtb
55 IMAGES
:= kernel.bin rootfs.bin
56 IMAGE
/kernel.bin
:= append-kernel
57 IMAGE
/rootfs.bin
:= append-rootfs | pad-rootfs | pad-to
128k
59 TARGET_DEVICES
+= dlink_dsm_g600_a
61 define Device
/freecom_fsg_3
62 DEVICE_VENDOR
:= Freecom
64 DEVICE_PACKAGES
:= ixp4xx-microcode-ethernet kmod-rtc-isl1208 kmod-ath5k wpad-basic-mbedtls
65 # Only 4 MB of Flash so not building by default
67 DEVICE_DTS
:= intel-ixp42x-freecom-fsg-3
68 KERNEL
:= kernel-bin | append-dtb
70 # This has to boot from harddisk so just append the kernel
71 IMAGE
/factory.bin
:= append-kernel | freecom-image
73 TARGET_DEVICES
+= freecom_fsg_3
75 define Device
/gateworks_avila
76 DEVICE_VENDOR
:= Gateworks
77 DEVICE_MODEL
:= Avila GW2348-4
78 DEVICE_PACKAGES
:= ixp4xx-microcode-ethernet kmod-rtc-ds1672 kmod-eeprom-at24 kmod-hwmon-ad7418
79 DEVICE_DTS
:= intel-ixp42x-gateworks-gw2348
80 KERNEL
:= kernel-bin | append-dtb
81 IMAGES
:= kernel.bin rootfs.bin
82 IMAGE
/kernel.bin
:= append-kernel
83 IMAGE
/rootfs.bin
:= append-rootfs | pad-rootfs | pad-to
128k
85 TARGET_DEVICES
+= gateworks_avila
87 define Device
/gateworks_cambria
88 DEVICE_VENDOR
:= Gateworks
89 DEVICE_MODEL
:= Cambria GW2358-4
90 DEVICE_PACKAGES
:= ixp4xx-microcode-ethernet kmod-rtc-ds1672 kmod-eeprom-at24 kmod-hwmon-ad7418
91 DEVICE_DTS
:= intel-ixp43x-gateworks-gw2358
92 KERNEL
:= kernel-bin | append-dtb
93 IMAGES
:= kernel.bin rootfs.bin
94 IMAGE
/kernel.bin
:= append-kernel
95 IMAGE
/rootfs.bin
:= append-rootfs | pad-rootfs | pad-to
128k
97 TARGET_DEVICES
+= gateworks_cambria
99 define Device
/iomega_nas100d
100 DEVICE_VENDOR
:= Iomega
101 DEVICE_MODEL
:= NAS100d
102 # USB2 is compiled in and needs no package
103 DEVICE_PACKAGES
:= ixp4xx-microcode-ethernet kmod-rtc-pcf8563
104 DEVICE_DTS
:= intel-ixp42x-iomega-nas100d
105 KERNEL
:= kernel-bin | append-dtb
106 IMAGES
:= factory.bin
107 # This has to boot from harddisk so just append the kernel
108 IMAGE
/factory.bin
:= append-kernel | linksys-ixp425-image
"nas100d"
110 TARGET_DEVICES
+= iomega_nas100d
112 define Device
/linksys_nslu2
113 DEVICE_VENDOR
:= Linksys
114 DEVICE_MODEL
:= NSLU2
115 # USB2 is compiled in and needs no package
116 DEVICE_PACKAGES
:= ixp4xx-microcode-ethernet kmod-rtc-x1205
117 # Only 32 MB of RAM so not building by default
119 DEVICE_DTS
:= intel-ixp42x-linksys-nslu2
120 KERNEL
:= kernel-bin | append-dtb
121 IMAGES
:= factory.bin
122 # This has to boot from harddisk so just append the kernel
123 IMAGE
/factory.bin
:= append-kernel | linksys-ixp425-image
"nslu2"
125 TARGET_DEVICES
+= linksys_nslu2
127 define Device
/usrobotics_usr8200
128 DEVICE_VENDOR
:= USRobotics
129 DEVICE_MODEL
:= USR8200
130 # USB2 is compiled in and needs no package
131 DEVICE_PACKAGES
:= ixp4xx-microcode-ethernet kmod-rtc-r7301 kmod-firewire kmod-firewire-ohci
132 DEVICE_DTS
:= intel-ixp42x-usrobotics-usr8200
133 KERNEL
:= kernel-bin | append-dtb
134 IMAGES
:= kernel.bin rootfs.bin
135 IMAGE
/kernel.bin
:= append-kernel
136 IMAGE
/rootfs.bin
:= append-rootfs | pad-rootfs | pad-to
128k
138 TARGET_DEVICES
+= usrobotics_usr8200
140 $(eval
$(call BuildImage
))