Skip to contentSkip to conversation

git-submodules: document it, use it (branch yem/git-modules)

PATCH New Yann E. MORIN 3 participants 8 messages Jul 3, 2016 Arm/Allwinner sunXi SoC support

lore
Share & tools
lore
#0 lore raw

cover git-submodules: document it, use it (branch yem/git-modules)

Hello All!

This series is a follow-up on the recently applied support for git submodules.

It adds the documentation that was missing, and changes sunxi-mali to use git submodules instead of the dirty hack we play with sunxi-mali-prop.

Regards,
Yann E. MORIN.

The following changes since commit d0b11058511642d4dc6fd26abbb2419b959a9806

babeld: needs MMU as it uses fork() (2016-07-03 10:26:53 +0200)

are available in the git repository at:

git://git.buildroot.org/~ymorin/git/buildroot.git

for you to fetch changes up to c7293830796ec228f541077aa09df81dda34d8af

package/sunxi-mali: remove useless package (2016-07-03 10:29:06 +0200)

----------------------------------------------------------------
Yann E. MORIN (3):
docs/manual: document FOO_GIT_SUBMODULE
package/sunxi-mali: use git submodules
package/sunxi-mali: remove useless package

 docs/manual/adding-packages-generic.txt      |  6 ++++++
 package/Config.in                            |  1 -
 package/sunxi-mali-prop/Config.in            |  4 ----
 package/sunxi-mali-prop/sunxi-mali-prop.hash |  2 --
 package/sunxi-mali-prop/sunxi-mali-prop.mk   | 10 ----------
 package/sunxi-mali/Config.in                 |  3 ---
 package/sunxi-mali/sunxi-mali.hash           |  2 --
 package/sunxi-mali/sunxi-mali.mk             | 15 ++++++---------
 8 files changed, 12 insertions(+), 31 deletions(-)
 delete mode 100644 package/sunxi-mali-prop/Config.in
 delete mode 100644 package/sunxi-mali-prop/sunxi-mali-prop.hash
 delete mode 100644 package/sunxi-mali-prop/sunxi-mali-prop.mk
 delete mode 100644 package/sunxi-mali/sunxi-mali.hash
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH 1/3 docs/manual: document FOO_GIT_SUBMODULE

---
 docs/manual/adding-packages-generic.txt | 6 ++++++
 1 file changed, 6 insertions(+)
docs/manual/adding-packages-generic.txt +6 -0
index de8aca2..2d7e677 100644
@@ -310,6 +310,12 @@ information is (assuming the package name is +libfoo+) :
      the package source code. Buildroot copies the contents of the
      source directory into the package's build directory.
 
+* +LIBFOO_GIT_SUBMODULES+, when +LIBFOO_SITE_METHOD=git+, will create
+  an archive with the git submodules in the repository.
+  Note that we try not to use such git submodules when they contain
+  bundled librraries, in which case we prefer to use those libraries
+  from their own package.
+
 * +LIBFOO_STRIP_COMPONENTS+ is the number of leading components
   (directories) that tar must strip from file names on extraction.
   The tarball for most packages has one leading component named
Signature · 1 line
2.7.4
#4 lore raw

PATCH 2/3 package/sunxi-mali: use git submodules

In reply to Yann E. MORIN

The sunxi-mali git tree is set up with a submodule that contains the actual libraries. Since there was no support for git submodules so far, we used a dirty trick to have that submodule cloned by its own package, with sunxi-mali just vampirising it into its own build dir.

Now that we have support for git submodules, we can simplify stuff a bit, and have sunxi-mali directly download the proprietary libs itself.

Remove the .hash file since we're not checking hashes for git clones.

---
 package/sunxi-mali/Config.in       |  3 ---
 package/sunxi-mali/sunxi-mali.hash |  2 --
 package/sunxi-mali/sunxi-mali.mk   | 15 ++++++---------
 3 files changed, 6 insertions(+), 14 deletions(-)
 delete mode 100644 package/sunxi-mali/sunxi-mali.hash
package/sunxi-mali/Config.in +0 -3
index b151135..5e3ae4c 100644
@@ -3,9 +3,6 @@ config BR2_PACKAGE_SUNXI_MALI
 	select BR2_PACKAGE_HAS_LIBEGL
 	select BR2_PACKAGE_HAS_LIBGLES
 	select BR2_PACKAGE_LIBUMP
-	# The egl/gles mali libraries are provided as a git submodule of the
-	# sunxi-mali repo and are downloaded by the sunxi-mali-prop package.
-	select BR2_PACKAGE_SUNXI_MALI_PROP
 	depends on BR2_TOOLCHAIN_USES_GLIBC
 	depends on BR2_arm
 	help
package/sunxi-mali/sunxi-mali.hash deleted +0 -2
deleted file mode 100644
index 7953e9e..0000000
@@ -1,2 +0,0 @@
-# Locally calculated
-sha256 5ae27be532928667aa820a0aa9813dde545c224294b9402b27b6ca68f4d69ee4  sunxi-mali-d343311efc8db166d8371b28494f0f27b6a58724.tar.gz
package/sunxi-mali/sunxi-mali.mk +6 -9
index 3e5443b..d621da1 100644
@@ -5,10 +5,14 @@
 ################################################################################
 
 SUNXI_MALI_VERSION = d343311efc8db166d8371b28494f0f27b6a58724
-SUNXI_MALI_SITE = $(call github,linux-sunxi,sunxi-mali,$(SUNXI_MALI_VERSION))
+SUNXI_MALI_SITE = https://github.com/linux-sunxi/sunxi-mali
+SUNXI_MALI_SITE_METHOD = git
+
+# Get the sunxi-mali-proprietary libraries
+SUNXI_MALI_GIT_SUBMODULES = YES
 
 SUNXI_MALI_INSTALL_STAGING = YES
-SUNXI_MALI_DEPENDENCIES = libump sunxi-mali-prop
+SUNXI_MALI_DEPENDENCIES = libump
 SUNXI_MALI_PROVIDES = libegl libgles
 
 # The options below must be provided in the environment.  Providing these
@@ -41,13 +45,6 @@ ifeq ($(BR2_PACKAGE_SUNXI_MALI_R3P1),y)
 SUNXI_MALI_MAKE_OPTS += VERSION=r3p1
 endif
 
-define SUNXI_MALI_GIT_SUBMODULE_FIXUP
-	rm -rf $(@D)/lib/mali
-	cp -rf $(SUNXI_MALI_PROP_SRCDIR) $(@D)/lib/mali
-endef
-
-SUNXI_MALI_PRE_CONFIGURE_HOOKS += SUNXI_MALI_GIT_SUBMODULE_FIXUP
-
 define SUNXI_MALI_BUILD_CMDS
 	$(SUNXI_MALI_MAKE_ENV) $(MAKE) -C $(@D) $(SUNXI_MALI_MAKE_OPTS) all
 	$(TARGET_CC) $(TARGET_CFLAGS) -o $(@D)/version/version \
Signature · 1 line
2.7.4
#6 lore raw

PATCH 3/3 package/sunxi-mali: remove useless package

In reply to Yann E. MORIN

sunxi-mali-prop only served a feeding prey for sunxi-mali to get the proprietary libs.

Now that sunxi-mali downloads them (as the git submodule they are), we no longer need sunxi-mali-prop.

Remove it.

---
 package/Config.in                            |  1 -
 package/sunxi-mali-prop/Config.in            |  4 ----
 package/sunxi-mali-prop/sunxi-mali-prop.hash |  2 --
 package/sunxi-mali-prop/sunxi-mali-prop.mk   | 10 ----------
 4 files changed, 17 deletions(-)
 delete mode 100644 package/sunxi-mali-prop/Config.in
 delete mode 100644 package/sunxi-mali-prop/sunxi-mali-prop.hash
 delete mode 100644 package/sunxi-mali-prop/sunxi-mali-prop.mk
package/Config.in +0 -1
index c57c932..dbeed1d 100644
@@ -466,7 +466,6 @@ endif
 	source "package/stm32flash/Config.in"
 	source "package/sunxi-cedarx/Config.in"
 	source "package/sunxi-mali/Config.in"
-	source "package/sunxi-mali-prop/Config.in"
 	source "package/sysstat/Config.in"
 	source "package/targetcli-fb/Config.in"
 	source "package/ti-gfx/Config.in"
package/sunxi-mali-prop/Config.in deleted +0 -4
deleted file mode 100644
index b9efb4e..0000000
@@ -1,4 +0,0 @@
-# Sunxi-mali-prop is a git submodule of sunxi-mali. To use this package
-# select the sunxi-mali option.
-config BR2_PACKAGE_SUNXI_MALI_PROP
-	bool
package/sunxi-mali-prop/sunxi-mali-prop.hash deleted +0 -2
deleted file mode 100644
index baf16fa..0000000
@@ -1,2 +0,0 @@
-# locally computed
-sha256  f87d93629072dd0306ffe1200425188129e5f7f97750126dff38464ea707f673  sunxi-mali-prop-1c5063f43cdc9de341c0d63b2e3921cab86c7742.tar.gz
package/sunxi-mali-prop/sunxi-mali-prop.mk deleted +0 -10
deleted file mode 100644
index b828dc2..0000000
@@ -1,10 +0,0 @@
-################################################################################
-#
-# sunxi-mali-prop
-#
-################################################################################
-
-SUNXI_MALI_PROP_VERSION = 1c5063f43cdc9de341c0d63b2e3921cab86c7742
-SUNXI_MALI_PROP_SITE = $(call github,linux-sunxi,sunxi-mali-proprietary,$(SUNXI_MALI_PROP_VERSION))
-
-$(eval $(generic-package))
Signature · 1 line
2.7.4
#2 lore raw

PATCH 1/3 docs/manual: document FOO_GIT_SUBMODULE

In reply to Yann E. MORIN

Yann, all,

Quoted 11 lines · Yann E. MORIN
---
 docs/manual/adding-packages-generic.txt | 6 ++++++
 1 file changed, 6 insertions(+)
docs/manual/adding-packages-generic.txt +0 -0
index de8aca2..2d7e677 100644

docs/manual/adding-packages-generic.txt information is (assuming the package name is +libfoo+) : · line 316

Quoted 7 lines
docs/manual/adding-packages-generic.txt +4 -0
@@ -310,6 +310,12 @@ information is (assuming the package name is +libfoo+) :
      the package source code. Buildroot copies the contents of the
      source directory into the package's build directory.
 
+* +LIBFOO_GIT_SUBMODULES+, when +LIBFOO_SITE_METHOD=git+, will create
+  an archive with the git submodules in the repository.
+  Note that we try not to use such git submodules when they contain
+  bundled librraries, in which case we prefer to use those libraries

s/librraries/libraries/

Quoted 8 lines
docs/manual/adding-packages-generic.txt +2 -1
+  from their own package.
+
 * +LIBFOO_STRIP_COMPONENTS+ is the number of leading components
   (directories) that tar must strip from file names on extraction.
   The tarball for most packages has one leading component named
--

2.7.4

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Regards,

Signature · 1 line
Samuel
#3 lore raw

PATCH 1/3 docs/manual: document FOO_GIT_SUBMODULE

In reply to Yann E. MORIN
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

---
 docs/manual/adding-packages-generic.txt | 6 ++++++
 1 file changed, 6 insertions(+)
docs/manual/adding-packages-generic.txt +0 -0
index de8aca2..2d7e677 100644

docs/manual/adding-packages-generic.txt information is (assuming the package name is +libfoo+) : · line 317

Quoted 8 lines
docs/manual/adding-packages-generic.txt +5 -0
@@ -310,6 +310,12 @@ information is (assuming the package name is +libfoo+) :
      the package source code. Buildroot copies the contents of the
      source directory into the package's build directory.
 
+* +LIBFOO_GIT_SUBMODULES+, when +LIBFOO_SITE_METHOD=git+, will create
+  an archive with the git submodules in the repository.
+  Note that we try not to use such git submodules when they contain
+  bundled librraries, in which case we prefer to use those libraries
+  from their own package.

Committed after fixing up the typo as noticed by Samuel, thanks.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard 
#5 lore raw

PATCH 2/3 package/sunxi-mali: use git submodules

In reply to Yann E. MORIN
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

The sunxi-mali git tree is set up with a submodule that contains the actual libraries. Since there was no support for git submodules so far, we used a dirty trick to have that submodule cloned by its own package, with sunxi-mali just vampirising it into its own build dir.

Quoted 7 lines

Now that we have support for git submodules, we can simplify stuff a bit, and have sunxi-mali directly download the proprietary libs itself.

Remove the .hash file since we're not checking hashes for git clones.

Committed, thanks.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard 
#7 lore raw

PATCH 3/3 package/sunxi-mali: remove useless package

In reply to Yann E. MORIN
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

sunxi-mali-prop only served a feeding prey for sunxi-mali to get the proprietary libs.

Quoted 7 lines

Now that sunxi-mali downloads them (as the git submodule they are), we no longer need sunxi-mali-prop.

Remove it.

Committed, thanks.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard