target: use SPDX license identifiers on Makefiles
[openwrt/openwrt.git] / target / linux / omap / image / Makefile
1 # SPDX-License-Identifier: GPL-2.0-only
2 #
3 # Copyright (C) 2012-2014 OpenWrt.org
4
5 include $(TOPDIR)/rules.mk
6 include $(INCLUDE_DIR)/image.mk
7
8 FAT32_BLOCK_SIZE=1024
9 FAT32_BLOCKS=$(shell echo $$(($(CONFIG_OMAP_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE))))
10
11 UBIFS_OPTS = -F -m 2048 -e 124KiB -c 4096 -U
12 UBI_OPTS = -m 2048 -p 128KiB -s 512 -O 2048
13
14 define Build/omap-sdcard
15 rm -f $@.boot
16 mkfs.fat $@.boot -C $(FAT32_BLOCKS)
17
18 mcopy -i $@.boot $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)/MLO ::MLO
19 mcopy -i $@.boot $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)/u-boot.img ::u-boot.img
20 mcopy -i $@.boot $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)/boot.scr ::boot.scr
21 mmd -i $@.boot ::/dtbs
22 mcopy -i $@.boot $(DTS_DIR)/$(DEVICE_DTS).dtb ::/dtbs/$(DEVICE_DTS).dtb
23 mcopy -i $@.boot $(IMAGE_KERNEL) ::/zImage
24 ./gen_omap_sdcard_img.sh $@ \
25 $@.boot \
26 $(IMAGE_ROOTFS) \
27 $(CONFIG_OMAP_SD_BOOT_PARTSIZE) \
28 $(CONFIG_TARGET_ROOTFS_PARTSIZE)
29 rm -f $@.boot
30 endef
31
32 define Device/Default
33 PROFILES := Default
34 KERNEL_NAME := zImage
35 KERNEL := kernel-bin
36 DEVICE_DTS = $(lastword $(subst _, ,$(1)))
37 IMAGES := sdcard.img.gz
38 IMAGE/sdcard.img.gz := omap-sdcard | append-metadata | gzip
39 endef
40
41 #uboot-omap-am335x_evm uboot-omap-omap3_beagle uboot-omap-omap3_overo uboot-omap-omap4_panda
42
43 define Device/ti_am335x-evm
44 DEVICE_VENDOR := Texas Instruments
45 DEVICE_MODEL := AM335x EVM
46 endef
47
48 TARGET_DEVICES += ti_am335x-evm
49
50 define Device/ti_am335x-bone-black
51 DEVICE_VENDOR := Texas Instruments
52 DEVICE_MODEL := AM335x BeagleBone Black
53 DEVICE_DTS := am335x-boneblack
54 endef
55
56 TARGET_DEVICES += ti_am335x-bone-black
57
58 define Device/ti_omap4-panda
59 DEVICE_VENDOR := PandaBoard.org
60 DEVICE_MODEL := OMAP4 TI pandaboard
61 DEVICE_PACKAGES := kmod-usb-net-smsc95xx
62 endef
63
64 TARGET_DEVICES += ti_omap4-panda
65
66 define Device/ti_omap3-beagle
67 DEVICE_VENDOR := BeagleBoard.org
68 DEVICE_MODEL := OMAP3 TI beagleboard
69 # beagleboard doesn't have a network interface, support most common usb net
70 DEVICE_PACKAGES := \
71 kmod-usb-net-asix kmod-usb-net-asix-ax88179 kmod-usb-net-hso \
72 kmod-usb-net-kaweth kmod-usb-net-pegasus kmod-usb-net-mcs7830 \
73 kmod-usb-net-smsc95xx kmod-usb-net-dm9601-ether
74 endef
75
76 TARGET_DEVICES += ti_omap3-beagle
77
78 $(eval $(call BuildImage))