How to make the rootfs.ext2 of L3.0.35_4.1.0_130816_images_MX6.tar.gz ???

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to make the rootfs.ext2 of L3.0.35_4.1.0_130816_images_MX6.tar.gz ???

5,745 次查看
sangjinhong
Contributor III

I'd like to know how to make the rootfs.ext2 of L3.0.35_4.1.0_130816_images_MX6.tar.gz.

Maybe, L3.0.35_4.1.0_130816_source.tar.gz may include the script file that make

JFFS2 root file system image.

Where is the script file that make ext2 root filesystem image???

and How can I write the image to SD card???

I can't find the answer in the freescale document.

Thanks.

标签 (1)
0 项奖励
4 回复数

2,112 次查看
b36401
NXP Employee
NXP Employee

When you unpack L3.0.35_4.1.0_130816_images_MX6.tar.gz
you get L3.0.35_4.1.0_130816_images_MX6 directory
that has rootfs.ext2.gz file.

Then you can unzip this file and get the image
of the filesystem. I mean "rootfs.ext2" file
you can get this way.

To get access to the files this image contains you can
mount this filesystem on host machine:

# sudo mount rootfs.ext2 /mnt/1 -o loop

Now you can see its content under /mnt/1 directory.
So you can make a partition and fresh filesystem on SD card
and copy the files into it using "cp -rp" command.

Or you can simply burn the image on fresh partition
of the card this way:

# sudo dd if=rootfs.ext2 of=/dev/sdb1

It this case you even do not need to mount it first.

So finally example commands are:

# tar -xzf L3.0.35_4.1.0_130816_images_MX6.tar.gz
# cd L3.0.35_4.1.0_130816_images_MX6/
# gunzip rootfs.ext2.gz
# sudo dd if=rootfs.ext2 of=/dev/sdb1

Here I assume that /dev/sdb is your SD card with
fresh /dev/sdb1 partition. Please be careful
and don't destroy the partition other that SD card one.

2,112 次查看
sangjinhong
Contributor III

Thanks for the kind answer.

Would you give me the information about making roorfs.ext2 file???

Thanks in advance.

0 项奖励

2,112 次查看
b36401
NXP Employee
NXP Employee

Are you asking about making fresh (empty) roorfs.ext2 image file?
Here are example commands:

# dd if=/dev/zero of=roorfs.ext2 bs=1024k count=256
# mkfs.ext2 roorfs.ext2

First command creates a file with 256 megabytes of zeros.
And second one makes a filesystem in this file.
Actual (net) size of this filesystem is 248M.

Or you are asking about the content other than in
that L3.0.35_4.1.0_130816_images_MX6.tar.gz repository?
The content may be created with BSP for example.

0 项奖励

2,112 次查看
sangjinhong
Contributor III

Thanks for your good answer.

0 项奖励