From patchwork Thu Jan 11 12:17:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen-chien Jesse Sung X-Patchwork-Id: 859089 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3zHPz64wJRz9t3F; Thu, 11 Jan 2018 23:17:54 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1eZbnr-0008It-7X; Thu, 11 Jan 2018 12:17:51 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1eZbnp-0008IK-JT for kernel-team@lists.ubuntu.com; Thu, 11 Jan 2018 12:17:49 +0000 Received: from 1.general.jesse.us.vpn ([10.172.69.96] helo=cola.voip.idv.tw) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1eZbno-0003HJ-RB; Thu, 11 Jan 2018 12:17:49 +0000 From: Wen-chien Jesse Sung To: kernel-team@lists.ubuntu.com, Timo Aaltonen Subject: [linux-oem][PATCH 2/8] UBUNTU: SAUCE: Add ubuntu/rtl8821ce into build script Date: Thu, 11 Jan 2018 20:17:20 +0800 Message-Id: <1515673046-27805-3-git-send-email-jesse.sung@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515673046-27805-1-git-send-email-jesse.sung@canonical.com> References: <1515673046-27805-1-git-send-email-jesse.sung@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://launchpad.net/bugs/1740231 Signed-off-by: Wen-chien Jesse Sung --- debian/rules.d/2-binary-arch.mk | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 21fadc9..dddadf2 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -56,6 +56,14 @@ define build_zfs = $(kmake) -C $(builddir)/build-$*/zfs/module $(conc_level) endef +define build_rtl8821ce = + install -d $(builddir)/build-$*/rtl8821ce + rsync -a --delete ubuntu/rtl8821ce/ $(builddir)/build-$*/rtl8821ce/ + cd $(builddir)/build-$*/rtl8821ce + ln -s rtl8821ce/rtl8821c.mk $(builddir)/build-$*/ + $(kmake) -C $(builddir)/build-$* $(conc_level) $(rtl8821ce_opts) M=$(builddir)/build-$*/rtl8821ce modules +endef + # Do the actual build, including image and modules $(stampdir)/stamp-build-%: target_flavour = $* $(stampdir)/stamp-build-%: splopts = --with-linux=$(CURDIR) @@ -66,11 +74,13 @@ $(stampdir)/stamp-build-%: zfsopts += --with-spl-obj=$(builddir)/build-$*/spl $(stampdir)/stamp-build-%: zfsopts += --prefix=/usr --with-config=kernel $(stampdir)/stamp-build-%: bldimg = $(call custom_override,build_image,$*) $(stampdir)/stamp-build-%: enable_zfs = $(call custom_override,do_zfs,$*) +$(stampdir)/stamp-build-%: rtl8821ce_opts = CONFIG_RTL8821CE=m $(stampdir)/stamp-build-%: $(stampdir)/stamp-prepare-% @echo Debug: $@ build_image $(build_image) bldimg $(bldimg) $(build_cd) $(kmake) $(build_O) $(conc_level) $(bldimg) modules $(if $(filter true,$(do_dtbs)),dtbs) $(if $(filter true,$(enable_zfs)),$(call build_zfs)) + $(if $(filter amd64,$(arch)),$(call build_rtl8821ce)) @touch $@ @@ -81,6 +91,11 @@ define install_zfs = $(kmake) -C $(builddir)/build-$* SUBDIRS=`pwd` modules_install $(zfsopts) endef +define install_rtl8821ce = + cd $(builddir)/build-$*/rtl8821ce; \ + $(kmake) -C $(builddir)/build-$* SUBDIRS=`pwd` modules_install $(rtl8821ce_opts) +endef + # Install the finished build install-%: pkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$* install-%: pkgdir_ex = $(CURDIR)/debian/$(extra_pkg_name)-$* @@ -105,6 +120,8 @@ install-%: splopts += INSTALL_MOD_PATH=$(pkgdir)/ install-%: splopts += INSTALL_MOD_DIR=kernel/zfs install-%: splopts += $(conc_level) install-%: zfsopts = $(splopts) +install-%: rtl8821ce_opts = INSTALL_MOD_DIR=kernel/ubuntu/rtl8821ce +install-%: rtl8821ce_opts += INSTALL_MOD_PATH=$(pkgdir)/ install-%: checks-% @echo Debug: $@ kernel_file $(kernel_file) kernfile $(kernfile) install_file $(install_file) instfile $(instfile) dh_testdir @@ -164,6 +181,7 @@ endif INSTALL_FW_PATH=$(pkgdir)/lib/firmware/$(abi_release)-$* $(if $(filter true,$(enable_zfs)),$(call install_zfs)) + $(if $(filter amd64,$(arch)),$(call install_rtl8821ce)) # # Build module blacklists: