2 # Copyright (C) 2013 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
10 #################################################
12 #################################################
14 DEVICE_VARS
+= MKUBIFS_OPTS
16 define Build
/boot-overlay
20 $(CP
) $@
$@.boot
/$(IMG_PREFIX
)-uImage
21 ln
-sf
$(IMG_PREFIX
)-uImage
$@.boot
/uImage
23 $(foreach dts
,$(DEVICE_DTS
), \
25 $(LINUX_DIR
)/arch
/$(ARCH
)/boot
/dts
/$(dts
).dtb \
26 $@.boot
/$(IMG_PREFIX
)-$(dts
).dtb
; \
28 $(IMG_PREFIX
)-$(dts
).dtb \
31 mkimage
-A arm
-O linux
-T script
-C none
-a
0 -e
0 \
32 -n
'$(DEVICE_ID) OpenWrt bootscript' \
33 -d .
/bootscript-
$(DEVICE_NAME
) \
34 $@.boot
/6x_bootscript-
$(DEVICE_NAME
)
36 $(STAGING_DIR_HOST
)/bin
/mkfs.ubifs \
37 --space-fixup
--force-compr
=zlib
--squash-uids \
38 $(MKUBIFS_OPTS
) -c
8124 \
39 -o
$@.boot.ubifs
-d
$@.boot
41 $(TAR
) -C
$@.boot
-cf
$@.boot.
tar .
44 define Build
/bootfs.
tar.gz
48 $(TAR
) -C
$@.boot
-xf
$(IMAGE_KERNEL
).boot.
tar
50 --numeric-owner
--owner
=0 --group
=0 --transform
"s,./,./boot/," \
54 #################################################
56 #################################################
58 KERNEL_LOADADDR
=0x10008000
62 FILESYSTEMS
:= squashfs ext4
64 KERNEL_SUFFIX
:= -uImage
66 KERNEL_PREFIX
:= $$(IMAGE_PREFIX
)
67 KERNEL
:= kernel-bin | uImage none
68 IMAGE_NAME
= $$(IMAGE_PREFIX
)-$$(1).
$$(2)
73 DEVICE_TITLE
:= Gateworks Ventana family
(normal NAND flash
)
89 DEVICE_PACKAGES
:= kmod-thermal-imx kmod-sky2 kmod-usb-chipidea-imx kmod-usb-mxs-phy \
90 kmod-sound-core kmod-sound-soc-imx kmod-sound-soc-imx-sgtl5000 \
91 kmod-can kmod-can-flexcan kmod-can-raw \
93 kmod-leds-gpio kmod-pps-gpio kmod-gw16083 \
95 KERNEL
+= | boot-overlay
96 IMAGES
:= nand.ubi bootfs.
tar.gz
98 UBINIZE_PARTS
= boot
=$$(KDIR_KERNEL_IMAGE
).boot.ubifs
=15
99 IMAGE
/nand.ubi
:= append-ubi
100 IMAGE
/bootfs.
tar.gz
:= bootfs.
tar.gz | install-dtb
101 IMAGE_NAME
= $$(IMAGE_PREFIX
)-$$(1)-$$(2)
104 MKUBIFS_OPTS
:= -m
$$(PAGESIZE
) -e
124KiB
107 define Device
/ventana-large
109 DEVICE_NAME
:= ventana
110 DEVICE_TITLE
:= Gateworks Ventana family
(large NAND flash
)
114 MKUBIFS_OPTS
:= -m
$$(PAGESIZE
) -e
248KiB
117 define Device
/wandboard
118 DEVICE_TITLE
:= Wandboard Dual
119 DEVICE_DTS
:= imx6dl-wandboard
120 DEVICE_PACKAGES
:= kmod-thermal-imx kmod-usb-chipidea-imx kmod-usb-mxs-phy
124 ventana ventana-large \
127 $(eval
$(call BuildImage
))