From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fKBNT-0006M5-3u for guix-patches@gnu.org; Sat, 19 May 2018 19:35:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fKBNO-00005o-4H for guix-patches@gnu.org; Sat, 19 May 2018 19:35:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:33544) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fKBNO-00005k-09 for guix-patches@gnu.org; Sat, 19 May 2018 19:35:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fKBNN-0004nU-Jo for guix-patches@gnu.org; Sat, 19 May 2018 19:35:01 -0400 Subject: [bug#31447] [PATCH] linux-libre: Add aarch64-linux. Resent-Message-ID: From: Vagrant Cascadian In-Reply-To: <87lgcgtx2z.fsf@aikidev.net> References: <87bmdivr91.fsf@aikidev.net> <87lgci4q90.fsf@gnu.org> <87d0xu5dgu.fsf@netris.org> <87vabmsztc.fsf@aikidev.net> <87lgcgtx2z.fsf@aikidev.net> Date: Sat, 19 May 2018 16:33:56 -0700 Message-ID: <871se7te3f.fsf@aikidev.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Mark H Weaver , Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 31447@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain On 2018-05-18, Vagrant Cascadian wrote: > On 2018-05-17, Vagrant Cascadian wrote: >> Since submitting, I did notice that the way .dtb files are installed, it >> doesn't preserve the subdirectory structure. Unlike the "arm" >> architecture, where .dtb files are all placed in a single directory, on >> "arm64" there are sub-directories for each soc family: >> >> allwinner/sun50i-a64-pine64-plus.dtb >> >> It looks like the linux Makefile supports setting INSTALL_DTBS_PATH >> variable, and both "arm" and "arm64" architectures have a "dtbs_install" >> target, which may simply do "the right thing". Attached is a patch which does that. Did test builds of linux-libre on x86_64-linux (no dtb files), aarch64-linux (dtb files in subdirs) and armhf-linux (dtb files in one big huge directory); all of these variants appear to be doing the right thing. The patch basically follows the previous behavior by checking for the presence of .dtb files, but rather than installing them manually, invokes "make dtbs_install". I did try to restrict dtb installation based on architecture (only arm, arm64 and mips linux architectures currently implement the dtbs_install Makefile target), which would seem a little cleaner to me. My attempt was essentially: (if (string=? (getenv "ARCH") (or "arm" "arm64" "mips")) (invoke "make" "dtbs_install" ... ) ) Which somehow matched on all architectures... and so failed to build on on x86_64. Since the compile cycles were so long to test if it worked or not, I've set it aside for now and decided to submit what I had working. So, with the previous updated patch and the following patch, it should be ready to go. Please feel free to squash them or merge them separately; whatever makes the most sense. Or give more review and feedback, of course. :) live well, vagrant --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0002-gnu-linux-libre-Use-make-dtbs_install-to-install-dev.patch Content-Transfer-Encoding: quoted-printable From=204e5ea2e07282b3c3125fc1922e729085a2e2706f Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Sat, 19 May 2018 21:08:41 +0000 Subject: [PATCH 2/2] gnu: linux-libre: Use "make dtbs_install" to install device tree files. * gnu/packages/linux.scm (make-linux-libre): Use "make dtbs_install" to install device tree files. =2D-- gnu/packages/linux.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index fe4704601..d8c75dd8c 100644 =2D-- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -366,8 +366,11 @@ for ARCH and optionally VARIANT, or #f if there is no = such configuration." (for-each (lambda (file) (install-file file out)) (find-files "." "^(\\.config|bzImage|zImage|Image= |vmlinuz|System\\.map)$")) ;; Install device tree files =2D (for-each (lambda (file) (install-file file dtbdir)) =2D (find-files "." "\\.dtb$")) + (unless (null? (find-files "." "\\.dtb$")) + (mkdir-p dtbdir) + (invoke "make" + (string-append "INSTALL_DTBS_PATH=3D= " dtbdir) + "dtbs_install")) ;; Install kernel modules (mkdir-p moddir) (invoke "make" =2D-=20 2.11.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEcDardHbDotegGFCHt4uC1IFLkbYFAlsAtGQACgkQt4uC1IFL kbYQqQ/+LkSktnw1NEAPScTV/ZCpXccmuaA7+Zey3Zdael4j9gD3cupaobUxZh4Q d/geQPYFvzLKqJuGQHDRkZzPRDSja2yy7oh1Bd82GKIcwqiX7qdwP6zzvD5ix40K +UZzMHt/bPtvP98matSas98LBrj57BqaMiExBGBBOAW3KHfTfab0yXd82YXzwQUk 9Usck+ive1mXiKpoWnWmCLdUAm7oOWqqHRMaT/SExsvBSofiNnbD1CVrovUBFD+w 2rwBWt1IWTMS+BNjmowfEN90Gk/jhKWrXjVRF++Iab3c1b6d6y9dD8ac9Ad3rwSy Z/xa37cEB8NL6wD/66Ffu5GnvDTxssqCcYcZVDafPvfIKSD5gIdR3YBO2NHlWp2g XoIs0HLsjpfN1HP2UvS8CjQIjE6O3Gsbtxf1U6FoBPWoU0WoP1Ay3AUPE2R6uDjl p4UoMBfcraVcnaicNXqlE0jXN2kLzvKAdZsR5ym+1XFy79P8cuDMsSatAjc35HjV fItdnz8DvajIWpy8WeLtGtnxNIexP0aO09ktKBqnM1UAi6MUao9fjFEgKpgJllFA P4KzvJYbVkGkNmpTTqQMFHa0gRxa2zVI9e3dyPXRsU5DksmW3EI4N/A1qJCpTD9o WuxvIvByz/VlSwvoeNSQumwh6WQdqErpg2AqlPJnzO6KgO+b7iM= =rYNE -----END PGP SIGNATURE----- --==-=-=--