From patchwork Fri Mar 23 16:47:01 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: 890067 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 4078jw03dwz9s08; Sat, 24 Mar 2018 03:53:08 +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 1ezPw7-0002Ec-4e; Fri, 23 Mar 2018 16:53:03 +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 1ezPqs-0001Tg-Dd for kernel-team@lists.ubuntu.com; Fri, 23 Mar 2018 16:47:38 +0000 Received: from 123-204-41-50.static.seed.net.tw ([123.204.41.50] helo=cola.voip.idv.tw) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ezPqr-0001XI-Li; Fri, 23 Mar 2018 16:47:38 +0000 From: Wen-chien Jesse Sung To: kernel-team@lists.ubuntu.com Subject: [bionic][PATCH 04/10] UBUNTU: SAUCE: Add ubuntu/rtl8821ce into build script Date: Sat, 24 Mar 2018 00:47:01 +0800 Message-Id: <20180323164707.6027-5-jesse.sung@canonical.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180323164707.6027-1-jesse.sung@canonical.com> References: <20180323164707.6027-1-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 73cc0bc50274..33abb99925d3 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_rtl8821c = + install -d $(builddir)/build-$*/rtl8821c + rsync -a --delete ubuntu/rtl8821c/ $(builddir)/build-$*/rtl8821c/ + cd $(builddir)/build-$*/rtl8821c + ln -s rtl8821c/rtl8821c.mk $(builddir)/build-$*/ + $(kmake) -C $(builddir)/build-$* $(conc_level) $(rtl8821c_opts) M=$(builddir)/build-$*/rtl8821c 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-%: rtl8821c_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_rtl8821c)) @touch $@ @@ -81,6 +91,11 @@ define install_zfs = $(kmake) -C $(builddir)/build-$* SUBDIRS=`pwd` modules_install $(zfsopts) endef +define install_rtl8821c = + cd $(builddir)/build-$*/rtl8821c; \ + $(kmake) -C $(builddir)/build-$* SUBDIRS=`pwd` modules_install $(rtl8821c_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-%: rtl8821c_opts = INSTALL_MOD_DIR=kernel/ubuntu/rtl8821c +install-%: rtl8821c_opts += INSTALL_MOD_PATH=$(pkgdir)/ install-%: checks-% @echo Debug: $@ kernel_file $(kernel_file) kernfile $(kernfile) install_file $(install_file) instfile $(instfile) dh_testdir @@ -166,6 +183,7 @@ endif INSTALL_FW_PATH=$(pkgdir)/lib/firmware/$(abi_release)-$* $(if $(filter true,$(enable_zfs)),$(call install_zfs)) + $(if $(filter amd64,$(arch)),$(call install_rtl8821c)) # # Build module blacklists: