2 # Copyright (C) 2012-2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/image.mk
11 FAT32_BLOCKS
=$(shell echo
$$(($(CONFIG_OMAP_SD_BOOT_PARTSIZE
)*1024*1024/$(FAT32_BLOCK_SIZE
))))
13 UBIFS_OPTS
= -F
-m
2048 -e
124KiB
-c
4096 -U
14 UBI_OPTS
= -m
2048 -p
128KiB
-s
512 -O
2048
16 define Build
/omap-sdcard
18 mkfs.fat
$@.boot
-C
$(FAT32_BLOCKS
)
20 mcopy
-i
$@.boot
$(STAGING_DIR_IMAGE
)/$(DEVICE_NAME
)/MLO
::MLO
21 mcopy
-i
$@.boot
$(STAGING_DIR_IMAGE
)/$(DEVICE_NAME
)/u-boot.img
::u-boot.img
22 mcopy
-i
$@.boot
$(STAGING_DIR_IMAGE
)/$(DEVICE_NAME
)/boot.scr
::boot.scr
23 mmd
-i
$@.boot
::/dtbs
24 mcopy
-i
$@.boot
$(DTS_DIR
)/$(DEVICE_DTS
).dtb
::/dtbs
/$(DEVICE_DTS
).dtb
25 mcopy
-i
$@.boot
$(IMAGE_KERNEL
) ::/zImage
26 .
/gen_omap_sdcard_img.sh
$@ \
29 $(CONFIG_OMAP_SD_BOOT_PARTSIZE
) \
30 $(CONFIG_TARGET_ROOTFS_PARTSIZE
)
38 DEVICE_DTS
= $(lastword
$(subst _
, ,$(1)))
39 IMAGES
:= sdcard.img.gz
40 IMAGE
/sdcard.img.gz
:= omap-sdcard | append-metadata | gzip
41 SUPPORTED_DEVICES
= $(subst _
,$(comma
),$(1))
44 #uboot-omap-am335x_evm uboot-omap-omap3_beagle uboot-omap-omap3_overo uboot-omap-omap4_panda
46 define Device
/ti_am335x-evm
47 DEVICE_VENDOR
:= Texas Instruments
48 DEVICE_MODEL
:= AM335x EVM
51 TARGET_DEVICES
+= ti_am335x-evm
53 define Device
/ti_am335x-bone-black
54 DEVICE_VENDOR
:= Texas Instruments
55 DEVICE_MODEL
:= AM335x BeagleBone Black
56 DEVICE_DTS
:= am335x-boneblack
59 TARGET_DEVICES
+= ti_am335x-bone-black
61 define Device
/ti_omap4-panda
62 DEVICE_VENDOR
:= PandaBoard.org
63 DEVICE_MODEL
:= OMAP4 TI pandaboard
64 DEVICE_PACKAGES
:= kmod-usb-net-smsc95xx
67 TARGET_DEVICES
+= ti_omap4-panda
69 define Device
/ti_omap3-beagle
70 DEVICE_VENDOR
:= BeagleBoard.org
71 DEVICE_MODEL
:= OMAP3 TI beagleboard
72 # beagleboard doesn't have a network interface, support most common usb net
74 kmod-usb-net-asix kmod-usb-net-asix-ax88179 kmod-usb-net-hso \
75 kmod-usb-net-kaweth kmod-usb-net-pegasus kmod-usb-net-mcs7830 \
76 kmod-usb-net-smsc95xx kmod-usb-net-dm9601-ether
79 TARGET_DEVICES
+= ti_omap3-beagle
81 $(eval
$(call BuildImage
))