From fa7470189eed39ae863f8f269fd3ef29bb084f16 Mon Sep 17 00:00:00 2001 From: Caliph Nomble Date: Mon, 14 Oct 2019 02:01:53 -0400 Subject: gnu: Add u-boot-rockpro64-rk3399 * gnu/packages/bootloaders.scm (u-boot-rockpro64-rk3399): New exported variable. (u-boot-2019.10): New variable. * gnu/bootloader/u-boot.scm (u-boot-rockpro64-rk3399-bootloader): New exported variable. (install-rockpro64-rk3399-u-boot): New variable. * gnu/system/install.scm (rockpro64-installation-os): New exported variable. Adjusted-by: Vagrant Cascadian Signed-off-by: Caliph Nomble Signed-off-by: Vagrant Cascadian --- gnu/system/install.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gnu/system') diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 912096027f..eab3649269 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -62,6 +62,7 @@ novena-installation-os pine64-plus-installation-os pinebook-installation-os + rockpro64-installation-os rk3399-puma-installation-os wandboard-installation-os os-with-u-boot)) @@ -583,6 +584,11 @@ The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET." "/dev/mmcblk0" ; SD card storage "ttyS0")) +(define rockpro64-installation-os + (embedded-installation-os u-boot-rockpro64-rk3399-bootloader + "/dev/mmcblk0" ; SD card/eMMC (SD priority) storage + "ttyS2")) ; UART2 connected on the Pi2 bus + (define rk3399-puma-installation-os (embedded-installation-os u-boot-puma-rk3399-bootloader "/dev/mmcblk0" ; SD card storage -- cgit 1.4.1 From 2fce14af242298a352ed244c192017c922244506 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Fri, 18 Oct 2019 13:14:08 -0700 Subject: gnu: Add u-boot-rock64-rk3328. * gnu/packages/bootloaders (u-boot-rock64-rk3328): New variable. * gnu/bootloader/u-boot (install-rock64-rk3328-u-boot): New variable. (u-boot-rock64-rk3328-bootloader): New variable. * gnu/system/install (define rock64-installation-os): New variable. --- gnu/bootloader/u-boot.scm | 17 +++++++++++++++++ gnu/packages/bootloaders.scm | 26 ++++++++++++++++++++++++++ gnu/system/install.scm | 6 ++++++ 3 files changed, 49 insertions(+) (limited to 'gnu/system') diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index 4f98be2483..20eabc370c 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -34,6 +34,7 @@ u-boot-pine64-plus-bootloader u-boot-pinebook-bootloader u-boot-puma-rk3399-bootloader + u-boot-rock64-rk3328-bootloader u-boot-rockpro64-rk3399-bootloader u-boot-wandboard-bootloader)) @@ -91,6 +92,15 @@ (write-file-on-device u-boot (stat:size (stat u-boot)) device (* 512 512))))) +(define install-rock64-rk3328-u-boot + #~(lambda (bootloader device mount-point) + (let ((idb (string-append bootloader "/libexec/idbloader.img")) + (u-boot (string-append bootloader "/libexec/u-boot.itb"))) + (write-file-on-device idb (stat:size (stat idb)) + device (* 64 512)) + (write-file-on-device u-boot (stat:size (stat u-boot)) + device (* 16384 512))))) + (define install-rockpro64-rk3399-u-boot #~(lambda (bootloader device mount-point) (let ((idb (string-append bootloader "/libexec/idbloader.img")) @@ -190,6 +200,13 @@ (package u-boot-puma-rk3399) (installer install-puma-rk3399-u-boot))) +(define u-boot-rock64-rk3328-bootloader + ;; SD and eMMC use the same format + (bootloader + (inherit u-boot-bootloader) + (package u-boot-rock64-rk3328) + (installer install-rock64-rk3328-u-boot))) + (define u-boot-rockpro64-rk3399-bootloader ;; SD and eMMC use the same format (bootloader diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 45e1b8fc1c..d2f4d511db 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -759,6 +759,32 @@ to Novena upstream, does not load u-boot.img from the first partition.") ("firmware-m0" ,rk3399-cortex-m0) ,@(package-native-inputs base)))))) +(define-public u-boot-rock64-rk3328 + (let ((base (make-u-boot-package "rock64-rk3328" "aarch64-linux-gnu"))) + (package + (inherit base) + (version (package-version u-boot-2019.10)) + (source (package-source u-boot-2019.10)) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'set-environment + (lambda* (#:key inputs #:allow-other-keys) + (let ((bl31 (string-append (assoc-ref inputs "firmware") + "/bl31.elf"))) + (setenv "BL31" bl31)) + #t)) + (add-after 'unpack 'add-u-boot-itb + (lambda _ + (substitute* "Kconfig" + (("default .u-boot.itb. if SPL_LOAD_FIT && .ROCKCHIP_RK3399") + "default \"u-boot.itb\" if SPL_LOAD_FIT && (ARCH_ROCKCHIP")) + #t)))))) + (native-inputs + `(("firmware" ,arm-trusted-firmware-rk3328) + ,@(package-native-inputs base)))))) + (define-public u-boot-rockpro64-rk3399 (let ((base (make-u-boot-package "rockpro64-rk3399" "aarch64-linux-gnu"))) (package diff --git a/gnu/system/install.scm b/gnu/system/install.scm index eab3649269..a450285597 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -62,6 +62,7 @@ novena-installation-os pine64-plus-installation-os pinebook-installation-os + rock64-installation-os rockpro64-installation-os rk3399-puma-installation-os wandboard-installation-os @@ -584,6 +585,11 @@ The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET." "/dev/mmcblk0" ; SD card storage "ttyS0")) +(define rock64-installation-os + (embedded-installation-os u-boot-rock64-rk3328-bootloader + "/dev/mmcblk0" ; SD card/eMMC (SD priority) storage + "ttyS2")) ; UART2 connected on the Pi2 bus + (define rockpro64-installation-os (embedded-installation-os u-boot-rockpro64-rk3399-bootloader "/dev/mmcblk0" ; SD card/eMMC (SD priority) storage -- cgit 1.4.1 From 545ff7b7841ddae9c73345ab5c6af42aadbda6e3 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Fri, 18 Oct 2019 15:43:09 -0700 Subject: gnu: Add u-boot-firefly-rk3399. * gnu/packages/bootloaders (u-boot-firefly-rk3399): New variable. * gnu/bootloader/u-boot (install-firefly-rk3399-u-boot): New variable. (u-boot-firefly-rk3399-bootloader): New variable. * gnu/system/install (define firefly-rk3399-installation-os): New variable. --- gnu/bootloader/u-boot.scm | 17 +++++++++++++++++ gnu/packages/bootloaders.scm | 22 ++++++++++++++++++++++ gnu/system/install.scm | 6 ++++++ 3 files changed, 45 insertions(+) (limited to 'gnu/system') diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index 20eabc370c..e21526eb7e 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -28,6 +28,7 @@ u-boot-a20-olinuxino-micro-bootloader u-boot-bananapi-m2-ultra-bootloader u-boot-beaglebone-black-bootloader + u-boot-firefly-rk3399-bootloader u-boot-mx6cuboxi-bootloader u-boot-nintendo-nes-classic-edition-bootloader u-boot-novena-bootloader @@ -92,6 +93,15 @@ (write-file-on-device u-boot (stat:size (stat u-boot)) device (* 512 512))))) +(define install-firefly-rk3399-u-boot + #~(lambda (bootloader device mount-point) + (let ((idb (string-append bootloader "/libexec/idbloader.img")) + (u-boot (string-append bootloader "/libexec/u-boot.itb"))) + (write-file-on-device idb (stat:size (stat idb)) + device (* 64 512)) + (write-file-on-device u-boot (stat:size (stat u-boot)) + device (* 16384 512))))) + (define install-rock64-rk3328-u-boot #~(lambda (bootloader device mount-point) (let ((idb (string-append bootloader "/libexec/idbloader.img")) @@ -169,6 +179,13 @@ (inherit u-boot-allwinner-bootloader) (package u-boot-bananapi-m2-ultra))) +(define u-boot-firefly-rk3399-bootloader + ;; SD and eMMC use the same format + (bootloader + (inherit u-boot-bootloader) + (package u-boot-firefly-rk3399) + (installer install-firefly-rk3399-u-boot))) + (define u-boot-mx6cuboxi-bootloader (bootloader (inherit u-boot-imx-bootloader) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index d2f4d511db..438f404e1a 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -785,6 +785,28 @@ to Novena upstream, does not load u-boot.img from the first partition.") `(("firmware" ,arm-trusted-firmware-rk3328) ,@(package-native-inputs base)))))) +(define-public u-boot-firefly-rk3399 + (let ((base (make-u-boot-package "firefly-rk3399" "aarch64-linux-gnu"))) + (package + (inherit base) + (version (package-version u-boot-2019.10)) + (source (package-source u-boot-2019.10)) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'set-environment + (lambda* (#:key inputs #:allow-other-keys) + (setenv "BL31" (string-append (assoc-ref inputs "firmware") + "/bl31.elf")) + #t)) + ;; Phases do not succeed on the bl31 ELF. + (delete 'strip) + (delete 'validate-runpath))))) + (native-inputs + `(("firmware" ,arm-trusted-firmware-rk3399) + ,@(package-native-inputs base)))))) + (define-public u-boot-rockpro64-rk3399 (let ((base (make-u-boot-package "rockpro64-rk3399" "aarch64-linux-gnu"))) (package diff --git a/gnu/system/install.scm b/gnu/system/install.scm index a450285597..bdf114c180 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -60,6 +60,7 @@ mx6cuboxi-installation-os nintendo-nes-classic-edition-installation-os novena-installation-os + firefly-rk3399-installation-os pine64-plus-installation-os pinebook-installation-os rock64-installation-os @@ -560,6 +561,11 @@ The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET." "/dev/mmcblk1" ; eMMC storage "ttyS0")) +(define firefly-rk3399-installation-os + (embedded-installation-os u-boot-firefly-rk3399-bootloader + "/dev/mmcblk0" ; SD card/eMMC (SD priority) storage + "ttyS2")) ; UART2 connected on the Pi2 bus + (define mx6cuboxi-installation-os (embedded-installation-os u-boot-mx6cuboxi-bootloader "/dev/mmcblk0" ; SD card storage -- cgit 1.4.1 From 625bdf09d344302ec2d5da7f35fe35ca1d128a93 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 4 Nov 2019 23:00:08 +0100 Subject: file-systems: Mount /var/run/nscd read-write in containers. Fixes . Reported by Ivan Vilata i Balaguer . * gnu/system/file-systems.scm (%network-file-mappings): Set 'writable?' to #true for /var/run/nscd. --- gnu/system/file-systems.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gnu/system') diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index 6cf6ccc53e..d47a514b66 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm @@ -507,7 +507,10 @@ a bind mount." ;; XXX: On some GNU/Linux systems, /etc/resolv.conf is a ;; symlink to a file in a tmpfs which, for an unknown reason, ;; cannot be bind mounted read-only within the container. - (writable? (string=? file "/etc/resolv.conf")))) + ;; The same goes with /var/run/nscd, as discussed in + ;; . + (writable? (or (string=? file "/etc/resolv.conf") + (string=? file "/var/run/nscd"))))) (cons "/var/run/nscd" %network-configuration-files))) (define (file-system-type-predicate type) -- cgit 1.4.1