diff mbox

[1/3] sunxi-tools: new host package

Message ID 1362695964-20697-1-git-send-email-carlo.caione@gmail.com
State Superseded
Headers show

Commit Message

Carlo Caione March 7, 2013, 10:39 p.m. UTC
Tools to help hacking Allwinner A10 (aka sun4i) based devices

Signed-off-by: Carlo Caione <carlo.caione@gmail.com>
---
 package/Config.in.host             |  1 +
 package/sunxi-tools/Config.in.host |  7 +++++++
 package/sunxi-tools/sunxi-tools.mk | 20 ++++++++++++++++++++
 3 files changed, 28 insertions(+)
 create mode 100644 package/sunxi-tools/Config.in.host
 create mode 100644 package/sunxi-tools/sunxi-tools.mk

Comments

Samuel Martin March 8, 2013, 9:37 a.m. UTC | #1
Hi Carlo,

2013/3/7 Carlo Caione <carlo.caione@gmail.com>:
> Tools to help hacking Allwinner A10 (aka sun4i) based devices
>
> Signed-off-by: Carlo Caione <carlo.caione@gmail.com>
> ---
>  package/Config.in.host             |  1 +
>  package/sunxi-tools/Config.in.host |  7 +++++++
>  package/sunxi-tools/sunxi-tools.mk | 20 ++++++++++++++++++++
>  3 files changed, 28 insertions(+)
>  create mode 100644 package/sunxi-tools/Config.in.host
>  create mode 100644 package/sunxi-tools/sunxi-tools.mk
>
> diff --git a/package/Config.in.host b/package/Config.in.host
> index 79050f2..b2b9fbd 100644
> --- a/package/Config.in.host
> +++ b/package/Config.in.host
> @@ -5,6 +5,7 @@ source "package/lpc3250loader/Config.in.host"
>  source "package/omap-u-boot-utils/Config.in.host"
>  source "package/openocd/Config.in.host"
>  source "package/sam-ba/Config.in.host"
> +source "package/sunxi-tools/Config.in.host"
>  source "package/uboot-tools/Config.in.host"
>
>  endmenu
> diff --git a/package/sunxi-tools/Config.in.host b/package/sunxi-tools/Config.in.host
> new file mode 100644
> index 0000000..71e0418
> --- /dev/null
> +++ b/package/sunxi-tools/Config.in.host
> @@ -0,0 +1,7 @@
> +config BR2_PACKAGE_HOST_SUNXI_TOOLS
> +       bool "host sunxi-tools"
> +       help
> +          Tools to help hacking Allwinner A10 (aka sun4i) based devices and
Looks like the indentation is wrong (spaces instead of 1 tab + 2 spaces).

> +         possibly it's successors
> +
> +         https://github.com/linux-sunxi/sunxi-tools
> diff --git a/package/sunxi-tools/sunxi-tools.mk b/package/sunxi-tools/sunxi-tools.mk
> new file mode 100644
> index 0000000..60acff5
> --- /dev/null
> +++ b/package/sunxi-tools/sunxi-tools.mk
> @@ -0,0 +1,20 @@
> +#############################################################
> +#
> +# sunxi-tools
> +#
> +#############################################################
> +
> +SUNXI_TOOLS_VERSION = master

In Buildroot, we usually use commit sha1 instead of branch name;
otherwise it makes hard to spot what change in a package may have break a build.

> +SUNXI_TOOLS_SITE = git://github.com/linux-sunxi/sunxi-tools.git

BTW, with packages hosted on github, it is possible to just download
the tarball of the source at a given revision,
see: http://buildroot.org/downloads/manual/manual.html#github-download-url

> +
> +define HOST_SUNXI_TOOLS_BUILD_CMDS
> +       $(MAKE) -C $(@D)
> +endef
> +
> +define HOST_SUNXI_TOOLS_INSTALL_CMDS
> +       for f in fexc bin2fex fex2bin bootinfo fel pio nand-part ; do \
> +               install -m 755 -D $(@D)/$$f $(HOST_DIR)/usr/bin/$$f ; \
> +       done
> +endef
> +
> +$(eval $(host-generic-package))
> --
> 1.8.1.5
>

Regards,
Carlo Caione March 8, 2013, 10:07 a.m. UTC | #2
On Fri, Mar 8, 2013 at 10:37 AM, Samuel Martin <s.martin49@gmail.com> wrote:
> Hi Carlo,
[cut]
>> +config BR2_PACKAGE_HOST_SUNXI_TOOLS
>> +       bool "host sunxi-tools"
>> +       help
>> +          Tools to help hacking Allwinner A10 (aka sun4i) based devices and
> Looks like the indentation is wrong (spaces instead of 1 tab + 2 spaces).

Uhm ... I'll check it out ...

>> +         possibly it's successors
>> +
>> +         https://github.com/linux-sunxi/sunxi-tools
>> diff --git a/package/sunxi-tools/sunxi-tools.mk b/package/sunxi-tools/sunxi-tools.mk
>> new file mode 100644
>> index 0000000..60acff5
>> --- /dev/null
>> +++ b/package/sunxi-tools/sunxi-tools.mk
>> @@ -0,0 +1,20 @@
>> +#############################################################
>> +#
>> +# sunxi-tools
>> +#
>> +#############################################################
>> +
>> +SUNXI_TOOLS_VERSION = master
>
> In Buildroot, we usually use commit sha1 instead of branch name;
> otherwise it makes hard to spot what change in a package may have break a build.

You are definitely right.

>> +SUNXI_TOOLS_SITE = git://github.com/linux-sunxi/sunxi-tools.git
>
> BTW, with packages hosted on github, it is possible to just download
> the tarball of the source at a given revision,
> see: http://buildroot.org/downloads/manual/manual.html#github-download-url

Ups ... It seems like I skipped that part.

Thank you for the suggestions ... I will prepare a second submission.

--
Carlo
Floris Bos March 8, 2013, 12:18 p.m. UTC | #3
On 03/07/2013 11:39 PM, Carlo Caione wrote:
> Tools to help hacking Allwinner A10 (aka sun4i) based devices

Submitted a patch for the same package earlier: 
http://patchwork.ozlabs.org/patch/218616/

> +SUNXI_TOOLS_VERSION = master
> +SUNXI_TOOLS_SITE = git://github.com/linux-sunxi/sunxi-tools.git
> +
> +define HOST_SUNXI_TOOLS_BUILD_CMDS
> +	$(MAKE) -C $(@D)
> +endef

Note that sunxi-tools (at least fel) has a dependency on libusb.
Your package is assuming that is always present on the host system.


Yours sincerely,

Floris Bos
Carlo Caione March 8, 2013, 8:39 p.m. UTC | #4
On Fri, Mar 8, 2013 at 1:18 PM, Floris Bos <bos@je-eigen-domein.nl> wrote:
> On 03/07/2013 11:39 PM, Carlo Caione wrote:
>>
>> Tools to help hacking Allwinner A10 (aka sun4i) based devices
>
>
> Submitted a patch for the same package earlier:
> http://patchwork.ozlabs.org/patch/218616/

Ups, I didn't see it. Sorry for the overlapping.
I'm going to use your package :)
Thomas Petazzoni March 10, 2013, 2:07 p.m. UTC | #5
Dear Carlo Caione,

On Fri, 8 Mar 2013 21:39:32 +0100, Carlo Caione wrote:

> Ups, I didn't see it. Sorry for the overlapping.
> I'm going to use your package :)

Yes, but it would be good if you could take Floris patch into your
patch series, and resend it in the next versions of your patch set.

Thanks,

Thomas
diff mbox

Patch

diff --git a/package/Config.in.host b/package/Config.in.host
index 79050f2..b2b9fbd 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -5,6 +5,7 @@  source "package/lpc3250loader/Config.in.host"
 source "package/omap-u-boot-utils/Config.in.host"
 source "package/openocd/Config.in.host"
 source "package/sam-ba/Config.in.host"
+source "package/sunxi-tools/Config.in.host"
 source "package/uboot-tools/Config.in.host"
 
 endmenu
diff --git a/package/sunxi-tools/Config.in.host b/package/sunxi-tools/Config.in.host
new file mode 100644
index 0000000..71e0418
--- /dev/null
+++ b/package/sunxi-tools/Config.in.host
@@ -0,0 +1,7 @@ 
+config BR2_PACKAGE_HOST_SUNXI_TOOLS
+	bool "host sunxi-tools"
+	help
+          Tools to help hacking Allwinner A10 (aka sun4i) based devices and
+	  possibly it's successors
+
+	  https://github.com/linux-sunxi/sunxi-tools
diff --git a/package/sunxi-tools/sunxi-tools.mk b/package/sunxi-tools/sunxi-tools.mk
new file mode 100644
index 0000000..60acff5
--- /dev/null
+++ b/package/sunxi-tools/sunxi-tools.mk
@@ -0,0 +1,20 @@ 
+#############################################################
+#
+# sunxi-tools
+#
+#############################################################
+
+SUNXI_TOOLS_VERSION = master
+SUNXI_TOOLS_SITE = git://github.com/linux-sunxi/sunxi-tools.git
+
+define HOST_SUNXI_TOOLS_BUILD_CMDS
+	$(MAKE) -C $(@D)
+endef
+
+define HOST_SUNXI_TOOLS_INSTALL_CMDS
+	for f in fexc bin2fex fex2bin bootinfo fel pio nand-part ; do \
+		install -m 755 -D $(@D)/$$f $(HOST_DIR)/usr/bin/$$f ; \
+	done
+endef
+
+$(eval $(host-generic-package))