Ticket #719 (closed defect: fixed)

Opened 12 years ago

Last modified 2 years ago

nand-erase of rootfs triggered by dfu-util incomplete?

Reported by: hns@… Owned by: werner@…
Priority: high Milestone:
Component: u-boot Version: unspecified
Severity: blocker Keywords:
Cc: buglog@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:


It took quite long to find the "bug" when flashing a different rootfs simply failed. No error messages from
dfu-util. Nothing. But the OpenMoko? system behaved strangely.

A small note finally said that one should go into the serial interface and do a nand erase * if the new
rootfs is smaller than the previous one

Why is this not automatically recognized by dfu-util, jffs2 or uboot (or whoever is responsible for it). What
to do if one does not have a serial interface?


pastedGraphic.png (8.0 KB) - added by hns@… 12 years ago.
screen shot without erasing NAND
2C2D369E-B8D6-4583-BA61-61891FB34D11-2407-0000021AD94A3665.png (99.6 KB) - added by hns@… 12 years ago.
new screenshot with missing icons

Change History

comment:1 Changed 12 years ago by werner@…

DFU actually does this sort of erasing. There was a bug that caused
some space not to be erased, but this was fixed a couple of weeks ago.

If you're experiencing this sort of problems with a recent u-boot build,
please describe in more detail what's happening.

Changed 12 years ago by hns@…

screen shot without erasing NAND

comment:2 Changed 12 years ago by hns@…

Here is the system config:

uBoot as shipped - 1.2.0-moko9_r8_.... May 19 2007)
dfu-util compiled from sources from http://svn.openmoko.org/trunk/src/host/dfu-util/ on Aug 02
2007 (appears to be revision 2601)
Result: flashing a different rootfs gives strange GUI effects (i.e. no icons displayed, fonts missing etc.)

This pages documents that others also had to manually erase NAND last week:

http://wiki.openmoko.org/wiki/Phase_1_Software_Testing "As this image is relatively small, make sure
you do a nand erase before flashing."

comment:3 Changed 12 years ago by hns@…

  • Severity changed from normal to blocker

Here another report that might be related to this issue from the device-owners list (does not appear in
the web archives yet).

If this bug is already fixed by a newer uboot version, this should be made public in the Wiki and by an
announcement on the lists...

Von: m@…
Betreff: Flashing Adventure (was Re: A few more First-Day issues)
Datum: 17. August 2007 12:17:14 MESZ
An: device-owners@…

Hi List,

This thread is a good point to post my experiences in the first days of
Neo1973 ownership.

The issue that I had is about flashing the device. I initially flashed
(with dfu) the *-moko10-* kernel while the rootfs holds modules for
*-moko11-*. The device booted ok but of course there were no modules to

So I flashed the *-moko11-* image to the nand partition reserved for the
kernel. And this is where the trouble started ...

Even though I flashed the *-moko11-* image and dfu reported no errors the
Neo still seemed to have the old *-moko10-* image in the nand. I flashed
the *-moko11-* image again, but no success. Now my idea was to
deliberately delete the nand with 'nand erase kernel' in u-boot.
Afterwards I flashed the *-moko11-* image once again with dfu.

Now when I switched on the Neo it stopped with a 'Bad magic number'
message an immediately powered down again (i.e. i guess the content of the
kernel partition got loaded in memory but could't get verified/executed or
similar). No reflashing of the kernel helped to get the Neo out of this
state, even though dfu reported successful flashing all the time (w. and
w/o executing a 'nand erase kernel' beforehand).

Well, I finally revived my Neo by putting the *-moko11-* image on the SD
card, and writing the image from there via memory into the nand as
described in

Trying to read the image into memory (ext2load mmc 0 0x32000000 uImage)
and then directly starting it from there (bootm 0x32000000) I got the
penguin and a blinking underscore curser. Doing the full procedure of
writing the kernel to nand after loading it into memory left me with a
bootable kernel again.

However, now the boot process stopped with a kernel panic because init
couldn't be started. So I guess now the rootfs was damaged/erased.
Reflashing it with the dfu tool resolved the problem and the Neo was
revived again.

Now I'm really curious what I did wrong and what the cause of my problems
was. Actually I have no clue and according to my understanding all steps I
took (1.) reflashing the kernel, 2.) loading a kernel into memory and
booting from memory) should have worked in the first place and what even
confuses me more was the need to reflash the rootfs, even though this
wasn't touched in the whole procedure (and yes, I always did a -a 3 in

Hope to learn something from you guys,



--- Peter Rasmussen <plr@…> wrote:
Then, when I will eventually be able to build a kernel, I am wondering:

is the only way to change to it, by loading it through the dfu-util, or
is it also possible by using a more "desktop like method", like building
a kernel, putting it in somewhere, eg. /boot, update /etc/lilo.conf, run
lilo and then reboot?
As someone already pointed out you can Boot from the SD card.

I doubt you'll get to the same process as you may be used to on a desktop
system, because on an embedded system it isn't simply a process of adding
a new
kernel image to the filesystem and pointing the bootloader at it. The
bootloader is configured to always boot the image that resides at a
location in the nand flash. Now, while you _could_ add more kernel images
the nand flash, you would need to repartition the flash each time you
one. And that isn't as simple as doing it on a disc based system either.

One thing that may be worth exploring is modding u-boot to support Flash
SD card, I don't think it does this just yet, but most of the code needed
to do
it will be there, then your reflash proceedure would be to upload the
files to
the SD card, and reboot into the u-boot menu and choose the appropriate
I think this is the closest to the familiar procedure as you are likely to

