|
@@ -0,0 +1,57 @@
|
|
|
+echo "*********************************"
|
|
|
+echo "* make root file system *"
|
|
|
+echo "*********************************"
|
|
|
+
|
|
|
+mkdir -p ./mnt ./rootfs ./davapp
|
|
|
+#cp -dR /home/wangqian/workdir/rootfs/* ./rootfs/
|
|
|
+#chmod 777 ./rootfs/
|
|
|
+
|
|
|
+#cp -dR /tftpboot/ttt/* ./rootfs/
|
|
|
+#cp -dR /home/wangqian/workdir/rootfs/* ./rootfs/
|
|
|
+#cp -dR ./davincifile/* ./davapp
|
|
|
+#mv -f ./rootfs/etc/passwd_ram ./rootfs/etc/passwd
|
|
|
+
|
|
|
+#rm -f ./rootfs/dav/1280.422
|
|
|
+#rm -f ./rootfs/dav/1920.422
|
|
|
+#rm -f ./rootfs/dav/lib_tls.tar.bz2
|
|
|
+
|
|
|
+#mv -f ./rootfs/dav/* ./davapp/
|
|
|
+
|
|
|
+###### 以下制作initrd ########
|
|
|
+dd if=/dev/zero of=./initrd bs=1024 count=65536
|
|
|
+/sbin/losetup /dev/loop0 ./initrd
|
|
|
+#./mkfs.minix /dev/loop0
|
|
|
+mkfs.ext2 /dev/loop0
|
|
|
+
|
|
|
+mount /dev/loop0 ./mnt
|
|
|
+chmod 777 ./mnt/
|
|
|
+rm -rf ./mnt/lost+found
|
|
|
+cp -dR ./rootfs/* ./mnt/
|
|
|
+umount ./mnt
|
|
|
+
|
|
|
+/sbin/losetup -d /dev/loop0
|
|
|
+gzip -9 ./initrd
|
|
|
+mv -f initrd.gz system/rootfs.img
|
|
|
+###### 制作initrd完成 ########
|
|
|
+
|
|
|
+###### 以下制作yaffs2镜像 ########
|
|
|
+#mv -f ./initrd.gz ./rootfs.img
|
|
|
+#cp ./rootfs.img ./davapp/rootfs.img
|
|
|
+
|
|
|
+#./mkyaffs2img 1 ./davapp ./davinci.img
|
|
|
+
|
|
|
+#cp ./davinci.img /tftpboot/
|
|
|
+
|
|
|
+################### clean dir ###################
|
|
|
+rm -rf ./mnt
|
|
|
+#rm -rf ./rootfs
|
|
|
+rm -rf ./davapp
|
|
|
+
|
|
|
+echo "*********************************"
|
|
|
+echo "* make yafffs2 system *"
|
|
|
+echo "*********************************"
|
|
|
+
|
|
|
+rm -fr system.yaffs*
|
|
|
+tar czvf app.tar.gz home
|
|
|
+mv app.tar.gz system/
|
|
|
+mkyaffs2image610 system system.yaffs.2k_4bit 1 2
|