diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-05-08 16:59:02 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-05-09 12:21:56 -0700 |
commit | 9db6ca02489e88165cba102f1379f121cd37b817 (patch) | |
tree | af38fd0145a7733e1540056417970b88d491021f | |
parent | 8fa130526050c4d3bdfa5465e06180f813a71f3c (diff) | |
download | consfigurator-9db6ca02489e88165cba102f1379f121cd37b817.tar.gz |
implement setting TARGET for u-boot-install-rockchip(8)
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r-- | src/property/u-boot.lisp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/property/u-boot.lisp b/src/property/u-boot.lisp index 4e45527..c9cb72c 100644 --- a/src/property/u-boot.lisp +++ b/src/property/u-boot.lisp @@ -24,8 +24,8 @@ (defmethod install-bootloader-propspec ((type (eql 'u-boot-install-rockchip)) volume running-on-target - &key &allow-other-keys) - `(u-boot-installed-rockchip ,volume ,running-on-target)) + &rest args &key &allow-other-keys) + `(u-boot-installed-rockchip ,volume ,running-on-target ,@args)) (defmethod install-bootloader-binaries-propspec ((type (eql 'u-boot-install-rockchip)) volume &key &allow-other-keys) @@ -33,10 +33,17 @@ (debianlike (apt:installed "u-boot-rockchip")))) -(defprop u-boot-installed-rockchip :posix (volume running-on-target) +(defprop u-boot-installed-rockchip :posix + (volume running-on-target &key target) (:desc "Installed U-Boot using Debian scripts") (:hostattrs - (os:required 'os:debianlike)) + (os:required 'os:debianlike) + (or running-on-target target + (inapplicable-property + "Must specify TARGET for u-boot-install-rockchip(8) unless running on device."))) (:apply (declare (ignore running-on-target)) - (mrun "u-boot-install-rockchip" (device-file volume)))) + (let ((args (list "u-boot-install-rockchip" (device-file volume)))) + (if target + (apply #'mrun :env `(:TARGET ,target) args) + (apply #'mrun args))))) |