2012-11-11 20:57:04 +00:00
#
# Copyright (C) 2010-2012 OpenWrt.org
2010-07-21 11:20:53 +00:00
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
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 / P r e p a r e
2017-11-08 17:40:37 +00:00
mkimage -A arm -O linux -T kernel -C none -a 0x20008000 -e 0x20008000 -n '$(VERSION_DIST) Linux-$(LINUX_VERSION)' -d $( KDIR) /zImage $( KDIR) /uImage
2010-07-21 11:20:53 +00:00
e n d e f
2016-09-15 10:51:57 +00:00
LEGACY_NOR_KERNEL_SIZE = 2048k
LEGACY_SPI_KERNEL_SIZE = 1536k
2012-10-07 23:24:02 +00:00
# Build sysupgrade image
2016-09-15 10:51:57 +00:00
d e f i n e B u i l d F i r m w a r e / L e g a c y
dd if = $( BIN_DIR) /$( IMG_PREFIX) -$( 1) -sysupgrade.bin \
of = $( KDIR) /uImage.pad bs = $( 3) count = 1
dd if = $( BIN_DIR) /$( IMG_PREFIX) -$( 1) -sysupgrade.bin \
of = $( KDIR) /root.$( 1) .pad bs = $( 3) skip = 1
2012-11-11 20:57:04 +00:00
sh $( TOPDIR) /scripts/combined-image.sh \
2013-11-10 09:57:07 +00:00
$( KDIR) /uImage.pad \
2012-10-07 23:24:02 +00:00
$( KDIR) /root.$( 1) .pad \
2016-09-15 10:51:57 +00:00
$( BIN_DIR) /$( IMG_PREFIX) -$( 1) -$( 2) -legacy-sysupgrade.bin
2012-10-07 23:24:02 +00:00
e n d e f
2014-07-31 23:40:40 +00:00
d e f i n e I m a g e / B u i l d K e r n e l / I n i t r a m f s
2017-11-08 17:40:37 +00:00
mkimage -A arm -O linux -T kernel -C none -a 0x20008000 -e 0x20008000 -n '$(VERSION_DIST) Linux-$(LINUX_VERSION)' -d $( KDIR) /zImage-initramfs $( BIN_DIR) /$( IMG_PREFIX) -initramfs-uImage
2014-07-31 23:40:40 +00:00
e n d e f
2010-07-21 11:20:53 +00:00
d e f i n e I m a g e / B u i l d
2016-09-15 10:51:57 +00:00
cat $( KDIR) /uImage $( KDIR) /root.$( 1) > $( BIN_DIR) /$( IMG_PREFIX) -$( 1) -sysupgrade.bin
2010-07-21 11:20:53 +00:00
$( call Image/Build/$( 1) ,$( 1) )
2016-09-15 10:51:57 +00:00
$( call BuildFirmware/Legacy,$( 1) ,laguna_spi,$( LEGACY_SPI_KERNEL_SIZE) )
$( call BuildFirmware/Legacy,$( 1) ,laguna_nor,$( LEGACY_NOR_KERNEL_SIZE) )
2010-07-21 11:20:53 +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
2016-09-15 10:51:57 +00:00
$( call prepare_generic_squashfs,$( BIN_DIR) /$( IMG_PREFIX) -$( 1) -sysupgrade.bin)
2010-07-21 11:20:53 +00:00
e n d e f
$( eval $ ( call BuildImage ) )