summary refs log tree commit diff
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2019-09-03 03:10:13 +0200
committerDanny Milosavljevic <dannym@scratchpost.org>2019-09-03 03:10:13 +0200
commitb9e9ada82b4ed6e5d1e7048cfd12dc100b4fc358 (patch)
treeddf733fc65534af5b6569736853475b324e43898
parent5bdd10bdfcff13c627ff49fb594b83d2c3bd304f (diff)
downloadguix-wip-buildroot.tar.gz
gnu: install-buildroot-u-boot: Add post-image-script. wip-buildroot
* gnu/bootloader/u-boot.scm (install-buildroot-u-boot): Modify.
(buildroot->guix-package): Use it.
-rw-r--r--gnu/bootloader/u-boot.scm5
-rw-r--r--guix/import/buildroot.scm6
2 files changed, 9 insertions, 2 deletions
diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm
index 001edc5dac..efd696d4a2 100644
--- a/gnu/bootloader/u-boot.scm
+++ b/gnu/bootloader/u-boot.scm
@@ -91,10 +91,13 @@
         (write-file-on-device u-boot (stat:size (stat u-boot))
                               device (* 512 512)))))
 
-(define install-buildroot-u-boot
+(define (install-buildroot-u-boot post-image-script post-script-args)
   #~(lambda (bootloader device mount-point)
       ;; FIXME: Take genimage and a custom config from buildroot in order to install bootloader.
       #$genimage
+      #$buildroot-boards
+      #$post-image-script
+      #$post-script-args
       #f))
 
 
diff --git a/guix/import/buildroot.scm b/guix/import/buildroot.scm
index 0ae06de5ec..c21614dfe7 100644
--- a/guix/import/buildroot.scm
+++ b/guix/import/buildroot.scm
@@ -140,4 +140,8 @@
                ,(if (eq? (assoc-ref buildroot-configuration "BR2_aarch64") 'y)
                     "aarch64-linux-gnu"
                     "arm-linux-gnueabihf")))
-             (installer install-buildroot-u-boot))))))))
+             (installer (install-buildroot-u-boot
+                         ,(assoc-ref buildroot-configuration
+                                     "BR2_ROOTFS_POST_IMAGE_SCRIPT")
+                         ,(assoc-ref buildroot-configuration
+                                     "BR2_ROOTFS_POST_SCRIPT_ARGS"))))))))))