[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23409: unable to load free firmware

From: Alex Kost
Subject: bug#23409: unable to load free firmware
Date: Wed, 04 May 2016 12:10:17 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Quilro Ordonez wrote:

> So the path would be:
> export GUIX_PACKAGE_PATH=/openfwwf-firmware-5.2

> Is that correct?


> address@hidden /home/quiliro# export
> GUIX_PACKAGE_PATH=/openfwwf-firmware-5.2
> address@hidden /home/quiliro# echo -n $(guix build
> openfwwf-firmware)/lib/firmware > \
>>      /sys/module/firmware_class/parameters/path
> guix build: warning: cannot access `/openfwwf-firmware-5.2': No existe
> el fichero o el directorio
> guix build: error: openfwwf-firmware: unknown package
> address@hidden /home/quiliro# export
> GUIX_PACKAGE_PATH=/gnu/store/yjycspnbxyafys84hn4f1phjy37fai20-openfwwf-firmware-5.2
> address@hidden /home/quiliro# echo -n $(guix build
> openfwwf-firmware)/lib/firmware >
> /sys/module/firmware_class/parameters/path
> guix build: error: openfwwf-firmware: unknown package

This happens because you put your packages in your system config file,
so "guix build" command cannot find them.  As Ludovic pointed, you need
to move these packages into a separate file (or files) and set
GUIX_PACKAGE_PATH accordingly.  For example, you can create
"/any/directory/you/want/my-guix-packages.scm" file with the following

(define-module (my-guix-packages)
  #:use-module (guix packages)
  #:use-module (guix build-system gnu)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix licenses)
  #:use-module (gnu packages flex)
  #:use-module (gnu packages bison))

(define-public b43-tools
  (let ((commit "8dce53297966b31b6c70a7a03c2433978dd9f288"))
      (name "b43-tools")
      (version (string-append "20160406." (string-take commit 8)))
         (method git-fetch)
         (uri (git-reference
               (url "http://git.bues.ch/git/b43-tools.git";)
               (commit commit)))
      (build-system gnu-build-system)
       `(("flex" ,flex)
         ("bison" ,bison)))
       `(#:modules ((srfi srfi-1)
                    (guix build gnu-build-system)
                    (guix build utils))
         #:tests? #f                    ;no tests
         #:phases (let ((subdirs '("assembler" "disassembler"))) ;TODO: fwcutter
                    (modify-phases %standard-phases
                      (delete 'configure)
                      (add-before 'build 'patch-/bin/true
                        (lambda _
                          (substitute* (find-files "." "Makefile")
                            (("/bin/true") ":"))
                      (replace 'build
                        (lambda _
                          (every (lambda (dir)
                                    (system* "make" "-C" dir "CC=gcc")))
                      (replace 'install
                        (lambda* (#:key outputs #:allow-other-keys)
                          (let ((out (assoc-ref outputs "out")))
                            (mkdir-p (string-append out "/bin"))
                            (every (lambda (dir)
                                      (system* "make" "-C" dir
                                               (string-append "PREFIX=" out)
      (home-page "")
      (synopsis "")
      (description "")
      (license gpl2))))

(define-public openfwwf-firmware
    (name "openfwwf-firmware")
    (version "5.2")
       (method url-fetch)
       (uri (string-append "http://netweb.ing.unibs.it/~openfwwf/firmware/";
                           "openfwwf-" version ".tar.gz"))
         ;; /gnu/store/ag7rf0kmb1wrnhwjfi3fgr1jcv1vg021-openfwwf-5.2.tar.gz
    (build-system gnu-build-system)
     `(("b43-tools" ,b43-tools)))
       (list (string-append "PREFIX="
                            (assoc-ref %outputs "out") "/b43-open"))
       #:tests? #f                      ;no tests
       #:phases (modify-phases %standard-phases
                  (delete 'configure))))
    (home-page "http://netweb.ing.unibs.it/~openfwwf/";)
    (synopsis "")
    (description "")
    (license gpl2)))
After that the following command should build the package:

  $ GUIX_PACKAGE_PATH=/any/directory/you/want guix build openfwwf-firmware

Also if you add this directory to GUILE_LOAD_PATH, you could use
(my-guix-packages) module in any guile code, particularly in your system
config which may look like this:

;; This is an operating system configuration template
;; for a "desktop" setup with GNOME and Xfce.

 (gnu system nss)

(use-service-modules desktop)
(use-package-modules certs)

  (host-name "komputilo")
  (timezone "America/Guayaquil")
  (locale "es_EC.utf8")

  ;; Assuming /dev/sdX is the target hard disk, and "my-root"
  ;; is the label of the target root file system.
  (bootloader (grub-configuration (device "/dev/sda")))

  (initrd (lambda (fs . args)
            (apply base-initrd fs
                   #:extra-modules '("pata_amd" "sata_nv")
  (firmware (list openfwwf-firmware))
  ;; (firmware (cons* b34-tools
  ;;            openfwwf-firmware %base-firmware))
  (file-systems (cons (file-system
                        (device "raiz")
                        (title 'label)
                        (mount-point "/")
                        (type "ext4"))

  (users (cons (user-account
                (name "quiliro")
                (comment "Quiliro Ordonez")
                (group "users")
                (supplementary-groups '("wheel" "netdev"
                                        "audio" "video"))
                (home-directory "/home/quiliro"))

  ;; This is where we specify system-wide packages.
  (packages (cons* nss-certs         ;for HTTPS access

  ;; Add GNOME and/or Xfce---we can choose at the log-in
  ;; screen with F1.  Use the "desktop" services, which
  ;; include the X11 log-in service, networking with Wicd,
  ;; and more.
  (services (cons* (gnome-desktop-service)

  ;; Allow resolution of '.local' host names with mDNS.
  (name-service-switch %mdns-host-lookup-nss))
So add the following to your ~/.bash_profile:

  export GUIX_PACKAGE_PATH=/any/directory/you/want
  export GUILE_LOAD_PATH=/any/directory/you/want


reply via email to

[Prev in Thread] Current Thread [Next in Thread]