@ -7,8 +7,26 @@
i n c l u d e $( TOPDIR ) / r u l e s . m k
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
i n c l u d e $( INCLUDE_DIR ) / i m a g e . m k
DTS_TARGETS = mpc8548cds_32b p1010rdb
d e f i n e i m g n a m e
BOOT_IMAGES := zImage
$( BIN_DIR ) / $( IMG_PREFIX ) - $( 2) - $( patsubst jffs 2-%,jffs 2,$ ( patsubst squashfs -%,squashfs ,$ ( 1) ) )
e n d e f
d e f i n e s y s u p n a m e
$( call imgname ,$ ( 1) ,$ ( 2) ) - s y s u p g r a d e . b i n
e n d e f
d e f i n e f a c t o r y n a m e
$( call imgname ,$ ( 1) ,$ ( 2) ) - f a c t o r y . b i n
e n d e f
i f e q ( $( CONFIG_TARGET_ROOTFS_INITRAMFS ) , y )
IMAGE_SUFFIX = -initramfs
e n d i f
zImage := $( BIN_DIR) /$( IMG_PREFIX) -zImage$( IMAGE_SUFFIX)
DTS_TARGETS = mpc8548cds_32b p1010rdb tl-wdr4900-v1
BOOT_IMAGES := zImage cuImage.tl-wdr4900-v1
d e f i n e I m a g e / P r e p a r e
d e f i n e I m a g e / P r e p a r e
$( foreach image,$( BOOT_IMAGES) ,
$( foreach image,$( BOOT_IMAGES) ,
@ -17,12 +35,33 @@ define Image/Prepare
e n d e f
e n d e f
d e f i n e I m a g e / B u i l d K e r n e l
d e f i n e I m a g e / B u i l d K e r n e l
cp $( KDIR) /zImage $( BIN_DIR) /$( IMG_PREFIX) -zImage
cp $( KDIR) /zImage $( zImage)
$( foreach dts,$( DTS_TARGETS) ,
$( foreach dts,$( DTS_TARGETS) ,
$( LINUX_DIR) /scripts/dtc/dtc -I dts -O dtb $( LINUX_DIR) /arch/powerpc/boot/dts/$( dts) .dts > $( BIN_DIR) /$( IMG_PREFIX) -$( dts) .fdt
$( LINUX_DIR) /scripts/dtc/dtc -I dts -O dtb $( LINUX_DIR) /arch/powerpc/boot/dts/$( dts) .dts > $( BIN_DIR) /$( IMG_PREFIX) -$( dts) .fdt
)
)
e n d e f
e n d e f
d e f i n e I m a g e / B u i l d / T P L I N K
-$( STAGING_DIR_HOST) /bin/mktplinkfw \
-H $( 4) -W $( 5) -F $( 6) -N OpenWrt -V $( REVISION) $( 7) \
-k $( KDIR) /$( 3) \
-r $( KDIR) /root.$( 1) \
-o $( call factoryname,$( 1) ,$( 2) )
-$( STAGING_DIR_HOST) /bin/mktplinkfw \
-H $( 4) -W $( 5) -F $( 6) -N OpenWrt -V $( REVISION) $( 7) -s \
-k $( KDIR) /$( 3) \
-r $( KDIR) /root.$( 1) \
-o $( call sysupname,$( 1) ,$( 2) )
e n d e f
d e f i n e I m a g e / B u i l d / P r o f i l e / T L W D R 4 9 0 0
$( call Image/Build/TPLINK,$( 1) ,tl-wdr4900-v1,cuImage.tl-wdr4900-v1,0x49000001,1,16Mppc)
e n d e f
d e f i n e I m a g e / B u i l d / P r o f i l e / D e f a u l t
$( call Image/Build/Profile/TLWDR4900,$( 1) )
e n d e f
d e f i n e I m a g e / B u i l d / e x t 2
d e f i n e I m a g e / B u i l d / e x t 2
cp $( KDIR) /root.$( 1) $( BIN_DIR) /$( IMG_PREFIX) -ext2.img
cp $( KDIR) /root.$( 1) $( BIN_DIR) /$( IMG_PREFIX) -ext2.img
e n d e f
e n d e f
@ -32,8 +71,11 @@ define Image/Build/squashfs
cp $( KDIR) /root.squashfs $( BIN_DIR) /$( IMG_PREFIX) -root.squashfs
cp $( KDIR) /root.squashfs $( BIN_DIR) /$( IMG_PREFIX) -root.squashfs
e n d e f
e n d e f
PROFILE ?= Default
d e f i n e I m a g e / B u i l d
d e f i n e I m a g e / B u i l d
$( call Image/Build/$( 1) ,$( 1) )
$( call Image/Build/$( 1) ,$( 1) )
$( call Image/Build/Profile/$( PROFILE) ,$( 1) )
e n d e f
e n d e f
$( eval $ ( call BuildImage ) )
$( eval $ ( call BuildImage ) )