* mtdutils and libubiio
@ 2009-05-05 9:49 Corentin Chary
2009-05-05 11:39 ` Josh Boyer
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Corentin Chary @ 2009-05-05 9:49 UTC (permalink / raw)
To: linux-mtd@lists.infradead.org
Hi,
Some time ago we made libubiio available at :
http://git.iksaif.net/?p=libubiio.git;a=summary
I wanted to know how it can be used in mtd-utils, so we can start
making patch for inclusion into mtd-utils.
The first thing I see is mkfs.ubifs, using libubiio we will be able to
run mkfs on an ubi volume. I believe it's
simpler than creating a image, and using other tools to write it to the volume.
Where can libubiio be used ?
Another question, do you use static Makefiles for a reason ? Maybe we
could move to CMake ?
Thanks
--
Corentin Chary
http://xf.iksaif.net - http://uffs.org
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: mtdutils and libubiio 2009-05-05 9:49 mtdutils and libubiio Corentin Chary @ 2009-05-05 11:39 ` Josh Boyer 2009-05-05 12:20 ` Mike Frysinger 2009-05-05 12:21 ` Artem Bityutskiy 2 siblings, 0 replies; 10+ messages in thread From: Josh Boyer @ 2009-05-05 11:39 UTC (permalink / raw) To: Corentin Chary; +Cc: linux-mtd@lists.infradead.org On Tue, May 05, 2009 at 11:49:54AM +0200, Corentin Chary wrote: >Hi, >Some time ago we made libubiio available at : >http://git.iksaif.net/?p=libubiio.git;a=summary >I wanted to know how it can be used in mtd-utils, so we can start >making patch for inclusion into mtd-utils. >The first thing I see is mkfs.ubifs, using libubiio we will be able to >run mkfs on an ubi volume. I believe it's >simpler than creating a image, and using other tools to write it to the volume. >Where can libubiio be used ? > >Another question, do you use static Makefiles for a reason ? Maybe we >could move to CMake ? We use them because they are simple. There has been nothing to-date that has really required anything else. I have no experience with CMake, but I'd rather avoid adding dependencies on it. josh ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mtdutils and libubiio 2009-05-05 9:49 mtdutils and libubiio Corentin Chary 2009-05-05 11:39 ` Josh Boyer @ 2009-05-05 12:20 ` Mike Frysinger 2009-05-05 12:21 ` Artem Bityutskiy 2 siblings, 0 replies; 10+ messages in thread From: Mike Frysinger @ 2009-05-05 12:20 UTC (permalink / raw) To: Corentin Chary; +Cc: Sidney Amani, linux-mtd@lists.infradead.org On Tue, May 5, 2009 at 05:49, Corentin Chary wrote: > Some time ago we made libubiio available at : > http://git.iksaif.net/?p=libubiio.git;a=summary > I wanted to know how it can be used in mtd-utils, so we can start > making patch for inclusion into mtd-utils. > The first thing I see is mkfs.ubifs, using libubiio we will be able to > run mkfs on an ubi volume. I believe it's > simpler than creating a image, and using other tools to write it to the volume. > Where can libubiio be used ? search the archives ... some one already posted a method for libifying the UBI code that exists in mtd-utils. fixing up the minor remaining issues with that patch seems saner than trying to merge a completely unrelated code base. -mike ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mtdutils and libubiio 2009-05-05 9:49 mtdutils and libubiio Corentin Chary 2009-05-05 11:39 ` Josh Boyer 2009-05-05 12:20 ` Mike Frysinger @ 2009-05-05 12:21 ` Artem Bityutskiy 2009-05-05 12:47 ` Corentin Chary 2009-05-06 12:22 ` Corentin Chary 2 siblings, 2 replies; 10+ messages in thread From: Artem Bityutskiy @ 2009-05-05 12:21 UTC (permalink / raw) To: Corentin Chary; +Cc: linux-mtd@lists.infradead.org On Tue, 2009-05-05 at 11:49 +0200, Corentin Chary wrote: > Hi, > Some time ago we made libubiio available at : > http://git.iksaif.net/?p=libubiio.git;a=summary > I wanted to know how it can be used in mtd-utils, so we can start > making patch for inclusion into mtd-utils. > The first thing I see is mkfs.ubifs, using libubiio we will be able to > run mkfs on an ubi volume. I believe it's > simpler than creating a image, and using other tools to write it to the volume. > Where can libubiio be used ? Sure, go ahead. > Another question, do you use static Makefiles for a reason ? Maybe we > could move to CMake ? I do not know CMake, buy I thought Makefiles work just fine. -- Best regards, Artem Bityutskiy (Битюцкий Артём) ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mtdutils and libubiio 2009-05-05 12:21 ` Artem Bityutskiy @ 2009-05-05 12:47 ` Corentin Chary 2009-05-05 12:57 ` Mike Frysinger 2009-05-06 12:22 ` Corentin Chary 1 sibling, 1 reply; 10+ messages in thread From: Corentin Chary @ 2009-05-05 12:47 UTC (permalink / raw) To: dedekind; +Cc: linux-mtd@lists.infradead.org > > search the archives ... some one already posted a method for libifying > the UBI code that exists in mtd-utils. fixing up the minor remaining > issues with that patch seems saner than trying to merge a completely > unrelated code base. libubiio use code from mtd-utils and UBI, so it's not realy a "completely unrelated code base". >We use them because they are simple. There has been nothing to-date that > has really required anything else. I have no experience with CMake, but > I'd rather avoid adding dependencies on it. Makefile are simple, but so is CMake. Adding a new shared library is as simple as that : add_library(ubiio SHARED libubiio.c) set_target_properties (ubiio PROPERTIES VERSION 0.1 SOVERSION 0) But I understand is a big dependence to add. > I do not know CMake, buy I thought Makefiles work just fine. Ok, I just wanted to know. >> I believe it's >> simpler than creating a image, and using other tools to write it to the volume. >> Where can libubiio be used ? > Sure, go ahead. I'll see what can I do with that. -- Corentin Chary http://xf.iksaif.net ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mtdutils and libubiio 2009-05-05 12:47 ` Corentin Chary @ 2009-05-05 12:57 ` Mike Frysinger 0 siblings, 0 replies; 10+ messages in thread From: Mike Frysinger @ 2009-05-05 12:57 UTC (permalink / raw) To: Corentin Chary; +Cc: linux-mtd@lists.infradead.org On Tue, May 5, 2009 at 08:47, Corentin Chary wrote: >> search the archives ... some one already posted a method for libifying >> the UBI code that exists in mtd-utils. fixing up the minor remaining >> issues with that patch seems saner than trying to merge a completely >> unrelated code base. > > libubiio use code from mtd-utils and UBI, so it's not realy a > "completely unrelated code base". you didnt indicate any relationship, nor did the git tree. at any rate, it's still an untested code base unlike the aforementioned patch which has been tested and is in active use now. >>We use them because they are simple. There has been nothing to-date that >> has really required anything else. I have no experience with CMake, but >> I'd rather avoid adding dependencies on it. > > Makefile are simple, but so is CMake. Adding a new shared library is > as simple as that : if you read the archives as i suggested, you'd see that shared libraries are not desirable here. -mike ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mtdutils and libubiio 2009-05-05 12:21 ` Artem Bityutskiy 2009-05-05 12:47 ` Corentin Chary @ 2009-05-06 12:22 ` Corentin Chary 2009-05-07 5:57 ` Artem Bityutskiy 1 sibling, 1 reply; 10+ messages in thread From: Corentin Chary @ 2009-05-06 12:22 UTC (permalink / raw) To: dedekind; +Cc: linux-mtd@lists.infradead.org On Tue, May 5, 2009 at 2:21 PM, Artem Bityutskiy <dedekind@infradead.org> wrote: > On Tue, 2009-05-05 at 11:49 +0200, Corentin Chary wrote: >> Hi, >> Some time ago we made libubiio available at : >> http://git.iksaif.net/?p=libubiio.git;a=summary >> I wanted to know how it can be used in mtd-utils, so we can start >> making patch for inclusion into mtd-utils. >> The first thing I see is mkfs.ubifs, using libubiio we will be able to >> run mkfs on an ubi volume. I believe it's >> simpler than creating a image, and using other tools to write it to the volume. >> Where can libubiio be used ? > > Sure, go ahead. > >> Another question, do you use static Makefiles for a reason ? Maybe we >> could move to CMake ? > > I do not know CMake, buy I thought Makefiles work just fine. > Hi, You'll find here some experiments: http://git.iksaif.net/?p=users/iksaif/mtd-utils.git;a=summary Before working on mkfs.ubifs I wanted to cleanup the mtd-utils dir, so I tried some change, including the use of CMake. As a lot of people here don't want to hear about CMake, if the patchs for mkfs are good enought, I'll rebase them on a vanilla version of mtd-utils. What you'll find here: - CMake "experiment" with dependencies check on zlib and libacl - libubiio, provinding the same API the kernel does - mkfs.ubifs using libubiio, can write the image directly on an ubi volume libubiio need a very recent kernel with the new UBI ioctl() It's not a finished work, it's more a request for comments ;). thanks -- Corentin Chary http://xf.iksaif.net ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mtdutils and libubiio 2009-05-06 12:22 ` Corentin Chary @ 2009-05-07 5:57 ` Artem Bityutskiy 2009-05-07 8:41 ` Corentin Chary 0 siblings, 1 reply; 10+ messages in thread From: Artem Bityutskiy @ 2009-05-07 5:57 UTC (permalink / raw) To: Corentin Chary; +Cc: linux-mtd@lists.infradead.org On Wed, 2009-05-06 at 14:22 +0200, Corentin Chary wrote: > Hi, > You'll find here some experiments: > http://git.iksaif.net/?p=users/iksaif/mtd-utils.git;a=summary > > Before working on mkfs.ubifs I wanted to cleanup the mtd-utils dir, so > I tried some change, > including the use of CMake. As a lot of people here don't want to hear > about CMake, if the patchs > for mkfs are good enought, I'll rebase them on a vanilla version of mtd-utils. I have a pile of patches in my tree as well. I wait for dwmw2 to send my "export subpage via sysfs" patch to Linus, and after this I'll push my changes. They basically make libmtd use sysfs interface, but there are some random minor libubi changes and fixes. I'll try to push this ASAP. Vs CMake. I do not know. I'm not very good in this at all. Mike kind of maintains the build system in the mtd-utils, and he lately improved it. So if you may convince him, probably. But the thing is that not many people care about mtd-utils, and if you introduce CMake and then disappear - who is going to maintain that ? I personally think that if Makefile can do the same stuff, there is no reason to change/add new build system only because it is fewer lines in CMake. > What you'll find here: > - CMake "experiment" with dependencies check on zlib and libacl > - libubiio, provinding the same API the kernel does > - mkfs.ubifs using libubiio, can write the image directly on an ubi volume Would you please send patches. It is so much more convenient to people? Teaching mkfs.ubifs write directly into the volume sounds nice, BTW. -- Best regards, Artem Bityutskiy (Битюцкий Артём) ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mtdutils and libubiio 2009-05-07 5:57 ` Artem Bityutskiy @ 2009-05-07 8:41 ` Corentin Chary 2009-05-07 8:49 ` Artem Bityutskiy 0 siblings, 1 reply; 10+ messages in thread From: Corentin Chary @ 2009-05-07 8:41 UTC (permalink / raw) To: dedekind, Mike Frysinger; +Cc: linux-mtd@lists.infradead.org On Thu, May 7, 2009 at 7:57 AM, Artem Bityutskiy <dedekind@infradead.org> wrote: > On Wed, 2009-05-06 at 14:22 +0200, Corentin Chary wrote: >> Hi, >> You'll find here some experiments: >> http://git.iksaif.net/?p=users/iksaif/mtd-utils.git;a=summary >> >> Before working on mkfs.ubifs I wanted to cleanup the mtd-utils dir, so >> I tried some change, >> including the use of CMake. As a lot of people here don't want to hear >> about CMake, if the patchs >> for mkfs are good enought, I'll rebase them on a vanilla version of mtd-utils. > > I have a pile of patches in my tree as well. I wait for dwmw2 to send > my "export subpage via sysfs" patch to Linus, and after this I'll > push my changes. They basically make libmtd use sysfs interface, but > there are some random minor libubi changes and fixes. I'll try to > push this ASAP. Ok, so it'll probably add change to libubiio because like libubi we use some sysfs files. > Vs CMake. I do not know. I'm not very good in this at all. Mike kind > of maintains the build system in the mtd-utils, and he lately improved > it. So if you may convince him, probably. But the thing is that not > many people care about mtd-utils, and if you introduce CMake and then > disappear - who is going to maintain that ? > > I personally think that if Makefile can do the same stuff, there is > no reason to change/add new build system only because it is fewer lines > in CMake. Well CMake is easy to maintain when the base CMakefile is done. Adding programs is done with add_executable(prog prog1.c prog2.c) for example. And things like cross-compiling, installation, debug, external buid, are builtin. Also, it have some dependencies checking functionality (find_package(ZLIB REQUIRED) to make sure zlib is present before compiling). Using CMake I was able to move all shared code into lib/ (no more crc32.c in each dirs). It can be done with Makefiles, but it's more tricky. wc `find . -name CMakeLists.txt` 14 29 416 ./jffs/CMakeLists.txt 7 21 213 ./mkfs.ubifs/CMakeLists.txt 26 71 856 ./lib/CMakeLists.txt 79 258 2511 ./CMakeLists.txt 35 68 990 ./ubi-utils/CMakeLists.txt 38 90 1474 ./mtd-utils/CMakeLists.txt 199 537 6460 total wc Makefile common.mk ubi-utils/Makefile mkfs.ubifs/Makefile 66 148 1728 Makefile 71 200 1772 common.mk 59 172 1514 ubi-utils/Makefile 23 48 502 mkfs.ubifs/Makefile 219 568 5516 total It's why I think maintaining a build system based on CMake is easier. So if Mike is ok, I'll be happy to help. If he is not, let's work with raw Makefiles. But it's clear that moving to CMake is *certainly not a priority* here, sot let's talk about usefull things: mkfs =). >> What you'll find here: >> - CMake "experiment" with dependencies check on zlib and libacl >> - libubiio, provinding the same API the kernel does >> - mkfs.ubifs using libubiio, can write the image directly on an ubi volume > > Would you please send patches. It is so much more convenient to > people? Teaching mkfs.ubifs write directly into the volume sounds > nice, BTW. > Well as I said it's just an experiment right now. Now that it works, I'll be able to send a series of patch with small and smooth changes. I'm not sure of the dtype I chose, but you'll be able to check that later with a clean patch. Breaking the whole buildsystem is certainly not the right way for merging such a thing... it's just that the current one is not really easy to work with. -- Corentin Chary http://xf.iksaif.net - http://uffs.org ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mtdutils and libubiio 2009-05-07 8:41 ` Corentin Chary @ 2009-05-07 8:49 ` Artem Bityutskiy 0 siblings, 0 replies; 10+ messages in thread From: Artem Bityutskiy @ 2009-05-07 8:49 UTC (permalink / raw) To: Corentin Chary; +Cc: linux-mtd@lists.infradead.org, Mike Frysinger On Thu, 2009-05-07 at 10:41 +0200, Corentin Chary wrote: > >> What you'll find here: > >> - CMake "experiment" with dependencies check on zlib and libacl > >> - libubiio, provinding the same API the kernel does > >> - mkfs.ubifs using libubiio, can write the image directly on an ubi volume > > > > Would you please send patches. It is so much more convenient to > > people? Teaching mkfs.ubifs write directly into the volume sounds > > nice, BTW. > > > > Well as I said it's just an experiment right now. > Now that it works, I'll be able to send a series of patch with small > and smooth changes. Just go ahead with this :-) -- Best regards, Artem Bityutskiy (Битюцкий Артём) ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-05-07 8:50 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-05-05 9:49 mtdutils and libubiio Corentin Chary 2009-05-05 11:39 ` Josh Boyer 2009-05-05 12:20 ` Mike Frysinger 2009-05-05 12:21 ` Artem Bityutskiy 2009-05-05 12:47 ` Corentin Chary 2009-05-05 12:57 ` Mike Frysinger 2009-05-06 12:22 ` Corentin Chary 2009-05-07 5:57 ` Artem Bityutskiy 2009-05-07 8:41 ` Corentin Chary 2009-05-07 8:49 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox