aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-05-07 00:04:31 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-05-07 00:04:31 -0700
commit9a46313fb1b4c1f4994231dd8d2411546b1a5456 (patch)
tree158346e7f7f29b833972e76053e35cb32e257344
parentdf4d93691362f6c6a79c689f245d2d81cf7eaa0b (diff)
downloadconsfigurator-9a46313fb1b4c1f4994231dd8d2411546b1a5456.tar.gz
add u-boot-install-rockchip support
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--consfigurator.asd1
-rw-r--r--src/package.lisp8
-rw-r--r--src/property/u-boot.lisp31
3 files changed, 40 insertions, 0 deletions
diff --git a/consfigurator.asd b/consfigurator.asd
index 85c8dd0..4239950 100644
--- a/consfigurator.asd
+++ b/consfigurator.asd
@@ -46,6 +46,7 @@
(:file "src/property/locale")
(:file "src/property/installer")
(:file "src/property/grub")
+ (:file "src/property/u-boot")
(:file "src/connection/shell-wrap")
(:file "src/connection/fork")
(:file "src/connection/rehome")
diff --git a/src/package.lisp b/src/package.lisp
index 211b653..356ab1e 100644
--- a/src/package.lisp
+++ b/src/package.lisp
@@ -496,6 +496,14 @@
(#:apt #:consfigurator.property.apt))
(:export #:grub))
+(defpackage :consfigurator.property.u-boot
+ (:use #:cl #:alexandria #:consfigurator
+ #:consfigurator.property.disk
+ #:consfigurator.property.installer)
+ (:local-nicknames (#:os #:consfigurator.property.os)
+ (#:apt #:consfigurator.property.apt))
+ (:export #:u-boot-install-rockchip))
+
(defpackage :consfigurator.connection.local
(:use #:cl #:consfigurator #:alexandria)
(:export #:local-connection))
diff --git a/src/property/u-boot.lisp b/src/property/u-boot.lisp
new file mode 100644
index 0000000..9d8f7f0
--- /dev/null
+++ b/src/property/u-boot.lisp
@@ -0,0 +1,31 @@
+;;; Consfigurator -- Lisp declarative configuration management system
+
+;;; Copyright (C) 2021 Sean Whitton <spwhitton@spwhitton.name>
+
+;;; This file 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, or (at your option)
+;;; any later version.
+
+;;; This file 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+(in-package :consfigurator.property.u-boot)
+(named-readtables:in-readtable :consfigurator)
+
+(defmethod install-bootloader ((type (eql 'u-boot-install-rockchip))
+ (volume opened-volume)
+ running-on-target &key)
+ (mrun "u-boot-install-rockchip" (device-file volume))
+ (mrun "sync"))
+
+(defmethod install-bootloader-binaries
+ ((type (eql 'u-boot-install-rockchip)) volume &key)
+ `(os:etypecase
+ (debianlike
+ (apt:installed "u-boot-rockchip"))))