UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor rahul_cg
Visitor
1,733 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
1,639 Views
Registered: ‎09-14-2016

Re: Mount filesystem from sd card

Jump to solution

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

0 Kudos
6 Replies
Voyager
Voyager
1,708 Views
Registered: ‎09-14-2016

Re: Mount filesystem from sd card

Jump to solution

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
Explorer
Explorer
1,688 Views
Registered: ‎10-19-2017

Re: Mount filesystem from sd card

Jump to solution

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 rahul_cg
Visitor
1,654 Views
Registered: ‎02-26-2018

Re: Mount filesystem from sd card

Jump to solution

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
1,640 Views
Registered: ‎09-14-2016

Re: Mount filesystem from sd card

Jump to solution

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

0 Kudos
Visitor rahul_cg
Visitor
1,628 Views
Registered: ‎02-26-2018

Re: Mount filesystem from sd card

Jump to solution

Not working last print on console is staring kernel.

Do i need to make changes in linux-menuconfig?

0 Kudos
Moderator
Moderator
1,598 Views
Registered: ‎04-24-2017

Re: Mount filesystem from sd card

Jump to solution

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