Index: bin/Ltibutils.pm =================================================================== RCS file: /sources/ltib/ltib/bin/Ltibutils.pm,v retrieving revision 1.38 diff -U 3 -r1.38 Ltibutils.pm --- bin/Ltibutils.pm 7 Aug 2011 15:05:53 -0000 1.38 +++ bin/Ltibutils.pm 3 Oct 2011 13:05:38 -0000 @@ -697,6 +688,10 @@ then rm -f $tdir/rootfs.yaffs2 fi +if [ "$pcf->{DEPLOYMENT_UBIFS}" = "y" ] +then + rm -f $tdir/rootfs.ubifs.img +fi if [ "$pcf->{DEPLOYMENT_CRAMFS}" = "y" ] then rm -f $tdir/cramfs.* @@ -856,6 +851,9 @@ # genext2fs seems to use 1k block size my $blocks = $fs_size; my $inodes = $fs_count + 400; + my $ubinize_config_tmpl = "bin/ubifs_ubinize_tmpl.ini"; + my $ubinize_config_file = "$tdir/ubinize.ini"; + my $ubinize_image_location_str = "UBI_IMAGE_LOCATION"; # try to sanely guess the endian of the target my $endian = '-l'; @@ -890,6 +888,7 @@ fi if [ "$pcf->{DEPLOYMENT_JFFS2}" = "y" ] then + echo "creating jffs2 image: $tdir/rootfs.jffs2" mkfs.jffs2 -n $pad_opt -D $dev_tab -U $endian -e $pcf->{DEPLOYMENT_ERASE_BLOCK_SIZE} -d $stage -o $tdir/rootfs.jffs2 ln -sf $tdir/rootfs.jffs2 $tdir/rootfs_image fi @@ -898,6 +897,25 @@ mkfs.yaffs2 -r -p $stage/etc/passwd -N -D $dev_tab $endian $stage $tdir/rootfs.yaffs2 ln -sf $tdir/rootfs.yaffs2 $tdir/rootfs_image fi +if [ "$pcf->{DEPLOYMENT_UBIFS}" = "y" ] +then + echo "creating ubifs image: $tdir/rootfs.ubifs.img" + mkfs.ubifs -U -D $dev_tab -d $stage -o $tdir/rootfs.ubifs \\ + -m $pcf->{DEPLOYMENT_MIN_I0_UNIT_SIZE} \\ + -e $pcf->{DEPLOYMENT_LEB_SIZE} \\ + -c $pcf->{DEPLOYMENT_MAX_LEB_COUNT} \\ + -x $pcf->{DEPLOYMENT_UBIFS_COMPR_TYPE} + # genrate the ini file from .tmpl file. + sed -e 's:$ubinize_image_location_str:$tdir/rootfs.ubifs:g' \\ + $ubinize_config_tmpl > $ubinize_config_file + ubinize -o $tdir/rootfs.ubifs.img \\ + -m $pcf->{DEPLOYMENT_MIN_I0_UNIT_SIZE} \\ + -s $pcf->{DEPLOYMENT_SUB_PAGE_SIZE} \\ + -p $pcf->{DEPLOYMENT_PEB_SIZE} $ubinize_config_file + rm $ubinize_config_file + rm $tdir/rootfs.ubifs + ln -sf $tdir/rootfs.ubifs.img $tdir/rootfs_image +fi if [ "$pcf->{DEPLOYMENT_CRAMFS}" = "y" ] then mkfs.cramfs -q -D $dev_tab $endian $stage $tdir/rootfs.cramfs