gnu: linux-libre: Add i686 and x86_64 full-blown configs.
Thanks to Jason Self <jself@gnu.org> for the kernel configs. * gnu/packages/linux.scm (kernel-config): New procedure. (linux-libre)[build-phase]: Copy it to .config. Reduce the list of things appended to .config. [native-inputs]: Add "kconfig" input. * gnu/packages/linux-libre-i686.conf, gnu/packages/linux-libre-x86_64.conf: New files, from <http://jxself.org/x86-32.txt> and <http://jxself.org/x86-64.txt>. * Makefile.am (KCONFIGS): New variable. (nobase_dist_guilemodule_DATA): Add it.
This commit is contained in:
parent
ed09bb11cd
commit
a94546ecc4
@ -102,10 +102,14 @@ endif BUILD_DAEMON_OFFLOAD
|
||||
guix/scripts/download.go: guix/build/download.go
|
||||
guix/download.go: guix/build/download.go
|
||||
|
||||
# Linux-Libre configurations.
|
||||
KCONFIGS = \
|
||||
gnu/packages/linux-libre-i686.conf \
|
||||
gnu/packages/linux-libre-x86_64.conf
|
||||
|
||||
GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go
|
||||
|
||||
nobase_dist_guilemodule_DATA = $(MODULES)
|
||||
nobase_dist_guilemodule_DATA = $(MODULES) $(KCONFIGS)
|
||||
nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
|
||||
|
||||
# Do we need to provide our own non-broken (srfi srfi-37) module?
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
(gnu packages xorg)
|
||||
(gnu packages avahi)
|
||||
(gnu packages linux)
|
||||
|
||||
(gnu services networking)
|
||||
(gnu services avahi)
|
||||
@ -47,7 +48,8 @@
|
||||
(device "dummy")
|
||||
(type "dummy"))
|
||||
;; %fuse-control-file-system ; needs fuse.ko
|
||||
%binary-format-file-system))
|
||||
;; %binary-format-file-system ; needs binfmt.ko
|
||||
))
|
||||
|
||||
(users (list (user-account
|
||||
(name "guest")
|
||||
@ -83,4 +85,4 @@ You can log in as 'guest' or 'root' with no password.
|
||||
;; Explicitly allow for empty passwords.
|
||||
(base-pam-services #:allow-empty-passwords? #t))
|
||||
|
||||
(packages (cons* xterm avahi %base-packages)))
|
||||
(packages (cons* strace xterm avahi %base-packages)))
|
||||
|
7810
gnu/packages/linux-libre-i686.conf
Normal file
7810
gnu/packages/linux-libre-i686.conf
Normal file
File diff suppressed because it is too large
Load Diff
7600
gnu/packages/linux-libre-x86_64.conf
Normal file
7600
gnu/packages/linux-libre-x86_64.conf
Normal file
File diff suppressed because it is too large
Load Diff
@ -49,7 +49,9 @@
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix build-system cmake)
|
||||
#:use-module (guix build-system python)
|
||||
#:use-module (guix build-system trivial))
|
||||
#:use-module (guix build-system trivial)
|
||||
#:use-module (srfi srfi-26)
|
||||
#:use-module (ice-9 match))
|
||||
|
||||
(define-public (system->linux-architecture arch)
|
||||
"Return the Linux architecture name for ARCH, a Guix system name such as
|
||||
@ -168,6 +170,21 @@
|
||||
(base32
|
||||
"1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
|
||||
|
||||
(define (kernel-config system)
|
||||
"Return the absolute file name of the Linux-Libre build configuration file
|
||||
for SYSTEM."
|
||||
(define (lookup file)
|
||||
(let ((file (string-append "gnu/packages/" file)))
|
||||
(search-path %load-path file)))
|
||||
|
||||
(match system
|
||||
("i686-linux"
|
||||
(lookup "linux-libre-i686.conf"))
|
||||
("x86_64-linux"
|
||||
(lookup "linux-libre-x86_64.conf"))
|
||||
(_
|
||||
(error "unsupported architecture" system))))
|
||||
|
||||
(define-public linux-libre
|
||||
(let* ((version "3.15")
|
||||
(build-phase
|
||||
@ -182,35 +199,34 @@
|
||||
(else arch)))
|
||||
(format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
|
||||
|
||||
(let ((build (assoc-ref %standard-phases 'build)))
|
||||
(and (zero? (system* "make" "defconfig"))
|
||||
(begin
|
||||
;; Appending works even when the option wasn't in the
|
||||
;; file. The last one prevails if duplicated.
|
||||
(let ((port (open-file ".config" "a")))
|
||||
(display (string-append "CONFIG_NET_9P=m\n"
|
||||
"CONFIG_NET_9P_VIRTIO=m\n"
|
||||
"CONFIG_VIRTIO_BLK=m\n"
|
||||
"CONFIG_SATA_SIS=y\n"
|
||||
"CONFIG_VIRTIO_NET=m\n"
|
||||
"CONFIG_SIS190=y\n"
|
||||
;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
|
||||
"CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n"
|
||||
"CONFIG_VIRTIO_PCI=m\n"
|
||||
"CONFIG_VIRTIO_BALLOON=m\n"
|
||||
"CONFIG_VIRTIO_MMIO=m\n"
|
||||
"CONFIG_FUSE_FS=m\n"
|
||||
"CONFIG_CIFS=m\n"
|
||||
"CONFIG_9P_FS=m\n"
|
||||
"CONFIG_E1000E=m\n")
|
||||
port)
|
||||
(close-port port))
|
||||
(let ((build (assoc-ref %standard-phases 'build))
|
||||
(config (assoc-ref inputs "kconfig")))
|
||||
(copy-file config ".config")
|
||||
(chmod ".config" #o666)
|
||||
|
||||
(zero? (system* "make" "oldconfig")))
|
||||
;; Appending works even when the option wasn't in the
|
||||
;; file. The last one prevails if duplicated.
|
||||
(let ((port (open-file ".config" "a")))
|
||||
(display (string-append "CONFIG_NET_9P=m\n"
|
||||
"CONFIG_NET_9P_VIRTIO=m\n"
|
||||
"CONFIG_VIRTIO_BLK=m\n"
|
||||
"CONFIG_VIRTIO_NET=m\n"
|
||||
;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
|
||||
"CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n"
|
||||
"CONFIG_VIRTIO_PCI=m\n"
|
||||
"CONFIG_VIRTIO_BALLOON=m\n"
|
||||
"CONFIG_VIRTIO_MMIO=m\n"
|
||||
"CONFIG_FUSE_FS=m\n"
|
||||
"CONFIG_CIFS=m\n"
|
||||
"CONFIG_9P_FS=m\n")
|
||||
port)
|
||||
(close-port port))
|
||||
|
||||
;; Call the default `build' phase so `-j' is correctly
|
||||
;; passed.
|
||||
(apply build #:make-flags "all" args)))))
|
||||
(zero? (system* "make" "oldconfig"))
|
||||
|
||||
;; Call the default `build' phase so `-j' is correctly
|
||||
;; passed.
|
||||
(apply build #:make-flags "all" args))))
|
||||
(install-phase
|
||||
`(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
@ -241,7 +257,9 @@
|
||||
(native-inputs `(("perl" ,perl)
|
||||
("bc" ,bc)
|
||||
("module-init-tools" ,module-init-tools)
|
||||
("patch/freedo+gnu" ,%boot-logo-patch)))
|
||||
("patch/freedo+gnu" ,%boot-logo-patch)
|
||||
("kconfig" ,(kernel-config (or (%current-target-system)
|
||||
(%current-system))))))
|
||||
(arguments
|
||||
`(#:modules ((guix build gnu-build-system)
|
||||
(guix build utils)
|
||||
|
Loading…
Reference in New Issue
Block a user