From 61dab769ff062fa69d94a4a126333f542489be52 Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Thu, 30 Jun 2022 11:20:55 +0200 Subject: [PATCH v2 4/5] gnu: Add install-pinenote-rk3568-u-boot and u-boot-pinenote-rk3568-bootloader. * gnu/bootloader/u-boot.scm (install-pinenote-rk3568-u-boot, u-boot-pinenote-rk3568-bootloader): New variables. diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index 6cad33b741..4410cc497a 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2017, 2019 Mathieu Othacehe ;;; Copyright © 2020 Julien Lepiller ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2022 Petr Hodina ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,6 +38,7 @@ (define-module (gnu bootloader u-boot) u-boot-novena-bootloader u-boot-pine64-plus-bootloader u-boot-pine64-lts-bootloader + u-boot-pinenote-rk3568-bootloader u-boot-pinebook-bootloader u-boot-pinebook-pro-rk3399-bootloader u-boot-puma-rk3399-bootloader @@ -127,6 +129,15 @@ (define install-rockpro64-rk3399-u-boot (define install-pinebook-pro-rk3399-u-boot install-rockpro64-rk3399-u-boot) +;; TODO: Supply correct offsets +(define install-pinenote-rk3568-u-boot + #~(lambda (bootloader root-index image) + (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)) + image (* 64 512)) + (write-file-on-device u-boot (stat:size (stat u-boot)) + image (* 16384 512))))) ;;; @@ -255,3 +266,9 @@ (define u-boot-pinebook-pro-rk3399-bootloader (inherit u-boot-bootloader) (package u-boot-pinebook-pro-rk3399) (disk-image-installer install-pinebook-pro-rk3399-u-boot))) + +(define u-boot-pinenote-rk3568-bootloader + (bootloader + (inherit u-boot-bootloader) + (package u-boot-pinenote-rk3568) + (disk-image-installer install-pinenote-rk3568-u-boot))) -- 2.36.1