mkimg_system()
122 {
123 echo "**************** start make system.img ****************"
124
125
126 cd $PRODUCT_IMAGES
127 mkdir ./system
128
129 echo "alloc disk space..."
130 dd if=/dev/zero of=$SYSTEMIMG bs=1024 count=${SYSTEMIMG_SIZE}
131 #mke2fs -F -m 0 -i 2000 $SYSTEMIMG > /dev/null
132 mkfs.ext4 -F $SYSTEMIMG > /dev/null
133 #sudo mount -o loop $SYSTEMIMG $PRODUCT_IMAGES/system/
134 mount -o loop $SYSTEMIMG $PRODUCT_IMAGES/system/
135
136 cd system
137
138 echo "copy from systemfs..."
139
140 cd ${PRODUCT_SYSTEM}
141 find . \( -path "./dev" -o -path "./acct" -o -path "./cache" -o -path "./config" -o -path "./d" -o -path " ./data" -o -path "./mnt" \) -prune -o -print | cpio -o -O ${PRODUCT_IMAGES}/system.cpio
142
143 cd ${PRODUCT_IMAGES}/system/
144 cpio -id -I ${PRODUCT_IMAGES}/system.cpio -f *svn*
145
146 cd ..
147 #sudo umount ${PRODUCT_IMAGES}/system/
148 umount ${PRODUCT_IMAGES}/system/
149 rm ./system/ -rf
150 rm ./system.cpio
151
152 cd $ANDROID_ROOT
153 echo "make system.img ok"
154 }
阅读(982) | 评论(0) | 转发(0) |