Copy file to SD card from internal flash.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Copy file to SD card from internal flash.
# 43  
Old 09-28-2011
I think I'm in!! The erasesize seems to be 256 bytes.

---------- Post updated at 09:22 AM ---------- Previous update was at 09:17 AM ----------

For the record, here's exactly what I did to get in: (needs linux of course)

Code:
# Create device node manually.  Once mtdblock is loaded,
# this will be our fake flash ROM device.
$ mknod /tmp/mtdblock0 b 31 0
# Load the kernel drivers you'll need
$ modprobe mtdblock
$ modprobe jffs2
# This driver needs to be told what size and erasesize.
# 8192 is the size of the block you gave me, the ECC-free version.
# 256 was just a guess.
$ modprobe mtdram total_size=8192 erase_size=256
# Copy it into the fake flash ROM
$ dd if=K9G8G08U0M_Samsung_1GB_NAND_Config.ini_block_JFFS_noECC.bin of=/tmp/mtdblock0
# Mount it as a filesystem!
$ mount -t jffs2 /tmp/mtdblock0 ./mnt/
# Silence means it thinks it worked.
$ ls -l mnt
total 2
-rw-r--r-- 1 root root 476 Oct 31  2010 Config.ini
-rw-r--r-- 1 root root  18 Oct 31  2010 MAC
-rw-r--r-- 1 root root   8 Oct 31  2010 can_unique_id
# Whoa, there's things there!
$ cat mnt/Config.ini
[General]
INIVersion=2.0

[Product]
ProductId=HDS10
ProductRegion=AMER
FinalAssyPartNum=003-8088-00
Description=HDS-10 with US Background

[Mapping]
HaveBackground=True
HaveLakeInsight=False
HaveNauticInsight=False
HaveUSInsight=False
HaveWorldBackground=False
HaveSonarOnly=False

[ApplicationDefaults]
DefaultChartProvider=Navico
DefaultDateFormat=MM/dd/yyyy
DefaultTimeFormat=12hr
DefaultTimeZone=-06:00
DefaultUnits=Imperial
DefaultVideoFormat=N/A
$

And you want AMER changed to RAM, yes?

Last edited by Corona688; 09-28-2011 at 12:41 PM..
# 44  
Old 09-28-2011
Reviewing the thread I see you want ROM, not RAM. Guess I've got memory on the brain Smilie

If this worked then the attached file is the noecc dump with AMER changed to ROM. I just edited the file with an ordinary UNIX text editor, unmounted the filesystem, and dumped the contents of the fake flash back out. The ROM dumps are definitely different.

You may have to regenerate the ECC characters somehow, not quite sure how.

Last edited by Corona688; 09-28-2011 at 07:03 PM..
# 45  
Old 09-28-2011
Whow!!!! I going to program some flash !!! Cant wait any more Smilie

Ooops Smilie I need ROW, not ROM Smilie

And if it is not problem for you:

Code:
[Mapping] 
HaveBackground=False 
HaveLakeInsight=False
HaveNauticInsight=False
HaveUSInsight=False 
HaveWorldBackground=True
HaveSonarOnly=False


Last edited by PouchX; 09-28-2011 at 03:40 PM..
# 46  
Old 09-28-2011
Fixed.

Last edited by Corona688; 09-28-2011 at 07:03 PM..
# 47  
Old 09-28-2011
When I compare ROM and ROW version in WinHEX, I see no differences.
Also. Only one byte is different comparing to original (AMER) Config.ini.

Is it ok?
# 48  
Old 09-28-2011
Obviously not. Smilie The text is compressed, so one byte can make a huge difference, but I'm beginning to doubt that I have the right method for extracting the images.
# 49  
Old 09-28-2011
I think extracting is ok. Problem is with pack it again. Am I right?

Last edited by PouchX; 09-28-2011 at 04:47 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

PowerHA; Import flash copy of VG?

Hey guys, wondering if this is possible to accomplish. PowerHA SystemMirror7.1 active/passive cluster. Restored a clustered system in test and upgraded to the latest version of PowerHA. Things are working great. However in the interest of time during cut over to the new system, I was hoping to... (4 Replies)
Discussion started by: j_aix
4 Replies

2. Shell Programming and Scripting

Copy file and evaluate its internal variables

Hi I have been trying to figure a way to copy a file, (a template), that has internal variables. Using the values as defined for those variables in another script. So a file called x - #! /bin/bash D=aa.$X.bb And file y #! /bin/bash X=6 while read line do eval echo... (5 Replies)
Discussion started by: steadyonabix
5 Replies

3. SuSE

In KDE Copy completed not always mean files were copied to USB flash drive - how to fix it?

I have noticed that when I copy files to flash disk and in UI I see message copy completed in notification area on task bar, usually copy is not completed. So, if I eject the media I loose data. It is very serious problem because may cause loss of valuable and even critical data. Moreover, when... (2 Replies)
Discussion started by: netwalker
2 Replies

4. Shell Programming and Scripting

File splitting, naming file according to internal field

Hi All, I have a rather stange set of requirements that I'm hoping someone here could help me with. We receive a file that is actually a concatenation of 4 files (don't believe this would change, but ideally the solution would handle n files). The super-file looks like:... (7 Replies)
Discussion started by: Leedor
7 Replies

5. AIX

Flash Copy Problem, has any one else seen this?

Around a month ago we suffered a prolonged power outage, due to circumstances the servers and storage arrays were still in use when the UPS dropped. One of the servers was running a flash copy on the database while batch processing had commenced. This is the only server that suffered any further... (2 Replies)
Discussion started by: gull04
2 Replies

6. Ubuntu

Format a compact flash card in Ubuntu

I need some assistance formatting a compact flash card in Ubtunu. I connect up the CF card through a USB reader. Ubuntu recognizes the reader usb device, but does not "mount" the CF card as a device. The CF card was formatted in FAT32 format. Any help would be greatly appreciated.... (3 Replies)
Discussion started by: genesis211
3 Replies

7. UNIX for Advanced & Expert Users

Sun internal disks and HBA card

I have a V490 that has couple internal disks attached to the same dual-port HBA card that I'm planning attach to the SAN for additional storage. Would I sacrifice performance if I use the same HBA? Is it better to throw in a new HBA instead? (1 Reply)
Discussion started by: kiem
1 Replies

8. Solaris

Install Solaris 10 with an internal StorageTek SAS HBA Raid card

Hi all i would like to ask some suggests about my next job! I have to install a new Sun Netra T5220, with an additional internal StorageTek SAS HBA Raid. The problem come in if every disk is now controlled by the HBA, how can I install the OS? No disk is being detected by the OS. SAS card... (2 Replies)
Discussion started by: kakabobo
2 Replies

9. UNIX for Advanced & Expert Users

Forwarding internal internet packets to internal webserver using iptables

Hi, I need to redirect internal internet requests to a auth client site siting on the gateway. Currently users that are authenticated to access the internet have there mac address listed in the FORWARD chain. All other users need to be redirected to a internal site for authentication. Can... (1 Reply)
Discussion started by: mshindo
1 Replies

10. Solaris

istall sas raid HBA internal card

I need to install a raid HBA internal card on a T5240. The reason is I have more drives and the current mother board controller does not support more than 4 drives. My question is I have raidctl set up on current drives. If I install new HBA card do I have to delete current raidctl and... (3 Replies)
Discussion started by: photon
3 Replies
Login or Register to Ask a Question