mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 13:48:06 +00:00
c640370939
This renames lantiq DTS(I) files to follow soc_vendor_device scheme. This will make DTS files easier to maintain. As a side effect, DTS file name can be derived from device node names now, only having to specify a SOC variable in Makefiles. While at it, move files to arch/mips/boot/dts/lantiq subfolder. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
137 lines
3.2 KiB
Makefile
137 lines
3.2 KiB
Makefile
#
|
|
# Copyright (C) 2010-2016 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
# boards missing since devicetree update
|
|
#EASY50712 ARV3527P
|
|
|
|
KERNEL_LOADADDR = 0x80002000
|
|
KERNEL_ENTRY = 0x80002000
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
include $(INCLUDE_DIR)/image.mk
|
|
|
|
ifeq ($(SUBTARGET),xway)
|
|
UBIFS_OPTS := -m 512 -e 15872 -c 1959
|
|
else
|
|
UBIFS_OPTS := -m 2048 -e 126KiB -c 4096
|
|
endif
|
|
|
|
define Build/append-avm-fakeroot
|
|
cat ./eva.dummy.squashfs >> $@
|
|
endef
|
|
|
|
define Build/dgn3500-sercom-footer
|
|
$(STAGING_DIR_HOST)/bin/dgn3500sum $@ $(1) $(2)
|
|
endef
|
|
|
|
define Build/mkbrncmdline
|
|
mkbrncmdline -i $@ -o $@.new BRN-BOOT
|
|
mv $@.new $@
|
|
endef
|
|
|
|
define Build/mkbrnimg
|
|
mkbrnimg -s $(SIGNATURE) -m $(MAGIC) -p $(CRC32_POLY) -o $@ $(IMAGE_KERNEL) $(IMAGE_ROOTFS)
|
|
endef
|
|
|
|
define Build/fullimage
|
|
mkimage -A mips -O linux -C lzma -T filesystem -a 0x00 \
|
|
-e 0x00 -n '$(VERSION_DIST) RootFS' \
|
|
-d $(IMAGE_ROOTFS) $(IMAGE_ROOTFS).new
|
|
|
|
cat $(IMAGE_KERNEL) $(IMAGE_ROOTFS).new > $@.tmp
|
|
|
|
mkimage -A mips -O linux -T multi -a 0x00 -C none \
|
|
-e 0x00 -n 'OpenWrt fullimage' \
|
|
-d $@.tmp $@
|
|
|
|
rm $(IMAGE_ROOTFS).new
|
|
rm $@.tmp
|
|
endef
|
|
|
|
# Shared device definition: applies to every defined device
|
|
define Device/Default
|
|
PROFILES = Default
|
|
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
|
|
KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs
|
|
KERNEL := kernel-bin | append-dtb | lzma | uImage lzma
|
|
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma
|
|
FILESYSTEMS := squashfs
|
|
IMAGE_SIZE :=
|
|
DTS_DIR := $(DTS_DIR)/lantiq
|
|
DEVICE_DTS = $$(SOC)_$(1)
|
|
SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
|
|
IMAGES := sysupgrade.bin
|
|
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
|
|
endef
|
|
DEVICE_VARS += IMAGE_SIZE
|
|
|
|
define Device/NAND/xway
|
|
BLOCKSIZE := 16k
|
|
PAGESIZE := 512
|
|
SUBPAGESIZE := 256
|
|
FILESYSTEMS += ubifs
|
|
endef
|
|
|
|
define Device/NAND/xrx200
|
|
BLOCKSIZE := 128k
|
|
PAGESIZE := 2048
|
|
SUBPAGESIZE := 512
|
|
FILESYSTEMS += ubifs
|
|
endef
|
|
|
|
define Device/NAND
|
|
$(Device/NAND/$(SUBTARGET))
|
|
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
|
endef
|
|
|
|
define Device/lantiqBrnImage
|
|
KERNEL := kernel-bin | append-dtb | mkbrncmdline | lzma-no-dict
|
|
IMAGES := factory.bin
|
|
IMAGE/factory.bin := mkbrnimg | check-size $$$$(IMAGE_SIZE)
|
|
endef
|
|
DEVICE_VARS += SIGNATURE MAGIC CRC32_POLY
|
|
|
|
define Device/lantiqFullImage
|
|
KERNEL := kernel-bin | append-dtb | lzma | uImage lzma | pad-offset 4 0
|
|
IMAGES := sysupgrade.bin fullimage.bin
|
|
IMAGE/fullimage.bin := fullimage | check-size $$$$(IMAGE_SIZE)
|
|
endef
|
|
|
|
define Device/AVM
|
|
DEVICE_VENDOR := AVM
|
|
KERNEL := kernel-bin | append-dtb | lzma | eva-image
|
|
KERNEL_INITRAMFS := $$(KERNEL)
|
|
IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-avm-fakeroot | \
|
|
append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
|
|
endef
|
|
|
|
ifeq ($(SUBTARGET),ase)
|
|
include amazonse.mk
|
|
endif
|
|
|
|
ifeq ($(SUBTARGET),xway_legacy)
|
|
include xway_legacy.mk
|
|
endif
|
|
|
|
ifeq ($(SUBTARGET),xway)
|
|
include danube.mk
|
|
include ar9.mk
|
|
endif
|
|
|
|
|
|
ifeq ($(SUBTARGET),xrx200)
|
|
include tp-link.mk
|
|
include vr9.mk
|
|
endif
|
|
|
|
|
|
ifeq ($(SUBTARGET),falcon)
|
|
include falcon.mk
|
|
endif
|
|
|
|
$(eval $(call BuildImage))
|