unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex Kost <alezost@gmail.com>
To: Quilro Ordonez <quiliro@riseup.net>
Cc: lxo@fsfla.org, 23409@debbugs.gnu.org
Subject: bug#23409: unable to load free firmware
Date: Wed, 04 May 2016 12:10:17 +0300	[thread overview]
Message-ID: <877ffagpdy.fsf@gmail.com> (raw)
In-Reply-To: <35d2e4a2bdc12bc75b84965e714beaa0@riseup.net> (Quilro Ordonez's message of "Tue, 03 May 2016 16:21:53 -0500")

[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]

Quilro Ordonez wrote:

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

> Is that correct?

No.

> root@komputilo /home/quiliro# export
> GUIX_PACKAGE_PATH=/openfwwf-firmware-5.2
> root@komputilo /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
> root@komputilo /home/quiliro# export
> GUIX_PACKAGE_PATH=/gnu/store/yjycspnbxyafys84hn4f1phjy37fai20-openfwwf-firmware-5.2
> root@komputilo /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
contents:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: my-guix-packages.scm --]
[-- Type: text/x-scheme, Size: 3356 bytes --]

(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"))
    (package
      (name "b43-tools")
      (version (string-append "20160406." (string-take commit 8)))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "http://git.bues.ch/git/b43-tools.git")
               (commit commit)))
         (sha256
          (base32
           "08k7sdr9jagm43r2zv4h03j86klhkblpk73p12444a3vzg1gy1lv"))))
      (build-system gnu-build-system)
      (native-inputs
       `(("flex" ,flex)
         ("bison" ,bison)))
      (arguments
       `(#: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") ":"))
                          #t))
                      (replace 'build
                        (lambda _
                          (every (lambda (dir)
                                   (zero?
                                    (system* "make" "-C" dir "CC=gcc")))
                                 subdirs)))
                      (replace 'install
                        (lambda* (#:key outputs #:allow-other-keys)
                          (let ((out (assoc-ref outputs "out")))
                            (mkdir-p (string-append out "/bin"))
                            (every (lambda (dir)
                                     (zero?
                                      (system* "make" "-C" dir
                                               (string-append "PREFIX=" out)
                                               "install")))
                                   subdirs))))))))
      (home-page "")
      (synopsis "")
      (description "")
      (license gpl2))))

(define-public openfwwf-firmware
  (package
    (name "openfwwf-firmware")
    (version "5.2")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "http://netweb.ing.unibs.it/~openfwwf/firmware/"
                           "openfwwf-" version ".tar.gz"))
       (sha256
        (base32
         ;; /gnu/store/ag7rf0kmb1wrnhwjfi3fgr1jcv1vg021-openfwwf-5.2.tar.gz
         "1p60gdi7w88s7qw82d3g9v7mk887mhvidf4l5q5hh09j10h37q4x"))))
    (build-system gnu-build-system)
    (native-inputs
     `(("b43-tools" ,b43-tools)))
    (arguments
     `(#:make-flags
       (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)))

[-- Attachment #3: Type: text/plain, Size: 309 bytes --]


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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: quilro-os.scm --]
[-- Type: text/x-scheme, Size: 1902 bytes --]

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

(use-modules
 (gnu)
 (gnu system nss)
 (my-guix-packages))

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

(operating-system
  (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")
                   args)))
  (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"))
                      %base-file-systems))


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

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

  ;; 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)
                   (xfce-desktop-service)
                   %desktop-services))

  ;; Allow resolution of '.local' host names with mDNS.
  (name-service-switch %mdns-host-lookup-nss))

[-- Attachment #5: Type: text/plain, Size: 158 bytes --]


So add the following to your ~/.bash_profile:

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

-- 
Alex

  reply	other threads:[~2016-05-04  9:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-30 21:06 bug#23409: unable to load free firmware Quilro Ordonez
2016-04-30 22:43 ` Leo Famulari
2016-05-01 13:19 ` Ludovic Courtès
2016-05-02 13:55   ` Eric Bavier
2016-05-03  8:01     ` Ludovic Courtès
2016-05-03 20:10       ` Quilro Ordonez
2016-05-03 20:45         ` Ludovic Courtès
2016-05-03 21:17           ` Quilro Ordonez
2016-05-03 21:21             ` Quilro Ordonez
2016-05-04  9:10               ` Alex Kost [this message]
2016-05-04 18:30                 ` Quilro Ordonez
2016-05-04 21:33                   ` Alex Kost
2016-05-04 23:08                     ` Quilro Ordonez
2016-05-04 23:13                     ` Quilro Ordonez
2016-05-05  8:42                       ` Alex Kost
2016-05-11 19:01                         ` Quilro Ordonez
     [not found]                           ` <87oa8bzjqg.fsf@gmail.com>
2016-05-12 16:11                             ` Quilro Ordonez
2016-05-13 13:25                           ` Ludovic Courtès
2016-05-13 21:15                             ` Quilro Ordonez
2016-05-14 16:17                               ` Alex Kost
2016-11-02 22:19     ` Ludovic Courtès
2017-01-11 22:29       ` Ludovic Courtès
2016-11-04  0:43   ` Quiliro Ordonez
2016-11-04  0:46   ` Quiliro Ordonez

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=877ffagpdy.fsf@gmail.com \
    --to=alezost@gmail.com \
    --cc=23409@debbugs.gnu.org \
    --cc=lxo@fsfla.org \
    --cc=quiliro@riseup.net \
    /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).