Mercurial > hg > zrouter
changeset 222:7ee7ba190a98
Ability to fix alignment for images with headers like TRX
author | ray@terran.dlink.ua |
---|---|
date | Mon, 14 Nov 2011 20:37:06 +0200 |
parents | 123b278a022f |
children | 40ec232a5205 |
files | Makefile |
diffstat | 1 files changed, 18 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Mon Nov 14 02:13:23 2011 +0200 +++ b/Makefile Mon Nov 14 20:37:06 2011 +0200 @@ -34,7 +34,12 @@ # Profiles - set of SUBDIRS that need to build .include "profiles/profiles.mk" -#.endif + +.if defined(IMAGE_TYPE) && ${IMAGE_TYPE} == "trx" +IMAGE_HEADER_EXTRA?=0x1c +.else +IMAGE_HEADER_EXTRA?=0 +.endif menu: @@ -214,13 +219,20 @@ _WORLD_INSTALL_ENV+=WITHOUT_TOOLCHAIN=yes .endif +.if !defined(WITH_IPSEC) +_WORLD_BUILD_ENV+=WITHOUT_IPSEC=yes +_WORLD_INSTALL_ENV+=WITHOUT_IPSEC=yes +.endif + _WORLD_BUILD_ENV+=WITHOUT_CDDL=yes _WORLD_BUILD_ENV+=WITHOUT_NIS=yes _WORLD_BUILD_ENV+=WITHOUT_BLUETOOTH=yes +.if !defined(WITH_WIDEC) && ${WITH_WIDEC} == "yes" _WORLD_BUILD_ENV+=NOENABLE_WIDEC=yes -DNOENABLE_WIDEC +.endif _WORLD_BUILD_ENV+=WITHOUT_KERBEROS=yes _WORLD_BUILD_ENV+=WITHOUT_KERBEROS_SUPPORT=yes @@ -608,7 +620,11 @@ ${NEW_KERNEL}.bin.gz.sync: ${NEW_KERNEL}.bin.gz @echo "++++++++++++++ Making [email protected] ++++++++++++++" - dd if=${NEW_KERNEL}.bin.gz of=${NEW_KERNEL}.bin.gz.sync bs=64k conv=sync + KERNEL_BIN_GZ_SIZE=`stat -f %z ${NEW_KERNEL}.bin.gz`; \ + IMAGE_KERNEL_SYNC_SIZE=$$(( ((( KERNEL_BIN_GZ_SIZE + ${IMAGE_HEADER_EXTRA}) + 0xffff ) & 0xffff0000) - ${IMAGE_HEADER_EXTRA} )); \ + cp ${NEW_KERNEL}.bin.gz ${NEW_KERNEL}.bin.gz.sync; \ + echo "Old size $${KERNEL_BIN_GZ_SIZE} New size $${IMAGE_KERNEL_SYNC_SIZE}"; \ + truncate -s $${IMAGE_KERNEL_SYNC_SIZE} ${NEW_KERNEL}.bin.gz.sync fwimage ${NEW_IMAGE}: ${NEW_KERNEL}.bin.gz.sync ${NEW_ROOTFS}.iso.ulzma ${ZTOOLS_PATH}/asustrx @echo "++++++++++++++ Making [email protected] ++++++++++++++"