I am hoping to eventually be able to run everything natively on the
Neo1973, just like on a desktop. Hey, it runs 266MHz so it should have
plenty horsepower to build its own kernel :-)
Yes, the Neo does have the horsepower, but I would advise against trying
Compilation, especially large builds like Linux kernels, are very disc IO
intensive, and the one thing you should avoid on NAND flash based systems
disc IO intensive operations. They are slow and you will eventually wear
the NAND flash. Of course, you could try and configure it to use a RAM
drive as
a cache and scratchpad for all the temporary files.

comment:4 Changed 12 years ago by alphaone@…

  • Status changed from new to closed
  • Resolution set to duplicate

Revision 2601 is not sufficient. You need at least revision 2632 for this to work.

* This bug has been marked as a duplicate of 419 *

comment:5 Changed 12 years ago by hns@…

  • Status changed from closed to reopened
  • Resolution duplicate deleted

The Wiki says: please reflash uboot only if you know what to do. Therefore, nobody sees a reason to do
so until problems come up.

Please make clear to everybody in the Getting Started pages of the Wiki that they have to reflash a
newer uboot first.

Nevertheless, the issue appears to be not properly solved yet. I have now updated to uboot from 19
Aug (u-boot-gta01bv4-1.2.0+git8993e54b6f397973794f3d6f47d3b3c0c98dd4f6+svn20070819-

Flashing the 2007.08 image worked fine. Going back to an older one still has missing icons indicating a
broken rootfs. See new attached screen shot.

Changed 12 years ago by hns@…

new screenshot with missing icons

comment:6 Changed 12 years ago by laforge@…

  • Component changed from dfu-util to u-boot
  • Summary changed from dfu-util should be able to initiate a nand-erase to nand-erase of rootfs triggered by dfu-util incomplete?

i still don't believe the bug still exists, but I'm at least reassigning it to
the right category.

comment:7 Changed 12 years ago by alphaone@…

  • Status changed from reopened to closed
  • Resolution set to fixed

Seems the new uboot has fixed the issue:

Closing this bug again.

comment:8 Changed 2 years ago by JustDox

Cheap Propecia Online Uk <a href=http://zol1.xyz/cheap-zoloft.php>Cheap Zoloft</a> Rx Elife Viagra 130mg Generic <a href=http://zol1.xyz/purchase-zoloft.php>Purchase Zoloft</a> Kann Viagra Suchtig Machen Buy Lexapro Online Pharmacy <a href=http://inderal.ccrpdc.com/propranolol-online.php>Propranolol Online</a> Amoxicillin Causes Tinnutis Baclofene Luxembourg <a href=http://viag1.xyz>Buy Viagra</a> Bentyl In Internet Tablets 500mg Lasix No Prescription <a href=http://kama1.xyz/buy-kamagra-cheap.php>Buy Kamagra Cheap</a> Order Generic Finasteride Effects Of Mixing Keflex And Alcohol <a href=http://kama1.xyz/best-generic-kamagra.php>Best Generic Kamagra</a> Purchase Cialis Online Canada Generic Tab Provera Get Website Without A Script <a href=http://cial1.xyz/low-price-cialis.php>Low Price Cialis</a> Candadapharmacy24 Cvs Viagra 100mg Price 380 <a href=http://kama1.xyz/kamagra-online-buy.php>Kamagra Online Buy</a> Vigra Online Medicamento Cialis 20 Mg <a href=http://cial5mg.xyz/viagra-cialis.php>Viagra Cialis</a> Bactrim Online Generic Finasteride Internet Website <a href=http://cial5mg.xyz/brand-cialis-online.php>Brand Cialis Online</a> Viagra Generique (Sildenafil Citrate) 100mg Comprar Genericos Kamagra <a href=http://cial5mg.xyz/purchase-generic-cialis.php>Purchase Generic Cialis</a> Get Worldwide Fedex Shipping Bentyl Byclomine Tablets Cialis Ficha Tecnica <a href=http://strattera.ccrpdc.com/prices-strattera.php>Prices Strattera</a> Was Ist Viagra Einnahme Canadian...5mg Cialis <a href=http://cial1.xyz/order-generic-cialis.php>Order Generic Cialis</a> Buy Celebrex Celecoxib 200 Mg Viagra Prices Usa <a href=http://zol1.xyz/zoloft-no-prescription-fast.php>Zoloft No Prescription Fast</a> Cytotec Sans Ordonnance Pharmacie Sale Levaquin 250mg Medicine Pharmacy Aberdeen <a href=http://zol1.xyz/where-to-buy-zoloft.php>Where To Buy Zoloft</a> Nolvadex Vente Cealis 30 Tablet Trial <a href=http://cial1.xyz/generic-cialis-usa.php>Generic Cialis Usa</a> Levitra Con Otros Medicamentos Cialis 10 Mg Preise <a href=http://kama1.xyz/price-generic-kamagra.php>Price Generic Kamagra</a> Amoxicillin Side Effects In Children Kamagra 100mg Oral <a href=http://propecia.ccrpdc.com/propecia-uk.php>Propecia Uk</a> Viagra Oral Dutasteride Where To Buy By Money Order Shop <a href=http://kama1.xyz/kamagra-pills.php>Kamagra Pills</a> Amoxil Ensemble

Note: See TracTickets for help on using tickets.