LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-21-2019, 05:02 AM   #1
exds75
LQ Newbie
 
Registered: Aug 2019
Posts: 2

Rep: Reputation: Disabled
how to update mounted sd card file directory in Linux ?


Hi Linux,

I am working on zynq AMP project (linux on cpu0 + bare metal app on cpu1).

bare-metal app on cpu1 realizes shell utilities (ls / rm / cat / write file / pwd) for sd card.
Linux on cpu0 can also mount sd card with

# mount /dev/mmcblk0p1 /mnt/
# ls /mnt


However, the new file created by cpu1 does not show in linux on cpu0.

For example, there are 7 files on sd card. After system boot up, cpu1 creates 1 new file (i.e., name aaaa.1234), then "ls" on cpu1 shows total 8 files. Then mount sd card in linux on cpu0, "ls" on cpu0 only shows original 7 files.

Further,I create a new file in linux on cpu0 (i.e., name bbbb.5678, then "ls" on cpu0 shows total 8 files). Then I try "ls" 10 more times on cpu1, which still shows total 8 files, but aaaa.1234 has been replaced by bbbb.5678> In other words, cpu1 has updated file directory and synchronized to cpu0, though aaaa.1234 lost.


My question is how to force linux on cpu0 update file directory and synchronized to cpu1 to show aaaa.1234 created by cpu1.

Please advise, thanks in advance.

Mike

Last edited by exds75; 08-21-2019 at 05:37 AM. Reason: missed portion
 
Old 08-21-2019, 05:22 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Quote:
Originally Posted by exds75 View Post
# mount /dev/mmcblk0p1 /mnt/
# ls
If you did solely this, you didn't change to /mnt which is the mount point.
 
Old 08-21-2019, 05:33 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,146

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
Only cluster-aware filesystems can be concurrently updated on disparate systems. You don't say what f/s you are using, but I'd guess it's one of the "standard" linux ones. You cannot do what you did without breaking things - maybe the entire f/s itself.

Without knowing anything, I'd say you need to do register a messaging channel between the 2 environments and use the Linux system to do all file updates. How you then read the updates from the bare-metal side is your concern.
 
Old 08-21-2019, 05:56 AM   #4
exds75
LQ Newbie
 
Registered: Aug 2019
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for quick reply.

Rootfs was generated according to

https://xilinx-wiki.atlassian.net/wi...odify+a+Rootfs

arm_ramdisk.image.gz ==> uramdisk.image.gz

mkimage -A arm -T ramdisk -C gzip -d arm_ramdisk.image.gz uramdisk.image.gz

system boots from qspi memory (BOOT.bin + uImage + devicetree.dtb + uramdisk.image.gz).

Problem is that data was collected by bare-metal app and then stored in files. I expect Linux to take the data file(s) and draw picture/curve ~~


Quote:
Originally Posted by syg00 View Post
Only cluster-aware filesystems can be concurrently updated on disparate systems. You don't say what f/s you are using, but I'd guess it's one of the "standard" linux ones. You cannot do what you did without breaking things - maybe the entire f/s itself.

Without knowing anything, I'd say you need to do register a messaging channel between the 2 environments and use the Linux system to do all file updates. How you then read the updates from the bare-metal side is your concern.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is the disk partition mounted or not mounted? Kenarkies Linux - Kernel 3 01-16-2010 02:06 AM
Mounted but not mounted jmoschetti45 Linux - Hardware 8 12-14-2009 08:05 PM
HAL daemon does not reconize a mounted partition as mounted 888m Slackware 4 07-30-2007 12:58 PM
samba: linux mounted share = choppy playback, windows mounted share = smooth kleptophobiac Linux - Software 2 04-10-2005 08:23 AM
NFS: a mounted to b, b mounted to c, c can't read a? Steve Cronje Linux - Networking 9 10-25-2004 09:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration