mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-12 16:03:13 +00:00
f52081bcf9
The majority of our targets provide a default value for the variable SUPPORTED_DEVICES, which is used in images to check against the compatible on a running device: SUPPORTED_DEVICES := $(subst _,$(comma),$(1)) At the moment, this is implemented in the Device/Default block of the individual targets or even subtargets. However, since we standardized device names and compatible in the recent past, almost all targets are following the same scheme now: device/image name: vendor_model compatible: vendor,model The equal redundant definitions are a symptom of this process. Consequently, this patch moves the definition to image.mk making it a global default. For the few targets not using the scheme above, SUPPORTED_DEVICES will be defined to a different value in Device/Default anyway, overwriting the default. In other words: This change is supposed to be cosmetic. This can be used as a global measure to get the current compatible with: $(firstword $(SUPPORTED_DEVICES)) (Though this is not precisely an achievement of this commit.) Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
54 lines
1.4 KiB
Makefile
54 lines
1.4 KiB
Makefile
#
|
|
# Copyright (C) 2017-2019 Tomasz Maciej Nowak <tmn505@gmail.com>
|
|
#
|
|
# 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
|
|
|
|
define Build/tegra-sdcard
|
|
rm -fR $@.boot
|
|
mkdir -p $@.boot
|
|
$(CP) $(KDIR)/$(KERNEL_NAME) $@.boot
|
|
$(if $(DEVICE_DTS),\
|
|
$(foreach dtb,$(DEVICE_DTS),$(CP) $(DTS_DIR)/$(dtb).dtb $@.boot), \
|
|
$(CP) $(DTS_DIR)/*.dtb $@.boot)
|
|
mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
|
|
-n '$(DEVICE_TITLE) OpenWrt bootscript' \
|
|
-d $(BOOT_SCRIPT) \
|
|
$@.boot/boot.scr
|
|
|
|
SIGNATURE="$(IMG_PART_SIGNATURE)" \
|
|
$(SCRIPT_DIR)/gen_image_generic.sh \
|
|
$@ \
|
|
$(CONFIG_TARGET_KERNEL_PARTSIZE) $@.boot \
|
|
$(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS) \
|
|
2048
|
|
|
|
$(if $(UBOOT),dd if=$(STAGING_DIR_IMAGE)/$(UBOOT).img of=$@ bs=512 skip=1 seek=1 conv=notrunc)
|
|
endef
|
|
|
|
DEVICE_VARS += BOOT_SCRIPT UBOOT
|
|
|
|
define Device/Default
|
|
BOOT_SCRIPT := generic-bootscript
|
|
IMAGES := sdcard.img.gz
|
|
IMAGE/sdcard.img.gz := tegra-sdcard | gzip | append-metadata
|
|
KERNEL_NAME := zImage
|
|
KERNEL := kernel-bin
|
|
PROFILES := Default
|
|
endef
|
|
|
|
define Device/compulab_trimslice
|
|
DEVICE_VENDOR := CompuLab
|
|
DEVICE_MODEL := TrimSlice
|
|
DEVICE_DTS := tegra20-trimslice
|
|
DEVICE_PACKAGES := kmod-r8169 kmod-rt2800-usb kmod-rtc-em3027 \
|
|
kmod-usb-storage wpad-basic-wolfssl
|
|
UBOOT := trimslice-mmc
|
|
endef
|
|
TARGET_DEVICES += compulab_trimslice
|
|
|
|
$(eval $(call BuildImage))
|