2015-11-02 10:18:50 +00:00
# Copyright (c) 2014 The Linux Foundation. All rights reserved.
#
i n c l u d e $( TOPDIR ) / r u l e s . m k
i n c l u d e $( INCLUDE_DIR ) / i m a g e . m k
d e f i n e I m a g e / B u i l d u I m a g e
2016-04-27 08:58:15 +00:00
$( CP) $( KDIR) /zImage$( 2) $( KDIR) /zImage-$( 1) $( 2)
cat $( LINUX_DIR) /arch/arm/boot/dts/mt7623-$1 .dtb >> $( KDIR) /zImage-$( 1) $( 2)
mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' -d $( KDIR) /zImage-$( 1) $( 2) $( KDIR) /uImage-$( 1) $( 2)
2015-11-02 10:18:50 +00:00
e n d e f
2016-04-27 08:58:15 +00:00
d e f i n e I m a g e / B u i l d / S y s u p g r a d e C o m b i n e d
$( call Image/BuilduImage,$1 )
2015-11-02 10:18:50 +00:00
i f n e q ( $( CONFIG_TARGET_ROOTFS_INITRAMFS ) , )
2016-04-27 08:58:15 +00:00
$( call Image/BuilduImage,$1 ,-initramfs)
$( CP) $( KDIR) /uImage-$( 1) -initramfs $( BIN_DIR) /$( IMG_PREFIX) -uImage-$( 1) -initramfs
2015-11-02 10:18:50 +00:00
e n d i f
2016-04-27 08:58:15 +00:00
mkdir -p " $( KDIR_TMP) /sysupgrade- $( 1) / "
echo " BOARD= $( 1) " > " $( KDIR_TMP) /sysupgrade- $( 1) /CONTROL "
2016-05-23 09:20:20 +00:00
$( CP) " $( KDIR) /root. $( 2) " " $( KDIR_TMP) /sysupgrade- $( 1) /root "
2016-04-27 08:58:15 +00:00
$( CP) " $( KDIR) /uImage- $( 1) " " $( KDIR_TMP) /sysupgrade- $( 1) /kernel "
( cd " $( KDIR_TMP) " ; $( TAR) cvf \
" $( BIN_DIR) / $( IMG_PREFIX) - $( 1) -sysupgrade.tar " sysupgrade-$( 1) \
$( if $( SOURCE_DATE_EPOCH) ,--mtime= " @ $( SOURCE_DATE_EPOCH) " ) \
)
2015-11-02 10:18:50 +00:00
e n d e f
2017-04-10 04:45:59 +00:00
COMPAT_NAND := mediatek,mt7623-rfb-nand
COMPAT_NAND_EPHY := mediatek,mt7623-rfb-nand-ephy
2015-11-02 10:18:50 +00:00
d e f i n e I m a g e / B u i l d / s q u a s h f s
$( call prepare_generic_squashfs,$( KDIR) /root.squashfs)
2016-04-27 08:58:15 +00:00
$( CP) $( KDIR) /root.squashfs $( BIN_DIR) /$( IMG_PREFIX) -root.squashfs
2016-05-23 09:20:20 +00:00
$( call Image/Build/SysupgradeCombined,eMMC,squashfs)
2016-06-17 01:46:25 +00:00
$( call Image/BuilduImage,NAND)
2017-04-21 07:38:52 +00:00
$( call Image/BuilduImage,NAND-ePHY)
2016-06-17 01:46:25 +00:00
i f n e q ( $( CONFIG_TARGET_ROOTFS_INITRAMFS ) , )
$( call Image/BuilduImage,NAND,-initramfs)
2017-04-21 07:38:52 +00:00
$( call Image/BuilduImage,NAND-ePHY,-initramfs)
2016-06-17 01:46:25 +00:00
$( CP) $( KDIR) /uImage-NAND-initramfs $( BIN_DIR) /$( IMG_PREFIX) -uImage-NAND-initramfs
2017-04-21 07:38:52 +00:00
$( CP) $( KDIR) /uImage-NAND-ePHY-initramfs $( BIN_DIR) /$( IMG_PREFIX) -uImage-NAND-ePHY-initramfs
2016-06-17 01:46:25 +00:00
e n d i f
2017-04-10 04:45:59 +00:00
$( call Image/Build/SysupgradeNAND,NAND,$( 1) ,$( KDIR) /uImage-NAND,$$ ( COMPAT_NAND) )
$( call Image/Build/SysupgradeNAND,NAND-ePHY,$( 1) ,$( KDIR) /uImage-NAND-ePHY,$$ ( COMPAT_NAND_EPHY) )
2015-11-02 10:18:50 +00:00
e n d e f
d e f i n e I m a g e / B u i l d
$( call Image/Build/$( 1) ,$( 1) )
e n d e f
$( eval $ ( call BuildImage ) )