device-nokia-n900: enable use of rtc time at boot (MR 3586)

Since N900 rtc works fine, remove swclock from boot as it causes time to be set
wrong. Additionally, rtc device is set correctly in kernel, so remove old,
adjusted hwclock config.

Partially reverts pmaports 0e502a5139
[ci:skip-build]: already built successfully in CI
This commit is contained in:
Sicelo A. Mhlongo 2022-10-25 06:51:20 +02:00 committed by Oliver Smith
parent 2acece294a
commit 789343b8c7
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
3 changed files with 12 additions and 9 deletions

View file

@ -2,7 +2,7 @@
# Maintainer: Sicelo <absicsz@gmail.com> # Maintainer: Sicelo <absicsz@gmail.com>
# Co-Maintainer: Danct12 <danct12@disroot.org> # Co-Maintainer: Danct12 <danct12@disroot.org>
pkgname=device-nokia-n900 pkgname=device-nokia-n900
pkgver=8.2 pkgver=8.3
pkgrel=1 pkgrel=1
pkgdesc="Nokia N900" pkgdesc="Nokia N900"
url="https://postmarketos.org" url="https://postmarketos.org"
@ -10,7 +10,7 @@ arch="armv7"
license="MIT" license="MIT"
depends="postmarketos-base linux-nokia-n900 u-boot-tools kbd kbd-bkeymaps ofono alsa-utils" depends="postmarketos-base linux-nokia-n900 u-boot-tools kbd kbd-bkeymaps ofono alsa-utils"
makedepends="devicepkg-dev u-boot-tools kbd kbd-bkeymaps" makedepends="devicepkg-dev u-boot-tools kbd kbd-bkeymaps"
install="$pkgname.post-install" install="$pkgname.pre-upgrade $pkgname.post-install"
subpackages=" subpackages="
$pkgname-x11 $pkgname-x11
$pkgname-xkeyboard-config:xkeyboard_config $pkgname-xkeyboard-config:xkeyboard_config
@ -112,6 +112,8 @@ package() {
"$pkgdir"/usr/share/bkeymaps/fi/rx51_fi.bmap.gz "$pkgdir"/usr/share/bkeymaps/fi/rx51_fi.bmap.gz
install -D -m644 "$srcdir"/keymaps/rx51_se.bmap.gz \ install -D -m644 "$srcdir"/keymaps/rx51_se.bmap.gz \
"$pkgdir"/usr/share/bkeymaps/se/rx51_se.bmap.gz "$pkgdir"/usr/share/bkeymaps/se/rx51_se.bmap.gz
postmarketos-mvcfg-package "$pkgdir" "$pkgname"
} }
x11() { x11() {

View file

@ -11,8 +11,8 @@ rc-update add acpid default
rc-update add hwdrivers boot rc-update add hwdrivers boot
# Enable ofono # Enable ofono
rc-update add ofono default rc-update add ofono default
# Enable swclock # Disable swclock because rtc is working
rc-update -q add swclock boot rc-update -q del swclock boot
# Load nokia-modem module on boot # Load nokia-modem module on boot
NMC=/etc/modules-load.d/nokia-modem.conf NMC=/etc/modules-load.d/nokia-modem.conf
@ -20,9 +20,4 @@ if [ ! -f $NMC ] || [ -z "$(grep nokia-modem $NMC)" ]; then
echo "nokia-modem" >> /etc/modules-load.d/nokia-modem.conf echo "nokia-modem" >> /etc/modules-load.d/nokia-modem.conf
fi fi
# Set RTC device for hwclock
if [ -z "$(grep /dev/rtc0 /etc/conf.d/hwclock)" ]; then
sed -i 's/clock_args=\"/clock_args=\" -f \/dev\/rtc/' /etc/conf.d/hwclock
fi
exit 0 exit 0

View file

@ -0,0 +1,6 @@
#!/bin/sh
postmarketos-mvcfg-pre-upgrade \
device-nokia-n900 \
/etc/conf.d/hwclock