unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Vagrant Cascadian <vagrant@debian.org>
To: "Mark H Weaver" <mhw@netris.org>, "Ludovic Courtès" <ludo@gnu.org>
Cc: 31447@debbugs.gnu.org
Subject: [bug#31447] [PATCH] linux-libre: Add aarch64-linux.
Date: Sat, 19 May 2018 16:33:56 -0700	[thread overview]
Message-ID: <871se7te3f.fsf@aikidev.net> (raw)
In-Reply-To: <87lgcgtx2z.fsf@aikidev.net>


[-- Attachment #1.1: Type: text/plain, Size: 1822 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0002-gnu-linux-libre-Use-make-dtbs_install-to-install-dev.patch --]
[-- Type: text/x-diff, Size: 1468 bytes --]

From 4e5ea2e07282b3c3125fc1922e729085a2e2706f Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
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.
---
 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
--- 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
-               (for-each (lambda (file) (install-file file dtbdir))
-                         (find-files "." "\\.dtb$"))
+               (unless (null? (find-files "." "\\.dtb$"))
+                              (mkdir-p dtbdir)
+                              (invoke "make"
+                                      (string-append "INSTALL_DTBS_PATH=" dtbdir)
+                                      "dtbs_install"))
                ;; Install kernel modules
                (mkdir-p moddir)
                (invoke "make"
-- 
2.11.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2018-05-19 23:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-14  3:40 [bug#31447] [PATCH] linux-libre: Add aarch64-linux Vagrant Cascadian
2018-05-17  8:53 ` Ludovic Courtès
2018-05-17 18:44   ` Mark H Weaver
2018-05-17 22:05     ` Vagrant Cascadian
2018-05-18  4:38       ` Mark H Weaver
2018-05-18 22:31       ` Vagrant Cascadian
2018-05-19 23:33         ` Vagrant Cascadian [this message]
2018-05-20 22:11           ` Ludovic Courtès
2018-05-20 22:26             ` Vagrant Cascadian
2018-05-20 22:12         ` bug#31447: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871se7te3f.fsf@aikidev.net \
    --to=vagrant@debian.org \
    --cc=31447@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).