summaryrefslogtreecommitdiff
path: root/px
diff options
context:
space:
mode:
Diffstat (limited to 'px')
-rw-r--r--px/system/config.scm60
-rw-r--r--px/system/raspberry.scm237
2 files changed, 1 insertions, 296 deletions
diff --git a/px/system/config.scm b/px/system/config.scm
index 7b6dc40..3d95889 100644
--- a/px/system/config.scm
+++ b/px/system/config.scm
@@ -30,10 +30,6 @@
px-server-os
px-server-ee-os
- px-core-arm-os
- px-gui-arm-os
- px-desktop-arm-os
-
%px-server-open-ports-common
%default-pantherx-channel)
@@ -169,58 +165,4 @@
#:authorized-keys authorized-keys
#:templates templates
#:default-packages %px-server-ee-packages
- #:default-services %px-server-ee-services))
-
-;;;
-;;; ARM
-;;;
-
-(define px-core-arm-os
- (operating-system
- (host-name "pantherx")
- (timezone "Europe/Berlin")
- (locale "en_US.utf8")
-
- (bootloader (bootloader-configuration
- (bootloader u-boot-bootloader)
- (targets '("/dev/vda"))))
-
- (file-systems (cons (file-system
- (device "/dev/sda1")
- (mount-point "/")
- (type "ext4")) %base-file-systems))
-
- (users (cons* (user-account
- (name "panther")
- (comment "default user")
- (group "users")
- (password (crypt "pantherx" "$6$abc"))
- (supplementary-groups '("wheel" "netdev" "lp" "video"
- "audio"))) %base-user-accounts))
-
- (packages %px-core-arm-packages)
- (services
- %px-core-arm-services)
- (name-service-switch %mdns-host-lookup-nss)))
-
-(define px-gui-arm-os
- (operating-system
- (inherit px-core-arm-os)
- (host-name "pantherx")
- (packages %px-gui-arm-packages)
- (services
- %px-gui-arm-services)))
-
-(define (px-desktop-arm-os os-config)
- (let ((selected-packages (prepare-packages os-config
- %px-desktop-arm-packages))
- (selected-services (prepare-services os-config
- %px-desktop-arm-services)))
- (operating-system
- (inherit os-config)
-
- (packages selected-packages)
- (services
- selected-services)
-
- (name-service-switch %mdns-host-lookup-nss))))
+ #:default-services %px-server-ee-services)) \ No newline at end of file
diff --git a/px/system/raspberry.scm b/px/system/raspberry.scm
deleted file mode 100644
index f9b903d..0000000
--- a/px/system/raspberry.scm
+++ /dev/null
@@ -1,237 +0,0 @@
-(define-module (px system raspberry)
- #:use-module (gnu bootloader)
- #:use-module (gnu image)
- #:use-module (gnu services)
- #:use-module (gnu system)
- #:use-module (gnu system file-systems)
- #:use-module (gnu system image)
- #:use-module (gnu system nss)
- #:use-module (gnu system shadow)
- #:use-module (guix gexp)
- #:use-module (guix platforms arm)
- #:use-module (nongnu packages linux)
- #:use-module (px bootloader u-boot)
- #:use-module (px system os)
- #:use-module (px hardware raspberrypi)
- #:use-module (px packages base)
- #:use-module (px packages bootloaders)
- #:use-module (px packages linux)
- #:use-module (px services base)
- #:use-module (px services device)
- #:use-module (px system config)
- #:use-module (srfi srfi-26)
- #:export (%raspberrypi-config-params
- %raspberrypi-cmdline-params
- raspberrypi-gui-os
- raspberrypi-gui-image
-
- %reterminal-config-params
- %reterminal-cmdline-params
- reterminal-image-type
-
- %reterminal-core-packages
- %reterminal-core-services
- reterminal-core-os
- reterminal-core-image
-
- %reterminal-gui-packages
- %reterminal-gui-services
- reterminal-gui-os))
-
-(define %raspberrypi-config-params
- (list "enable_uart=1" "uart_2ndstage=1" "arm_64bit=1" "kernel=u-boot.bin"))
-
-(define %raspberrypi-cmdline-params
- (list "root=LABEL=RASPIROOT rw rootwait"
- "console=serial0,115200 console=tty1 console=ttyAMA0,115200"
- "selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N"
- "dwc_otg.lpm_enable=0 kgdboc=serial0,115200"))
-
-(define (make-raspberrypi-boot-partition config cmdline)
- (partition (size (* 128
- (expt 2 20)))
- (label "BOOT")
- (file-system
- "fat32")
- (flags '())
- (initializer #~(lambda* (root #:key #:allow-other-keys)
- (use-modules (guix build utils))
- (mkdir-p root)
- (copy-recursively #$(file-append
- u-boot-rpi-arm64
- "/libexec/u-boot.bin")
- (string-append root
- "/u-boot.bin"))
- (copy-recursively #$(file-append
- raspberrypi-firmware "/")
- root)
- (copy-recursively #$(file-append
- seeed-reterminal-dtoverlays
- "/")
- (string-append root
- "/overlays"))
- (copy-recursively #$(plain-file "config.txt"
- (string-join
- config "\n"))
- (string-append root
- "/config.txt"))
- (copy-recursively #$(plain-file "cmdline.txt"
- (string-join
- cmdline " "))
- (string-append root
- "/cmdline.txt"))))))
-
-(define %raspberrypi-boot-partition
- (make-raspberrypi-boot-partition %raspberrypi-config-params
- %raspberrypi-cmdline-params))
-
-(define %raspberrypi-root-partition
- (partition (size 'guess)
- (label "RASPIROOT")
- (file-system
- "ext4")
- (flags '(boot))
- (initializer #~initialize-root-partition)))
-
-(define raspberrypi-image-type
- (image-type (name 'raspberrypi-raw)
- (constructor (cut image-with-os
- (image-without-os (format 'disk-image)
- (partitions (list
- %raspberrypi-boot-partition
- %raspberrypi-root-partition)))
- <>))))
-
-(define raspberrypi-gui-os
- (operating-system
- (inherit px-gui-arm-os)
-
- (bootloader (bootloader-configuration
- (bootloader u-boot-rpi-arm64-bootloader)
- (targets '("/dev/vda"))
- (device-tree-support? #f)))
- (kernel linux-raspberry-5.15)
- (kernel-arguments (cons* "cgroup_enable=memory" %default-kernel-arguments))
- (initrd-modules '())
- (firmware (list raspberrypi-firmware brcm80211-firmware bluez-firmware))
- (file-systems (cons* (file-system
- (device (file-system-label "BOOT"))
- (mount-point "/boot/firmware")
- (type "vfat"))
- (file-system
- (device (file-system-label "RASPIROOT"))
- (mount-point "/")
- (type "ext4")) %base-file-systems))
- (services
- (cons* (service btuart-service-type) %px-gui-arm-services))))
-
-(define raspberrypi-gui-image
- (image (inherit (os+platform->image raspberrypi-gui-os aarch64-linux
- #:type raspberrypi-image-type))
- (partition-table-type 'mbr)
- (name 'raspberrypi-gui-image)))
-
-;;
-;; SEEED reTerminal core configurations
-;;
-
-(define %reterminal-config-params
- (cons* "dtoverlay=dwc2,dr_mode=host"
- "dtparam=ant2"
- "disable_splash=1"
- "ignore_lcd=1"
- "dtoverlay=vc4-kms-v3d-pi4"
- "dtoverlay=i2c3,pins_4_5"
- "gpio=13=pu"
- "dtoverlay=reTerminal,tp_rotate=0"
- "dtoverlay=reTerminal-bridge"
- "dtoverlay=reTerminal,key0=0x043,key1=0x044,key2=0x057,key3=0x058"
- "vt.global_cursor_default=0"
- %raspberrypi-config-params))
-
-(define %reterminal-cmdline-params
- %raspberrypi-cmdline-params)
-
-(define %reterminal-boot-partition
- (make-raspberrypi-boot-partition %reterminal-config-params
- %reterminal-cmdline-params))
-
-(define reterminal-image-type
- (image-type (name 'reterminal-image-raw)
- (constructor (cut image-with-os
- (image-without-os (format 'disk-image)
- (partitions (list
- %reterminal-boot-partition
- %raspberrypi-root-partition)))
- <>))))
-
-(define %reterminal-core-packages
- %px-core-arm-packages)
-
-(define %reterminal-core-services
- %px-core-arm-services)
-
-(define* (reterminal-core-os #:key (open-ports %px-server-open-ports-common)
- (authorized-keys '()))
- (make-os (operating-system
- (host-name "reterminal-core")
- (timezone "Europe/Berlin")
- (locale "en_US.utf8")
-
- (bootloader (bootloader-configuration
- (bootloader u-boot-rpi-arm64-bootloader)
- (targets '("/dev/vda"))
- (device-tree-support? #f)))
- (initrd-modules '())
- (kernel linux-raspberry-5.15)
- (kernel-loadable-modules %reterminal-kernel-modules)
- (kernel-arguments (cons* "cgroup_enable=memory"
- %default-kernel-arguments))
- (file-systems (cons* (file-system
- (device (file-system-label "BOOT"))
- (mount-point "/boot/firmware")
- (type "vfat"))
- (file-system
- (device (file-system-label "RASPIBOOT"))
- (mount-point "/")
- (type "ext4")) %base-file-systems))
- (users (cons (user-account
- (name "panther")
- (comment "panther's account")
- (group "users")
- (password (crypt "pantherx" "$6$abc"))
- (supplementary-groups '("wheel" "audio" "video"))
- (home-directory "/home/panther"))
- %base-user-accounts))
- (name-service-switch %mdns-host-lookup-nss))
- #:kernel 'custom
- #:open-ports open-ports
- #:authorized-keys authorized-keys
- #:templates (list %raspberry-pi-4-template
- %seeed-reterminal-template)
- #:default-packages %reterminal-core-packages
- #:default-services %reterminal-core-services))
-
-(define reterminal-core-image
- (image (inherit (os+platform->image (reterminal-core-os) aarch64-linux
- #:type reterminal-image-type))
- (partition-table-type 'mbr)
- (name 'reterminal-core-image)))
-
-;;
-;; SEEED reTerminal GUI configuration
-;;
-
-(define %reterminal-gui-packages
- (cons* seeed-reterminal-dtoverlays %px-gui-arm-packages))
-
-(define %reterminal-gui-services
- %px-gui-arm-services)
-
-(define reterminal-gui-os
- (operating-system
- (inherit raspberrypi-gui-os)
- (kernel-loadable-modules %reterminal-kernel-modules)
- (packages %reterminal-gui-packages)
- (services
- %reterminal-gui-services)))