public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] How to restore NVRAM on MTD partition from backup
       [not found] <900150360.1783904.1513775998046.ref@mail.yahoo.com>
@ 2017-12-20 13:19 ` A.W.C.
  2017-12-22 21:58   ` Lukasz Majewski
  0 siblings, 1 reply; 4+ messages in thread
From: A.W.C. @ 2017-12-20 13:19 UTC (permalink / raw)
  To: u-boot

Hi,

U-Boot 2009.03 on custom board. How to restore NVRAM on MTD partition from backup use U-boot memory commands, by uploading backup over serial line? (kermit mode or ymodem mode)
NAND flash type.

Regards,
Alex

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] How to restore NVRAM on MTD partition from backup
  2017-12-20 13:19 ` A.W.C.
@ 2017-12-22 21:58   ` Lukasz Majewski
  0 siblings, 0 replies; 4+ messages in thread
From: Lukasz Majewski @ 2017-12-22 21:58 UTC (permalink / raw)
  To: u-boot

On Wed, 20 Dec 2017 13:19:58 +0000 (UTC)
"A.W.C." <bluestream@ymail.com> wrote:

> Hi,
> 
> U-Boot 2009.03 on custom board. 

Nice :-)

I assume that it is not possible to move to newer one?

>How to restore NVRAM on MTD partition
> from backup use U-boot memory commands, by uploading backup over
> serial line? (kermit mode or ymodem mode) NAND flash type.

It depends on what commands do you have?

Yes, it would be best to use load command to get the data via serial
line, store it in RAM and then flash it on persistent memory.

How do you access NVRAM? (Is it really this memory - not some Parallel
NAND, SPI-NOR, OneNAND)?

If it has a custom driver ,then you may want to look for 'cp' or other
command.

> 
> Regards,
> Alex
> 
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot



Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171222/a2479f6e/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] How to restore NVRAM on MTD partition from backup
       [not found] <1820015694.5687163.1514494008039.ref@mail.yahoo.com>
@ 2017-12-28 20:46 ` A.W.C.
  2017-12-28 22:09   ` Lukasz Majewski
  0 siblings, 1 reply; 4+ messages in thread
From: A.W.C. @ 2017-12-28 20:46 UTC (permalink / raw)
  To: u-boot

Missed that mail :(

it's old board, I have no source code for that customized version of bootloader.

I have commands 
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loady   - load binary file over serial line (ymodem mode)

NAND device: Manufacturer ID: 0xad, Chip ID: 0x75 (Hynix NAND 32MiB 3,3V 8-bit)
The NVRAM is MTD partition on "gen_nand":
0x01f00000-0x01f80000 : "NVRAM"
dev:    size   erasesize  name
mtd9: 00080000 00004000 "NVRAM"

The cp command is available in bootloader

# help cp
cp [.b, .w, .l] source target count
    - copy memory




Regards,
Alex
--------------------------------------------
On Fri, 12/22/17, Lukasz Majewski <lukma@denx.de> wrote:

 Subject: Re: [U-Boot] How to restore NVRAM on MTD partition from backup
 To: "A.W.C." <bluestream@ymail.com>
 Cc: u-boot at lists.denx.de
 Date: Friday, December 22, 2017, 11:58 PM
 
 On Wed, 20 Dec 2017 13:19:58
 +0000 (UTC)
 "A.W.C." <bluestream@ymail.com>
 wrote:
 
 > Hi,
 > 
 > U-Boot 2009.03 on
 custom board. 
 
 Nice :-)
 
 I assume that it is not
 possible to move to newer one?
 
 >How to restore NVRAM on MTD partition
 > from backup use U-boot memory commands, by
 uploading backup over
 > serial line?
 (kermit mode or ymodem mode) NAND flash type.
 
 It depends on what commands do
 you have?
 
 Yes, it would be
 best to use load command to get the data via serial
 line, store it in RAM and then flash it on
 persistent memory.
 
 How do
 you access NVRAM? (Is it really this memory - not some
 Parallel
 NAND, SPI-NOR, OneNAND)?
 
 If it has a custom driver
 ,then you may want to look for 'cp' or other
 command.
 
 >
 
 > Regards,
 >
 Alex
 > 
 > 
 >
 _______________________________________________
 > U-Boot mailing list
 >
 U-Boot at lists.denx.de
 > https://lists.denx.de/listinfo/u-boot
 
 
 
 Best regards,
 
 Lukasz Majewski
 
 --
 
 DENX
 Software Engineering GmbH,      Managing Director:
 Wolfgang Denk
 HRB 165235 Munich, Office:
 Kirchenstr.5, D-82194 Groebenzell, Germany
 Phone: (+49)-8142-66989-10 Fax:
 (+49)-8142-66989-80 Email: wd at denx.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] How to restore NVRAM on MTD partition from backup
  2017-12-28 20:46 ` [U-Boot] How to restore NVRAM on MTD partition from backup A.W.C.
@ 2017-12-28 22:09   ` Lukasz Majewski
  0 siblings, 0 replies; 4+ messages in thread
From: Lukasz Majewski @ 2017-12-28 22:09 UTC (permalink / raw)
  To: u-boot

Hi,

> Missed that mail :(
> 
> it's old board, I have no source code for that customized version of
> bootloader.
> 
> I have commands 
> loadb   - load binary file over serial line (kermit mode)
> loads   - load S-Record file over serial line
> loady   - load binary file over serial line (ymodem mode)

You should be able to use kermit to upload new data to RAM (to some
address).

> 
> NAND device: Manufacturer ID: 0xad, Chip ID: 0x75 (Hynix NAND 32MiB
> 3,3V 8-bit) The NVRAM is MTD partition on "gen_nand":
> 0x01f00000-0x01f80000 : "NVRAM"
> dev:    size   erasesize  name
> mtd9: 00080000 00004000 "NVRAM"

So the NVRAM is a mtd partition for NAND.

What is the output of mtdparts command?

> 
> The cp command is available in bootloader
> 
> # help cp
> cp [.b, .w, .l] source target count
>     - copy memory

It should be enough to use "nand" commands:
https://www.denx.de/wiki/DULG/UBootCmdGroupNand

Erase, then write the mtd9 partition.

> 
> 
> 
> 
> Regards,
> Alex
> --------------------------------------------
> On Fri, 12/22/17, Lukasz Majewski <lukma@denx.de> wrote:
> 
>  Subject: Re: [U-Boot] How to restore NVRAM on MTD partition from
> backup To: "A.W.C." <bluestream@ymail.com>
>  Cc: u-boot at lists.denx.de
>  Date: Friday, December 22, 2017, 11:58 PM
>  
>  On Wed, 20 Dec 2017 13:19:58
>  +0000 (UTC)
>  "A.W.C." <bluestream@ymail.com>
>  wrote:
>  
>  > Hi,
>  > 
>  > U-Boot 2009.03 on  
>  custom board. 
>  
>  Nice :-)
>  
>  I assume that it is not
>  possible to move to newer one?
>  
>  >How to restore NVRAM on MTD partition
>  > from backup use U-boot memory commands, by  
>  uploading backup over
>  > serial line?  
>  (kermit mode or ymodem mode) NAND flash type.
>  
>  It depends on what commands do
>  you have?
>  
>  Yes, it would be
>  best to use load command to get the data via serial
>  line, store it in RAM and then flash it on
>  persistent memory.
>  
>  How do
>  you access NVRAM? (Is it really this memory - not some
>  Parallel
>  NAND, SPI-NOR, OneNAND)?
>  
>  If it has a custom driver
>  ,then you may want to look for 'cp' or other
>  command.
>  
>  >  
>  
>  > Regards,
>  >  
>  Alex
>  > 
>  > 
>  >  
>  _______________________________________________
>  > U-Boot mailing list
>  >  
>  U-Boot at lists.denx.de
>  > https://lists.denx.de/listinfo/u-boot  
>  
>  
>  
>  Best regards,
>  
>  Lukasz Majewski
>  
>  --
>  
>  DENX
>  Software Engineering GmbH,      Managing Director:
>  Wolfgang Denk
>  HRB 165235 Munich, Office:
>  Kirchenstr.5, D-82194 Groebenzell, Germany
>  Phone: (+49)-8142-66989-10 Fax:
>  (+49)-8142-66989-80 Email: wd at denx.de



Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171228/19b0091a/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-12-28 22:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1820015694.5687163.1514494008039.ref@mail.yahoo.com>
2017-12-28 20:46 ` [U-Boot] How to restore NVRAM on MTD partition from backup A.W.C.
2017-12-28 22:09   ` Lukasz Majewski
     [not found] <900150360.1783904.1513775998046.ref@mail.yahoo.com>
2017-12-20 13:19 ` A.W.C.
2017-12-22 21:58   ` Lukasz Majewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox