* [Buildroot] YAFFS2 support for buildroot
@ 2010-12-08 16:44 Robert Szentmihalyi
2010-12-08 19:34 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Robert Szentmihalyi @ 2010-12-08 16:44 UTC (permalink / raw)
To: buildroot
Hi,
I am planning to add YAFFS2 support to buildroot.
Is anybody else interested in that or working on it already?
Would anybody care to give me a hint about what is the preferred way to add
support for a new root filesystem to buildroot, so that a patch could
eventually be accepted for inclusion?
Thanks for your support,
Robert
--
Robert Szentmih?lyi
Technischer Leiter
Helvetica IT AG
Bahnhofstrasse 15
CH-8890 Flums SG
Tel +41 81 733 15 67
Fax +41 81 733 15 68
Mobil +41 79 252 97 80
Niederlassung Deutschland:
Leopoldstrasse 244
DE-80807 M?nchen
Tel +49 89 20 80 39 508
http://www.helvetica-it.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] YAFFS2 support for buildroot
2010-12-08 16:44 [Buildroot] YAFFS2 support for buildroot Robert Szentmihalyi
@ 2010-12-08 19:34 ` Thomas Petazzoni
2010-12-08 22:47 ` Robert Szentmihalyi
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2010-12-08 19:34 UTC (permalink / raw)
To: buildroot
Hi Robert,
On Wed, 8 Dec 2010 17:44:10 +0100
Robert Szentmihalyi <robert.szentmihalyi@helvetica-it.com> wrote:
> I am planning to add YAFFS2 support to buildroot.
> Is anybody else interested in that or working on it already?
I am not personaly, and I haven't heard of any effort in this direction.
> Would anybody care to give me a hint about what is the preferred way to add
> support for a new root filesystem to buildroot, so that a patch could
> eventually be accepted for inclusion?
It depends on what you want to be able to do:
1) Have Buildroot generate a YAFFS2 image for the filesystem
2) Have Buildroot patch the kernel built to support YAFFS2
1) is fairly easy, 2) is much more complicated because we don't have
(yet ?) a proper infrastructure to handle third-party kernel patches in
a generic way (even though it'd be nice to support things like Xenomai).
For 1), what you have to do is :
*) Create a package for the userspace yaffs tools. You can look in
package/cramfs/cramfs.mk for an example. You need to do this so
that Buildroot builds a host version of mkyaffs and installs it in
$(HOST_DIR)/usr/bin.
*) Create a new filesystem format in fs/yaffs/ by taking example on
other filesystems.
If you need any other detail or clarification about this, do not
hesitate to ask.
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] YAFFS2 support for buildroot
2010-12-08 19:34 ` Thomas Petazzoni
@ 2010-12-08 22:47 ` Robert Szentmihalyi
2010-12-09 19:33 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Robert Szentmihalyi @ 2010-12-08 22:47 UTC (permalink / raw)
To: buildroot
Hi Thomas,
thank you for your input.
On Mittwoch, 8. Dezember 2010, Thomas Petazzoni wrote:
> Hi Robert,
>
> On Wed, 8 Dec 2010 17:44:10 +0100
>
> Robert Szentmihalyi <robert.szentmihalyi@helvetica-it.com> wrote:
> > I am planning to add YAFFS2 support to buildroot.
> > Is anybody else interested in that or working on it already?
>
> I am not personaly, and I haven't heard of any effort in this direction.
>
> > Would anybody care to give me a hint about what is the preferred way to
> > add support for a new root filesystem to buildroot, so that a patch
> > could eventually be accepted for inclusion?
>
> It depends on what you want to be able to do:
>
> 1) Have Buildroot generate a YAFFS2 image for the filesystem
>
> 2) Have Buildroot patch the kernel built to support YAFFS2
I have solved that with the attached script for now, which generates a patch
against a given kernel which contains the yaffs2 code taken from the git
repository plus a defconfig for our board. I place the generated patch in the
buildroot directory and set BR2_LINUX_KERNEL_PATCH and
BR2_LINUX_KERNEL_DEFCONFIG to make use of it.
This works at least until I have time to think up something better :-)
>
> 1) is fairly easy, 2) is much more complicated because we don't have
> (yet ?) a proper infrastructure to handle third-party kernel patches in
> a generic way (even though it'd be nice to support things like Xenomai).
>
> For 1), what you have to do is :
>
> *) Create a package for the userspace yaffs tools. You can look in
> package/cramfs/cramfs.mk for an example. You need to do this so
> that Buildroot builds a host version of mkyaffs and installs it in
> $(HOST_DIR)/usr/bin.
I looked at cramfs.mk.
Is there a way to pull the sources from the yaffs git repository, or will I
have to create a pseudo package and place it in the dl directory?
As I said, my goal is not just to make it work somehow, but to create a patch
which can be submitted later, so that others can benefit from it.
>
> *) Create a new filesystem format in fs/yaffs/ by taking example on
> other filesystems.
I did that and I added
source "fs/yaffs2/Config.in"
to
fs/Config.in,
but the option does not appear under "target filesystem options".
What am I missing?
>
> If you need any other detail or clarification about this, do not
> hesitate to ask.
>
> Regards,
>
> Thomas
Thanks for your help!
Regards,
Robert
--
Robert Szentmih?lyi
Technischer Leiter
Helvetica IT AG
Bahnhofstrasse 15
CH-8890 Flums SG
Tel +41 81 733 15 67
Fax +41 81 733 15 68
Mobil +41 79 252 97 80
Niederlassung Deutschland:
Leopoldstrasse 244
DE-80807 M?nchen
Tel +49 89 20 80 39 508
http://www.helvetica-it.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mk_buildroot_patch.sh
Type: application/x-shellscript
Size: 1509 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101208/fe84b90d/attachment.bin>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] YAFFS2 support for buildroot
2010-12-08 22:47 ` Robert Szentmihalyi
@ 2010-12-09 19:33 ` Thomas Petazzoni
2010-12-10 23:28 ` Robert Szentmihalyi
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2010-12-09 19:33 UTC (permalink / raw)
To: buildroot
Hello Robert,
On Wed, 8 Dec 2010 23:47:55 +0100
Robert Szentmihalyi <robert.szentmihalyi@helvetica-it.com> wrote:
> I have solved that with the attached script for now, which generates
> a patch against a given kernel which contains the yaffs2 code taken
> from the git repository plus a defconfig for our board. I place the
> generated patch in the buildroot directory and set
> BR2_LINUX_KERNEL_PATCH and BR2_LINUX_KERNEL_DEFCONFIG to make use of
> it. This works at least until I have time to think up something
> better :-)
Ok. I haven't either thought on how to integrate well-known kernel
patches. This is probably a topic on which we will work on later.
> Is there a way to pull the sources from the yaffs git repository, or
> will I have to create a pseudo package and place it in the dl
> directory? As I said, my goal is not just to make it work somehow,
> but to create a patch which can be submitted later, so that others
> can benefit from it.
Yes, the GENTARGETS and AUTOTARGETS infrastructure can both pull
sources from a git repository. Something like :
YAFFSTOOLS_SITE = git://foobar.org
YAFFSTOOLS_VERSION = somegitcommitid
See http://buildroot.org/downloads/buildroot.html#generic-reference for
more details
> I did that and I added
> source "fs/yaffs2/Config.in"
> to
> fs/Config.in,
> but the option does not appear under "target filesystem options".
Could you post what you have done exactly ? Because from this
description, it should just work.
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] YAFFS2 support for buildroot
2010-12-09 19:33 ` Thomas Petazzoni
@ 2010-12-10 23:28 ` Robert Szentmihalyi
0 siblings, 0 replies; 5+ messages in thread
From: Robert Szentmihalyi @ 2010-12-10 23:28 UTC (permalink / raw)
To: buildroot
Hello Thomas,
On Donnerstag, 9. Dezember 2010, Thomas Petazzoni wrote:
>
> Yes, the GENTARGETS and AUTOTARGETS infrastructure can both pull
> sources from a git repository. Something like :
>
> YAFFSTOOLS_SITE = git://foobar.org
> YAFFSTOOLS_VERSION = somegitcommitid
>
> See http://buildroot.org/downloads/buildroot.html#generic-reference for
> more details
The download now works and I have solved the other issues, but I still don't
quite see how to effectively implement yaffstools.mk for building mkyaffsimage
and mkyaffs2image.
How do I refer to the kernel directory?
I have attached my cuurent yaffstools.mk and the original Makefile from git.
Maybe you could have a look at it in case you have a few spare minutes :-)
>
> > I did that and I added
> > source "fs/yaffs2/Config.in"
> > to
> > fs/Config.in,
> > but the option does not appear under "target filesystem options".
>
> Could you post what you have done exactly ? Because from this
> description, it should just work.
>
I have found the problem that caused this in the meantime.
Thanks for your help,
Robert
--
Robert Szentmih?lyi
Technischer Leiter
Helvetica IT AG
Bahnhofstrasse 15
CH-8890 Flums SG
Tel +41 81 733 15 67
Fax +41 81 733 15 68
Mobil +41 79 252 97 80
Niederlassung Deutschland:
Leopoldstrasse 244
DE-80807 M?nchen
Tel +49 89 20 80 39 508
http://www.helvetica-it.com
-------------- next part --------------
#############################################################
#
# yaffs-utils
#
#############################################################
YAFFSTOOLS_SITE = git://www.aleph1.co.uk/yaffs2
YAFFSTOOLS_VERSION = 0e2c2639d6f9ac7b09c93550f9bfa03fdb734eef
define YAFFS_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D)
endef
define YAFFS_INSTALL_TARGET_CMDS
install -D -m 755 $(@D)/mkyaffsimage $(TARGET_DIR)/usr/sbin/mkyaffsimage
install -D -m 755 $(@D)/mkyaffs2image $(TARGET_DIR)/usr/sbin/mkyaffs2image
endef
define HOST_YAFFS_BUILD_CMDS
$(HOST_MAKE_ENV) $(MAKE) CFLAGS="$(HOST_CFLAGS) -Wall -O2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" LDFLAGS="$(HOST_LDFLAGS)" -C $(@D)
endef
define HOST_YAFFS_INSTALL_CMDS
install -D -m 755 $(@D)/mkyaffsimage $(HOST_DIR)/usr/sbin/mkyaffsimage
install -D -m 755 $(@D)/mkyaffs2image $(HOST_DIR)/usr/sbin/mkyaffs2image
endef
$(eval $(call GENTARGETS,package,yaffstools))
$(eval $(call GENTARGETS,package,yaffstools,host))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: text/x-makefile
Size: 1739 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101211/e5349a99/attachment.bin>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-10 23:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-08 16:44 [Buildroot] YAFFS2 support for buildroot Robert Szentmihalyi
2010-12-08 19:34 ` Thomas Petazzoni
2010-12-08 22:47 ` Robert Szentmihalyi
2010-12-09 19:33 ` Thomas Petazzoni
2010-12-10 23:28 ` Robert Szentmihalyi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox