2012-01-14 23:02:56 +00:00
|
|
|
#
|
2014-02-12 15:38:08 +00:00
|
|
|
# Copyright (C) 2012-2014 OpenWrt.org
|
2012-01-14 23:02:56 +00:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
2017-04-15 17:00:10 +00:00
|
|
|
FAT32_BLOCK_SIZE=1024
|
|
|
|
FAT32_BLOCKS=$(shell echo $$(($(CONFIG_OMAP_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE))))
|
|
|
|
|
2014-02-12 10:48:33 +00:00
|
|
|
UBIFS_OPTS = -F -m 2048 -e 124KiB -c 4096 -U
|
|
|
|
UBI_OPTS = -m 2048 -p 128KiB -s 512 -O 2048
|
|
|
|
|
2017-04-15 17:00:10 +00:00
|
|
|
define Build/omap-sdcard
|
|
|
|
rm -f $@.boot
|
|
|
|
mkfs.fat $@.boot -C $(FAT32_BLOCKS)
|
|
|
|
|
|
|
|
mcopy -i $@.boot $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)/MLO ::MLO
|
|
|
|
mcopy -i $@.boot $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)/u-boot.img ::u-boot.img
|
|
|
|
mcopy -i $@.boot $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)/uEnv.txt ::uEnv.txt
|
|
|
|
mmd -i $@.boot ::/dtbs
|
|
|
|
mcopy -i $@.boot $(DTS_DIR)/$(DEVICE_DTS).dtb ::/dtbs/$(DEVICE_DTS).dtb
|
|
|
|
mcopy -i $@.boot $(IMAGE_KERNEL) ::/zImage
|
|
|
|
./gen_omap_sdcard_img.sh $@ \
|
|
|
|
$@.boot \
|
|
|
|
$(IMAGE_ROOTFS) \
|
|
|
|
$(CONFIG_OMAP_SD_BOOT_PARTSIZE) \
|
|
|
|
$(CONFIG_TARGET_ROOTFS_PARTSIZE)
|
|
|
|
rm -f $@.boot
|
2014-02-13 10:43:32 +00:00
|
|
|
endef
|
|
|
|
|
2017-04-15 17:00:10 +00:00
|
|
|
define Device/Default
|
|
|
|
PROFILES := Default
|
|
|
|
DEVICE_VARS :=
|
|
|
|
KERNEL_NAME := zImage
|
|
|
|
KERNEL := kernel-bin
|
|
|
|
IMAGES := sdcard.img.gz
|
|
|
|
IMAGE/sdcard.img.gz := omap-sdcard | append-metadata | gzip
|
2018-07-19 06:48:56 +00:00
|
|
|
SUPPORTED_DEVICES = $(subst _,$(comma),$(1))
|
2012-01-14 23:02:56 +00:00
|
|
|
endef
|
|
|
|
|
2017-04-15 17:00:10 +00:00
|
|
|
#uboot-omap-am335x_evm uboot-omap-omap3_beagle uboot-omap-omap3_overo uboot-omap-omap4_panda
|
|
|
|
|
2018-07-19 06:48:56 +00:00
|
|
|
define Device/ti_am335x-evm
|
2017-04-15 17:00:10 +00:00
|
|
|
DEVICE_TITLE := TI AM335x EVM
|
|
|
|
DEVICE_DTS := am335x-evm
|
2012-01-14 23:02:56 +00:00
|
|
|
endef
|
|
|
|
|
2018-07-19 06:48:56 +00:00
|
|
|
TARGET_DEVICES += ti_am335x-evm
|
2017-04-15 17:00:10 +00:00
|
|
|
|
2018-07-19 06:48:56 +00:00
|
|
|
define Device/ti_am335x-bone-black
|
2017-04-15 17:00:10 +00:00
|
|
|
DEVICE_TITLE := TI AM335x BeagleBone Black
|
|
|
|
DEVICE_DTS := am335x-boneblack
|
2012-01-14 23:02:56 +00:00
|
|
|
endef
|
|
|
|
|
2018-07-19 06:48:56 +00:00
|
|
|
TARGET_DEVICES += ti_am335x-bone-black
|
2017-04-15 17:00:10 +00:00
|
|
|
|
2018-07-19 06:48:56 +00:00
|
|
|
define Device/ti_omap4-panda
|
2017-04-15 17:00:10 +00:00
|
|
|
DEVICE_TITLE := OMAP4 TI pandaboard
|
|
|
|
DEVICE_DTS := omap4-panda
|
|
|
|
DEVICE_PACKAGES := kmod-usb-net-smsc95xx
|
2012-01-14 23:02:56 +00:00
|
|
|
endef
|
|
|
|
|
2018-07-19 06:48:56 +00:00
|
|
|
TARGET_DEVICES += ti_omap4-panda
|
2017-04-15 17:00:10 +00:00
|
|
|
|
2018-07-19 06:48:56 +00:00
|
|
|
define Device/ti_omap3-beagle
|
2017-04-15 17:00:10 +00:00
|
|
|
DEVICE_TITLE := OMAP3 TI beagleboard
|
|
|
|
DEVICE_DTS := omap3-beagle
|
|
|
|
# beagleboard doesn't have a network interface, support most common usb net
|
|
|
|
DEVICE_PACKAGES := kmod-usb-net \
|
|
|
|
kmod-usb-net-asix kmod-usb-net-asix-ax88179 kmod-usb-net-hso \
|
|
|
|
kmod-usb-net-kaweth kmod-usb-net-pegasus kmod-usb-net-mcs7830 \
|
|
|
|
kmod-usb-net-smsc95xx kmod-usb-net-dm9601-ether
|
|
|
|
endef
|
|
|
|
|
2018-07-19 06:48:56 +00:00
|
|
|
TARGET_DEVICES += ti_omap3-beagle
|
2017-04-15 17:00:10 +00:00
|
|
|
|
2012-01-14 23:02:56 +00:00
|
|
|
$(eval $(call BuildImage))
|