Message ID | 1456242888-23322-1-git-send-email-gustavo.zacarias@free-electrons.com |
---|---|
State | Accepted |
Headers | show |
On 02/23/16 16:54, gustavo.zacarias@free-electrons.com wrote: > From: Gustavo Zacarias <gustavo.zacarias@free-electrons.com> > > Signed-off-by: Gustavo Zacarias <gustavo.zacarias@free-electrons.com> > --- > package/Config.in | 3 +++ > package/procrank_linux/Config.in | 7 +++++++ > package/procrank_linux/procrank_linux.mk | 21 +++++++++++++++++++++ You forgot to add a hash file. > 3 files changed, 31 insertions(+) > create mode 100644 package/procrank_linux/Config.in > create mode 100644 package/procrank_linux/procrank_linux.mk > > diff --git a/package/Config.in b/package/Config.in > index 00132df..c1be419 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -1595,6 +1595,9 @@ endif > source "package/powerpc-utils/Config.in" > if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS > source "package/procps-ng/Config.in" > +endif > + source "package/procrank_linux/Config.in" > +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS > source "package/psmisc/Config.in" > endif > source "package/pwgen/Config.in" > diff --git a/package/procrank_linux/Config.in b/package/procrank_linux/Config.in > new file mode 100644 > index 0000000..59d462b > --- /dev/null > +++ b/package/procrank_linux/Config.in > @@ -0,0 +1,7 @@ > +config BR2_PACKAGE_PROCRANK_LINUX > + bool "procrank_linux" > + help > + procrank is a tool commonly used by Android platform > + developers to find out how much memory is really being used. > + > + https://github.com/csimmonds/procrank_linux > diff --git a/package/procrank_linux/procrank_linux.mk b/package/procrank_linux/procrank_linux.mk > new file mode 100644 > index 0000000..7e74319 > --- /dev/null > +++ b/package/procrank_linux/procrank_linux.mk > @@ -0,0 +1,21 @@ > +################################################################################ > +# > +# procrank_linux > +# > +################################################################################ > + > +PROCRANK_LINUX_VERSION = 21c30ab4514a5b15ac6e813e21bee0d3d714cb08 > +PROCRANK_LINUX_SITE = $(call github,csimmonds,procrank_linux,$(PROCRANK_LINUX_VERSION)) > +PROCRANK_LINUX_LICENSE = Apache-2.0 > +PROCRANK_LINUX_LICENSE_FILES = NOTICE Check. There's a Makefile licensed GPLv2+ but I guess that's not relevant. > + > +define PROCRANK_LINUX_BUILD_CMDS > + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CROSS_COMPILE="$(TARGET_CROSS)" What a horrible Makefile... There is no way to pass CFLAGS and LDFLAGS. Fortunately, with the toolchain wrapper, this shouldn't be a problem anymore. Well, except for LDFLAGS. This _is_ going to be a problem on e.g. Blackfin FLAT. I guess a patch adding CFLAGS and LDFLAGS to the Makefiles would be upstreamable? Regards, Arnout > +endef > + > +define PROCRANK_LINUX_INSTALL_TARGET_CMDS > + $(INSTALL) -m 0755 -D $(@D)/procrank \ > + $(TARGET_DIR)/usr/bin/procrank > +endef > + > +$(eval $(generic-package)) >
On 23/02/16 17:26, Arnout Vandecappelle wrote: > You forgot to add a hash file. Are github pull hashes stable? (i.e. not tagged) > Check. There's a Makefile licensed GPLv2+ but I guess that's not relevant. I've used the same logic, in the end it's the code that matters. > What a horrible Makefile... There is no way to pass CFLAGS and LDFLAGS. > Fortunately, with the toolchain wrapper, this shouldn't be a problem anymore. > Well, except for LDFLAGS. This _is_ going to be a problem on e.g. Blackfin FLAT. > I guess a patch adding CFLAGS and LDFLAGS to the Makefiles would be upstreamable? Actually bfin flat builds fine, it's on my testing rotation for static builds when there's no need for mmu since it uses an old gcc and it's quick to catch "newer version required" scenarios (everything quite old and funky). That being said i had a previous version that i wasn't quick enough to submit that had a patch which was removed since upstream was quick enough accepting the pull (musl build fix). Regards.
Gustavo, On Tue, 23 Feb 2016 17:36:14 -0300, Gustavo Zacarias wrote: > On 23/02/16 17:26, Arnout Vandecappelle wrote: > > > You forgot to add a hash file. > > Are github pull hashes stable? (i.e. not tagged) Yes, at least from our experience of the last months adding hashes for Github-sourced packages. Thanks, Thomas
On 02/23/16 21:36, Gustavo Zacarias wrote: > On 23/02/16 17:26, Arnout Vandecappelle wrote: > >> You forgot to add a hash file. > > Are github pull hashes stable? (i.e. not tagged) Looks like it. git has been updated a while ago to generate stable archives, and github seems to have caught on. We've slowly been introducing hashes for github packages and up to now no autobuilder complaints. > >> Check. There's a Makefile licensed GPLv2+ but I guess that's not relevant. > > I've used the same logic, in the end it's the code that matters. > >> What a horrible Makefile... There is no way to pass CFLAGS and LDFLAGS. >> Fortunately, with the toolchain wrapper, this shouldn't be a problem anymore. >> Well, except for LDFLAGS. This _is_ going to be a problem on e.g. Blackfin FLAT. >> I guess a patch adding CFLAGS and LDFLAGS to the Makefiles would be upstreamable? > > Actually bfin flat builds fine, it's on my testing rotation for static builds > when there's no need for mmu since it uses an old gcc and it's quick to catch > "newer version required" scenarios (everything quite old and funky). > That being said i had a previous version that i wasn't quick enough to submit > that had a patch which was removed since upstream was quick enough accepting the > pull (musl build fix). Well, it _builds_ file, but are you sure it's still generating a flat/sep/shared binary? Regards, Arnout > Regards. >
Arnout, On Tue, 23 Feb 2016 22:35:30 +0100, Arnout Vandecappelle wrote: > > Actually bfin flat builds fine, it's on my testing rotation for static builds > > when there's no need for mmu since it uses an old gcc and it's quick to catch > > "newer version required" scenarios (everything quite old and funky). > > That being said i had a previous version that i wasn't quick enough to submit > > that had a patch which was removed since upstream was quick enough accepting the > > pull (musl build fix). > > Well, it _builds_ file, but are you sure it's still generating a > flat/sep/shared binary? I've just tested, and: $ file output/target/usr/bin/procrank output/target/usr/bin/procrank: BFLT executable - version 4 ram Thomas
Gustavo, On Tue, 23 Feb 2016 12:54:48 -0300, gustavo.zacarias@free-electrons.com wrote: > From: Gustavo Zacarias <gustavo.zacarias@free-electrons.com> > > Signed-off-by: Gustavo Zacarias <gustavo.zacarias@free-electrons.com> > --- > package/Config.in | 3 +++ > package/procrank_linux/Config.in | 7 +++++++ > package/procrank_linux/procrank_linux.mk | 21 +++++++++++++++++++++ > 3 files changed, 31 insertions(+) > create mode 100644 package/procrank_linux/Config.in > create mode 100644 package/procrank_linux/procrank_linux.mk Applied to master after adding a hash file. Thanks! Thomas
diff --git a/package/Config.in b/package/Config.in index 00132df..c1be419 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1595,6 +1595,9 @@ endif source "package/powerpc-utils/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/procps-ng/Config.in" +endif + source "package/procrank_linux/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/psmisc/Config.in" endif source "package/pwgen/Config.in" diff --git a/package/procrank_linux/Config.in b/package/procrank_linux/Config.in new file mode 100644 index 0000000..59d462b --- /dev/null +++ b/package/procrank_linux/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PROCRANK_LINUX + bool "procrank_linux" + help + procrank is a tool commonly used by Android platform + developers to find out how much memory is really being used. + + https://github.com/csimmonds/procrank_linux diff --git a/package/procrank_linux/procrank_linux.mk b/package/procrank_linux/procrank_linux.mk new file mode 100644 index 0000000..7e74319 --- /dev/null +++ b/package/procrank_linux/procrank_linux.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# procrank_linux +# +################################################################################ + +PROCRANK_LINUX_VERSION = 21c30ab4514a5b15ac6e813e21bee0d3d714cb08 +PROCRANK_LINUX_SITE = $(call github,csimmonds,procrank_linux,$(PROCRANK_LINUX_VERSION)) +PROCRANK_LINUX_LICENSE = Apache-2.0 +PROCRANK_LINUX_LICENSE_FILES = NOTICE + +define PROCRANK_LINUX_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CROSS_COMPILE="$(TARGET_CROSS)" +endef + +define PROCRANK_LINUX_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/procrank \ + $(TARGET_DIR)/usr/bin/procrank +endef + +$(eval $(generic-package))