* [Buildroot] [PATCH 05/10] microcom: convert to gentargets
From: Martin Banky @ 2010-10-05 21:05 UTC (permalink / raw)
To: buildroot
In-Reply-To: <878w2cs9oo.fsf@macbook.be.48ers.dk>
Peter,
Yes, I'd be the one to complain ;-) I use it to troubleshoot serial
port communication issues on my embedded system. It's a fast and dirty way
to see if I have communication with the microprocessor. Basically it lets me
know if it's a hardware issue or if it's in my code. But other than that, I
don't have any other use for it. Also, buildroot is one of the few remaining
places to host it. Just my 2c's.
Martin
On Tue, Oct 5, 2010 at 12:48 PM, Peter Korsgaard <jacmet@uclibc.org> wrote:
> >>>>> "Martin" == Martin Banky <Martin.Banky@gmail.com> writes:
>
> Martin> Thomas,
>
> Martin> I guess I should have explained this better. What I meant
> Martin> about microcom being a flat archive, is that when you extract
> Martin> it, it does not create a directory for itself. It just sticks
> Martin> its files, without a directory being created, in the current
> Martin> directory. $(TAR_STRIP_COMPONENTS)=1 is 'Automatically detect
> Martin> tar --strip-path/components option', which, equates to either
> Martin> --strip-path or --strip-components, depending on the version of
> Martin> tar. Per the man page: --strip-components = 'strip NUMBER
> Martin> leading components from file names on extraction', which means
> Martin> that for microcom, which doesn't have a directory structure, it
> Martin> strips all the file names off, so no files actually get
> Martin> extracted. This in turn, means that the patch routine does not
> Martin> work. Hence, the reason for manually patching microcom. If you
> Martin> have a better solution, I'd appreciate it, if you would show
> Martin> me, because I couldn't figure one out. I hope this makes more
> Martin> sense.
>
> Maybe we should just get rid of the microcom package instead? It was
> integrated into busybox a few years ago, which is also why it was marked
> as deprecated.
>
> I'll remove it later this week unless someone complains.
>
> --
> Bye, Peter Korsgaard
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101005/1f8e186b/attachment-0001.html>
^ permalink raw reply
* [Buildroot] [PATCH 2/2] mii-diag: convert to gentargets and bump to 2.11.3
From: Martin Banky @ 2010-10-05 20:04 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1286309077-26567-1-git-send-email-Martin.Banky@gmail.com>
Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
package/mii-diag/mii-diag.mk | 79 ++++++++++++++++--------------------------
1 files changed, 30 insertions(+), 49 deletions(-)
diff --git a/package/mii-diag/mii-diag.mk b/package/mii-diag/mii-diag.mk
index ba01c0e..8d946ae 100644
--- a/package/mii-diag/mii-diag.mk
+++ b/package/mii-diag/mii-diag.mk
@@ -3,59 +3,40 @@
# mii-diag
#
#############################################################
-MIIDIAG_VERSION:=2.11
-MIIDIAG_DEBIAN_PATCH_LEVEL:=2
-MIIDIAG_SOURCE:=mii-diag_$(MIIDIAG_VERSION).orig.tar.gz
-MIIDIAG_PATCH_FILE=mii-diag_$(MIIDIAG_VERSION)-$(MIIDIAG_DEBIAN_PATCH_LEVEL).diff.gz
-MIIDIAG_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mii-diag
-MIIDIAG_DIR:=$(BUILD_DIR)/mii-diag-$(MIIDIAG_VERSION)
-MIIDIAG_CAT:=$(ZCAT)
-MIIDIAG_BINARY:=usr/sbin/mii-diag
-
-ifneq ($(MIIDIAG_PATCH_FILE),)
-MIIDIAG_PATCH=$(DL_DIR)/$(MIIDIAG_PATCH_FILE)
-$(MIIDIAG_PATCH):
- $(call DOWNLOAD,$(MIIDIAG_SITE),$(MIIDIAG_PATCH_FILE))
-endif
-
-$(DL_DIR)/$(MIIDIAG_SOURCE):
- $(call DOWNLOAD,$(MIIDIAG_SITE),$(MIIDIAG_SOURCE))
-
-$(MIIDIAG_DIR)/.unpacked: $(DL_DIR)/$(MIIDIAG_SOURCE) $(MIIDIAG_PATCH)
- mkdir -p $(MIIDIAG_DIR)
- $(MIIDIAG_CAT) $(DL_DIR)/$(MIIDIAG_SOURCE) | tar --strip 1 -C $(MIIDIAG_DIR) $(TAR_OPTIONS) -
-ifneq ($(MIIDIAG_PATCH_FILE),)
- (cd $(MIIDIAG_DIR) && $(MIIDIAG_CAT) $(MIIDIAG_PATCH) | patch -p1)
+MII_DIAG_VERSION = 2.11
+MII_DIAG_SOURCE = mii-diag_$(MII_DIAG_VERSION).orig.tar.gz
+MII_DIAG_PATCH = mii-diag_$(MII_DIAG_VERSION)-3.diff.gz
+MII_DIAG_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mii-diag
+
+ifneq ($(MII_DIAG_PATCH),)
+define MII_DIAG_DEBIAN_PATCHES
+ if [ -d $(@D)/debian/patches ]; then \
+ (cd $(@D)/debian/patches && for i in *; \
+ do $(SED) 's,^\+\+\+ .*mii-diag-$(MII_DIAG_VERSION)/,+++ mii-diag-$(MII_DIAG_VERSION)/,' $$i; \
+ done; \
+ ); \
+ toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.patch; \
+ fi
+endef
endif
- toolchain/patch-kernel.sh $(MIIDIAG_DIR) package/mii-diag/ mii-diag-\*.patch*
- touch $@
-
-$(MIIDIAG_DIR)/.configured: $(MIIDIAG_DIR)/.unpacked
- touch $@
-
-$(MIIDIAG_DIR)/mii-diag: $(MIIDIAG_DIR)/.configured
- $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" -C $(MIIDIAG_DIR)
-$(TARGET_DIR)/$(MIIDIAG_BINARY): $(MIIDIAG_DIR)/mii-diag
- $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" -C $(MIIDIAG_DIR) DESTDIR=$(TARGET_DIR) install
- $(STRIPCMD) $@
- touch $@
+MII_DIAG_POST_PATCH_HOOKS = MII_DIAG_DEBIAN_PATCHES
-mii-diag: $(TARGET_DIR)/$(MIIDIAG_BINARY)
+define MII_DIAG_BUILD_CMDS
+ $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D)
+endef
-mii-diag-source: $(DL_DIR)/$(MIIDIAG_SOURCE) $(MIIDIAG_PATCH)
+define MII_DIAG_INSTALL_TARGET_CMDS
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
+endef
-mii-diag-clean:
- -$(MAKE) -C $(MIIDIAG_DIR) clean
+define MII_DIAG_UNINSTALL_TARGET_CMDS
+ rm -f $(TARGET_DIR)/usr/sbin/mii-diag
+endef
-mii-diag-dirclean:
- rm -rf $(MIIDIAG_DIR)
+define MII_DIAG_CLEAN_CMDS
+ $(MAKE) -C $(@D) clean
+endef
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_MIIDIAG),y)
-TARGETS+=mii-diag
-endif
+$(eval $(call GENTARGETS,package,mii-diag))
--
1.7.3.1
^ permalink raw reply related
* [Buildroot] [PATCH 1/2] input-tools: convert to gentargets
From: Martin Banky @ 2010-10-05 20:04 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1286309077-26567-1-git-send-email-Martin.Banky@gmail.com>
Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
.../input-tools/input-tools-20051019-rint.patch | 18 ++++
package/input-tools/input-tools.mk | 88 ++++++++-----------
package/input-tools/joystick-20051019-rint.patch | 18 ----
3 files changed, 55 insertions(+), 69 deletions(-)
create mode 100644 package/input-tools/input-tools-20051019-rint.patch
delete mode 100644 package/input-tools/joystick-20051019-rint.patch
diff --git a/package/input-tools/input-tools-20051019-rint.patch b/package/input-tools/input-tools-20051019-rint.patch
new file mode 100644
index 0000000..b2aa13f
--- /dev/null
+++ b/package/input-tools/input-tools-20051019-rint.patch
@@ -0,0 +1,18 @@
+diff -urN joystick-20051019.orig/utils/jscal.c joystick-20051019/utils/jscal.c
+--- joystick-20051019.orig/utils/jscal.c 2004-10-19 09:51:52.000000000 +0200
++++ joystick-20051019/utils/jscal.c 2009-01-18 10:48:50.000000000 +0100
+@@ -141,10 +141,10 @@
+ c = 32767.0 / (inputs.cmin[1] - inputs.cmax[0]);
+ d = 32767.0 / (inputs.cmin[2] - inputs.cmax[1]);
+
+- results[0] = rint(a);
+- results[1] = rint(b);
+- results[2] = rint(c*16384.0);
+- results[3] = rint(d*16384.0);
++ results[0] = (int) (a + 0.5);
++ results[1] = (int) (b + 0.5);
++ results[2] = (int) (c*16384.0 + 0.5);
++ results[3] = (int) (d*16384.0 + 0.5);
+
+ return 1;
+ }
diff --git a/package/input-tools/input-tools.mk b/package/input-tools/input-tools.mk
index 9f5eb19..d4decc0 100644
--- a/package/input-tools/input-tools.mk
+++ b/package/input-tools/input-tools.mk
@@ -3,64 +3,50 @@
# input-tools
#
#############################################################
+INPUT_TOOLS_VERSION = 20051019
+INPUT_TOOLS_SOURCE = joystick_$(INPUT_TOOLS_VERSION).orig.tar.gz
+INPUT_TOOLS_PATCH = joystick_$(INPUT_TOOLS_VERSION)-5.diff.gz
+INPUT_TOOLS_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/j/joystick/
-INPUT_TOOLS_VERSION:=20051019
-INPUT_TOOLS_SOURCE:=joystick_$(INPUT_TOOLS_VERSION).orig.tar.gz
-INPUT_TOOLS_PATCH:=joystick_$(INPUT_TOOLS_VERSION)-2.diff.gz
-INPUT_TOOLS_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/j/joystick/
-INPUT_TOOLS_DIR:=$(BUILD_DIR)/joystick-$(INPUT_TOOLS_VERSION).orig
-INPUT_TOOLS_CAT:=$(ZCAT)
+INPUT_TOOLS_TARGETS_$(BR2_PACKAGE_INPUT_TOOLS_EVTEST) += evtest
+INPUT_TOOLS_TARGETS_$(BR2_PACKAGE_INPUT_TOOLS_INPUTATTACH) += inputattach
+INPUT_TOOLS_TARGETS_$(BR2_PACKAGE_INPUT_TOOLS_JSCAL) += jscal
+INPUT_TOOLS_TARGETS_$(BR2_PACKAGE_INPUT_TOOLS_JSTEST) += jstest
-INPUT_TOOLS_TARGETS-y:=
-
-INPUT_TOOLS_TARGETS-$(BR2_PACKAGE_INPUT_TOOLS_EVTEST) += evtest
-INPUT_TOOLS_TARGETS-$(BR2_PACKAGE_INPUT_TOOLS_INPUTATTACH) += inputattach
-INPUT_TOOLS_TARGETS-$(BR2_PACKAGE_INPUT_TOOLS_JSCAL) += jscal
-INPUT_TOOLS_TARGETS-$(BR2_PACKAGE_INPUT_TOOLS_JSTEST) += jstest
-
-INPUT_TOOLS_TARGETS := $(addprefix $(TARGET_DIR)/usr/bin/, $(INPUT_TOOLS_TARGETS-y))
-INPUT_TOOLS_SOURCES := $(addprefix $(INPUT_TOOLS_DIR)/utils/, \
- $(addsuffix .c, $(INPUT_TOOLS_TARGETS-y)))
-
-$(DL_DIR)/$(INPUT_TOOLS_SOURCE):
- $(call DOWNLOAD,$(INPUT_TOOLS_SITE),$(@F))
-
-$(DL_DIR)/$(INPUT_TOOLS_PATCH):
- $(call DOWNLOAD,$(INPUT_TOOLS_SITE),$(@F))
-
-$(INPUT_TOOLS_DIR)/.unpacked: $(DL_DIR)/$(INPUT_TOOLS_SOURCE) $(DL_DIR)/$(INPUT_TOOLS_PATCH)
- $(INPUT_TOOLS_CAT) $(DL_DIR)/$(INPUT_TOOLS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
ifneq ($(INPUT_TOOLS_PATCH),)
- (cd $(INPUT_TOOLS_DIR) && $(INPUT_TOOLS_CAT) $(DL_DIR)/$(INPUT_TOOLS_PATCH) | patch -p1)
+define INPUT_TOOLS_DEBIAN_PATCHES
+ if [ -d $(@D)/debian/patches ]; then \
+ (cd $(@D)/debian/patches && for i in *; \
+ do $(SED) 's,^\+\+\+ .*joystick-$(INPUT_TOOLS_VERSION)/,+++ joystick-$(INPUT_TOOLS_VERSION)/,' $$i; \
+ done; \
+ ); \
+ toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.patch; \
+ fi
+endef
endif
- toolchain/patch-kernel.sh $(INPUT_TOOLS_DIR) package/input-tools/ \*.patch
- touch $@
-
-$(INPUT_TOOLS_SOURCES): $(INPUT_TOOLS_DIR)/.unpacked
-$(INPUT_TOOLS_DIR)/utils/%: $(INPUT_TOOLS_DIR)/utils/%.c
- $(TARGET_CC) $(TARGET_CFLAGS) -o $@ $^
+INPUT_TOOLS_POST_PATCH_HOOKS = INPUT_TOOLS_DEBIAN_PATCHES
-$(INPUT_TOOLS_TARGETS): $(TARGET_DIR)/usr/bin/%: $(INPUT_TOOLS_DIR)/utils/%
- cp -dpf $^ $@
- $(STRIPCMD) $(STRIP_STRIP_ALL) $@
+define INPUT_TOOLS_BUILD_CMDS
+ (cd $(@D)/utils; \
+ $(TARGET_CC) $(TARGET_CFLAGS) -o evtest evtest.c; \
+ $(TARGET_CC) $(TARGET_CFLAGS) -o inputattach inputattach.c; \
+ $(TARGET_CC) $(TARGET_CFLAGS) -o jscal jscal.c; \
+ $(TARGET_CC) $(TARGET_CFLAGS) -o jstest jstest.c; \
+ )
+endef
-input-tools: $(INPUT_TOOLS_TARGETS)
+define INPUT_TOOLS_INSTALL_TARGET_CMDS
+ test -z "$(INPUT_TOOLS_TARGETS_y)" || \
+ install -m 755 $(addprefix $(@D)/utils/,$(INPUT_TOOLS_TARGETS_y)) $(TARGET_DIR)/usr/bin/
+endef
-input-tools-source: $(DL_DIR)/$(INPUT_TOOLS_SOURCE) $(DL_DIR)/$(INPUT_TOOLS_PATCH)
+define INPUT_TOOLS_UNINSTALL_TARGET_CMDS
+ rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(INPUT_TOOLS_TARGETS_y))
+endef
-input-tools-unpacked: $(INPUT_TOOLS_DIR)/.unpacked
+define INPUT_TOOLS_CLEAN_CMDS
+ rm -f $(addprefix $(@D)/utils/,$(INPUT_TOOLS_TARGETS_y))
+endef
-input-tools-clean:
- rm -f $(INPUT_TOOLS_TARGETS)
-
-input-tools-dirclean:
- rm -rf $(INPUT_TOOLS_DIR)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_INPUT_TOOLS),y)
-TARGETS+=input-tools
-endif
+$(eval $(call GENTARGETS,package,input-tools))
diff --git a/package/input-tools/joystick-20051019-rint.patch b/package/input-tools/joystick-20051019-rint.patch
deleted file mode 100644
index b2aa13f..0000000
--- a/package/input-tools/joystick-20051019-rint.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff -urN joystick-20051019.orig/utils/jscal.c joystick-20051019/utils/jscal.c
---- joystick-20051019.orig/utils/jscal.c 2004-10-19 09:51:52.000000000 +0200
-+++ joystick-20051019/utils/jscal.c 2009-01-18 10:48:50.000000000 +0100
-@@ -141,10 +141,10 @@
- c = 32767.0 / (inputs.cmin[1] - inputs.cmax[0]);
- d = 32767.0 / (inputs.cmin[2] - inputs.cmax[1]);
-
-- results[0] = rint(a);
-- results[1] = rint(b);
-- results[2] = rint(c*16384.0);
-- results[3] = rint(d*16384.0);
-+ results[0] = (int) (a + 0.5);
-+ results[1] = (int) (b + 0.5);
-+ results[2] = (int) (c*16384.0 + 0.5);
-+ results[3] = (int) (d*16384.0 + 0.5);
-
- return 1;
- }
--
1.7.3.1
^ permalink raw reply related
* [Buildroot] [PATCH 0/2] Resubmit converted gentargets
From: Martin Banky @ 2010-10-05 20:04 UTC (permalink / raw)
To: buildroot
As Thomas pointed out, gentargets can use post patch hooks. I've changed these
two packages to apply the debian patches in the post patch hooks.
[PATCH 1/2] input-tools: convert to gentargets
[PATCH 2/2] mii-diag: convert to gentargets and bump to 2.11.3
^ permalink raw reply
* [Buildroot] [PATCH 05/10] microcom: convert to gentargets
From: Peter Korsgaard @ 2010-10-05 19:48 UTC (permalink / raw)
To: buildroot
In-Reply-To: <AANLkTim76qFFMTStNN-D_ompE2Bcw+ZeT0aWgBE3bd=e@mail.gmail.com>
>>>>> "Martin" == Martin Banky <Martin.Banky@gmail.com> writes:
Martin> Thomas,
Martin> ???? I guess I should have explained this better. What I meant
Martin> about microcom being a flat archive, is that when you extract
Martin> it, it does not create a directory for itself. It just sticks
Martin> its files, without a directory being created, in the current
Martin> directory. $(TAR_STRIP_COMPONENTS)=1 is 'Automatically detect
Martin> tar --strip-path/components option', which, equates to either
Martin> --strip-path or --strip-components, depending on the version of
Martin> tar. Per the man page: --strip-components = 'strip NUMBER
Martin> leading components from file names on extraction', which means
Martin> that for microcom, which doesn't have a directory structure, it
Martin> strips all the file names off, so no files actually get
Martin> extracted. This in turn, means that the patch routine does not
Martin> work. Hence, the reason for manually patching microcom. If you
Martin> have a better solution, I'd appreciate it, if you would show
Martin> me, because I couldn't figure one out. I hope this makes more
Martin> sense.
Maybe we should just get rid of the microcom package instead? It was
integrated into busybox a few years ago, which is also why it was marked
as deprecated.
I'll remove it later this week unless someone complains.
--
Bye, Peter Korsgaard
^ permalink raw reply
* [Buildroot] [PATCH 01/10] input-tools: convert to gentargets
From: Martin Banky @ 2010-10-05 19:26 UTC (permalink / raw)
To: buildroot
In-Reply-To: <AANLkTin3Q3uafh2GjjCuGhg3fMRfb_c1fuKQ96WpkXGx@mail.gmail.com>
Thomas,
Well, what do you know, post patch does work for gentargets! You learn
something new every day. I'll change the packages that are affected and
repost.
Ok, I just checked on the cvs Debian patches, and now remember why I
didn't check the sed routine very hard. The patch is over 12,000 lines long,
however I just checked the patch and found at least on instance where the
patch needs to be fixed. Line 9527, '++++
../build-tree.new/cvs-1.12.13/src/root.c 2006-05-05 23:34:12.000000000
+0800' is one reason why the sed routine is needed. I haven't checked the
other patch sets, but it kind of seems that the sed routine might be needed
after all. Thoughts?
Martin
On Tue, Oct 5, 2010 at 11:38 AM, Martin Banky <Martin.Banky@gmail.com>wrote:
> Thomas,
> I got the Debian patch routine from the cvs package, when I was
> converting it. I just figured that there was some type of formatting issue
> in the debian patches that needed to be addressed. If I read it correctly,
> it looks like it strips any prefix from the name of the package to patch. I
> must confess, I'm not very good with sed. Is this something that doesn't
> need to be done? If so, just let me know, and I'll change the packages that
> are affected.
> As to the *_TOOLS_BUILD_CMDS issue, until now, I thought that the
> hooks were only available for the autotargets packages. I just re-read that
> section in the Usage and documentation page, and it looks like you can use
> the hooks in a gentargets package. I'll try it out, and change the packages
> that have that issue.
>
> Martin
>
>
> On Tue, Oct 5, 2010 at 2:17 AM, Thomas Petazzoni <
> thomas.petazzoni at free-electrons.com> wrote:
>
>> Hello,
>>
>> Thanks Martin for doing all this conversion work, this is much
>> appreciated!
>>
>> On Tue, 5 Oct 2010 01:22:34 -0700
>> Martin Banky <martin.banky@gmail.com> wrote:
>>
>> > +define INPUT_TOOLS_DEBIAN_PATCHES
>> > + if [ -d $(@D)/debian/patches ]; then \
>> > + (cd $(@D)/debian/patches && for i in *; \
>> > + do $(SED) 's,^\+\+\+
>> .*joystick-$(INPUT_TOOLS_VERSION)/,+++ joystick-$(INPUT_TOOLS_VERSION)/,'
>> $$i; \
>>
>> I have seen this in several of your patches, but I don't understand why
>> it is here. There are several other packages that do apply the debian
>> patches, but such a sed step is not needed.
>>
>> > +define INPUT_TOOLS_BUILD_CMDS
>> > + $(INPUT_TOOLS_DEBIAN_PATCHES)
>>
>> Even though it doesn't technically make any difference, I'd prefer to
>> have this as a post-patch hook.
>>
>> Thanks!
>>
>> Thomas
>> --
>> Thomas Petazzoni, Free Electrons
>> Kernel, drivers, real-time and embedded Linux
>> development, consulting, training and support.
>> http://free-electrons.com
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101005/d5c51630/attachment-0001.html>
^ permalink raw reply
* [Buildroot] [PATCH 06/10] microperl: convert to gentargets
From: Martin Banky @ 2010-10-05 19:10 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20101005111943.7ed624fa@surf>
Thomas,
To be honest, I didn't delve into the reason why Errno.pm is needed by
the host. Also, the original makefile did not seem to really differentiate
between host and target. It modified the source and built both the host and
target from this one modified set of files. This is why I didn't create a
host build. I realize that 'ext/util/make_ext nonxs Errno MAKE="$(firstword
$(MAKE))" \' builds the host Errno.pm portion, but by that time so much work
has already been done, it seemed wasteful to repeat it for the target. I
couldn't figure out what modifications were only necessary for the host, and
which for the target, or if they were needed for both. I'm open to
suggestions.
Martin
On Tue, Oct 5, 2010 at 2:19 AM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Tue, 5 Oct 2010 01:22:39 -0700
> Martin Banky <martin.banky@gmail.com> wrote:
>
> > +define MICROPERL_CONFIGURE_CMDS
>
> I am not a huge huge fan of this, because it's subverting the purpose
> of MICROPERL_CONFIGURE_CMDS to do a more-or-less partial build of
> microperl for the host. Do we really need such a partial build ? If so,
> shouldn't we create a host-microperl package ?
>
> Regards,
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101005/79a8df39/attachment.html>
^ permalink raw reply
* [Buildroot] [PATCH 05/10] microcom: convert to gentargets
From: Martin Banky @ 2010-10-05 18:54 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20101005112147.2bc80d0e@surf>
Thomas,
I guess I should have explained this better. What I meant about
microcom being a flat archive, is that when you extract it, it does not
create a directory for itself. It just sticks its files, without a directory
being created, in the current directory. $(TAR_STRIP_COMPONENTS)=1 is
'Automatically detect tar --strip-path/components option', which, equates to
either --strip-path or --strip-components, depending on the version of tar.
Per the man page: --strip-components = 'strip NUMBER leading components from
file names on extraction', which means that for microcom, which doesn't have
a directory structure, it strips all the file names off, so no files
actually get extracted. This in turn, means that the patch routine does not
work. Hence, the reason for manually patching microcom. If you have a better
solution, I'd appreciate it, if you would show me, because I couldn't figure
one out. I hope this makes more sense.
Martin
On Tue, Oct 5, 2010 at 2:21 AM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:
> On Tue, 5 Oct 2010 01:22:38 -0700
> Martin Banky <martin.banky@gmail.com> wrote:
>
> > +define MICROCOM_CONFIGURE_CMDS
> > + $(ZCAT) $(DL_DIR)/$(MICROCOM_SOURCE) | tar -C $(@D) $(TAR_OPTIONS)
> -
>
> This sounds strange to me. The extraction is already done by the
> package infrastructure.
>
> > toolchain/patch-kernel.sh $(MICROCOM_DIR) package/microcom/
> \*.patch
>
> This as well.
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101005/f8254073/attachment.html>
^ permalink raw reply
* [Buildroot] [PATCH 01/10] input-tools: convert to gentargets
From: Martin Banky @ 2010-10-05 18:38 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20101005111715.6559e7d2@surf>
Thomas,
I got the Debian patch routine from the cvs package, when I was
converting it. I just figured that there was some type of formatting issue
in the debian patches that needed to be addressed. If I read it correctly,
it looks like it strips any prefix from the name of the package to patch. I
must confess, I'm not very good with sed. Is this something that doesn't
need to be done? If so, just let me know, and I'll change the packages that
are affected.
As to the *_TOOLS_BUILD_CMDS issue, until now, I thought that the hooks
were only available for the autotargets packages. I just re-read that
section in the Usage and documentation page, and it looks like you can use
the hooks in a gentargets package. I'll try it out, and change the packages
that have that issue.
Martin
On Tue, Oct 5, 2010 at 2:17 AM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> Thanks Martin for doing all this conversion work, this is much
> appreciated!
>
> On Tue, 5 Oct 2010 01:22:34 -0700
> Martin Banky <martin.banky@gmail.com> wrote:
>
> > +define INPUT_TOOLS_DEBIAN_PATCHES
> > + if [ -d $(@D)/debian/patches ]; then \
> > + (cd $(@D)/debian/patches && for i in *; \
> > + do $(SED) 's,^\+\+\+
> .*joystick-$(INPUT_TOOLS_VERSION)/,+++ joystick-$(INPUT_TOOLS_VERSION)/,'
> $$i; \
>
> I have seen this in several of your patches, but I don't understand why
> it is here. There are several other packages that do apply the debian
> patches, but such a sed step is not needed.
>
> > +define INPUT_TOOLS_BUILD_CMDS
> > + $(INPUT_TOOLS_DEBIAN_PATCHES)
>
> Even though it doesn't technically make any difference, I'd prefer to
> have this as a post-patch hook.
>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101005/a61967bb/attachment.html>
^ permalink raw reply
* [Buildroot] [git commit master 1/1] libintl: needs wchar like gettext
From: Peter Korsgaard @ 2010-10-05 11:24 UTC (permalink / raw)
To: buildroot
commit: http://git.buildroot.net/buildroot/commit/?id=06d764401d2dc2f8cee15a0e8a2c68d31b6ad2d8
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
CHANGES | 22 +++++++++++-----------
package/gettext/Config.in | 1 +
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/CHANGES b/CHANGES
index 9ca8a29..d93e9e1 100644
--- a/CHANGES
+++ b/CHANGES
@@ -32,17 +32,17 @@
ifplugd, imagemagick, iperf, ipsec-tools, iproute2, iptables,
iw, jpeg, kexec, kismet, less, libcgi, libcurl, libdaemon,
libdnet, liberation, libevent, libeXosip2, libglade, libgtk2,
- libiconv, libidn, libmms, libnl, liboil, libosip2, libpcap,
- libpng, libtool, libungif, libxml2, libxslt, lighttpd, lite,
- lm-sensors, lockfile-progs, logrotate, m4, mdadm, mesa3d,
- metacity, mtd-utils, mysql_client, nano, nbd, ncftp, neon,
- netperf, netsnmp, ng-spice-rework, ntfsprogs, ntp, openntpd,
- openssh, openvpn, oprofile, pango, patch, pcre, php,
- pkg-config, prboom, radvd, rdesktop, ruby, qt, quagga, samba,
- sawman, sdl_mixer, sdl_sound, setserial, shared-mime-info,
- speex, sqlite, squashfs, strace, sylpheed, taglib, tcpdump,
- thttpd, tiff, tn5250, udev, udpcast, usbmount, usbutils,
- vsftpd, vtun, which, wpa_supplicant,
+ libiconv, libidn, libintl, libmms, libnl, liboil, libosip2,
+ libpcap, libpng, libtool, libungif, libxml2, libxslt,
+ lighttpd, lite, lm-sensors, lockfile-progs, logrotate, m4,
+ mdadm, mesa3d, metacity, mtd-utils, mysql_client, nano, nbd,
+ ncftp, neon, netperf, netsnmp, ng-spice-rework, ntfsprogs,
+ ntp, openntpd, openssh, openvpn, oprofile, pango, patch, pcre,
+ php, pkg-config, prboom, radvd, rdesktop, ruby, qt, quagga,
+ samba, sawman, sdl_mixer, sdl_sound, setserial,
+ shared-mime-info, speex, sqlite, squashfs, strace, sylpheed,
+ taglib, tcpdump, thttpd, tiff, tn5250, udev, udpcast,
+ usbmount, usbutils, vsftpd, vtun, which, wpa_supplicant,
xdriver_xf86-input-{acecad,aiptek,evdev,joystick,keyboard},
xdriver-xf86-input-{mouse,synaptics,vmmouse,void},
xdriver-xf86-video-{apm,ark,ast,ati,chips,cirrus,dummy,fbdev},
diff --git a/package/gettext/Config.in b/package/gettext/Config.in
index c1ae97f..fabfe1e 100644
--- a/package/gettext/Config.in
+++ b/package/gettext/Config.in
@@ -27,6 +27,7 @@ config BR2_PACKAGE_GETTEXT_STATIC
config BR2_PACKAGE_LIBINTL
bool "libintl"
depends on BR2_NEEDS_GETTEXT
+ depends on BR2_USE_WCHAR
help
Selecting this package installs all of gettext in the staging
directory and the shared library for it's use in the target.
--
1.7.1
^ permalink raw reply related
* [Buildroot] [PATCH 3/3] gcc-patch: Add patch for 4.4.5 to support Sparc-leon processors
From: Konrad Eisele @ 2010-10-05 10:50 UTC (permalink / raw)
To: buildroot
In-Reply-To: <4CAB0299.2010903@gaisler.com>
Gcc patch that adds hfleon (fpu,v7), hfleonv8 (fpu, v8), sfleon (softfpu,v7),
sfleonv8 (softfpu,v8) SPARC variants. Default cpu is selected with --with-cpu.
Adds leon pipeline descrption to gcc.
Signed-off-by: Konrad Eisele <konrad@gaisler.com>
---
toolchain/gcc/4.4.5/950-sparc-leon.patch | 206 ++++++++++++++++++++++++++++++
1 files changed, 206 insertions(+), 0 deletions(-)
create mode 100644 toolchain/gcc/4.4.5/950-sparc-leon.patch
diff --git a/toolchain/gcc/4.4.5/950-sparc-leon.patch b/toolchain/gcc/4.4.5/950-sparc-leon.patch
new file mode 100644
index 0000000..cdff2bb
--- /dev/null
+++ b/toolchain/gcc/4.4.5/950-sparc-leon.patch
@@ -0,0 +1,206 @@
+diff -Naur gcc-4.4.5.ori/gcc/config/sparc/leon.md gcc-4.4.5/gcc/config/sparc/leon.md
+--- gcc-4.4.5.ori/gcc/config/sparc/leon.md 1970-01-01 01:00:00.000000000 +0100
++++ gcc-4.4.5/gcc/config/sparc/leon.md 2010-10-05 11:47:08.000000000 +0200
+@@ -0,0 +1,56 @@
++;; Scheduling description for Leon.
++;; Copyright (C) 2010 Free Software Foundation, Inc.
++;;
++;; This file is part of GCC.
++;;
++;; GCC is free software; you can redistribute it and/or modify
++;; it under the terms of the GNU General Public License as published by
++;; the Free Software Foundation; either version 3, or (at your option)
++;; any later version.
++;;
++;; GCC is distributed in the hope that it will be useful,
++;; but WITHOUT ANY WARRANTY; without even the implied warranty of
++;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++;; GNU General Public License for more details.
++;;
++;; You should have received a copy of the GNU General Public License
++;; along with GCC; see the file COPYING3. If not see
++;; <http://www.gnu.org/licenses/>.
++
++
++(define_automaton "leon")
++
++(define_cpu_unit "leon_memory, leon_fpalu" "leon")
++(define_cpu_unit "leon_fpmds" "leon")
++(define_cpu_unit "write_buf" "leon")
++
++(define_insn_reservation "leon_load" 1
++ (and (eq_attr "cpu" "leon")
++ (eq_attr "type" "load,sload,fpload"))
++ "leon_memory")
++
++(define_insn_reservation "leon_store" 1
++ (and (eq_attr "cpu" "leon")
++ (eq_attr "type" "store,fpstore"))
++ "leon_memory+write_buf")
++
++(define_insn_reservation "leon_fp_alu" 1
++ (and (eq_attr "cpu" "leon")
++ (eq_attr "type" "fp,fpmove"))
++ "leon_fpalu, nothing")
++
++(define_insn_reservation "leon_fp_mult" 1
++ (and (eq_attr "cpu" "leon")
++ (eq_attr "type" "fpmul"))
++ "leon_fpmds, nothing")
++
++(define_insn_reservation "leon_fp_div" 16
++ (and (eq_attr "cpu" "leon")
++ (eq_attr "type" "fpdivs,fpdivd"))
++ "leon_fpmds, nothing*15")
++
++(define_insn_reservation "leon_fp_sqrt" 23
++ (and (eq_attr "cpu" "leon")
++ (eq_attr "type" "fpsqrts,fpsqrtd"))
++ "leon_fpmds, nothing*21")
++
+diff -Naur gcc-4.4.5.ori/gcc/config/sparc/sparc.c gcc-4.4.5/gcc/config/sparc/sparc.c
+--- gcc-4.4.5.ori/gcc/config/sparc/sparc.c 2010-10-05 11:46:07.000000000 +0200
++++ gcc-4.4.5/gcc/config/sparc/sparc.c 2010-10-05 11:47:08.000000000 +0200
+@@ -246,6 +246,30 @@
+ 0, /* shift penalty */
+ };
+
++static const
++struct processor_costs leon_costs = {
++ COSTS_N_INSNS (1), /* int load */
++ COSTS_N_INSNS (1), /* int signed load */
++ COSTS_N_INSNS (1), /* int zeroed load */
++ COSTS_N_INSNS (1), /* float load */
++ COSTS_N_INSNS (1), /* fmov, fneg, fabs */
++ COSTS_N_INSNS (1), /* fadd, fsub */
++ COSTS_N_INSNS (1), /* fcmp */
++ COSTS_N_INSNS (1), /* fmov, fmovr */
++ COSTS_N_INSNS (1), /* fmul */
++ COSTS_N_INSNS (15), /* fdivs */
++ COSTS_N_INSNS (15), /* fdivd */
++ COSTS_N_INSNS (23), /* fsqrts */
++ COSTS_N_INSNS (23), /* fsqrtd */
++ COSTS_N_INSNS (5), /* imul */
++ COSTS_N_INSNS (5), /* imulX */
++ 0, /* imul bit factor */
++ COSTS_N_INSNS (5), /* idiv */
++ COSTS_N_INSNS (5), /* idivX */
++ COSTS_N_INSNS (1), /* movcc/movr */
++ 0, /* shift penalty */
++};
++
+ const struct processor_costs *sparc_costs = &cypress_costs;
+
+ #ifdef HAVE_AS_RELAX_OPTION
+@@ -655,6 +679,10 @@
+ { TARGET_CPU_ultrasparc3, "ultrasparc3" },
+ { TARGET_CPU_niagara, "niagara" },
+ { TARGET_CPU_niagara2, "niagara2" },
++ { TARGET_CPU_sparchfleon, "sparchfleon" },
++ { TARGET_CPU_sparchfleonv8, "sparchfleonv8" },
++ { TARGET_CPU_sparcsfleon, "sparcsfleon" },
++ { TARGET_CPU_sparcsfleonv8, "sparcsfleonv8" },
+ { 0, 0 }
+ };
+ const struct cpu_default *def;
+@@ -693,6 +721,11 @@
+ /* UltraSPARC T1 */
+ { "niagara", PROCESSOR_NIAGARA, MASK_ISA, MASK_V9|MASK_DEPRECATED_V8_INSNS},
+ { "niagara2", PROCESSOR_NIAGARA, MASK_ISA, MASK_V9},
++ /* SPARC-LEON */
++ { "sparchfleon", PROCESSOR_LEON, MASK_ISA, MASK_FPU },
++ { "sparchfleonv8", PROCESSOR_LEON, MASK_ISA & ~(MASK_V8), MASK_V8|MASK_FPU },
++ { "sparcsfleon", PROCESSOR_LEON, MASK_ISA | MASK_FPU, 0 },
++ { "sparcsfleonv8", PROCESSOR_LEON, (MASK_ISA | MASK_FPU) & ~(MASK_V8), MASK_V8 },
+ { 0, 0, 0, 0 }
+ };
+ const struct cpu_table *cpu;
+@@ -859,6 +892,9 @@
+ case PROCESSOR_NIAGARA2:
+ sparc_costs = &niagara2_costs;
+ break;
++ case PROCESSOR_LEON:
++ sparc_costs = &leon_costs;
++ break;
+ };
+
+ #ifdef TARGET_DEFAULT_LONG_DOUBLE_128
+diff -Naur gcc-4.4.5.ori/gcc/config/sparc/sparc.h gcc-4.4.5/gcc/config/sparc/sparc.h
+--- gcc-4.4.5.ori/gcc/config/sparc/sparc.h 2010-10-05 11:46:07.000000000 +0200
++++ gcc-4.4.5/gcc/config/sparc/sparc.h 2010-10-05 11:47:08.000000000 +0200
+@@ -243,6 +243,10 @@
+ #define TARGET_CPU_ultrasparc3 9
+ #define TARGET_CPU_niagara 10
+ #define TARGET_CPU_niagara2 11
++#define TARGET_CPU_sparchfleon 12
++#define TARGET_CPU_sparchfleonv8 13
++#define TARGET_CPU_sparcsfleon 14
++#define TARGET_CPU_sparcsfleonv8 15
+
+ #if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
+ || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
+@@ -299,6 +303,26 @@
+ #define ASM_CPU32_DEFAULT_SPEC "-Asparclite"
+ #endif
+
++#if TARGET_CPU_DEFAULT == TARGET_CPU_sparchfleon
++#define CPP_CPU32_DEFAULT_SPEC "-Dsparcleon"
++#define ASM_CPU32_DEFAULT_SPEC ""
++#endif
++
++#if TARGET_CPU_DEFAULT == TARGET_CPU_sparcsfleon
++#define CPP_CPU32_DEFAULT_SPEC "-Dsparcleon -D_SOFT_FLOAT"
++#define ASM_CPU32_DEFAULT_SPEC ""
++#endif
++
++#if TARGET_CPU_DEFAULT == TARGET_CPU_sparchfleonv8
++#define CPP_CPU32_DEFAULT_SPEC "-Dsparcleon -D__sparc_v8__ "
++#define ASM_CPU32_DEFAULT_SPEC ""
++#endif
++
++#if TARGET_CPU_DEFAULT == TARGET_CPU_sparcsfleonv8
++#define CPP_CPU32_DEFAULT_SPEC "-Dleon -D__sparc_v8__ -D_SOFT_FLOAT"
++#define ASM_CPU32_DEFAULT_SPEC ""
++#endif
++
+ #if TARGET_CPU_DEFAULT == TARGET_CPU_supersparc
+ #define CPP_CPU32_DEFAULT_SPEC "-D__supersparc__ -D__sparc_v8__"
+ #define ASM_CPU32_DEFAULT_SPEC ""
+@@ -533,6 +557,7 @@
+ PROCESSOR_V7,
+ PROCESSOR_CYPRESS,
+ PROCESSOR_V8,
++ PROCESSOR_LEON,
+ PROCESSOR_SUPERSPARC,
+ PROCESSOR_SPARCLITE,
+ PROCESSOR_F930,
+diff -Naur gcc-4.4.5.ori/gcc/config/sparc/sparc.md gcc-4.4.5/gcc/config/sparc/sparc.md
+--- gcc-4.4.5.ori/gcc/config/sparc/sparc.md 2010-10-05 11:46:07.000000000 +0200
++++ gcc-4.4.5/gcc/config/sparc/sparc.md 2010-10-05 11:47:08.000000000 +0200
+@@ -89,6 +89,7 @@
+ "v7,
+ cypress,
+ v8,
++ leon,
+ supersparc,
+ sparclite,f930,f934,
+ hypersparc,sparclite86x,
+@@ -320,6 +321,7 @@
+ (include "ultra3.md")
+ (include "niagara.md")
+ (include "niagara2.md")
++(include "leon.md")
+
+
+ ;; Operand and operator predicates and constraints
+diff -Naur gcc-4.4.5.ori/gcc/config.gcc gcc-4.4.5/gcc/config.gcc
+--- gcc-4.4.5.ori/gcc/config.gcc 2010-10-05 11:46:08.000000000 +0200
++++ gcc-4.4.5/gcc/config.gcc 2010-10-05 11:47:08.000000000 +0200
+@@ -2998,6 +2998,7 @@
+ case ${val} in
+ "" | sparc | sparcv9 | sparc64 | sparc86x \
+ | v7 | cypress | v8 | supersparc | sparclite | f930 \
++ | sparchfleon | sparcsfleon | sparchfleonv8 | sparcsfleonv8 \
+ | f934 | hypersparc | sparclite86x | sparclet | tsc701 \
+ | v9 | ultrasparc | ultrasparc3 | niagara | niagara2)
+ # OK
--
1.6.3.2
^ permalink raw reply related
* [Buildroot] [PATCH 2/3] toolchain: Add support for --with-cpu
From: Konrad Eisele @ 2010-10-05 10:50 UTC (permalink / raw)
To: buildroot
In-Reply-To: <4CAB0299.2010903@gaisler.com>
Add support for gcc configuration switch --with-cpu. Uses newly added
BR2_GCC_TARGET_CPU from the target config.
Signed-off-by: Konrad Eisele <konrad@gaisler.com>
---
toolchain/gcc/Makefile.in | 3 +++
toolchain/gcc/gcc-uclibc-4.x.mk | 8 ++++----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/toolchain/gcc/Makefile.in b/toolchain/gcc/Makefile.in
index b6ebca9..2e55ed0 100644
--- a/toolchain/gcc/Makefile.in
+++ b/toolchain/gcc/Makefile.in
@@ -37,6 +37,9 @@ endif
ifneq ($(call qstrip,$(BR2_GCC_TARGET_ABI)),)
GCC_WITH_ABI:=--with-abi=$(BR2_GCC_TARGET_ABI)
endif
+ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),)
+GCC_WITH_CPU:=--with-cpu=$(BR2_GCC_TARGET_CPU)
+endif
# AVR32 GCC configuration
ifeq ($(BR2_avr32),y)
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index f17b73f..d40731d 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -211,7 +211,7 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched
$(THREADS) \
$(GCC_DECIMAL_FLOAT) \
$(SOFT_FLOAT_CONFIG_OPTION) \
- $(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \
+ $(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_CPU) \
$(EXTRA_GCC_CONFIG_OPTIONS) \
$(EXTRA_GCC1_CONFIG_OPTIONS) \
$(QUIET) \
@@ -287,7 +287,7 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched
$(MULTILIB) \
$(GCC_DECIMAL_FLOAT) \
$(SOFT_FLOAT_CONFIG_OPTION) \
- $(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \
+ $(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_CPU) \
$(EXTRA_GCC_CONFIG_OPTIONS) \
$(EXTRA_GCC2_CONFIG_OPTIONS) \
$(QUIET) \
@@ -362,7 +362,7 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ)
$(THREADS) \
$(GCC_DECIMAL_FLOAT) \
$(SOFT_FLOAT_CONFIG_OPTION) \
- $(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \
+ $(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_CPU) \
$(DISABLE_LARGEFILE) \
$(EXTRA_GCC_CONFIG_OPTIONS) \
$(EXTRA_GCC2_CONFIG_OPTIONS) \
@@ -495,7 +495,7 @@ $(GCC_BUILD_DIR4)/.configured: $(GCC_BUILD_DIR4)/.prepared
$(THREADS) \
$(GCC_DECIMAL_FLOAT) \
$(SOFT_FLOAT_CONFIG_OPTION) \
- $(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \
+ $(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_CPU) \
$(DISABLE_LARGEFILE) \
$(EXTRA_GCC_CONFIG_OPTIONS) \
$(EXTRA_TARGET_GCC_CONFIG_OPTIONS) \
--
1.6.3.2
^ permalink raw reply related
* [Buildroot] [PATCH 1/3] config: Add sparc-leon processors. Readd V7, 8 part of BR2_SPARC_TYPE. Add BR2_GCC_TARGET_CPU. Remove depricated v9 Sparc type.
From: Konrad Eisele @ 2010-10-05 10:50 UTC (permalink / raw)
To: buildroot
In-Reply-To: <4CAB0299.2010903@gaisler.com>
Add the Sparc processor variants hfleon (fpu,v7), hfleonv8 (fpu,v8),
sfleon (softfpu,v7) sfleonv8 (softfpu,v8). Readd the prevously removed BR2_SPARC_TYPE
entry for V7 and V8 as for it is used by uclibc to destinguish between v7 and v8.
Also add entry BR2_GCC_TARGET_CPU that is later used by toolchain/gcc/gcc-uclibc-4.x.mk
to add possblity for adding --with-cpu to gcc's configure. As for V9 seems to be removed
also removed the V9 targets from the choice selection.
Signed-off-by: Konrad Eisele <konrad@gaisler.com>
---
target/Config.in.arch | 31 +++++++++++++++++++------------
1 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/target/Config.in.arch b/target/Config.in.arch
index e08ce5b..d828501 100644
--- a/target/Config.in.arch
+++ b/target/Config.in.arch
@@ -304,6 +304,14 @@ config BR2_sparc_cypress
bool "cypress"
config BR2_sparc_v8
bool "v8"
+config BR2_sparc_sparchfleon
+ bool "hfleon"
+config BR2_sparc_sparchfleonv8
+ bool "hfleonv8"
+config BR2_sparc_sparcsfleon
+ bool "sfleon"
+config BR2_sparc_sparcsfleonv8
+ bool "sfleonv8"
config BR2_sparc_supersparc
bool "supersparc"
config BR2_sparc_sparclite
@@ -320,20 +328,13 @@ config BR2_sparc_sparclet
bool "sparclet"
config BR2_sparc_tsc701
bool "tsc701"
-config BR2_sparc_v9
- bool "v9"
-config BR2_sparc_v9a
- bool "v9a"
-config BR2_sparc_v9b
- bool "v9b"
-config BR2_sparc_ultrasparc
- bool "ultrasparc"
-config BR2_sparc_ultrasparc3
- bool "ultrasparc3"
-config BR2_sparc_niagara
- bool "niagara"
endchoice
+config BR2_SPARC_TYPE
+ string
+ default V7 if BR2_sparc_v7 || BR2_sparc_cypress || BR2_sparc_sparclite || BR2_sparc_f930 || BR2_sparc_f934 || BR2_sparc_sparclite86x || BR2_sparc_sparclet || BR2_sparc_tsc701 || BR2_sparc_sparchfleon || BR2_sparc_sparcsfleon
+ default V8 if BR2_sparc_v8 || BR2_sparc_supersparc || BR2_sparc_hypersparc || BR2_sparc_sparchfleonv8 || BR2_sparc_sparcsfleonv8
+
choice
prompt "Target Architecture Variant"
depends on BR2_xtensa
@@ -666,3 +667,9 @@ config BR2_GCC_TARGET_ABI
default ibmlongdouble if BR2_powerpc && BR2_PPC_ABI_ibmlongdouble
default ieeelongdouble if BR2_powerpc && BR2_PPC_ABI_ieeelongdouble
+config BR2_GCC_TARGET_CPU
+ string
+ default sparchfleon if BR2_sparc_sparchfleon
+ default sparchfleonv8 if BR2_sparc_sparchfleonv8
+ default sparcsfleon if BR2_sparc_sparcsfleon
+ default sparcsfleonv8 if BR2_sparc_sparcsfleonv8
--
1.6.3.2
^ permalink raw reply related
* [Buildroot] Sparc Leon patches
From: Konrad Eisele @ 2010-10-05 10:48 UTC (permalink / raw)
To: buildroot
H,
I prepared 3 Sparc Leon patches. I'll send them as replay to this mail in
a minute. In short they do the following.
0001-config-Add-sparc-leon-processors.-Readd-V7-8-part-of.patch:
Add Sparc Leon processors to target config.
0003-gcc-patch-Add-patch-for-4.4.5-to-support-Sparc-leon-.patch:
Add support for gcc configure option --with-cpu.
0002-toolchain-Add-support-for-with-cpu.patch:
Add gcc patch for 4.4.5 that enables the Sparc Leon variants.
I hope the formatting is ok.
-- Greetings Konrad
^ permalink raw reply
* [Buildroot] [git commit master 1/1] hdparm: needs largefile support
From: Peter Korsgaard @ 2010-10-05 10:08 UTC (permalink / raw)
To: buildroot
commit: http://git.buildroot.net/buildroot/commit/?id=c1d0fae7d0226f044ffab26965213d9785deca27
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
package/hdparm/Config.in | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/package/hdparm/Config.in b/package/hdparm/Config.in
index 1b57439..32bd247 100644
--- a/package/hdparm/Config.in
+++ b/package/hdparm/Config.in
@@ -1,6 +1,10 @@
config BR2_PACKAGE_HDPARM
bool "hdparm"
+ depends on BR2_LARGEFILE
help
hdparm - get/set hard disk parameters for Linux IDE drives.
http://www.ibiblio.org/pub/Linux/system/hardware/
+
+comment "hdparm requires a toolchain with LARGEFILE support"
+ depends on !BR2_LARGEFILE
--
1.7.1
^ permalink raw reply related
* [Buildroot] [git commit master 1/1] ipsec-tools: breaks with parallel builds
From: Peter Korsgaard @ 2010-10-05 10:08 UTC (permalink / raw)
To: buildroot
commit: http://git.buildroot.net/buildroot/commit/?id=f40cb9cb5474ffe06bf05371593c6a9a8ef0d330
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
CHANGES | 10 +++++-----
package/ipsec-tools/ipsec-tools.mk | 1 +
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/CHANGES b/CHANGES
index 4a382a2..9ca8a29 100644
--- a/CHANGES
+++ b/CHANGES
@@ -29,11 +29,11 @@
docker, dosfstools, dropbear, e2fsprogs, expat, ezxml, fbset,
fconfig, ffmpeg, freetype, gadgetfs-test, gamin, gawk, gperf,
gtk2-themes, gtkperf, gvfs, haserl, hdparm, hostapd, hwdata,
- ifplugd, imagemagick, iperf, iproute2, iptables, iw, jpeg,
- kexec, kismet, less, libcgi, libcurl, libdaemon, libdnet,
- liberation, libevent, libeXosip2, libglade, libgtk2, libiconv,
- libidn, libmms, libnl, liboil, libosip2, libpcap, libpng,
- libtool, libungif, libxml2, libxslt, lighttpd, lite,
+ ifplugd, imagemagick, iperf, ipsec-tools, iproute2, iptables,
+ iw, jpeg, kexec, kismet, less, libcgi, libcurl, libdaemon,
+ libdnet, liberation, libevent, libeXosip2, libglade, libgtk2,
+ libiconv, libidn, libmms, libnl, liboil, libosip2, libpcap,
+ libpng, libtool, libungif, libxml2, libxslt, lighttpd, lite,
lm-sensors, lockfile-progs, logrotate, m4, mdadm, mesa3d,
metacity, mtd-utils, mysql_client, nano, nbd, ncftp, neon,
netperf, netsnmp, ng-spice-rework, ntfsprogs, ntp, openntpd,
diff --git a/package/ipsec-tools/ipsec-tools.mk b/package/ipsec-tools/ipsec-tools.mk
index eddc7ce..0861a05 100644
--- a/package/ipsec-tools/ipsec-tools.mk
+++ b/package/ipsec-tools/ipsec-tools.mk
@@ -8,6 +8,7 @@ IPSEC_TOOLS_VERSION = 0.7.3
IPSEC_TOOLS_SOURCE = ipsec-tools-$(IPSEC_TOOLS_VERSION).tar.bz2
IPSEC_TOOLS_SITE = http://ftp.sunet.se/pub/NetBSD/misc/ipsec-tools/0.7/
IPSEC_TOOLS_INSTALL_STAGING = YES
+IPSEC_TOOLS_MAKE = $(MAKE1)
IPSEC_TOOLS_DEPENDENCIES = openssl flex host-flex
# configure hardcodes -Werror, so override CFLAGS on make invocation
--
1.7.1
^ permalink raw reply related
* [Buildroot] [PATCH 05/10] microcom: convert to gentargets
From: Thomas Petazzoni @ 2010-10-05 9:21 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1286266963-23413-5-git-send-email-Martin.Banky@gmail.com>
On Tue, 5 Oct 2010 01:22:38 -0700
Martin Banky <martin.banky@gmail.com> wrote:
> +define MICROCOM_CONFIGURE_CMDS
> + $(ZCAT) $(DL_DIR)/$(MICROCOM_SOURCE) | tar -C $(@D) $(TAR_OPTIONS) -
This sounds strange to me. The extraction is already done by the
package infrastructure.
> toolchain/patch-kernel.sh $(MICROCOM_DIR) package/microcom/ \*.patch
This as well.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [PATCH 06/10] microperl: convert to gentargets
From: Thomas Petazzoni @ 2010-10-05 9:19 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1286266963-23413-6-git-send-email-Martin.Banky@gmail.com>
Hello,
On Tue, 5 Oct 2010 01:22:39 -0700
Martin Banky <martin.banky@gmail.com> wrote:
> +define MICROPERL_CONFIGURE_CMDS
I am not a huge huge fan of this, because it's subverting the purpose
of MICROPERL_CONFIGURE_CMDS to do a more-or-less partial build of
microperl for the host. Do we really need such a partial build ? If so,
shouldn't we create a host-microperl package ?
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
* [Buildroot] [PATCH 01/10] input-tools: convert to gentargets
From: Thomas Petazzoni @ 2010-10-05 9:17 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1286266963-23413-1-git-send-email-Martin.Banky@gmail.com>
Hello,
Thanks Martin for doing all this conversion work, this is much
appreciated!
On Tue, 5 Oct 2010 01:22:34 -0700
Martin Banky <martin.banky@gmail.com> wrote:
> +define INPUT_TOOLS_DEBIAN_PATCHES
> + if [ -d $(@D)/debian/patches ]; then \
> + (cd $(@D)/debian/patches && for i in *; \
> + do $(SED) 's,^\+\+\+ .*joystick-$(INPUT_TOOLS_VERSION)/,+++ joystick-$(INPUT_TOOLS_VERSION)/,' $$i; \
I have seen this in several of your patches, but I don't understand why
it is here. There are several other packages that do apply the debian
patches, but such a sed step is not needed.
> +define INPUT_TOOLS_BUILD_CMDS
> + $(INPUT_TOOLS_DEBIAN_PATCHES)
Even though it doesn't technically make any difference, I'd prefer to
have this as a post-patch hook.
Thanks!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [PATCH 10/10] netplug: convert to gentargets and bump to 1.2.9.2
From: Martin Banky @ 2010-10-05 8:22 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1286266963-23413-1-git-send-email-Martin.Banky@gmail.com>
Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
package/netplug/netplug-1.2.9-disable-werror.patch | 22 --------
.../netplug/netplug-1.2.9.2-makefile-flags.patch | 21 ++++++++
package/netplug/netplug-socklen-type.patch | 12 ----
package/netplug/netplug.mk | 54 ++++++--------------
4 files changed, 36 insertions(+), 73 deletions(-)
delete mode 100644 package/netplug/netplug-1.2.9-disable-werror.patch
create mode 100644 package/netplug/netplug-1.2.9.2-makefile-flags.patch
delete mode 100644 package/netplug/netplug-socklen-type.patch
diff --git a/package/netplug/netplug-1.2.9-disable-werror.patch b/package/netplug/netplug-1.2.9-disable-werror.patch
deleted file mode 100644
index d8a3e15..0000000
--- a/package/netplug/netplug-1.2.9-disable-werror.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-netplug uses nested functions, and gcc generates a warning that
-is turned into an error:
-
-cc1: warnings being treated as errors
-if_info.c: In function 'ifsm_scriptdone':
-if_info.c:289: error: generating trampoline in object (requires executable stack)
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: netplug-1.2.9/Makefile
-===================================================================
---- netplug-1.2.9.orig/Makefile 2010-05-09 21:07:40.000000000 +0200
-+++ netplug-1.2.9/Makefile 2010-05-09 21:09:32.000000000 +0200
-@@ -9,7 +9,7 @@
-
- install_opts :=
-
--CFLAGS += -Wall -Werror -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \
-+CFLAGS += -Wall -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \
- -DNP_SCRIPT_DIR='"$(scriptdir)"' -ggdb3 -O3 -DNP_VERSION='"$(version)"'
-
- netplugd: config.o netlink.o lib.o if_info.o main.o
diff --git a/package/netplug/netplug-1.2.9.2-makefile-flags.patch b/package/netplug/netplug-1.2.9.2-makefile-flags.patch
new file mode 100644
index 0000000..b2468f8
--- /dev/null
+++ b/package/netplug/netplug-1.2.9.2-makefile-flags.patch
@@ -0,0 +1,21 @@
+Preserve the cflags settings, because buildroot clobbers them.
+
+--- a/Makefile 2010-10-05 00:06:38.000000000 -0700
++++ b/Makefile 2010-10-05 00:15:27.000000000 -0700
+@@ -11,11 +11,14 @@ mandir ?= $(prefix)/usr/share/man
+
+ install_opts :=
+
+-CFLAGS += -Wall -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \
++NETPLUG_CFLAGS += -Wall -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \
+ -DNP_SCRIPT_DIR='"$(scriptdir)"' -ggdb3 -O3 -DNP_VERSION='"$(version)"'
+
++%.o: %.c
++ $(CC) $(NETPLUG_CFLAGS) $(CFLAGS) -c -o $@ $<
++
+ netplugd: config.o netlink.o lib.o if_info.o main.o
+- $(CC) $(LDFLAGS) -o $@ $^
++ $(CC) $(LDFLAGS) -o $@ $(NETPLUG_CFLAGS) $^
+
+ install:
+ install -d $(install_opts) -m 755 \
diff --git a/package/netplug/netplug-socklen-type.patch b/package/netplug/netplug-socklen-type.patch
deleted file mode 100644
index 1e36988..0000000
--- a/package/netplug/netplug-socklen-type.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur netplug-1.2.9/netlink.c netplug-1.2.9-patched/netlink.c
---- netplug-1.2.9/netlink.c 2005-01-07 23:57:09.000000000 -0600
-+++ netplug-1.2.9-patched/netlink.c 2008-02-27 20:18:09.855767996 -0600
-@@ -284,7 +284,7 @@
- exit(1);
- }
-
-- int addr_len = sizeof(addr);
-+ socklen_t addr_len = sizeof(addr);
-
- if (getsockname(fd, (struct sockaddr *) &addr, &addr_len) == -1) {
- do_log(LOG_ERR, "Could not get socket details: %m");
diff --git a/package/netplug/netplug.mk b/package/netplug/netplug.mk
index 74fa0c5..a411d86 100644
--- a/package/netplug/netplug.mk
+++ b/package/netplug/netplug.mk
@@ -3,51 +3,27 @@
# netplug
#
#############################################################
-NETPLUG_VERSION=1.2.9
+NETPLUG_VERSION=1.2.9.2
NETPLUG_SOURCE=netplug-$(NETPLUG_VERSION).tar.bz2
NETPLUG_SITE=http://www.red-bean.com/~bos/netplug
-NETPLUG_DIR=$(BUILD_DIR)/netplug-$(NETPLUG_VERSION)
-NETPLUG_CAT:=$(BZCAT)
-NETPLUG_BINARY:=netplugd
-NETPLUG_TARGET_BINARY:=sbin/netplugd
-$(DL_DIR)/$(NETPLUG_SOURCE):
- $(call DOWNLOAD,$(NETPLUG_SITE),$(NETPLUG_SOURCE))
+define NETPLUG_BUILD_CMDS
+ $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D)
+endef
-netplug-source: $(DL_DIR)/$(NETPLUG_SOURCE)
+define NETPLUG_INSTALL_TARGET_CMDS
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
+endef
-$(NETPLUG_DIR)/.unpacked: $(DL_DIR)/$(NETPLUG_SOURCE)
- $(NETPLUG_CAT) $(DL_DIR)/$(NETPLUG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(NETPLUG_DIR) package/netplug/ netplug\*.patch
- touch $(NETPLUG_DIR)/.unpacked
-
-$(NETPLUG_DIR)/$(NETPLUG_BINARY): $(NETPLUG_DIR)/.unpacked
- $(MAKE) CC="$(TARGET_CC)" -C $(NETPLUG_DIR)
- $(STRIPCMD) $(NETPLUG_DIR)/$(NETPLUG_BINARY)
-
-$(TARGET_DIR)/$(NETPLUG_TARGET_BINARY): $(NETPLUG_DIR)/$(NETPLUG_BINARY)
- $(INSTALL) -m 644 -D $(NETPLUG_DIR)/etc/netplugd.conf $(TARGET_DIR)/etc/netplug/netplugd.conf
- $(INSTALL) -m 755 -D package/netplug/netplug-script $(TARGET_DIR)/etc/netplug.d/netplug
- $(INSTALL) -m 755 -D package/netplug/S29netplug $(TARGET_DIR)/etc/init.d
- $(INSTALL) -m 755 -D $(NETPLUG_DIR)/$(NETPLUG_BINARY) $(TARGET_DIR)/$(NETPLUG_TARGET_BINARY)
- touch -c $(TARGET_DIR)/$(NETPLUG_TARGET_BINARY)
-
-netplug: $(TARGET_DIR)/$(NETPLUG_TARGET_BINARY)
-
-netplug-clean:
- rm -f $(TARGET_DIR)/$(NETPLUG_TARGET_BINARY)
+define NETPLUG_UNINSTALL_TARGET_CMDS
+ rm -f $(TARGET_DIR)/sbin/netplugd
rm -rf $(TARGET_DIR)/etc/netplug*
rm -f $(TARGET_DIR)/etc/init.d/S*netplug
- -$(MAKE) -C $(NETPLUG_DIR) clean
+endef
-netplug-dirclean:
- rm -rf $(NETPLUG_DIR)
+define NETPLUG_CLEAN_CMDS
+ $(MAKE) -C $(@D) clean
+endef
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_NETPLUG),y)
-TARGETS+=netplug
-endif
+$(eval $(call GENTARGETS,package,netplug))
--
1.7.3.1
^ permalink raw reply related
* [Buildroot] [PATCH 09/10] mplayer: convert to gentargets
From: Martin Banky @ 2010-10-05 8:22 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1286266963-23413-1-git-send-email-Martin.Banky@gmail.com>
Would have bumped the version, but someone smarter than me is going to have to
do it.
Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
package/multimedia/mplayer/mplayer.mk | 88 +++++++++++---------------------
1 files changed, 30 insertions(+), 58 deletions(-)
diff --git a/package/multimedia/mplayer/mplayer.mk b/package/multimedia/mplayer/mplayer.mk
index ac3a67e..a53c687 100644
--- a/package/multimedia/mplayer/mplayer.mk
+++ b/package/multimedia/mplayer/mplayer.mk
@@ -3,67 +3,54 @@
# mplayer
#
#############################################################
-MPLAYER_VERSION:=1.0rc2
-MPLAYER_SOURCE:=MPlayer-$(MPLAYER_VERSION).tar.bz2
-MPLAYER_SITE:=http://www7.mplayerhq.hu/MPlayer/releases
-MPLAYER_DIR:=$(BUILD_DIR)/MPlayer-$(MPLAYER_VERSION)
-MPLAYER_CAT:=$(BZCAT)
-MPLAYER_BINARY:=mplayer
-MPLAYER_TARGET_BINARY:=usr/bin/$(MPLAYER_BINARY)
+MPLAYER_VERSION = 1.0rc2
+MPLAYER_SOURCE = MPlayer-$(MPLAYER_VERSION).tar.bz2
+MPLAYER_SITE = http://www.mplayerhq.hu/MPlayer/releases
MPLAYER_DEPENDENCIES = \
$(if $(BR2_PACKAGE_LIBMAD),libmad) \
$(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib)
ifeq ($(BR2_ENDIAN),"BIG")
-MPLAYER_ENDIAN:=--enable-big-endian
+MPLAYER_CONF_OPTS += --enable-big-endian
else
-MPLAYER_ENDIAN:=--disable-big-endian
+MPLAYER_CONF_OPTS += --disable-big-endian
endif
-# mplayer unfortunately uses --disable-largefileS, so we cannot use
+# mplayer unfortunately uses --disable-largefiles, so we cannot use
# DISABLE_LARGEFILE
ifeq ($(BR2_LARGEFILE),y)
-MPLAYER_LARGEFILE:=--enable-largefiles
+MPLAYER_CONF_OPTS += --enable-largefiles
else
# dvdread/dvdcss requires largefile support
-MPLAYER_LARGEFILE:=--disable-largefiles \
+MPLAYER_CONF_OPTS += --disable-largefiles \
--disable-dvdread-internal \
--disable-libdvdcss-internal
endif
ifeq ($(BR2_PACKAGE_SDL),y)
-MPLAYER_SDL:=--enable-sdl --with-sdl-config=$(STAGING_DIR)/usr/bin/sdl-config
+MPLAYER_CONF_OPTS += --enable-sdl --with-sdl-config=$(STAGING_DIR)/usr/bin/sdl-config
MPLAYER_DEPENDENCIES += sdl
else
-MPLAYER_SDL:=--disable-sdl
+MPLAYER_CONF_OPTS += --disable-sdl
endif
ifeq ($(BR2_PACKAGE_FREETYPE),y)
-MPLAYER_FREETYPE:= \
+MPLAYER_CONF_OPTS += \
--enable-freetype \
--with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config
MPLAYER_DEPENDENCIES += freetype
else
-MPLAYER_FREETYPE:=--disable-freetype
+MPLAYER_CONF_OPTS += --disable-freetype
endif
ifeq ($(BR2_i386),y)
# This seems to be required to compile some of the inline asm
-MPLAYER_CFLAGS:=-fomit-frame-pointer
+MPLAYER_CFLAGS = -fomit-frame-pointer
endif
-$(DL_DIR)/$(MPLAYER_SOURCE):
- $(call DOWNLOAD,$(MPLAYER_SITE),$(MPLAYER_SOURCE))
-
-$(MPLAYER_DIR)/.unpacked: $(DL_DIR)/$(MPLAYER_SOURCE)
- $(MPLAYER_CAT) $(DL_DIR)/$(MPLAYER_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(MPLAYER_DIR) package/multimedia/mplayer/ mplayer-$(MPLAYER_VERSION)\*.patch\*
- $(CONFIG_UPDATE) $(MPLAYER_DIR)
- touch $@
-
-$(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked
- (cd $(MPLAYER_DIR); rm -rf config.cache; \
+define MPLAYER_CONFIGURE_CMDS
+ (cd $(@D); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
CFLAGS="$(TARGET_CFLAGS) $(MPLAYER_CFLAGS)" \
@@ -80,44 +67,29 @@ $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked
--charset=UTF-8 \
--enable-mad \
--enable-fbdev \
- $(MPLAYER_ENDIAN) \
- $(MPLAYER_LARGEFILE) \
- $(MPLAYER_SDL) \
- $(MPLAYER_FREETYPE) \
+ $(MPLAYER_CONF_OPTS) \
--enable-cross-compile \
--disable-ivtv \
--disable-tv \
--disable-live \
--enable-dynamic-plugins \
)
- touch $@
-
-$(MPLAYER_DIR)/$(MPLAYER_BINARY): $(MPLAYER_DIR)/.configured
- $(MAKE1) -C $(MPLAYER_DIR)
- touch -c $@
+endef
-$(TARGET_DIR)/$(MPLAYER_TARGET_BINARY): $(MPLAYER_DIR)/$(MPLAYER_BINARY)
- $(INSTALL) -m 0755 -D $(MPLAYER_DIR)/$(MPLAYER_BINARY) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
- -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
- touch -c $@
+define MPLAYER_BUILD_CMDS
+ $(MAKE1) -C $(@D)
+endef
-mplayer: $(MPLAYER_DEPENDENCIES) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
+define MPLAYER_INSTALL_TARGET_CMDS
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
+endef
-mplayer-source: $(DL_DIR)/$(MPLAYER_SOURCE)
+define MPLAYER_UNINSTALL_TARGET_CMDS
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall
+endef
-mplayer-unpacked: $(MPLAYER_DIR)/.unpacked
+define MPLAYER_CLEAN_CMDS
+ $(MAKE) -C $(@D) clean
+endef
-mplayer-clean:
- rm -f $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
- -$(MAKE) -C $(MPLAYER_DIR) clean
-
-mplayer-dirclean:
- rm -rf $(MPLAYER_DIR)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_MPLAYER),y)
-TARGETS+=mplayer
-endif
+$(eval $(call GENTARGETS,package/multimedia,mplayer))
--
1.7.3.1
^ permalink raw reply related
* [Buildroot] [PATCH 08/10] alsa-utils: convert to autotargets and bump to 1.0.23
From: Martin Banky @ 2010-10-05 8:22 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1286266963-23413-1-git-send-email-Martin.Banky@gmail.com>
Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
package/multimedia/alsa-utils/alsa-utils.mk | 96 ++++++---------------------
1 files changed, 20 insertions(+), 76 deletions(-)
diff --git a/package/multimedia/alsa-utils/alsa-utils.mk b/package/multimedia/alsa-utils/alsa-utils.mk
index 3d1b0ef..9bac6b8 100644
--- a/package/multimedia/alsa-utils/alsa-utils.mk
+++ b/package/multimedia/alsa-utils/alsa-utils.mk
@@ -3,52 +3,23 @@
# alsa-utils
#
#############################################################
-ALSA_UTILS_VERSION:=1.0.22
-ALSA_UTILS_SOURCE:=alsa-utils-$(ALSA_UTILS_VERSION).tar.bz2
-ALSA_UTILS_SITE:=ftp://ftp.alsa-project.org/pub/utils
-ALSA_UTILS_DIR:=$(BUILD_DIR)/alsa-utils-$(ALSA_UTILS_VERSION)
-ALSA_UTILS_CAT:=$(BZCAT)
-ALSA_UTILS_BINARY:=alsactl/alsactl
-ALSA_UTILS_TARGET_BINARY:=usr/sbin/alsactl
+ALSA_UTILS_VERSION = 1.0.23
+ALSA_UTILS_SOURCE = alsa-utils-$(ALSA_UTILS_VERSION).tar.bz2
+ALSA_UTILS_SITE = ftp://ftp.alsa-project.org/pub/utils
+ALSA_UTILS_INSTALL_STAGING = YES
+ALSA_UTILS_DEPENDENCIES = alsa-lib \
+ $(if $(BR2_PACKAGE_NCURSES),ncurses) \
+ $(if $(BR2_PACKAGE_LIBINTL),libintl) \
+ $(if $(BR2_PACKAGE_LIBICONV),libiconv)
-ALSA_UTILS_CONFIGURE_OPTS =
-ifneq ($(BR2_PACKAGE_ALSA_UTILS_ALSAMIXER),y)
-ALSA_UTILS_CONFIGURE_OPTS += --disable-alsamixer --disable-alsatest
-endif
-
-$(DL_DIR)/$(ALSA_UTILS_SOURCE):
- $(call DOWNLOAD,$(ALSA_UTILS_SITE),$(ALSA_UTILS_SOURCE))
-
-$(ALSA_UTILS_DIR)/.unpacked: $(DL_DIR)/$(ALSA_UTILS_SOURCE)
- $(ALSA_UTILS_CAT) $(DL_DIR)/$(ALSA_UTILS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(ALSA_UTILS_DIR) package/multimedia/alsa-utils/ alsa-utils-$(ALSA_UTILS_VERSION)\*.patch
- $(CONFIG_UPDATE) $(ALSA_UTILS_DIR)
- touch $@
+ALSA_UTILS_CONF_ENV = ac_cv_prog_ncurses5_config=$(STAGING_DIR)/bin/ncurses5-config
-$(ALSA_UTILS_DIR)/.configured: $(ALSA_UTILS_DIR)/.unpacked
- (cd $(ALSA_UTILS_DIR); rm -f config.cache; \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- CFLAGS="$(TARGET_CFLAGS)" \
- LDFLAGS="$(TARGET_LDFLAGS)" \
- ac_cv_prog_ncurses5_config=$(STAGING_DIR)/bin/ncurses5-config \
- ./configure $(QUIET) \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=/usr \
- $(ALSA_UTILS_CONFIGURE_OPTS) \
- --disable-xmlto \
- --with-curses=ncurses \
- )
- touch $@
+ALSA_UTILS_CONF_OPT = --disable-xmlto \
+ --with-curses=ncurses
-$(ALSA_UTILS_DIR)/$(ALSA_UTILS_BINARY): $(ALSA_UTILS_DIR)/.configured
- $(MAKE) CC="$(TARGET_CC)" -C $(ALSA_UTILS_DIR)
- touch -c $@
-
-ALSA_UTILS_TARGETS_ :=
-ALSA_UTILS_TARGETS_y :=
+ifneq ($(BR2_PACKAGE_ALSA_UTILS_ALSAMIXER),y)
+ALSA_UTILS__CONF_OPT += --disable-alsamixer --disable-alsatest
+endif
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSACONF) += usr/sbin/alsaconf
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSACTL) += usr/sbin/alsactl
@@ -65,13 +36,10 @@ ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ASEQDUMP) += usr/bin/aseqdump
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ASEQNET) += usr/bin/aseqnet
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST) += usr/bin/speaker-test
-$(TARGET_DIR)/$(ALSA_UTILS_TARGET_BINARY): $(ALSA_UTILS_DIR)/$(ALSA_UTILS_BINARY)
- $(MAKE) DESTDIR=$(STAGING_DIR) -C $(ALSA_UTILS_DIR) install
- mkdir -p $(TARGET_DIR)/usr/bin
- mkdir -p $(TARGET_DIR)/usr/sbin
- for file in $(ALSA_UTILS_TARGETS_y); do \
- cp -dpf $(STAGING_DIR)/$$file $(TARGET_DIR)/$$file; \
- done
+define ALSA_UTILS_INSTALL_TARGET_CMDS
+ test -z "$(ALSA_UTILS_INSTALL_FILES_y)" || \
+ install -D -m 755 $(addprefix $(STAGING_DIR)/,$(ALSA_UTILS_TARGETS_y)) \
+ $(TARGET_DIR)/usr/bin/
if [ -x "$(TARGET_DIR)/usr/bin/speaker-test" ]; then \
mkdir -p $(TARGET_DIR)/usr/share/alsa/speaker-test; \
mkdir -p $(TARGET_DIR)/usr/share/sounds/alsa; \
@@ -83,30 +51,6 @@ $(TARGET_DIR)/$(ALSA_UTILS_TARGET_BINARY): $(ALSA_UTILS_DIR)/$(ALSA_UTILS_BINARY
rm -rf $(TARGET_DIR)/usr/share/alsa/; \
cp -rdpf $(STAGING_DIR)/usr/share/alsa/ $(TARGET_DIR)/usr/share/alsa/; \
fi
- touch -c $@
-
-alsa-utils: alsa-lib $(if $(BR2_PACKAGE_NCURSES),ncurses) $(if $(BR2_PACKAGE_LIBINTL),libintl) $(if $(BR2_PACKAGE_LIBICONV),libiconv) $(TARGET_DIR)/$(ALSA_UTILS_TARGET_BINARY)
+endef
-alsa-utils-unpacked: $(ALSA_UTILS_DIR)/.unpacked
-
-alsa-utils-source: $(DL_DIR)/$(ALSA_UTILS_SOURCE)
-
-alsa-utils-clean:
- for file in $(ALSA_UTILS_TARGETS_y); do \
- rm -f $(TARGET_DIR)/$$file; \
- done
- for file in $(ALSA_UTILS_TARGETS_); do \
- rm -f $(TARGET_DIR)/$$file; \
- done
- -$(MAKE) -C $(ALSA_UTILS_DIR) clean
-
-alsa-utils-dirclean:
- rm -rf $(ALSA_UTILS_DIR)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_ALSA_UTILS),y)
-TARGETS+=alsa-utils
-endif
+$(eval $(call AUTOTARGETS,package/multimedia,alsa-utils))
--
1.7.3.1
^ permalink raw reply related
* [Buildroot] [PATCH 07/10] mii-diag: convert to gentargets and bump to 2.11.3
From: Martin Banky @ 2010-10-05 8:22 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1286266963-23413-1-git-send-email-Martin.Banky@gmail.com>
Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
package/mii-diag/mii-diag.mk | 80 ++++++++++++++++--------------------------
1 files changed, 30 insertions(+), 50 deletions(-)
diff --git a/package/mii-diag/mii-diag.mk b/package/mii-diag/mii-diag.mk
index ba01c0e..8870073 100644
--- a/package/mii-diag/mii-diag.mk
+++ b/package/mii-diag/mii-diag.mk
@@ -3,59 +3,39 @@
# mii-diag
#
#############################################################
-MIIDIAG_VERSION:=2.11
-MIIDIAG_DEBIAN_PATCH_LEVEL:=2
-MIIDIAG_SOURCE:=mii-diag_$(MIIDIAG_VERSION).orig.tar.gz
-MIIDIAG_PATCH_FILE=mii-diag_$(MIIDIAG_VERSION)-$(MIIDIAG_DEBIAN_PATCH_LEVEL).diff.gz
-MIIDIAG_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mii-diag
-MIIDIAG_DIR:=$(BUILD_DIR)/mii-diag-$(MIIDIAG_VERSION)
-MIIDIAG_CAT:=$(ZCAT)
-MIIDIAG_BINARY:=usr/sbin/mii-diag
-
-ifneq ($(MIIDIAG_PATCH_FILE),)
-MIIDIAG_PATCH=$(DL_DIR)/$(MIIDIAG_PATCH_FILE)
-$(MIIDIAG_PATCH):
- $(call DOWNLOAD,$(MIIDIAG_SITE),$(MIIDIAG_PATCH_FILE))
-endif
-
-$(DL_DIR)/$(MIIDIAG_SOURCE):
- $(call DOWNLOAD,$(MIIDIAG_SITE),$(MIIDIAG_SOURCE))
-
-$(MIIDIAG_DIR)/.unpacked: $(DL_DIR)/$(MIIDIAG_SOURCE) $(MIIDIAG_PATCH)
- mkdir -p $(MIIDIAG_DIR)
- $(MIIDIAG_CAT) $(DL_DIR)/$(MIIDIAG_SOURCE) | tar --strip 1 -C $(MIIDIAG_DIR) $(TAR_OPTIONS) -
-ifneq ($(MIIDIAG_PATCH_FILE),)
- (cd $(MIIDIAG_DIR) && $(MIIDIAG_CAT) $(MIIDIAG_PATCH) | patch -p1)
+MII_DIAG_VERSION = 2.11
+MII_DIAG_SOURCE = mii-diag_$(MII_DIAG_VERSION).orig.tar.gz
+MII_DIAG_PATCH = mii-diag_$(MII_DIAG_VERSION)-3.diff.gz
+MII_DIAG_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mii-diag
+
+ifneq ($(MII_DIAG_PATCH),)
+define MII_DIAG_DEBIAN_PATCHES
+ if [ -d $(@D)/debian/patches ]; then \
+ (cd $(@D)/debian/patches && for i in *; \
+ do $(SED) 's,^\+\+\+ .*mii-diag-$(MII_DIAG_VERSION)/,+++ mii-diag-$(MII_DIAG_VERSION)/,' $$i; \
+ done; \
+ ); \
+ toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.patch; \
+ fi
+endef
endif
- toolchain/patch-kernel.sh $(MIIDIAG_DIR) package/mii-diag/ mii-diag-\*.patch*
- touch $@
-
-$(MIIDIAG_DIR)/.configured: $(MIIDIAG_DIR)/.unpacked
- touch $@
-
-$(MIIDIAG_DIR)/mii-diag: $(MIIDIAG_DIR)/.configured
- $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" -C $(MIIDIAG_DIR)
-$(TARGET_DIR)/$(MIIDIAG_BINARY): $(MIIDIAG_DIR)/mii-diag
- $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" -C $(MIIDIAG_DIR) DESTDIR=$(TARGET_DIR) install
- $(STRIPCMD) $@
- touch $@
+define MII_DIAG_BUILD_CMDS
+ $(MII_DIAG_DEBIAN_PATCHES)
+ $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D)
+endef
-mii-diag: $(TARGET_DIR)/$(MIIDIAG_BINARY)
+define MII_DIAG_INSTALL_TARGET_CMDS
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
+endef
-mii-diag-source: $(DL_DIR)/$(MIIDIAG_SOURCE) $(MIIDIAG_PATCH)
+define MII_DIAG_UNINSTALL_TARGET_CMDS
+ rm -f $(TARGET_DIR)/usr/sbin/mii-diag
+endef
-mii-diag-clean:
- -$(MAKE) -C $(MIIDIAG_DIR) clean
+define MII_DIAG_CLEAN_CMDS
+ $(MAKE) -C $(@D) clean
+endef
-mii-diag-dirclean:
- rm -rf $(MIIDIAG_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_MIIDIAG),y)
-TARGETS+=mii-diag
-endif
+$(eval $(call GENTARGETS,package,mii-diag))
--
1.7.3.1
^ permalink raw reply related
* [Buildroot] [PATCH 06/10] microperl: convert to gentargets
From: Martin Banky @ 2010-10-05 8:22 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1286266963-23413-1-git-send-email-Martin.Banky@gmail.com>
Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
package/microperl/microperl.mk | 145 ++++++++++++++-------------------------
1 files changed, 52 insertions(+), 93 deletions(-)
diff --git a/package/microperl/microperl.mk b/package/microperl/microperl.mk
index bf76fa7..5b18606 100644
--- a/package/microperl/microperl.mk
+++ b/package/microperl/microperl.mk
@@ -3,122 +3,81 @@
# microperl
#
#############################################################
-MICROPERL_MAJ=5
-MICROPERL_VERSION=$(MICROPERL_MAJ).8.8
+MICROPERL_VERSION=5.8.8
MICROPERL_SOURCE=perl-$(MICROPERL_VERSION).tar.bz2
-MICROPERL_CAT:=$(BZCAT)
MICROPERL_SITE=ftp://ftp.cpan.org/pub/CPAN/src/5.0
-MICROPERL_DIR=$(BUILD_DIR)/perl-$(MICROPERL_VERSION)
-MICROPERL_MODS_DIR=/usr/lib/perl$(MICROPERL_MAJ)/$(MICROPERL_VERSION)
+MICROPERL_MODS_DIR=/usr/lib/perl5/$(MICROPERL_VERSION)
MICROPERL_MODS=$(call qstrip,$(BR2_PACKAGE_MICROPERL_MODULES))
+
ifeq ($(BR2_PACKAGE_AUTOMAKE),y)
MICROPERL_MODS+=File/Basename.pm Errno.pm Config.pm IO/File.pm Symbol.pm \
SelectSaver.pm IO/Seekable.pm IO/Handle.pm IO.pm XSLoader.pm \
DynaLoader.pm AutoLoader.pm Carp/Heavy.pm
endif
-$(DL_DIR)/$(MICROPERL_SOURCE):
- $(call DOWNLOAD,$(MICROPERL_SITE),$(MICROPERL_SOURCE))
-$(MICROPERL_DIR)/.source: $(DL_DIR)/$(MICROPERL_SOURCE)
- $(MICROPERL_CAT) $(DL_DIR)/$(MICROPERL_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+define MICROPERL_CONFIGURE_CMDS
# makedepend contains bashisms
$(SED) 's~sh ./makedepend~bash ./makedepend~' \
- $(MICROPERL_DIR)/Makefile.SH \
- $(MICROPERL_DIR)/x2p/Makefile.SH \
- $(MICROPERL_DIR)/pod/Makefile.SH
- chmod -R u+w $(MICROPERL_DIR)
- touch $@
-
-$(MICROPERL_DIR)/.host_configured: $(MICROPERL_DIR)/.source
+ $(@D)/Makefile.SH \
+ $(@D)/x2p/Makefile.SH \
+ $(@D)/pod/Makefile.SH
+ chmod -R u+w $(@D)
# we need to build a perl for the host just for Errno.pm
- (cd $(MICROPERL_DIR); ./Configure -Dcc=$(HOSTCC) -de )
- touch $@
-
-
-$(MICROPERL_DIR)/.host_configured_and_fixed: $(MICROPERL_DIR)/.host_configured
- $(SED) 's/^.*<command-line>.*//g' $(MICROPERL_DIR)/Makefile
- $(SED) 's/^.*<command-line>.*//g' $(MICROPERL_DIR)/x2p/Makefile
- $(SED) 's/^.*<command-line>.*//g' $(MICROPERL_DIR)/makefile
- $(SED) 's/^.*<command-line>.*//g' $(MICROPERL_DIR)/x2p/makefile
- touch $@
-
-$(MICROPERL_DIR)/.host_make: $(MICROPERL_DIR)/.host_configured_and_fixed
- $(MAKE) -C $(MICROPERL_DIR) || echo "An error is expected on make"
- touch $@
-
-$(MICROPERL_DIR)/.host_make_fixed: $(MICROPERL_DIR)/.host_make
- $(MAKE) -C $(MICROPERL_DIR) test || echo "An error is expected on make test"
- touch $@
-
-$(MICROPERL_DIR)/.configured: $(MICROPERL_DIR)/.host_make_fixed
+ (cd $(@D); ./Configure -Dcc=$(HOSTCC) -de )
+ $(SED) 's/^.*<command-line>.*//g' $(@D)/Makefile
+ $(SED) 's/^.*<command-line>.*//g' $(@D)/x2p/Makefile
+ $(SED) 's/^.*<command-line>.*//g' $(@D)/makefile
+ $(SED) 's/^.*<command-line>.*//g' $(@D)/x2p/makefile
+endef
+
+define MICROPERL_BUILD_CMDS
+ $(MAKE) -C $(@D) || echo "An error is expected on make"
+ $(MAKE) -C $(@D) test || echo "An error is expected on make test"
# we need to build a perl for the host just for Errno.pm
- (cd $(MICROPERL_DIR); \
- chmod a+x ext/util/make_ext; \
- ext/util/make_ext nonxs Errno MAKE="$(firstword $(MAKE))" \
+ (cd $(@D); \
+ chmod a+x ext/util/make_ext; \
+ ext/util/make_ext nonxs Errno MAKE="$(firstword $(MAKE))" \
)
- (cd $(MICROPERL_DIR); \
- chmod u+w uconfig.h; ./uconfig.sh; \
- $(MAKE) -f $(MICROPERL_DIR)/Makefile.micro regen_uconfig; \
- $(SED) 's,PRIVLIB ".*,PRIVLIB "/$(MICROPERL_MODS_DIR)",' \
- -e 's,PRIVLIB_EXP ".*,PRIVLIB_EXP "$(MICROPERL_MODS_DIR)",' \
- -e 's,BIN ".*,BIN "/usr/bin",' \
- ./uconfig.h; \
+ (cd $(@D); \
+ chmod u+w uconfig.h; ./uconfig.sh; \
+ $(MAKE) -f $(@D)/Makefile.micro regen_uconfig; \
+ $(SED) 's,PRIVLIB ".*,PRIVLIB "/$(MICROPERL_MODS_DIR)",' \
+ -e 's,PRIVLIB_EXP ".*,PRIVLIB_EXP "$(MICROPERL_MODS_DIR)",' \
+ -e 's,BIN ".*,BIN "/usr/bin",' \
+ ./uconfig.h; \
)
- touch $@
-
-$(MICROPERL_DIR)/microperl: $(MICROPERL_DIR)/.configured
- $(MAKE) -f $(MICROPERL_DIR)/Makefile.micro CC="$(TARGET_CC)" \
- OPTIMIZE="$(TARGET_CFLAGS)" -C $(MICROPERL_DIR)
-ifeq ($(BR2_PACKAGE_AUTOMAKE),y)
- #(cd $(@D); \
- # CONFIG=uconfig.h $(SHELL) ext/util/make_ext nonxs Errno MAKE="$(firstword $(MAKE))"; \
- #)
-endif
+ $(MAKE) -f $(@D)/Makefile.micro CC="$(TARGET_CC)" \
+ OPTIMIZE="$(TARGET_CFLAGS)" -C $(@D)
+endef
-$(TARGET_DIR)/usr/bin/microperl: $(MICROPERL_DIR)/microperl
ifneq ($(MICROPERL_MODS),)
- (cd $(MICROPERL_DIR); \
- for i in $(patsubst %,$(TARGET_DIR)/$(MICROPERL_MODS_DIR)/%,$(dir $(MICROPERL_MODS))); do \
- [ -d $$i ] || mkdir -p $$i; \
- done; \
- for i in $(MICROPERL_MODS); do \
- cp -dpf $(MICROPERL_DIR)/lib/$$i $(TARGET_DIR)/$(MICROPERL_MODS_DIR)/$$i; \
- done; \
+define MICROPERL_INSTALL_MODS
+ (cd $(@D); \
+ for i in $(patsubst %,$(TARGET_DIR)/$(MICROPERL_MODS_DIR)/%,$(dir $(MICROPERL_MODS))); do \
+ [ -d $$i ] || mkdir -p $$i; \
+ done; \
+ for i in $(MICROPERL_MODS); do \
+ install -D -m 644 $(@D)/lib/$$i $(TARGET_DIR)/$(MICROPERL_MODS_DIR)/$$i; \
+ done; \
)
+endef
endif
- cp -dpf $(MICROPERL_DIR)/microperl $@
-ifneq ($(BR2_STRIP_none),y)
- $(STRIPCMD) $(STRIP_STRIP_ALL) $@
-endif
- (cd $(TARGET_DIR)/usr/bin; rm -f perl; ln -s microperl perl;)
-microperl: $(TARGET_DIR)/usr/bin/microperl
-
-microperl-source: $(DL_DIR)/$(MICROPERL_SOURCE)
-
-microperl-unpacked: $(MICROPERL_DIR)/.source
-
-microperl-config: $(MICROPERL_DIR)/.host_configured
-
-microperl-host: $(MICROPERL_DIR)/.host_make
-
-microperl-host-fixed: $(MICROPERL_DIR)/.host_make_fixed
+define MICROPERL_INSTALL_TARGET_CMDS
+ $(MICROPERL_INSTALL_MODS)
+ install -D -m 755 $(@D)/microperl $(TARGET_DIR)/usr/bin/microperl
+ (cd $(TARGET_DIR)/usr/bin; rm -f perl; ln -s microperl perl;)
+endef
-microperl-clean:
+define MICROPERL_UNINSTALL_TARGET_CMDS
rm -rf $(TARGET_DIR)/usr/bin/microperl \
$(TARGET_DIR)/$(MICROPERL_MODS_DIR) $(TARGET_DIR)/usr/bin/perl
- -rmdir $(TARGET_DIR)/usr/lib/perl$(MICROPERL_MAJ)
- -$(MAKE) -C $(MICROPERL_DIR) -f Makefile.micro clean
+ -rmdir $(TARGET_DIR)/usr/lib/perl5
+endef
-microperl-dirclean:
- rm -rf $(MICROPERL_DIR)
+define MICROPERL_CLEAN_CMDS
+ -$(MAKE) -C $(@D) -f Makefile.micro clean
+endef
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_MICROPERL),y)
-TARGETS+=microperl
-endif
+$(eval $(call GENTARGETS,package,microperl))
--
1.7.3.1
^ permalink raw reply related
* [Buildroot] [PATCH 05/10] microcom: convert to gentargets
From: Martin Banky @ 2010-10-05 8:22 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1286266963-23413-1-git-send-email-Martin.Banky@gmail.com>
The microcom archive is a flat archive, so the Makefile.package.in extract
function fails to extract any files. The $(TAR_STRIP_COMPONENTS)=1 seems to
strip the file names off.
Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
.../microcom/-microcom-102-001-speed-defines.patch | 34 ++++++++
.../-microcom-102-002-rename-variable-log.patch | 78 +++++++++++++++++++
.../microcom/microcom-102-001-speed-defines.patch | 34 --------
.../microcom-102-002-rename-variable-log.patch | 78 -------------------
package/microcom/microcom.mk | 80 +++++--------------
5 files changed, 133 insertions(+), 171 deletions(-)
create mode 100644 package/microcom/-microcom-102-001-speed-defines.patch
create mode 100644 package/microcom/-microcom-102-002-rename-variable-log.patch
delete mode 100644 package/microcom/microcom-102-001-speed-defines.patch
delete mode 100644 package/microcom/microcom-102-002-rename-variable-log.patch
diff --git a/package/microcom/-microcom-102-001-speed-defines.patch b/package/microcom/-microcom-102-001-speed-defines.patch
new file mode 100644
index 0000000..b9aece8
--- /dev/null
+++ b/package/microcom/-microcom-102-001-speed-defines.patch
@@ -0,0 +1,34 @@
+diff -rdup microcom-1.02.orig/help.c microcom-1.02/help.c
+--- microcom-1.02.orig/help.c 2000-07-30 06:15:47.000000000 +0200
++++ microcom-1.02/help.c 2007-01-19 19:44:19.000000000 +0100
+@@ -273,12 +273,29 @@ static void help_set_speed(int fd, char
+ B19200,
+ B38400,
+ B57600,
++#if defined B115200
+ B115200,
++#endif
++#if defined B230400
+ B230400,
++#endif
++#if defined B460800
+ B460800
++#endif
+ };
++#undef __STOPCHAR
++#if defined B115200
++#define __STOPCHAR 'h'
++#endif
++#if defined B230400
++#define __STOPCHAR 'i'
++#endif
++#if defined B460800
++#define __STOPCHAR 'j'
++#endif
+
+- if (c < 'a' && c > 'j') {
++
++ if (c < 'a' && c > __STOPCHAR) {
+ if (c == '~') {
+ help_speed();
+ return;
diff --git a/package/microcom/-microcom-102-002-rename-variable-log.patch b/package/microcom/-microcom-102-002-rename-variable-log.patch
new file mode 100644
index 0000000..8516b56
--- /dev/null
+++ b/package/microcom/-microcom-102-002-rename-variable-log.patch
@@ -0,0 +1,78 @@
+diff -rdup microcom-1.02.speed/help.c microcom-1.02/help.c
+--- microcom-1.02.speed/help.c 2007-01-19 19:44:19.000000000 +0100
++++ microcom-1.02/help.c 2007-01-19 19:48:20.000000000 +0100
+@@ -23,7 +23,7 @@ extern int crnl_mapping; //0 - no mappin
+ extern int script; /* script active flag */
+ extern char scr_name[MAX_SCRIPT_NAME]; /* default name of the script */
+ extern char device[MAX_DEVICE_NAME]; /* serial device name */
+-extern int log; /* log active flag */
++extern int log_active; /* log active flag */
+ extern FILE* flog; /* log file */
+
+ static int help_state = 0;
+@@ -85,7 +85,7 @@ static void help_escape(void) {
+
+ write(STDOUT_FILENO, str1, strlen(str1));
+
+- if (log == 0)
++ if (log_active == 0)
+ write(STDOUT_FILENO, " l - log on \n", 26);
+ else
+ write(STDOUT_FILENO, " l - log off \n", 26);
+@@ -156,11 +156,11 @@ static void help_send_escape(int fd, cha
+ case 'q': /* quit help */
+ break;
+ case 'l': /* log on/off */
+- log = (log == 0)? 1: 0;
+- if (log) { /* open log file */
++ log_active = (log_active == 0)? 1: 0;
++ if (log_active) { /* open log file */
+ if ((flog = fopen("microcom.log", "a")) == (FILE *)0) {
+ write(STDOUT_FILENO, "Cannot open microcom.log \n", 26);
+- log = 0;
++ log_active = 0;
+ }
+ }
+ else { /* cloase log file */
+diff -rdup microcom-1.02.speed/microcom.c microcom-1.02/microcom.c
+--- microcom-1.02.speed/microcom.c 2000-08-27 17:22:47.000000000 +0200
++++ microcom-1.02/microcom.c 2007-01-19 19:48:37.000000000 +0100
+@@ -25,7 +25,7 @@ int crnl_mapping; //0 - no mapping, 1 ma
+ int script = 0; /* script active flag */
+ char scr_name[MAX_SCRIPT_NAME] = "script.scr"; /* default name of the script */
+ char device[MAX_DEVICE_NAME]; /* serial device name */
+-int log = 0; /* log active flag */
++int log_active = 0; /* log active flag */
+ FILE* flog; /* log file */
+ int pf = 0; /* port file descriptor */
+ struct termios pots; /* old port termios settings to restore */
+@@ -106,7 +106,7 @@ void main_usage(int exitcode, char *str,
+ /* restore original terminal settings on exit */
+ void cleanup_termios(int signal) {
+ /* cloase the log file first */
+- if (log) {
++ if (log_active) {
+ fflush(flog);
+ fclose(flog);
+ }
+diff -rdup microcom-1.02.speed/mux.c microcom-1.02/mux.c
+--- microcom-1.02.speed/mux.c 2000-07-30 06:15:47.000000000 +0200
++++ microcom-1.02/mux.c 2007-01-19 19:48:48.000000000 +0100
+@@ -24,7 +24,7 @@
+
+ extern int script;
+ extern char scr_name[];
+-extern int log;
++extern int log_active;
+ extern FILE* flog;
+
+ void mux_clear_sflag(void) {
+@@ -71,7 +71,7 @@ void mux_loop(int pf) {
+ i = read(pf, buf, BUFSIZE);
+ if (i > 0) {
+ write(STDOUT_FILENO, buf, i);
+- if (log)
++ if (log_active)
+ fwrite(buf, 1, i, flog);
+ if (script) {
+ i = script_process(S_DCE, buf, i);
diff --git a/package/microcom/microcom-102-001-speed-defines.patch b/package/microcom/microcom-102-001-speed-defines.patch
deleted file mode 100644
index b9aece8..0000000
--- a/package/microcom/microcom-102-001-speed-defines.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-diff -rdup microcom-1.02.orig/help.c microcom-1.02/help.c
---- microcom-1.02.orig/help.c 2000-07-30 06:15:47.000000000 +0200
-+++ microcom-1.02/help.c 2007-01-19 19:44:19.000000000 +0100
-@@ -273,12 +273,29 @@ static void help_set_speed(int fd, char
- B19200,
- B38400,
- B57600,
-+#if defined B115200
- B115200,
-+#endif
-+#if defined B230400
- B230400,
-+#endif
-+#if defined B460800
- B460800
-+#endif
- };
-+#undef __STOPCHAR
-+#if defined B115200
-+#define __STOPCHAR 'h'
-+#endif
-+#if defined B230400
-+#define __STOPCHAR 'i'
-+#endif
-+#if defined B460800
-+#define __STOPCHAR 'j'
-+#endif
-
-- if (c < 'a' && c > 'j') {
-+
-+ if (c < 'a' && c > __STOPCHAR) {
- if (c == '~') {
- help_speed();
- return;
diff --git a/package/microcom/microcom-102-002-rename-variable-log.patch b/package/microcom/microcom-102-002-rename-variable-log.patch
deleted file mode 100644
index 8516b56..0000000
--- a/package/microcom/microcom-102-002-rename-variable-log.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-diff -rdup microcom-1.02.speed/help.c microcom-1.02/help.c
---- microcom-1.02.speed/help.c 2007-01-19 19:44:19.000000000 +0100
-+++ microcom-1.02/help.c 2007-01-19 19:48:20.000000000 +0100
-@@ -23,7 +23,7 @@ extern int crnl_mapping; //0 - no mappin
- extern int script; /* script active flag */
- extern char scr_name[MAX_SCRIPT_NAME]; /* default name of the script */
- extern char device[MAX_DEVICE_NAME]; /* serial device name */
--extern int log; /* log active flag */
-+extern int log_active; /* log active flag */
- extern FILE* flog; /* log file */
-
- static int help_state = 0;
-@@ -85,7 +85,7 @@ static void help_escape(void) {
-
- write(STDOUT_FILENO, str1, strlen(str1));
-
-- if (log == 0)
-+ if (log_active == 0)
- write(STDOUT_FILENO, " l - log on \n", 26);
- else
- write(STDOUT_FILENO, " l - log off \n", 26);
-@@ -156,11 +156,11 @@ static void help_send_escape(int fd, cha
- case 'q': /* quit help */
- break;
- case 'l': /* log on/off */
-- log = (log == 0)? 1: 0;
-- if (log) { /* open log file */
-+ log_active = (log_active == 0)? 1: 0;
-+ if (log_active) { /* open log file */
- if ((flog = fopen("microcom.log", "a")) == (FILE *)0) {
- write(STDOUT_FILENO, "Cannot open microcom.log \n", 26);
-- log = 0;
-+ log_active = 0;
- }
- }
- else { /* cloase log file */
-diff -rdup microcom-1.02.speed/microcom.c microcom-1.02/microcom.c
---- microcom-1.02.speed/microcom.c 2000-08-27 17:22:47.000000000 +0200
-+++ microcom-1.02/microcom.c 2007-01-19 19:48:37.000000000 +0100
-@@ -25,7 +25,7 @@ int crnl_mapping; //0 - no mapping, 1 ma
- int script = 0; /* script active flag */
- char scr_name[MAX_SCRIPT_NAME] = "script.scr"; /* default name of the script */
- char device[MAX_DEVICE_NAME]; /* serial device name */
--int log = 0; /* log active flag */
-+int log_active = 0; /* log active flag */
- FILE* flog; /* log file */
- int pf = 0; /* port file descriptor */
- struct termios pots; /* old port termios settings to restore */
-@@ -106,7 +106,7 @@ void main_usage(int exitcode, char *str,
- /* restore original terminal settings on exit */
- void cleanup_termios(int signal) {
- /* cloase the log file first */
-- if (log) {
-+ if (log_active) {
- fflush(flog);
- fclose(flog);
- }
-diff -rdup microcom-1.02.speed/mux.c microcom-1.02/mux.c
---- microcom-1.02.speed/mux.c 2000-07-30 06:15:47.000000000 +0200
-+++ microcom-1.02/mux.c 2007-01-19 19:48:48.000000000 +0100
-@@ -24,7 +24,7 @@
-
- extern int script;
- extern char scr_name[];
--extern int log;
-+extern int log_active;
- extern FILE* flog;
-
- void mux_clear_sflag(void) {
-@@ -71,7 +71,7 @@ void mux_loop(int pf) {
- i = read(pf, buf, BUFSIZE);
- if (i > 0) {
- write(STDOUT_FILENO, buf, i);
-- if (log)
-+ if (log_active)
- fwrite(buf, 1, i, flog);
- if (script) {
- i = script_process(S_DCE, buf, i);
diff --git a/package/microcom/microcom.mk b/package/microcom/microcom.mk
index f691723..729230e 100644
--- a/package/microcom/microcom.mk
+++ b/package/microcom/microcom.mk
@@ -2,70 +2,32 @@
#
# microcom terminal emulator
#
-# Maintainer: Tim Riker <Tim@Rikers.org>
-#
#############################################################
-# Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org>
-# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-# USA
-
-# TARGETS
-# http://microcom.port5.com/m102.tar.gz
-MICROCOM_VERSION:=1.02
-MICROCOM_SITE:=http://buildroot.net/downloads/sources/
-MICROCOM_SOURCE:=m102.tar.gz
-MICROCOM_DIR:=$(BUILD_DIR)/microcom-$(MICROCOM_VERSION)
-
-$(DL_DIR)/$(MICROCOM_SOURCE):
- $(call DOWNLOAD,$(MICROCOM_SITE),$(MICROCOM_SOURCE))
-
-microcom-source: $(DL_DIR)/$(MICROCOM_SOURCE)
+MICROCOM_VERSION = 1.02
+MICROCOM_SOURCE = m102.tar.gz
+MICROCOM_SITE = http://sources.buildroot.net
-$(MICROCOM_DIR)/.unpacked: $(DL_DIR)/$(MICROCOM_SOURCE)
- mkdir -p $(MICROCOM_DIR)
- $(ZCAT) $(DL_DIR)/$(MICROCOM_SOURCE) | tar -C $(MICROCOM_DIR) $(TAR_OPTIONS) -
+define MICROCOM_CONFIGURE_CMDS
+ $(ZCAT) $(DL_DIR)/$(MICROCOM_SOURCE) | tar -C $(@D) $(TAR_OPTIONS) -
toolchain/patch-kernel.sh $(MICROCOM_DIR) package/microcom/ \*.patch
- touch $@
+ $(SED) 's~gcc~$$(CC)~' -e 's~-O~$$(CFLAGS)~' $(@D)/Makefile
+endef
-$(MICROCOM_DIR)/.configured: $(MICROCOM_DIR)/.unpacked
- $(SED) 's~gcc~$$(CC)~' -e 's~-O~$$(CFLAGS)~' $(MICROCOM_DIR)/Makefile
- touch $@
+define MICROCOM_BUILD_CMDS
+ $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D)
+endef
-$(MICROCOM_DIR)/microcom: $(MICROCOM_DIR)/.configured
- $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(MICROCOM_DIR)
- $(STRIPCMD) $(STRIP_STRIP_ALL) $@
+define MICROCOM_INSTALL_TARGET_CMDS
+ install -D -m 755 $(@D)/microcom $(TARGET_DIR)/usr/bin/microcom
+endef
-$(TARGET_DIR)/usr/bin/microcom: $(MICROCOM_DIR)/microcom
- install -c $(MICROCOM_DIR)/microcom $(TARGET_DIR)/usr/bin/microcom
+define MICROCOM_UNINSTALL_TARGET_CMDS
+ rm -f $(TARGET_DIR)/usr/bin/microcom
+endef
-microcom-clean:
- rm -f $(MICROCOM_DIR)/*.o $(MICROCOM_DIR)/microcom \
- $(TARGET_DIR)/usr/bin/microcom
+define MICROCOM_CLEAN_CMDS
+ rm -f $(@D)/*.o
+endef
-microcom-dirclean:
- rm -rf $(MICROCOM_DIR)
-
-microcom: $(TARGET_DIR)/usr/bin/microcom
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_MICROCOM),y)
-TARGETS+=microcom
-endif
+$(eval $(call GENTARGETS,package,microcom))
--
1.7.3.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox