瀏覽代碼

Create tar rootfs, use whole SD card size for rootfs.

Thomas Buck 8 年之前
父節點
當前提交
e3744ba1e6
共有 2 個檔案被更改,包括 14 行新增4 行删除
  1. 0
    2
      configs/olinuxino_defconfig
  2. 14
    2
      flash.sh

+ 0
- 2
configs/olinuxino_defconfig 查看文件

@@ -19,8 +19,6 @@ BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y
19 19
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx23-olinuxino"
20 20
 BR2_PACKAGE_FFMPEG=y
21 21
 BR2_PACKAGE_FFMPEG_SWSCALE=y
22
-BR2_TARGET_ROOTFS_EXT2=y
23
-# BR2_TARGET_ROOTFS_TAR is not set
24 22
 BR2_TARGET_UBOOT=y
25 23
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
26 24
 BR2_TARGET_UBOOT_PATCH="$(BR2_EXTERNAL)/board/olinuxino/u-boot"

+ 14
- 2
flash.sh 查看文件

@@ -41,8 +41,20 @@ else
41 41
 	echo Could not find a suitable bootstream!
42 42
 fi
43 43
 
44
-echo Writing root filesystem
45
-sudo dd if=output/images/rootfs.ext2 of="$1"2 bs=512
44
+if [ -e output/images/rootfs.tar ] ; then
45
+	echo Creating root filesystem
46
+	sudo mkfs.ext4 "$1"2 -L rootfs
47
+
48
+	echo Mounting root filesystem
49
+	sudo mkdir -p /media/rootfs
50
+	sudo mount "$1"2 /media/rootfs
51
+
52
+	echo Copying root filesystem
53
+	sudo tar xfp output/images/rootfs.tar -C /media/rootfs
54
+else
55
+	echo Writing root filesystem
56
+	sudo dd if=output/images/rootfs.ext2 of="$1"2 bs=512
57
+fi
46 58
 
47 59
 echo Synchronising changes to disk
48 60
 sudo sync

Loading…
取消
儲存