1 # we dont need the kernel in the image
2 ROOTFS_POSTPROCESS_COMMAND += "rm -f ${IMAGE_ROOTFS}/boot/zImage*"
4 def wrt_get_kernel_version(d):
6 if bb.data.inherits_class('image', d):
7 skd = bb.data.getVar('STAGING_KERNEL_DIR', d, 1)
8 return base_read_file(skd+'/kernel-abiversion')
9 return "-no kernel version for available-"
12 I=${DEPLOY_DIR}/images
13 KERNEL_VERSION="${@wrt_get_kernel_version(d)}"
15 for type in ${IMAGE_FSTYPES}; do
17 trx -o ${I}/wrt-generic-${type}.trx ${I}/loader.gz \
18 ${I}/wrt-kernel-${KERNEL_VERSION}.lzma -a 0x10000 ${I}/${IMAGE_NAME}.rootfs.${type}
21 addpattern -2 -i ${I}/wrt-generic-${type}.trx -o ${I}/wrt54gs-${type}.trx -g
24 sed "1s,^W54S,W54G," ${I}/wrt54gs-${type}.trx > ${I}/wrt54g-${type}.trx
27 motorola-bin ${I}/wrt-generic-${type}.trx ${I}/motorola-${type}.bin
31 IMAGE_POSTPROCESS_COMMAND += "wrt_create_images;"
33 DEPENDS_prepend = "${@["wrt-imagetools-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}"