treewide: make AddDepends/usb-serial selective
[openwrt/openwrt.git] / target / linux / ramips / image / Makefile
index 10e9edd3bbfd13036ee80c55b2c2873cd5fff3a4..5937970a37a94c26be12ae9568a2c277ce67b84f 100644 (file)
@@ -1,9 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-only
 #
 # Copyright (C) 2008-2011 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
+
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
@@ -35,26 +33,6 @@ define Build/edimax-header
        @mv $@.new $@
 endef
 
-define Build/elx-header
-       $(eval hw_id=$(word 1,$(1)))
-       $(eval xor_pattern=$(word 2,$(1)))
-       ( \
-               echo -ne "\x00\x00\x00\x00\x00\x00\x00\x03" | \
-                       dd bs=42 count=1 conv=sync; \
-               hw_id="$(hw_id)"; \
-               echo -ne "\x$${hw_id:0:2}\x$${hw_id:2:2}\x$${hw_id:4:2}\x$${hw_id:6:2}" | \
-                       dd bs=20 count=1 conv=sync; \
-               echo -ne "$$(printf '%08x' $$(stat -c%s $@) | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \
-                       dd bs=8 count=1 conv=sync; \
-               echo -ne "$$($(STAGING_DIR_HOST)/bin/mkhash md5 $@ | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \
-                       dd bs=58 count=1 conv=sync; \
-       ) > $(KDIR)/tmp/$(DEVICE_NAME).header
-       $(call Build/xor-image,-p $(xor_pattern) -x)
-       cat $(KDIR)/tmp/$(DEVICE_NAME).header $@ > $@.new
-       mv $@.new $@
-       rm -rf $(KDIR)/tmp/$(DEVICE_NAME).header
-endef
-
 define Build/jcg-header
        $(STAGING_DIR_HOST)/bin/jcgimage -v $(1) \
                $(if $(JCG_MAXSIZE), -m $$(($(subst k, * 1024,$(JCG_MAXSIZE)))),) \
@@ -122,12 +100,6 @@ define Build/poray-header
        mv $@.new $@
 endef
 
-define Build/ravpower-wd009-factory
-       mkimage -A mips -T standalone -C none -a 0x80010000 -e 0x80010000 -n "OpenWrt Bootloader" -d $(UBOOT_PATH) $@.new
-       cat $@ >> $@.new
-       @mv $@.new $@
-endef
-
 define Build/relocate-kernel
        rm -rf $@.relocate
        $(CP) ../../generic/image/relocate $@.relocate
@@ -154,6 +126,11 @@ define Build/sercom-seal
                $(1)
 endef
 
+define Build/sign-dlink-ru
+       sign_dlink_ru $@ $1 $2
+       mv $@.new $@
+endef
+
 define Build/trx
        $(STAGING_DIR_HOST)/bin/trx $(1) \
                -o $@ \
@@ -187,7 +164,7 @@ define Device/Default
   DEVICE_DTS_DIR := ../dts
   DEVICE_DTS = $$(SOC)_$(1)
   IMAGES := sysupgrade.bin
-  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
+  COMPILE :=
   sysupgrade_bin := append-kernel | append-rootfs | pad-rootfs
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size
 endef