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
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)
e n d e f
d e f i n e I m a g e / B u i l d / j f f s 2 - 1 2 8 k
$( CP) $( KDIR) /root.jffs2-128k $( BIN_DIR) /$( IMG_PREFIX) -root.jffs2
$( call Image/Build/SysupgradeCombined,NAND,jffs2-128k)
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 ) )