realtek: d-link: add support for dgs-1210-28p-f
[openwrt/openwrt.git] / target / linux / ixp4xx / image / Makefile
1 # SPDX-License-Identifier: GPL-2.0-only
2 #
3 # Copyright (C) 2006-2021 OpenWrt.org
4
5 include $(TOPDIR)/rules.mk
6 include $(INCLUDE_DIR)/image.mk
7
8 # Cook a Linksys NSLU2 etc image
9 define Build/linksys-ixp425-image
10 touch $@.null-initrd
11 $(TOPDIR)/scripts/slugimage.pl -L $(STAGING_DIR_IMAGE)/apex/apex-$(1)-armeb.bin -k $@ -r $@.null-initrd -p -o $@.new
12 mv $@.new $@
13 endef
14
15 define Build/freecom-image
16 mkdir -p $@.tmptar
17 # Add kernel
18 cp $@ $@.tmptar/zImage
19 cd $@.tmptar && tar -c -j -f $@.new --numeric-owner --owner=0 --group=0 *
20 rm -rf $@.tmptar
21 encode_crc $@.new $@
22 rm -f $@.new
23 endef
24
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 \
30 $(KDIR)/zImage.pad \
31 $(KDIR)/root.$(1).pad \
32 $(BIN_DIR)/$(IMG_PREFIX)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))-sysupgrade.bin
33 endef
34
35 define Image/Build
36 $(call Image/Build/$(1),$(1))
37 $(call BuildFirmware/Generic,$(1))
38 endef
39
40 define Device/Default
41 PROFILES := Default
42 DEVICE_DTS_DIR = $$(DTS_DIR)/intel/ixp
43 KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
44 KERNEL_NAME := zImage
45 KERNEL := kernel-bin | append-dtb
46 BLOCKSIZE := 128k
47 endef
48
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
58 endef
59 TARGET_DEVICES += dlink_dsm_g600_a
60
61 define Device/freecom_fsg_3
62 DEVICE_VENDOR := Freecom
63 DEVICE_MODEL := FSG-3
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
66 DEFAULT := n
67 DEVICE_DTS := intel-ixp42x-freecom-fsg-3
68 KERNEL := kernel-bin | append-dtb
69 IMAGES := factory.bin
70 # This has to boot from harddisk so just append the kernel
71 IMAGE/factory.bin := append-kernel | freecom-image
72 endef
73 TARGET_DEVICES += freecom_fsg_3
74
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
84 endef
85 TARGET_DEVICES += gateworks_avila
86
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
96 endef
97 TARGET_DEVICES += gateworks_cambria
98
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"
109 endef
110 TARGET_DEVICES += iomega_nas100d
111
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
118 DEFAULT := n
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"
124 endef
125 TARGET_DEVICES += linksys_nslu2
126
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
137 endef
138 TARGET_DEVICES += usrobotics_usr8200
139
140 $(eval $(call BuildImage))