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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

3,988 Views
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.

Labels (1)
0 Kudos
4 Replies

355 Views
b36401
NXP TechSupport
NXP TechSupport

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.

355 Views
sangjinhong
Contributor III

Thanks for the kind answer.

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

Thanks in advance.

0 Kudos

355 Views
b36401
NXP TechSupport
NXP TechSupport

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 Kudos

355 Views
sangjinhong
Contributor III

Thanks for your good answer.

0 Kudos