[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Initializing a 64bit system using guix on a 32bit OS
From: |
Alex Kost |
Subject: |
Re: Initializing a 64bit system using guix on a 32bit OS |
Date: |
Sat, 23 May 2015 12:24:58 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Mark H Weaver (2015-05-22 20:31 +0300) wrote:
> address@hidden (Ludovic Courtès) writes:
>
>> Alex Kost <address@hidden> skribis:
[...]
>>> So I'm wondering is there a way to init a 64-bit system from a 32-bit
>>> one or perhaps it's just not possible?
>>
>> It actually is possible, but a little bit trickier. Mark did it a few
>> weeks ago, though in a slightly different context. The following should
>> work:
>>
>> 1. Install an i686 GuixSD, simply with ‘guix system init’, but use an
>> x86_64 kernel. To do that, you need to explicitly ask for an
>> x86_64 kernel and Guix (so that the daemon accepts to build x86_64
>> things) in the OS config:
>>
>> (define linux-libre-x86_64
>> (package (inherit linux-libre)
>> (arguments `(#:system "x86_64-linux"
>> ,@(package-arguments linux-libre)))))
>
> I think this is not sufficient, because it would still use the kernel
> config for i686. Here's what I used for the kernel:
[...]
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index 26e9aa9..c42919d 100644
> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -64,6 +64,7 @@
> #:use-module (guix build-system cmake)
> #:use-module (guix build-system python)
> #:use-module (guix build-system trivial)
> + #:use-module ((guix build utils) #:select (alist-replace))
> #:use-module (srfi srfi-26)
> #:use-module (ice-9 match))
>
> @@ -308,6 +309,15 @@ It has been modified to remove all non-free binary
> blobs.")
> (license gpl2)
> (home-page "http://www.gnu.org/software/linux-libre/"))))
>
> +(define linux-libre-64
> + (package (inherit linux-libre)
> + (arguments
> + `(#:system "x86_64-linux"
> + ,@(package-arguments linux-libre)))
> + (native-inputs
> + (alist-replace "kconfig" (list (kernel-config "x86_64-linux"))
> + (package-native-inputs linux-libre)))))
> +
Thanks Ludovic and Mark! I tried to follow your advices but eventually
I got the same error:
guix system: error: build failed: a `x86_64-linux' is required to build
`/gnu/store/zh42mbm0wvbsz05zr798nchyd3bc7fh6-guix-0.8.2.c2ee19e.drv', but I am
a `i686-linux'
I used the following command:
guix system init --no-grub config-64-simple.scm /mnt/guix
I'm attaching the OS config I used. Did I miss anything?
config-64-simple.scm
Description: Text document