cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
2,369 Views
Registered: ‎02-26-2018

Mount filesystem from sd card

Jump to solution

I have compiled linux uboot and rootfs by  method provided on below mentioned link.

 

http://www.wiki.xilinx.com/Build+Linux+for+Zynq-7000+AP+SoC+using+Buildroot

 

now issue i am facing is that my filesystem is RAMFS. i Want my filesystem to be on second partition of sd card.

 

and kernel should refer that filesystem while booting.

can anyone please tell how to achieve this?

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Voyager
Voyager
2,275 Views
Registered: ‎09-14-2016

HI,

 

Make 2 partitions on your SD card : 

1. FAT32 - "BOOT" >> boot.bin, image.ub, system.dtb, Image files 

2. EXT4 - "ROOTFS" >> extracted rootfs.tar.gz in this .

 

Load kernel and device-tree:

ZynqMP> fatload mmc 0:1 0x3000000 uImage.ub
ZynqMP> fatload mmc 0:1 0x2A00000 system.dtb
ZynqMP> bootm 0x3000000 - 0x2A00000

Tell to the kernel where the rootfs is :

 

ZynqMP> setenv bootargs 'earlycon earlyprintk root=/dev/mmcblk0p1 rw rootfstype=ext4

 

Cheers,

Trigger

View solution in original post

0 Kudos
6 Replies
Highlighted
Voyager
Voyager
2,344 Views
Registered: ‎09-14-2016

Hi, hello or what you want ...

 

 unpack rootfs.cpio.uboot from the project directory to the partition (you will need to issue the command with the root privileges).

 

Cheers,

Trigger

0 Kudos
Highlighted
Explorer
Explorer
2,324 Views
Registered: ‎10-19-2017

What version of the tools?

For newer versions, (2017.3/2017.4), use the tar.gz and unzip that onto your second partition. For older versions use the .cpio.

0 Kudos
Visitor
Visitor
2,290 Views
Registered: ‎02-26-2018

I have unpacked rootfs in second partition and its name is ROOTFS with type FAT16.

I dont know how to tell uboot to use rootfs which is on second partition.

 

0 Kudos
Highlighted
Voyager
Voyager
2,276 Views
Registered: ‎09-14-2016

HI,

 

Make 2 partitions on your SD card : 

1. FAT32 - "BOOT" >> boot.bin, image.ub, system.dtb, Image files 

2. EXT4 - "ROOTFS" >> extracted rootfs.tar.gz in this .

 

Load kernel and device-tree:

ZynqMP> fatload mmc 0:1 0x3000000 uImage.ub
ZynqMP> fatload mmc 0:1 0x2A00000 system.dtb
ZynqMP> bootm 0x3000000 - 0x2A00000

Tell to the kernel where the rootfs is :

 

ZynqMP> setenv bootargs 'earlycon earlyprintk root=/dev/mmcblk0p1 rw rootfstype=ext4

 

Cheers,

Trigger

View solution in original post

0 Kudos
Highlighted
Visitor
Visitor
2,264 Views
Registered: ‎02-26-2018

Not working last print on console is staring kernel.

Do i need to make changes in linux-menuconfig?

0 Kudos
Highlighted
Moderator
Moderator
2,234 Views
Registered: ‎04-24-2017

Hi @rahul_cg,

 

Refer UG1144 "Configuring SD Card ext filesystem Boot" section.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos