cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Tom_Tang
Visitor
Visitor
245 Views
Registered: ‎05-08-2020

petalinux2020.1 doesn't recognize 'mkfs'

Hello:

     I use the XCZU4EV-1SFVC784I to develop petalinux2020.1. While I want to use the NVMe SSD to store data. After fdisk a 80G area for it ,  when use the 'mkfs' command, petalinux can't recognize the command. It shows "-sh mkfs: command not found ".  So I can't mount this area to use it.

     I want to know how can solve this problem, thanks.

 

x.png

0 Kudos
Reply
4 Replies
rfs613
Scholar
Scholar
222 Views
Registered: ‎05-28-2013

You can enable mkfs using petalinux-config -c rootfs then pick Filesystem Packages → base → util-linux → util-linux-mkfs.

Note that mkfs is just a front-end. Depending on the -t flag, it will call a more specific tool to do the actual formatting. In your case this will be mke2fs which handles ext2/3/4. This also needs to be enabled, Filesystem Packages → base → e2fsprogs → e2fsprogs-mke2fs.

Alternatively, instead of the full version from util-linux and e2fsprogs packages, you can also use the busybox version of these tools (petalinux-config -c busybox, look for mkfs.ext2).

Tom_Tang
Visitor
Visitor
181 Views
Registered: ‎05-08-2020

     Hi. Thanks for your reply.

    After adopted the method metioned above (1.Filesystem Packages → base → util-linux → util-linux-mkfs  2. Filesystem Packages → base → e2fsprogs → e2fsprogs-mke2fs) and petalinux-build. It can execute the 'mkfs' command . But when I execute the order ‘mkfs -t ext4 /dev/nvmeOn1p1’, the petalinx command window just printf things ceaselessly. When I restart the board 'mkfs' command didn't work infect. Even if I use the software 'DiskGenius' to make a 80G EXT4 filesystem for NVMe SSD , the board still printf things ceaselessly, can't work normally. And if I remove the EXT4 filesystem for NVMe SSD, the board works normally again.

      I cut out a fragment of the ceaseless printing as follow:

y.png

     So what's the problem here. Looking forward for your reply.

0 Kudos
Reply
rfs613
Scholar
Scholar
135 Views
Registered: ‎05-28-2013

Hi, sorry for the delay in replying.

The message you are seeing indicates an unexpected condition related to locking of per-cpu csd resources. The failing function is flush_smp_call_function_queue() which calls csd_unlock() which is printing the warning message. It looks like csd_unlock() got called without a corresponding csd_lock(). Or perhaps csd->flags value got corrupted. Unfortunately I have no idea why this might be happening.

I suspect that mkfs command is not the root cause of the problem. Most likely, any access to the NVMe could trigger it. You could test reading or writing some data using "dd" command, or by reading the partition table with "fdisk" command.

Another thing you could try is to disable SMP, leaving only one CPU active.

0 Kudos
Reply
joancab
Scholar
Scholar
134 Views
Registered: ‎05-11-2015

I wrote this tutorial to use an NVMe SSD on the PCIe slot of an MYIR board that also has a zynq ultrascale+. I think it also applies to yours.

It took me a bit with the kernel configuration to make the SSD work. Before attempting mkfs you need to check if it's available (ls /dev/nvm*) 

https://github.com/Akteevy/UltraMYIR/tree/master/05%20NVMe%20SSD%20on%20PCIe

 

0 Kudos
Reply