Updating YAFFS2 RootFS
Hi,
I'm looking to update the linux yaffs2 rootfs from U-Boot (2009-06). The whole update will be:
* Take the rootfs.tgz from the yaffs2 "image" partition (ok,
with yrdm / ywrm) for update or restore purposes.
* Unpack it (maybe gunzip)
* Update the Linux YAFFS2 RootFS (how ?)
After a quick search (mail list, code) seems that:
* No native support for this operation in u-boot.
* Some "user" patch files exists (out of date ?)
So, my questions:
* Is the situation really like that ?
* Which is the actual patch file ?
* What about the future for YAFFS2 in U-Boot ? Is there any
update planned ?
Regards
David
Dear "David Andrey",
Quoted 3 lines · In message <[email protected]> you wrote:
I'm looking to update the linux yaffs2 rootfs from U-Boot (2009-06). The whole update will be:
Are you positively sure you have to do this in U-Boot? Keep in mind that U-Boot is a boot loader, so don't throw tasks on it that require an operating system.
Quoted 2 lines
* Take the rootfs.tgz from the yaffs2 "image" partition (ok,
with yrdm / ywrm) for update or restore purposes.
OK - but... what for?
Quoted 1 line
* Unpack it (maybe gunzip)
Why? And: why in U-Boot?
Quoted 1 line
* Update the Linux YAFFS2 RootFS (how ?)
Just write a new image to another, alternative partition.
Quoted 3 lines
After a quick search (mail list, code) seems that:
* No native support for this operation in u-boot.
What exactly is "this operation" here, which you are missing support for?
Quoted 1 line
* Some "user" patch files exists (out of date ?)
Which sort of patches are you referring to?
Quoted 1 line
* Is the situation really like that ?
Sorry, I don;t undewrstand what exactly you mean by "the situation" ?
Quoted 1 line
* Which is the actual patch file ?
What do you mean?
Quoted 2 lines
* What about the future for YAFFS2 in U-Boot ? Is there any
update planned ?
YAFFS2 is supported in mainline U-Boot. What exactly do you think is missing?
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel 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 Build a system that even a fool can use and only a fool will want to use it.
Dear Wolfgang,
Seems that a little much infos about background will be a good thing :-)
The idea is to provide an update / restore mechanism from U-boot.
he NAND is formatted as follow:
* U-Boot Partition
* Images Partition (YAFFS2) (Kernel, RootFS as tgz, FPGA / DSP Firmwares).
* Linux RootFS (YAFFS2)
To update "Linux", the way we imagine is this one:
1. write a new kernel and rootFS in the "Images" partition (get the files through TFTP)
2. u-boot erase the old rootFS and "install" the newer
3. Boot Linux with the newer kernel
But why from U-Boot ? :-)
-> To provide a robust update mechanism.
-> equals what happens with Linux (through end-user), u-boot
will "always" start.
So, I'm looking to clarify the step 2. What is missing ? Ideally, something like this:
yrdm /images/my_newer_rootfs.tgz my_ram_address yunzip my_ram_address /rootfs/
The patch's I means are:
http://lists.denx.de/pipermail/u-boot/2008-September/040910.html
http://lists.denx.de/pipermail/u-boot/2006-September/016867.html
So, what do you think ? Sense or no sense ? Is it a way to achieve this from u-boot ?
Regards
David
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Samstag, 26. Juni 2010 00:02
To: David Andrey
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] Updating YAFFS2 RootFS
Dear "David Andrey",
Quoted 2 lines · In message <[email protected]> you wrote:
I'm looking to update the linux yaffs2 rootfs from U-Boot (2009-06).
The
Quoted 1 line
whole update will be:
Are you positively sure you have to do this in U-Boot? Keep in mind that U-Boot is a boot loader, so don't throw tasks on it that require an operating system.
Quoted 2 lines
* Take the rootfs.tgz from the yaffs2 "image" partition (ok,
with yrdm / ywrm) for update or restore purposes.
OK - but... what for?
Quoted 1 line
* Unpack it (maybe gunzip)
Why? And: why in U-Boot?
Quoted 1 line
* Update the Linux YAFFS2 RootFS (how ?)
Just write a new image to another, alternative partition.
Quoted 3 lines
After a quick search (mail list, code) seems that:
* No native support for this operation in u-boot.
What exactly is "this operation" here, which you are missing support for?
Quoted 1 line
* Some "user" patch files exists (out of date ?)
Which sort of patches are you referring to?
Quoted 1 line
* Is the situation really like that ?
Sorry, I don;t undewrstand what exactly you mean by "the situation" ?
Quoted 1 line
* Which is the actual patch file ?
What do you mean?
Quoted 2 lines
* What about the future for YAFFS2 in U-Boot ? Is there any
update planned ?
YAFFS2 is supported in mainline U-Boot. What exactly do you think is missing?
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel 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 Build a system that even a fool can use and only a fool will want to use it.
Dear "David Andrey",
Please do not top post / full qoute. Read
http://www.netmeister.org/news/learn2quote.html
Quoted 7 lines · In message <[email protected]> you wrote:
he NAND is formatted as follow:
* U-Boot Partition
* Images Partition (YAFFS2) (Kernel, RootFS as tgz, FPGA / DSP Firmwares).
* Linux RootFS (YAFFS2)
Quoted 5 lines
To update "Linux", the way we imagine is this one:
1. write a new kernel and rootFS in the "Images" partition (get the files through TFTP)
2. u-boot erase the old rootFS and "install" the newer
3. Boot Linux with the newer kernel
If you have a network connection an can download the images through TFTP, then why do you need the "Images Partition" at all? You coulinstall the downloaded images directly.
Quoted 4 lines
But why from U-Boot ? :-)
-> To provide a robust update mechanism.-> equals what happens with Linux (through end-user), u-bootwill "always" start.
OK.
Quoted 4 lines
So, I'm looking to clarify the step 2. What is missing ? Ideally, something like this:
yrdm /images/my_newer_rootfs.tgzmy_ram_addressyunzipmy_ram_address/rootfs/
For me the reason to have the images partition is missing. If I were in your place, I would probably use the spoace rather to have space for a second root file system, so I can always install into an alternative partition while keeping the old (working copy) in place. Even if an update fails permanently for some reason (like corrupted images on the server) you can then still fall back to the old version.
And as long as you download the images anyway there is little reason to store these locally in a non-installed form. At least I cannt see one.
Quoted 3 lines
The patch's I means are:
http://lists.denx.de/pipermail/u-boot/2008-September/040910.html
http://lists.denx.de/pipermail/u-boot/2006-September/016867.html
That's old and obsolete stuff. Should not be needed at all.
Quoted 2 lines
So, what do you think ? Sense or no sense ? Is it a way to achieve this from u-boot ?
It can be done as you described it, but it makes little sense to me.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
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
Our universe is a fragile house of atoms, held together by the mortar
of cause-and-effect. One magician would be two too many.
- Terry Pratchett, _The Dark Side of the Sun_Dear Wolfgang,
Quoted 13 lines
Quoted 7 lines
he NAND is formatted as follow:
* U-Boot Partition
* Images Partition (YAFFS2) (Kernel, RootFS as tgz, FPGA / DSP Firmwares).
* Linux RootFS (YAFFS2)Quoted 5 lines
To update "Linux", the way we imagine is this one:
1. write a new kernel and rootFS in the "Images" partition (get the files through TFTP)
2. u-boot erase the old rootFS and "install" the newer
3. Boot Linux with the newer kernel
Quoted 3 lines
If you have a network connection an can download the images through TFTP, then why do you need the "Images Partition" at all? You coulinstall the downloaded images directly.
For restore purposes.
Quoted 7 lines
So, I'm looking to clarify the step 2. What is missing ? Ideally, something like this:
yrdm /images/my_newer_rootfs.tgzmy_ram_addressyunzipmy_ram_address/rootfs/If I were in your place, I would probably use the spoace rather to
have space
Quoted 4 lines
for a second root file system, so I can always install into an alternative partition while keeping the old (working copy) in place. Even if an update fails permanently for some reason (like corrupted images on the server) you can then still fall back to the old version.
Is plan B. Compressed RootFS still take less space.
Quoted 1 line
Quoted 1 line
So, what do you think ? Sense or no sense ? Is it a way to achieve
this
Quoted 3 lines
Quoted 1 line
from u-boot ?
It can be done as you described it, but it makes little sense to me.
What about the implementation of a "yunzip" ? Any suggestions ?
The YAFFS2 code in U-Boot is the one released in 2007. Do you plan any update in some near future ?
Regards
David
Dear "David Andrey",
Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 4 lines
If you have a network connection an can download the images through TFTP, then why do you need the "Images Partition" at all? You coulinstall the downloaded images directly.
For restore purposes.
As mentioned: you can do that, but I would not recommend it.
Quoted 8 lines
Quoted 1 line
If I were in your place, I would probably use the spoace rather to
have space
Quoted 4 lines
for a second root file system, so I can always install into an alternative partition while keeping the old (working copy) in place. Even if an update fails permanently for some reason (like corrupted images on the server) you can then still fall back to the old version.
Is plan B. Compressed RootFS still take less space.
Use a file system type which supports compression?
Quoted 2 lines
The YAFFS2 code in U-Boot is the one released in 2007. Do you plan any update in some near future ?
I am not aware of any such plans. Patches are welcome.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel 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 What is wanted is not the will to believe, but the will to find out, which is the exact opposite. -- Bertrand Russell, "Skeptical Essays", 1928