From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: Guix with U-Boot Date: Mon, 29 Aug 2016 16:19:19 +0200 Message-ID: <20160829161919.5277eb35@scratchpost.org> References: <20160822132018.19828-1-david@craven.ch> <20160822132018.19828-6-david@craven.ch> <20160827104228.5db67f6a@scratchpost.org> <20160829123149.0e260af6@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/QvIcBZ/S7arMiI0_Y3MNUF7" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beNPL-0001iD-6K for guix-devel@gnu.org; Mon, 29 Aug 2016 10:19:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beNPH-0003kP-U6 for guix-devel@gnu.org; Mon, 29 Aug 2016 10:19:27 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:43576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beNPH-0003kG-JE for guix-devel@gnu.org; Mon, 29 Aug 2016 10:19:23 -0400 In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: David Craven Cc: guix-devel --MP_/QvIcBZ/S7arMiI0_Y3MNUF7 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, 29 Aug 2016 16:12:00 +0200 David Craven wrote: > Mhmm so I'm trying your patches and I get a no code for gnu system > u-boot. The file seems to be missing from the patches? Attached gnu/system/u-boot.scm . (Don't worry, once the branch is up, I'll diff with what I have here :) ) --MP_/QvIcBZ/S7arMiI0_Y3MNUF7 Content-Type: text/x-scheme Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=u-boot.scm ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2013, 2014, 2015, 2016 Ludovic Court=C3=A8s ;;; Copyright =C2=A9 2016 Danny Milosavljevic ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu system u-boot) #:use-module (guix store) #:use-module (guix packages) #:use-module (guix derivations) #:use-module (guix records) #:use-module (guix monads) #:use-module (guix gexp) #:use-module (guix download) #:use-module (gnu artwork) #:use-module (gnu system file-systems) #:autoload (gnu packages u-boot) (make-u-boot-package) #:use-module (gnu system grub) ; #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (srfi srfi-1) #:export (u-boot-configuration u-boot-configuration? u-boot-configuration-board u-boot-configuration-u-boot u-boot-configuration-device u-boot-configuration-file)) ;;; Commentary: ;;; ;;; Configuration of U-Boot. ;;; ;;; Code: (define-record-type* u-boot-configuration make-u-boot-configuration u-boot-configuration? (board u-boot-configuration-board) ; string ; not opt= ional! (u-boot u-boot-configuration-u-boot ; package (default #f)) ; will actually default to (make-u-boot-pa= ckage board) (device u-boot-configuration-device) ; string (menu-entries u-boot-configuration-menu-entries ; list (default '())) (default-entry u-boot-configuration-default-entry ; integer (default 0)) (timeout u-boot-configuration-timeout ; integer (default 5))) =0C ;;; ;;; Configuration file. ;;; (define* (u-boot-configuration-file config store-fs entries #:key (system (%current-system)) (old-entries '())) "Return the U-Boot configuration file corresponding to CONFIG, a object, and where the store is available at STORE-FS= , a object. OLD-ENTRIES is taken to be a list of menu entries corresponding to old generations of the system." (define linux-image-name (if (string-prefix? "mips" system) "vmlinuz" "bzImage")) (define all-entries (append entries (u-boot-configuration-menu-entries config))) (define entry->gexp (match-lambda (($ label linux arguments initrd) #~(format port "LABEL ~s MENU LABEL ~a LINUX ~a/~a ~a INITRD ~a FDTDIR . APPEND ~a ~%" #$label #$linux #$linux-image-name #$initrd (string-join (list #$@arguments)))))) (define builder #~(call-with-output-file #$output (lambda (port) (format port " ui menu.c32 DEFAULT ~a TIMEOUT ~a~%" #$(u-boot-configuration-default-entry config) #$(u-boot-configuration-timeout config)) #$@(map entry->gexp all-entries) #$@(if (pair? old-entries) #~((format port "~%") #$@(map entry->gexp old-entries) (format port "~%")) #~())))) (gexp->derivation "extlinux.conf" builder)) ;;; u-boot.scm ends here --MP_/QvIcBZ/S7arMiI0_Y3MNUF7--