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 # Build sysupgrade image
16 define BuildFirmware
/Generic
17 dd if
=$(KDIR
)/zImage of
=$(KDIR
)/zImage.pad bs
=64k conv
=sync
; \
18 dd if
=$(KDIR
)/root.
$(1) of
=$(KDIR
)/root.
$(1).pad bs
=128k conv
=sync
; \
19 sh
$(TOPDIR
)/scripts
/combined-image.sh \
21 $(KDIR
)/root.
$(1).pad \
22 $(BIN_DIR
)/$(IMG_PREFIX
)-$(patsubst jffs2-
%,jffs2
,$(patsubst squashfs-
%,squashfs
,$(1)))-sysupgrade.bin
26 $(call Image
/Build
/$(1),$(1))
27 $(call BuildFirmware
/Generic
,$(1))
32 KERNEL_DEPENDS
= $$(wildcard $(DTS_DIR
)/$$(DEVICE_DTS
).dts
)
34 KERNEL
:= kernel-bin | append-dtb
38 define Device
/gateworks_avila
39 DEVICE_VENDOR
:= Gateworks
40 DEVICE_MODEL
:= Avila GW2348-4
41 DEVICE_PACKAGES
:= ixp4xx-microcode-ethernet kmod-rtc-ds1672 kmod-eeprom-at24 kmod-hwmon-ad7418
42 DEVICE_DTS
:= intel-ixp42x-gateworks-gw2348
43 KERNEL
:= kernel-bin | append-dtb
44 IMAGES
:= kernel.bin rootfs.bin
45 IMAGE
/kernel.bin
:= append-kernel
46 IMAGE
/rootfs.bin
:= append-rootfs | pad-rootfs | pad-to
128k
48 TARGET_DEVICES
+= gateworks_avila
50 define Device
/gateworks_cambria
51 DEVICE_VENDOR
:= Gateworks
52 DEVICE_MODEL
:= Cambria GW2358-4
53 DEVICE_PACKAGES
:= ixp4xx-microcode-ethernet kmod-rtc-ds1672 kmod-eeprom-at24 kmod-hwmon-ad7418
54 DEVICE_DTS
:= intel-ixp43x-gateworks-gw2358
55 KERNEL
:= kernel-bin | append-dtb
56 IMAGES
:= kernel.bin rootfs.bin
57 IMAGE
/kernel.bin
:= append-kernel
58 IMAGE
/rootfs.bin
:= append-rootfs | pad-rootfs | pad-to
128k
60 TARGET_DEVICES
+= gateworks_cambria
62 define Device
/linksys_nslu2
63 DEVICE_VENDOR
:= Linksys
65 # USB2 is compiled in and needs no package
66 DEVICE_PACKAGES
:= ixp4xx-microcode-ethernet kmod-rtc-x1205
67 # Only 32 MB of RAM so not building by default
69 DEVICE_DTS
:= intel-ixp42x-linksys-nslu2
70 KERNEL
:= kernel-bin | append-dtb
72 # This has to boot from harddisk so just append the kernel
73 IMAGE
/factory.bin
:= append-kernel | linksys-ixp425-image
"nslu2"
75 TARGET_DEVICES
+= linksys_nslu2
77 define Device
/usrobotics_usr8200
78 DEVICE_VENDOR
:= USRobotics
79 DEVICE_MODEL
:= USR8200
80 # USB2 is compiled in and needs no package
81 DEVICE_PACKAGES
:= ixp4xx-microcode-ethernet kmod-rtc-r7301 kmod-firewire kmod-firewire-ohci
82 DEVICE_DTS
:= intel-ixp42x-usrobotics-usr8200
83 KERNEL
:= kernel-bin | append-dtb
84 IMAGES
:= kernel.bin rootfs.bin
85 IMAGE
/kernel.bin
:= append-kernel
86 IMAGE
/rootfs.bin
:= append-rootfs | pad-rootfs | pad-to
128k
88 TARGET_DEVICES
+= usrobotics_usr8200
90 $(eval
$(call BuildImage
))