aboutsummaryrefslogblamecommitdiffstats
path: root/main/mkinitfs/add-feature-rpirtc.patch
blob: b2f0dfd6b6b668316e902fd127a20edceeb409bb (plain) (tree)











































                                                                      
From f87f786cb9f066288d6482aafb32b7e88dc5f4b8 Mon Sep 17 00:00:00 2001
From: Henrik Riomar <henrik.riomar@gmail.com>
Date: Tue, 15 Oct 2019 12:59:43 +0200
Subject: [PATCH] add feature rpirtc

Add new feature rpi rtc allowing a hw rtc to be used.

The init script in Alpine Linux since v3.9 looks for /dev/rtc, if
not found it will switch to swclock.

To make this check work on a Rasberry PI with a mounted rtc and
the following in usercfg.txt
 dtoverlay=i2c-rtc,ds3231
we must have rtc drivers available already initramfs.

(cherry picked from commit 89f9c4fb0dd3a69dea4cb7ecead55692c9732e06)
---
 Makefile                  | 1 +
 features.d/rpirtc.modules | 1 +
 2 files changed, 2 insertions(+)
 create mode 100644 features.d/rpirtc.modules

diff --git a/Makefile b/Makefile
index 3c076a1..b4524a5 100644
--- a/Makefile
+++ b/Makefile
@@ -43,6 +43,7 @@ CONF_FILES	:= mkinitfs.conf \
 		features.d/raid.files \
 		features.d/raid.modules \
 		features.d/reiserfs.modules \
+		features.d/rpirtc.modules \
 		features.d/scsi.modules \
 		features.d/squashfs.modules \
 		features.d/ubifs.modules \
diff --git a/features.d/rpirtc.modules b/features.d/rpirtc.modules
new file mode 100644
index 0000000..91c8ad3
--- /dev/null
+++ b/features.d/rpirtc.modules
@@ -0,0 +1 @@
+kernel/drivers/rtc/rtc-ds1307.ko
-- 
2.24.1