Find the answer to your Linux question:
Results 1 to 8 of 8
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Linux Kernel 2.6.12 on ARM 9 Board - for S3C2440 microcontroller

    Hello everyone,

    My name is "USMAN" and I am from KHI, PAKISTAN. I am currently working as a "research and developer engineer - senior software engineer for embedded systems ( real time computing) in LINUX environment".

    Guys, this is my first post to this forum; therefore I can foresee and expect that any mistake ,technical or non-technical will be specifically ignored and understood.

    Currently I am working on embedded Linux 2.6.12 on an ARM 9 board , which is using a S3C2440 micro controller.

    There are a few queries and specific ambiguities/anomalies that I would want to discuss and state here.

    1. Using FTP, whenever we are trying to move, copy or transport any file remotely from our own WINDOWS PC terminal machine to the ARM 9 board and if that file is already existent on the ARM 9 board, then it is not over-written or replaced, but an another copy of that file having same name, all the same attributes etc is created. And when we delete any one of the files ( the FTP one or the already existent/copy one); both of the files are then deleted.

    Is this issue related to the file system of Linux on ARM board? Or the compatibility issue of ARM board with Windows file system?
    Or we need to delete the old file, before copying a new one?

    2. We need to re spawn/restart/fork our application process whenever it crashes or abnormally terminates using an automated method. I think the best way would be to use "/etc/inittab file". How do we create this file in ARM 9 Linux environment? Can you please list the steps to create it and where do we have to put this file then? Meaning in /etc/ folder or putting it some init-scripts like rcS, rc.touch or rc.mouse?

    3. Whenever we are executing the following piece of code in our application:

    sprintf(xfile,"/cdu/mplayer %s",filename);

    ,there are zombie processes for "mplayer" utility being created in the environment. What could be the reason for this?

    Is this the kernel version we are using on an ARM 9 board: kernel 2.6.12-h1940

    4. Can anyone please recommend any complete in-depth step by step guide for setting up LINUX environment and application development using C on an ARM board?

    Meaning as to how the IP can be defined in ARM 9 linux?
    1) How the file system works?
    2) How to enable the functionality and working of /etc/inittab file in ARM 9 linux?
    3) What pre-requisite requirements, cautionary steps or suitable/appropriate steps need to be adapted before invoking a process as a daemon ( to run in the background) from a script file?

    Above are just some of the examples. I mean to say all and everything related to linux and the environment itself on ARM board.

    I would also want to inform that the date and time of ARM 9 board was set to : January 1st, 1970 UTC. I have now changed it to the current date and time , which is same as the WINDOWS PC terminal machine too. Could this be the reason for issue ##1?

    Will be very much thankful for everyone's support, timely assistance and feedback to the above given queries.

    Looking forward for a reply from your people's side.


  2. #2
    Guys still waiting for any reply or suggestion.

    I hope I have posted on the right form of " Other Distributions".

    Please do correct me if I am wrong.

  3. #3

    be patient?

    Quote Originally Posted by USMAN2011 View Post
    Guys still waiting for any reply or suggestion.
    USMAN, a very technical question. I have no real idea how to answer it, except to say that a lot of clever, UN*X savvy people hang out here, you might just need to be patient while waiting for a helpful reply to your question, since it will take someone who knows how to answer it, and who has the time and inclination, to happen to stumble across your post before you can expect an answer you can use.

    The only thing I can think of would be, for my negligibly valuable two cents, would be have you tried a different player like Banshee? RhythmBox can occasionally be a pain.

  4. $spacer_open
  5. #4
    Actually, I might have an insight to offer on the copying issue. I am no Linux guru, but... in Linux, (and what I'm about to state might only apply to EXT3 & EXT4 filesystems) a file can be said to be the equivalent of its inode. The inode is essentially a serial number for a file. Every file SHOULD have a unique inode number. HOWEVER, hard links (not to be confused with symbolic, or symlinks, which are created by passing "ln" the "-s" option) muddy the waters a bit here. If, instead of copying the file from your Windows disk, (and I'll refrain here from using funny/pejorative alternate spellings for clarity) you have created a HARD LINK, some GNU/Linux utilities used for handling files may treat some commands given regarding the link as though you were telling it to operate on the original, actual file itself, rather than on the LINK itself, (or on BOTH!) unless you pass parameters to the command specifying you meant the LINK, not the TARGET.

    My understanding of this is admittedly imperfect, and may not have anything to do with your problem, but you might want to "man ln" just in case, and read up on that to see if THAT is what's going on. ALSO, you can use the "ls" command, passing it the "-i" parameter to have it list files preceded by their "index number" (or inode) to see if the file you created by copying/moving and the original are truly unique, or if one is a hard link to the other.

    Try " info coreutils 'cp invocation' " and look in the subsection 'links'. Also, the " info coreutils 'ln invocation' might be more informative too.

    Also, you might try specifying " --one-file-system " (by alias, for instance, by adding in your .bash_profile, or .bash_rc or wherever alias's go now, something like " alias rm='rm --one-file-system' " to prevent the rm command from traversing multiple (bind-bound) file systems. I am not real sure on this one, but portions of file systems can be mounted to directories much the way physical drives can, so some weird stuff is possible, and I can only hope that if I haven't already given you an idea where to look, someone else will come along who knows this stuff better than I do!

    Of course, I could be completely wrong about all this. Hope this has helped in some way. I had to go back and look some of this stuff up. Good luck!

  6. #5

    One other thing

    I am not real familiar with FTP, have you tried, (just to see if the FTP itself is part of the problem) using a thumb/USB/removable hard disk to move the files?

    I have never had any problem with moving files between msdosfs or ntfs partitions and any Linux partition when doing it from the Linux OS, (it must be done this way, I think, because of course, Windows can't see or work with the Linux partitions... no that would make interoperability too easy!)

    I just use an external drive, copy all the files from the Win disk to the external, then again to the Linux system, and I've never run into a problem. If you're having to do it live, with one computer running Linux and the other Windows, while both are running... I'm not sure that's even possible... maybe Samba might help, I think that's something that can make Windows boxes talk to Linux ones, but I've never used Samba either. Again, best of luck!

  7. #6
    Hey Hallux,
    Thank you so much for your reply, help and assistance.
    I had the feeling and really believed in it that there would be helpful people on this board. Had firm belief that myself and my team can be put in the right direction , if any suggestion or advice is given.

    Thanks again!

    Well there is some good news and bad news.

    Actually during all this morning time (PKST - Pakistan Standard time), we have been able to pin-point the issue and know the rationale reason for its happening too. .

    Whenever we were rebooting the system 3 to 5 times, the operating system kernel was erasing, deleting, and even at times corrupting some of the files. These files were actually those which were being audio played by our application.

    Let me a brief a little to you about it in step-by-step format:

    1)These files are actually sound files in .wav WAVE format , played by our application.

    2)Our application is actually placed in a folder-tree hierarchy: /ECF/EQ on the root path.

    3)The sound files are placed in the folder hierarchy: /ECF/EQ/cdu_voice on the root path.

    4)The name of our application is “main_screen_cdu”, which is compiled and ported to ARM board using arm-linux-gcc compiler.

    5)Our application is playing these sound files , by invoking a daemon process in background.

    6)This daemon process is actually the “play” executable that was given to us from the vendor. We have renamed it from “play” to “mplayer” for our own usage at the application side.

    7)Also whenever we are invoking the “mplayer” process from our application using the background daemon style. Meaning [process-name] &, the mplayer never really dies. Meaning the process remains as a zombie process.

    We then later found out that the file system we are using is actually: YAFFS2 .
    Whenever we booted linux, there was an error message being shown on the screen related to yaffs tragedy:

    yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.

    Files that were erased/deleted /removed after reboot were being move to the "lost+found" directory on root path.

    Then the VENDOR for the ARM 9 board informed us that we will have to integrate any new files ( which is copied, moved or transferred from any machine or O.S - WINDOWS/LINUX) into the filesystem using its make tool: mkyaffs2image. He informed us that it is a "bug" of the yaffs2 filesystem.?

    When a new file is found, the yaffs2 filesystem regard it as the "yaffs2" format and try to resolve in this way, while if the file is actually not in yaffs2 format, the filesystem shall not be able to read it and then regard it as junk file and move it to "Lost+Found"

    Now what I want to know is that is there a way to convert from YAFFS2 to ext2 OR ext3 OR any other file system - that does not has these type of issues. But the only restriction we are facing currently: hardware NAND flash s being used.

    Please help me out.

    Thank you once again.

    Best Regards.

  8. #7
    Meaning what I want to quote is:

    Is there a way to "turn off" this behavior of YAFFS2 and let it accept/integrate any file freely which is transferred to it? Or at least NOT SCAN the entire file system when the system boots?

    Thanks for all help, but then again we are now badly stuck at this point.


  9. #8
    'fraid I can't help you there... I am totally unfamiliar with the application and the file system... it sounds like you're using some embedded form of the OS, and what familiarity I have is with ordinary desktop Linux. As for switching from one file system to another, the only thing I can say is that file systems are (I think) mutually exclusive. The file system can be looked at as a guide to which 1's and which 0's (or the magnetic equivalent on a physical drive... however they're stored on flash I really don't know) at which physical locations on the disc belong to which files. To switch file systems, you'd have to somehow have (or make...) a utility that would over-write the old file system bit by bit, whilst simultaneously rewriting it in free space on the same device, without losing or corrupting anything. The alternative would be to remap the cylinders, heads, sectors, etc., without moving the data, which would be, I would think, impossible.

    You can think of it as trying to navigate the streets of a city, driving around in a van with the windows all painted black, able to know only your speed and how long you've been traveling, and in what direction relative to your start point. Ordinarily, this can be done, done safely, etc., IF THE MAP IS CORRECT. If you change the map to that of a completely different city... well, you're going to crash your van into a building, run someone over, drive over the edge of a cliff, into a river, etc. When you move to a new city, with a new street/building layout, you need to be able to navigate which means having an accurate map. So as far as migrating to a new file system, I think your safest bet would be, again, copy the files to an external device, reformat, then copy them back.

    I am still not clear on something though... are we talking about a single device here, or is this a prototype for a computer you/your organization are looking to produce? If it's a prototype, I really don't know what to say, it's way out of my domain. I have LinuxMint on my computer. My music files are stored (mostly MP3 and some OGG's, which are way easier to store, size-wise, than the equivalent PCM/.wav files would be, for the same duration) in a directory called /home/hallux/Music/[artist name]/[album title]/ on a logical device (I think it's /dev/sda4) to which /home is mounted. I use ext4 for my file system. I understand it provides a good environment for files under Linux, and allows the use of features that such alternative file systems associated with other OS's, such as msdosfs and ntfs, would not allow.

    But anyway... the only other thing I can think of is... I believe Linux has a utility called mplayer, so I would just want to make sure if you've renamed something else to mplayer, that you don't also have the regular mplayer package installed, as that could cause some confusion... beyond that, I think I've told you all I can think of, and I wish you the very best of luck, hopefully someone who knows more than I do about this stuff will cruise through this thread and be able to give you more specific info. I really, for example, don't know what an Arm-9 board is. Arm is a type of processor, right? (That should tell you how little I know about it.) Anyway, all the best.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts