A new version of the earlier posted binary ATI kernel module
The new version is now based on gentargets instead
PATCH 1/2 Makefile.package.in: Makes it possible to override the default extract commands
--- package/Makefile.package.in | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-)
package/Makefile.package.in +19 -3
@@ -79,6 +79,8 @@ GIT:=$(call qstrip,$(BR2_GIT)) $(QUIET) # external-deps target. DL_MODE=DOWNLOAD +EX_MODE=DEFAULT + DL_DIR=$(call qstrip,$(BR2_DL_DIR)) ifeq ($(DL_DIR),) DL_DIR:=$(TOPDIR)/dl
@@ -239,9 +241,17 @@ ifeq ($(DL_MODE),DOWNLOAD) $(Q)touch $@ endif -# Unpack the archive +# Unpack the archive using custom commands +$(BUILD_DIR)/%/.stamp_custom_extracted: + @$(call MESSAGE,"Extracting - custom") + $(Q)mkdir -p $(@D) + $($(PKG)_EXTRACT_CMDS) + $(foreach hook,$($(PKG)_POST_EXTRACT_HOOKS),$(call $(hook))$(sep)) + $(Q)touch $@ + +# Unpack the archive using default commands $(BUILD_DIR)/%/.stamp_extracted: - @$(call MESSAGE,"Extracting") + @$(call MESSAGE,"Extracting - default") $(Q)mkdir -p $(@D) $(Q)$(if $($(PKG)_SOURCE),$(INFLATE$(suffix $($(PKG)_SOURCE))) $(DL_DIR)/$($(PKG)_SOURCE) | \ $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -)
@@ -261,7 +271,7 @@ $(BUILD_DIR)/%/.stamp_patched: NAMEVER = $($(NOHOSTPKG)_NAME)-$($(PKG)_VERSION) $(BUILD_DIR)/%/.stamp_patched: @$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$($(PKG)_NAME)") $(if $($(PKG)_PATCH),toolchain/patch-kernel.sh $(@D) $(DL_DIR) $($(PKG)_PATCH)) - $(Q)( \ + ( \ if test -d $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME); then \ if test "$(wildcard $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME)/$(NAMEVER)*.patch*)"; then \ toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \
@@ -419,7 +429,13 @@ $(2)_TARGET_INSTALL_HOST = $$($(2)_DIR)/.stamp_host_installed $(2)_TARGET_BUILD = $$($(2)_DIR)/.stamp_built $(2)_TARGET_CONFIGURE = $$($(2)_DIR)/.stamp_configured $(2)_TARGET_PATCH = $$($(2)_DIR)/.stamp_patched + +ifdef $(2)_EXTRACT_CMDS +$(2)_TARGET_EXTRACT = $$($(2)_DIR)/.stamp_custom_extracted +else $(2)_TARGET_EXTRACT = $$($(2)_DIR)/.stamp_extracted +endif + $(2)_TARGET_SOURCE = $$($(2)_DIR)/.stamp_downloaded $(2)_TARGET_UNINSTALL = $$($(2)_DIR)/.stamp_uninstalled $(2)_TARGET_CLEAN = $$($(2)_DIR)/.stamp_cleaned
Signature · 1 line
1.7.3.4
PATCH 1/2 Makefile.package.in: Makes it possible to override the default extract commands
Hi Allan!
Interesting patch. Would you mind describing a common use case in the longer commit message?
Quoted 9 lines
(quoted diff) +0
-0@@ -261,7 +271,7 @@ $(BUILD_DIR)/%/.stamp_patched: NAMEVER = $($(NOHOSTPKG)_NAME)-$($(PKG)_VERSION)?$(BUILD_DIR)/%/.stamp_patched:
? ? ? ?@$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$($(PKG)_NAME)")
? ? ? ?$(if $($(PKG)_PATCH),toolchain/patch-kernel.sh $(@D) $(DL_DIR) $($(PKG)_PATCH))
- ? ? ? $(Q)( \
+ ? ? ? ( \
? ? ? ?if test -d $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME); then \
? ? ? ? ?if test "$(wildcard $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME)/$(NAMEVER)*.patch*)"; then \
? ? ? ? ? ?toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \
How does this removal of $(Q) relate to the new feature?
PATCH 1/2 Makefile.package.in: Makes it possible to override the default extract commands
Hey
The removal of $(Q) was not on purpose, I guess I should be more careful when "git add -i".
I will post a new commit with out the missing $(Q), and with an example in the commit message.
2011/4/11 Daniel Nystr?m <[email protected]>:
Quoted 17 lines
Hi Allan!
Interesting patch. Would you mind describing a common use case in the longer commit message?
Quoted 9 lines
(quoted diff) +0
-0@@ -261,7 +271,7 @@ $(BUILD_DIR)/%/.stamp_patched: NAMEVER = $($(NOHOSTPKG)_NAME)-$($(PKG)_VERSION)?$(BUILD_DIR)/%/.stamp_patched:
? ? ? ?@$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$($(PKG)_NAME)")
? ? ? ?$(if $($(PKG)_PATCH),toolchain/patch-kernel.sh $(@D) $(DL_DIR) $($(PKG)_PATCH))
- ? ? ? $(Q)( \
+ ? ? ? ( \
? ? ? ?if test -d $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME); then \
? ? ? ? ?if test "$(wildcard $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME)/$(NAMEVER)*.patch*)"; then \
? ? ? ? ? ?toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \How does this removal of $(Q) relate to the new feature?
PATCH 2/2 fglrx: Binary ATI kernel module added (version 11-2)
In reply to Allan W. Nielsen--- package/Config.in | 5 ++ package/fglrx/Config.in | 7 +++ .../fglrx/fglrx-11-2-fix-gcc-version-detect.patch | 30 ++++++++++++++ package/fglrx/fglrx.mk | 42 ++++++++++++++++++++ 4 files changed, 84 insertions(+), 0 deletions(-) create mode 100644 package/fglrx/Config.in create mode 100644 package/fglrx/fglrx-11-2-fix-gcc-version-detect.patch create mode 100644 package/fglrx/fglrx.mk
package/Config.in +5 -0
@@ -499,4 +499,9 @@ source "package/vim/Config.in" endif endmenu +menu "Linux kernel modules" +depends on BR2_LINUX_KERNEL +source "package/fglrx/Config.in" +endmenu + endmenu
package/fglrx/Config.in new file +7 -0
@@ -0,0 +1,7 @@ + +config BR2_PACKAGE_FGLRX + bool "fglrx" + depends on BR2_LINUX_KERNEL && (BR2_x86_64 || BR2_i386) + help + Build the ATI binary kernel module +
package/fglrx/fglrx-11-2-fix-gcc-version-detect.patch new file +30 -0
@@ -0,0 +1,30 @@ +--- A/common/lib/modules/fglrx/build_mod/2.6.x/Makefile 2011-02-02 19:39:49.000000000 +0100 ++++ B/common/lib/modules/fglrx/build_mod/2.6.x/Makefile 2011-03-28 15:05:41.656418668 +0200 +@@ -24,7 +24,7 @@ + # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-GCC_VER_MAJ = $(shell $(CC) --version | head -n 1 | sed -e 's/[^0-9. ]//g;s/^ *//;s/^\(.\)\..*$$/\1/') ++GCC_VER_MAJ = $(shell $(CC) --version | head -n 1 | perl -pe "s/^.+?(\d+)[^ ]+$$/\1/g" ) + + LIBIP_PREFIX ?= .. + +@@ -75,7 +75,7 @@ + KVER = $(shell uname -r) + endif + +-KDIR = /lib/modules/$(KVER)/build ++KDIR ?= /lib/modules/$(KVER)/build + PWD = $(shell pwd) + + fglrx-cfiles = ${fglrx-c-objs:.o=.c} +@@ -85,6 +85,9 @@ + kmod_build:: $(fglrx-libs) $(fglrx-cfiles) $(fglrx-hdrs) $(drm-hdrs) + $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules + ++modules_install: kmod_build ++ $(MAKE) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) INSTALL_MOD_DIR=kernel -C $(KDIR) M=$(PWD) modules_install ++ + %.c: + @ln -s ../$@ +
package/fglrx/fglrx.mk new file +42 -0
42 lines not on this page · raw message
Signature · 1 line
1.7.3.4