public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Matteo Facchinetti <matteo.facchinetti@sirius-es.it>
To: u-boot@lists.denx.de
Subject: [U-Boot] add usb_system_autoupdate command.
Date: Mon, 17 Nov 2008 14:50:24 +0100	[thread overview]
Message-ID: <492176A0.7040101@sirius-es.it> (raw)
In-Reply-To: <491FE238.8050300@coritel.it>

Hi Marco,

I looked updater.c and and I take that code as example.

Well,
I removed all function as same as do_... (do_fat_fsload, do_protect, 
do_flerase, do_mem_cp).
In this way, I could remove also strcpy() and sprintf() needed to made 
their parameters and the result is that I cleaned and emproved all code.

Now all works correctly.
I think that the rewrite of the code, indirectly solve some bugs of 
memory corruption.

In attach, the code...
and if anyone try it, I'm interesting to feedback or opinions.

Thanks at all.
Matteo.




Marco wrote:
> Hi Matteo,
>
> in my opinion you should follow the "philosophy" of updater.c under the
> tools folder to erase the flash. This command is very interesting, let
> me know if you fix your problem.
>
> Regards,
>
> Marco
>
> Matteo Facchinetti ha scritto:
>   
>> Hi,
>>
>> I have add the possibility to automatic update entire flash using a USB
>> pendrive.
>>
>> To make it, need the following steps:
>> 1) insert usb pendrive. In pendrive must be present these files:
>> install.dat and the files we want to copy.
>> 2) from uboot console: => usb_system_autoupdate
>> 3) the system update start, reading information from install.dat file.
>>
>> The install.dat file raws has this syntax:
>> <file_type> "<file_name>" <star_flash_addr_partition>
>> <end_flash_addr_partition>
>>
>> file_type values: kernel, uboot, fdt, rootfs.
>>
>> In attachment there's an example of install.dat and the source code.
>>
>> Now using it on my system (mpc5200, uboot_1.3.1) but there's a problem
>> that I can't fix:
>> if try to update uboot partition, it freeze in line 211 when call
>> do_flerase().
>>
>> debugging I can see that it freeze in:
>> cmd_flash.c
>> 434:     printf ("Erased %d sectors\n", erased);
>> after uboot partition erasing.
>>
>>
>> Can you help me?
>>
>>
>> Thanks in advance.
>> Matteo Facchinetti
>>
>>
>>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>>     
>
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmd_usb_system_autoupdate.c
Type: text/x-csrc
Size: 6692 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20081117/6e6e406a/attachment.c 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: install.dat
Type: chemical/x-mopac-input
Size: 185 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20081117/6e6e406a/attachment.dat 

  reply	other threads:[~2008-11-17 13:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-15 16:28 [U-Boot] add usb_system_autoupdate command Matteo Facchinetti
2008-11-16  8:39 ` Marco Cavallini
2008-11-16  9:04 ` Marco
2008-11-17 13:50   ` Matteo Facchinetti [this message]
2008-12-09 23:06     ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=492176A0.7040101@sirius-es.it \
    --to=matteo.facchinetti@sirius-es.it \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox