unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Craven <david@craven.ch>
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: wip v2 u-boot support
Date: Fri, 9 Sep 2016 00:09:57 +0200	[thread overview]
Message-ID: <CAL1_imn=tB-gDsZ5iOm_uyopHS8YCYyaF5R=h7BjLLDnAjVeww@mail.gmail.com> (raw)
In-Reply-To: <CAL1_imkWrOjaNyiFJzPN3GLnjgE15JP=QFbtO5ApLrft=JnB-Q@mail.gmail.com>

Hi Danny,

I'm testing your new u-boot code. I fixed a few bugs, but there is
still some work to do... ;-)

guix system vm u-boot-test.scm --no-grub

This should work without giving any errors and boot (it doesn't matter
that u-boot is built for arm). And after booting there should be the
extlinux.conf file.

Below is a test operating-system and the stuff I've already fixed.

(use-modules (gnu))
(use-package-modules linux u-boot)
(use-service-modules base networking ssh)

(operating-system
  (host-name "beagle-bone-black")
  (timezone "Europe/Zurich")
  (locale "en_US.UTF-8")

  (bootloader (u-boot-configuration
               (u-boot u-boot-beagle-bone-black)))
  (kernel linux-libre) ; linux-libre-beagle-bone-black

  (file-systems
   (cons
    (file-system
      (mount-point "/")
      (type "ext4")
      (title 'label)
      (device "root"))
    %base-file-systems))

  (users
   (cons*
    (user-account
     (name "test")
     (group "users")
     (supplementary-groups '("wheel" "video"))
     (home-directory "/home/test")
     (password "sa5JEXtYx/rm6")) ; Password is pass.
    %base-user-accounts))

  (services
   (cons*
    (dropbear-service)
    (dhcp-client-service)
    %base-services)))

diff --git a/gnu/system.scm b/gnu/system.scm
index 24e4e15..153f7b0 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -733,9 +733,16 @@ listed in OS.  The C library expects to find it under
                                                     "/boot")
                                    (operating-system-kernel-arguments os)))
                            (initrd #~(string-append #$system "/initrd"))))))
-    (grub-configuration-file (operating-system-bootloader os)
-                             store-fs entries
-                             #:old-entries old-entries)))
+
+    (match (operating-system-bootloader os)
+      ((? grub-configuration? config)
+       (grub-configuration-file (operating-system-bootloader os)
+                                store-fs entries
+                                #:old-entries old-entries))
+      ((? u-boot-configuration? config)
+       (u-boot-configuration-file (operating-system-bootloader os)
+                                  store-fs entries
+                                  #:old-entries old-entries)))))

 (define (operating-system-parameters-file os)
   "Return a file that describes the boot parameters of OS.  The primary use of
diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm
index 4c9da8c..c3d2efb 100644
--- a/gnu/system/grub.scm
+++ b/gnu/system/grub.scm
@@ -52,6 +52,7 @@
             grub-configuration-package
             grub-configuration-device

+            <menu-entry>
             menu-entry
             menu-entry?

diff --git a/gnu/system/u-boot.scm b/gnu/system/u-boot.scm
index 00a0165..d56f75e 100644
--- a/gnu/system/u-boot.scm
+++ b/gnu/system/u-boot.scm
@@ -48,10 +48,7 @@
 (define-record-type* <u-boot-configuration>
   u-boot-configuration make-u-boot-configuration
   u-boot-configuration?
-  (board           u-boot-configuration-board)           ; string ;
not optional!
-  (u-boot          u-boot-configuration-u-boot           ; package
-                   (default #f)) ; will actually default to
(make-u-boot-package board)
-  (device          u-boot-configuration-device)        ; string
+  (u-boot          u-boot-configuration-u-boot)        ; package
   (menu-entries    u-boot-configuration-menu-entries   ; list
                    (default '()))
   (default-entry   u-boot-configuration-default-entry  ; integer
@@ -96,7 +93,7 @@ corresponding to old generations of the system."
   FDTDIR .
   APPEND ~a
 ~%"
-                #$label
+                #$label #$label
                 #$linux #$linux-image-name
                 #$initrd
                 (string-join (list #$@arguments))))))

  reply	other threads:[~2016-09-08 22:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-05 19:58 wip u-boot support Danny Milosavljevic
2016-09-05 20:29 ` wip v2 " Danny Milosavljevic
2016-09-06 16:34   ` David Craven
2016-09-08 22:09     ` David Craven [this message]
2016-09-08 23:57       ` Danny Milosavljevic
2016-09-09  0:02       ` Danny Milosavljevic
2016-09-09 12:02         ` David Craven
2016-09-09 14:35           ` Danny Milosavljevic
2016-09-09 14:57           ` Danny Milosavljevic
2016-09-09 15:29             ` David Craven
2016-09-09 18:09               ` [WIP PATCH] gnu: add U-Boot support to operating-system configuration Danny Milosavljevic
2016-09-10 17:52                 ` David Craven
2016-09-16 11:07                   ` Danny Milosavljevic
2016-09-16 12:26                     ` Vincent Legoll
2016-09-17  7:47                       ` David Craven
2016-09-17 17:08                         ` David Craven
2016-09-24  4:16                           ` 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='CAL1_imn=tB-gDsZ5iOm_uyopHS8YCYyaF5R=h7BjLLDnAjVeww@mail.gmail.com' \
    --to=david@craven.ch \
    --cc=dannym@scratchpost.org \
    --cc=guix-devel@gnu.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).