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 - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 11-12-2007, 12:51 PM   #1
mikej_w
LQ Newbie
 
Registered: Nov 2007
Posts: 3

Rep: Reputation: 0
Wrat is the right way to updating file system?


Hello, and thanks for reading this query.

I am trying to determine the best way to upgrade software on my target. For development we can a use the command line shell of our bootloader program, but we need the unit to auto-update in the production version. Currently, we TFTP the 2 files (kernel
and filesystem) to ram, and then copy the ram files to the MTDs in flash. A reboot then brings us up on the new filesystem.

HOWEVER:

Apparently, the kernel and filesystem is expanded on-the-fly as needed by program operations into ram. So this is where I (think) I am running into a problem. Sometimes during the erase and programming of the MTDs, the target locks up; sometimes I get no warnings, sometimes I get

"Error -3 while decompressing!
94241eda(1899)->94657000(4096)"

To minimize the risk of loading code from the filesystem, I kill off the majority of the processes, although I am sure there are more I can kill. I don't think this is the answer to my problem.

I am developing with a MIPS processor with MMU, Linux 2.6.10 kernel, compiled with UClibc, and BusyBox v1.2.2.
My kernel is in mtd0, and mtd1 contains the filesystem, as CRAMFS.

1.) What is the "right" way to update my file system and kernel?
2.) Can I use switch_root or pivot_root to help this situation?

Thank you for your expert advice.

- Mike
 
Old 11-12-2007, 03:58 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
I'd divide it into two phases:
1. Downloading - getting the files and checking if they're correct (any variant of SHA or MD5, for instance). No upgrade phase it the above fails, for obvious reasons.
2. Upgrading - remove all not needed processes and the upgrade. If possible, switch to a special mode with no external applications, only the task to upgrade. Or use priorities to give the upgrade process the highest one and full access to the MTDs.
 
  


Reply

Tags
embedded, tftp



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
when does linux switch from realmode file system to protectedmode file system sitthar Linux - General 3 04-08-2006 08:05 AM
figuring out 'file system' and 'swap file system' types TrulyTessa Linux - Newbie 3 09-26-2005 06:46 PM
updating system... jsheffie Linux - Software 1 02-10-2005 01:06 PM
Updating BSD System ubuntu-addict *BSD 6 12-12-2004 09:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 03:18 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