emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44543: closed ([PATCH] gnu: raspberry-pi: Add helpers for config.txt


From: GNU bug Tracking System
Subject: bug#44543: closed ([PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation.)
Date: Thu, 06 May 2021 21:13:02 +0000

Your message dated Thu, 6 May 2021 23:12:20 +0200
with message-id <86AB64B2-613D-49F9-8985-50766CB1DCF9@vodafonemail.de>
and subject line Re: [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for 
config.txt file generation.
has caused the debbugs.gnu.org bug report #44543,
regarding [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
44543: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=44543
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation. Date: Tue, 10 Nov 2020 00:53:52 +0100
* gnu/packages/raspberry-pi.scm (raspi-config-file, raspi-custom.txt):
  New functions.
  (raspi-config.txt, raspi-u-boot-bootloader.txt, raspi-kernel.txt):
  New variables.
---
 gnu/packages/raspberry-pi.scm | 44 +++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/raspberry-pi.scm b/gnu/packages/raspberry-pi.scm
index 7700c26d06..af3998c4d6 100644
--- a/gnu/packages/raspberry-pi.scm
+++ b/gnu/packages/raspberry-pi.scm
@@ -235,3 +235,47 @@ Raspberry Pi.  Note: It does not work on Raspberry Pi 1.")
                (install-file "arm64.bin" libexec)
                #t))))))))
     (supported-systems '("aarch64-linux"))))
+
+(define-public (raspi-config-file name content)
+  "Creates a configuration file like config.txt for the Raspberry Pi firmware.
+CONTENT can be a list of strings, which are concatenated with a newline
+character.  Alternatively CONTENT can be a string with the full file content."
+  (plain-file
+   name
+   (if (list? content)
+       (string-join content "\n" 'suffix)
+       content)))
+
+(define-public raspi-config.txt
+  ;; Creates a config.txt to start the ARM cores up in 64-bit mode if necessary
+  ;; and to include bootloader.txt, kernel.txt, and a custom.txt, each with
+  ;; separate configurations for the Raspberry Pi firmware.
+  (raspi-config-file
+   "config.txt"
+   `("# See 
https://www.raspberrypi.org/documentation/configuration/config-txt/README.md 
for details."
+     ""
+     ,(string-append "arm_64bit=" (if (target-aarch64?) "1" "0"))
+     "include bootloader.txt"
+     "include kernel.txt"
+     "include custom.txt")))
+
+(define-public raspi-u-boot-bootloader.txt
+  ;; Creates a bootloader.txt file to be included by the config.txt to load the
+  ;; U-Boot bootloader.
+  (raspi-config-file
+   "bootloader.txt"
+   "kernel=u-boot.bin"))
+
+(define-public raspi-kernel.txt
+  ;; Creates a kernel.txt to be included by the config.txt to ensure that
+  ;; upstream kernel and device tree files can be used.
+  (raspi-config-file
+   "kernel.txt"
+   '("dtoverlay=upstream"
+     "upstream_kernel=1")))
+
+(define-public (raspi-custom.txt content)
+  "Creates a custom.txt to be included by the config.txt.  CONTENT can be a 
list
+of strings, which are concatenated with a newline character.  Alternatively
+CONTENT can be a string with the full file content."
+  (raspi-config-file "custom.txt" content))
-- 
2.26.0





--- End Message ---
--- Begin Message --- Subject: Re: [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation. Date: Thu, 6 May 2021 23:12:20 +0200
Hi!

I’m closing this ticket. There will be a new patch series which will also 
contain this change.


Bye

Stefan

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]