2013-05-29 01:27:29 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2013 OpenWrt.org
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
2015-11-18 21:35:24 +00:00
|
|
|
#################################################
|
|
|
|
# Images
|
|
|
|
#################################################
|
|
|
|
|
2016-07-31 17:27:15 +00:00
|
|
|
DEVICE_VARS += MKUBIFS_OPTS
|
|
|
|
|
|
|
|
define Build/boot-overlay
|
|
|
|
rm -rf $@.boot
|
|
|
|
mkdir -p $@.boot
|
2015-11-18 21:35:24 +00:00
|
|
|
|
2016-07-31 17:27:15 +00:00
|
|
|
$(CP) $@ $@.boot/$(IMG_PREFIX)-uImage
|
|
|
|
ln -sf $(IMG_PREFIX)-uImage $@.boot/uImage
|
|
|
|
|
|
|
|
$(foreach dts,$(DEVICE_DTS), \
|
|
|
|
$(CP) \
|
2018-02-08 11:02:24 +00:00
|
|
|
$(DTS_DIR)/$(dts).dtb \
|
2016-07-31 17:27:15 +00:00
|
|
|
$@.boot/$(IMG_PREFIX)-$(dts).dtb; \
|
|
|
|
ln -sf \
|
|
|
|
$(IMG_PREFIX)-$(dts).dtb \
|
|
|
|
$@.boot/$(dts).dtb; \
|
2013-11-18 22:23:42 +00:00
|
|
|
)
|
2015-11-18 21:35:24 +00:00
|
|
|
mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
|
2016-07-31 17:27:15 +00:00
|
|
|
-n '$(DEVICE_ID) OpenWrt bootscript' \
|
2015-11-18 21:35:24 +00:00
|
|
|
-d ./bootscript-$(DEVICE_NAME) \
|
2016-07-31 17:27:15 +00:00
|
|
|
$@.boot/6x_bootscript-$(DEVICE_NAME)
|
|
|
|
|
2015-11-18 21:35:24 +00:00
|
|
|
$(STAGING_DIR_HOST)/bin/mkfs.ubifs \
|
2017-01-09 15:29:16 +00:00
|
|
|
--space-fixup --compr=zlib --squash-uids \
|
2016-07-31 17:27:15 +00:00
|
|
|
$(MKUBIFS_OPTS) -c 8124 \
|
|
|
|
-o $@.boot.ubifs -d $@.boot
|
2016-08-20 18:17:51 +00:00
|
|
|
|
|
|
|
$(TAR) -C $@.boot -cf $@.boot.tar .
|
2013-05-29 01:27:29 +00:00
|
|
|
endef
|
|
|
|
|
2016-04-19 13:46:33 +00:00
|
|
|
define Build/bootfs.tar.gz
|
2016-08-20 18:17:51 +00:00
|
|
|
rm -rf $@.boot
|
|
|
|
mkdir -p $@.boot
|
|
|
|
|
|
|
|
$(TAR) -C $@.boot -xf $(IMAGE_KERNEL).boot.tar
|
|
|
|
$(TAR) -C $@.boot \
|
2016-07-31 17:27:15 +00:00
|
|
|
--numeric-owner --owner=0 --group=0 --transform "s,./,./boot/," \
|
|
|
|
-czvf $@ .
|
2016-04-19 13:46:33 +00:00
|
|
|
endef
|
|
|
|
|
2018-07-09 09:09:53 +00:00
|
|
|
define Build/boot-scr
|
|
|
|
mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
|
|
|
|
-n '$(DEVICE_ID) OpenWrt bootscript' \
|
|
|
|
-d ./bootscript-$(DEVICE_NAME) \
|
|
|
|
$(BIN_DIR)/boot.scr
|
|
|
|
endef
|
|
|
|
|
2015-11-18 21:35:24 +00:00
|
|
|
#################################################
|
|
|
|
# Devices
|
|
|
|
#################################################
|
|
|
|
|
|
|
|
KERNEL_LOADADDR=0x10008000
|
|
|
|
|
|
|
|
define Device/Default
|
2016-07-02 17:33:52 +00:00
|
|
|
PROFILES := Generic
|
2016-07-02 17:12:09 +00:00
|
|
|
FILESYSTEMS := squashfs ext4
|
|
|
|
KERNEL_INSTALL := 1
|
|
|
|
KERNEL_SUFFIX := -uImage
|
|
|
|
KERNEL_NAME := zImage
|
|
|
|
KERNEL_PREFIX := $$(IMAGE_PREFIX)
|
|
|
|
KERNEL := kernel-bin | uImage none
|
|
|
|
IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1).$$(2)
|
|
|
|
IMAGES :=
|
2013-10-18 00:02:45 +00:00
|
|
|
endef
|
|
|
|
|
2015-11-18 21:35:24 +00:00
|
|
|
define Device/ventana
|
2016-07-31 17:27:15 +00:00
|
|
|
DEVICE_TITLE := Gateworks Ventana family (normal NAND flash)
|
2016-07-02 17:12:09 +00:00
|
|
|
DEVICE_DTS:= \
|
|
|
|
imx6dl-gw51xx \
|
|
|
|
imx6dl-gw52xx \
|
|
|
|
imx6dl-gw53xx \
|
|
|
|
imx6dl-gw54xx \
|
|
|
|
imx6dl-gw551x \
|
|
|
|
imx6dl-gw552x \
|
2017-03-10 00:05:23 +00:00
|
|
|
imx6dl-gw553x \
|
2017-03-10 15:01:12 +00:00
|
|
|
imx6dl-gw5904 \
|
2016-07-02 17:12:09 +00:00
|
|
|
imx6q-gw51xx \
|
|
|
|
imx6q-gw52xx \
|
|
|
|
imx6q-gw53xx \
|
|
|
|
imx6q-gw54xx \
|
|
|
|
imx6q-gw5400-a \
|
|
|
|
imx6q-gw551x \
|
2016-09-01 14:49:28 +00:00
|
|
|
imx6q-gw552x \
|
2017-03-10 15:01:12 +00:00
|
|
|
imx6q-gw553x \
|
|
|
|
imx6q-gw5904
|
2017-01-10 09:10:13 +00:00
|
|
|
DEVICE_PACKAGES := kmod-sky2 kmod-sound-core kmod-sound-soc-imx kmod-sound-soc-imx-sgtl5000 \
|
2016-07-02 17:12:09 +00:00
|
|
|
kmod-can kmod-can-flexcan kmod-can-raw \
|
2016-09-06 16:40:25 +00:00
|
|
|
kmod-hwmon-gsc \
|
2017-01-10 08:59:10 +00:00
|
|
|
kmod-leds-gpio kmod-pps-gpio \
|
2016-07-02 17:12:09 +00:00
|
|
|
kobs-ng
|
2016-07-31 17:27:15 +00:00
|
|
|
KERNEL += | boot-overlay
|
|
|
|
IMAGES := nand.ubi bootfs.tar.gz
|
|
|
|
UBINIZE_PARTS = boot=$$(KDIR_KERNEL_IMAGE).boot.ubifs=15
|
|
|
|
IMAGE/nand.ubi := append-ubi
|
|
|
|
IMAGE/bootfs.tar.gz := bootfs.tar.gz | install-dtb
|
2016-07-02 17:33:10 +00:00
|
|
|
IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1)-$$(2)
|
2016-07-31 17:27:15 +00:00
|
|
|
PAGESIZE := 2048
|
2016-09-04 06:56:05 +00:00
|
|
|
BLOCKSIZE := 128k
|
2016-07-31 17:27:15 +00:00
|
|
|
MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB
|
|
|
|
endef
|
2017-12-10 22:45:20 +00:00
|
|
|
TARGET_DEVICES += ventana
|
2016-07-31 17:27:15 +00:00
|
|
|
|
|
|
|
define Device/ventana-large
|
|
|
|
$(Device/ventana)
|
|
|
|
DEVICE_NAME := ventana
|
|
|
|
DEVICE_TITLE := Gateworks Ventana family (large NAND flash)
|
|
|
|
IMAGES := nand.ubi
|
|
|
|
PAGESIZE := 4096
|
2016-09-04 06:56:05 +00:00
|
|
|
BLOCKSIZE := 256k
|
2016-07-31 17:27:15 +00:00
|
|
|
MKUBIFS_OPTS := -m $$(PAGESIZE) -e 248KiB
|
2013-11-18 22:23:40 +00:00
|
|
|
endef
|
2017-12-10 22:45:20 +00:00
|
|
|
TARGET_DEVICES += ventana-large
|
2013-10-18 00:02:45 +00:00
|
|
|
|
2015-11-18 21:35:24 +00:00
|
|
|
define Device/wandboard
|
2016-07-02 17:12:09 +00:00
|
|
|
DEVICE_TITLE := Wandboard Dual
|
|
|
|
DEVICE_DTS := imx6dl-wandboard
|
2013-10-18 00:02:45 +00:00
|
|
|
endef
|
2017-12-10 22:45:20 +00:00
|
|
|
TARGET_DEVICES += wandboard
|
2013-05-29 01:27:29 +00:00
|
|
|
|
2018-07-09 09:09:53 +00:00
|
|
|
define Device/cubox-i
|
|
|
|
KERNEL := kernel-bin | install-dtb | boot-scr
|
|
|
|
DEVICE_NAME := cubox
|
|
|
|
DEVICE_TITLE := SolidRun CuBox-i
|
|
|
|
DEVICE_PACKAGES := u-boot-mx6cuboxi kmod-drm-imx kmod-drm-imx-hdmi kmod-usb-hid
|
|
|
|
DEVICE_DTS := imx6q-cubox-i imx6dl-cubox-i
|
|
|
|
endef
|
|
|
|
TARGET_DEVICES += cubox-i
|
|
|
|
|
2013-05-29 01:27:29 +00:00
|
|
|
$(eval $(call BuildImage))
|