Package: src:linux Version: 4.0.2-1 Severity: normal Tags: upstream
My cubox-i4pro armhf device has two real-time-clocks. One, snvs, is not battery backed, hence is not useful for setting the system clock on boot after a power failure. The other, pcf8523, does have battery backup. Unfortunately, the snvs is recognzed first, so it become /dev/rtc0 (the pcf8523 becomes /dev/rtc1) and the kernel at boot time uses /dev/rtc0 by default to set the system time from. There does not seem to be any way to over-ride this. There's code in /etc/default/hwclock that would do part of the work in a sysvinit setup, but it seems to be ignored under systemd. In googling about, I stumbled across a proposed patch that would add a kernel command line parameter, "hctosys=rtc<#>' that would over-ride the default, but it seems not to have ever been implemented ( http://lkml.iu.edu/hypermail/linux/kernel/1407.0/03989.html ) Presumably, there is systemd magic that could do the same thing as was available under sysvinit. Is there anybody out there with enough systemd foo to tell me how to do that? Other ways to attack this problem may involve something with udev rules, but I'm not savvy enough to figure that out for myself, either. Personally, I kind of like the kernel command line parameter, but others may have other ideas. Thanks for your consideration! Rick -- Package-specific info: ** Version: Linux version 4.0.0-1-armmp (debian-kernel@lists.debian.org) (gcc version 4.9.2 (Debian 4.9.2-16) ) #1 SMP Debian 4.0.2-1 (2015-05-11) ** Command line: hctosys=rtc1 console=ttymxc0,115200 quiet ** Not tainted ** extracts from dmesg rbthomas@cube:~$ dmesg | egrep 'rtc|clock' | grep -v crtc [ 0.000000] Kernel command line: hctosys=rtc1 console=ttymxc0,115200 quiet [ 0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled [ 0.000007] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655765682ns [ 0.114449] PTP clock support registered [ 0.115986] Switched to clocksource mxc_timer1 [ 1.303721] snvs_rtc 20cc034.snvs-rtc-lp: rtc core: registered 20cc034.snvs-rtc-lp as rtc0 [ 1.311100] snvs_rtc 20cc034.snvs-rtc-lp: setting system clock to 2015-05-15 23:43:56 UTC (1431733436) [ 5.634623] rtc-pcf8523 2-0068: rtc core: registered rtc-pcf8523 as rtc1 ** Kernel log: [ 7.857815] usb-storage 1-1.4.2:1.0: USB Mass Storage device detected [ 7.858173] scsi host6: usb-storage 1-1.4.2:1.0 [ 7.865466] scsi 1:0:0:0: Direct-Access Generic STORAGE DEVICE 0272 PQ: 0 ANSI: 0 [ 7.866779] sd 1:0:0:0: Attached scsi generic sg1 type 0 [ 7.873156] scsi 2:0:0:0: Direct-Access SanDisk Cruzer Fit 1.27 PQ: 0 ANSI: 6 [ 7.873790] scsi 3:0:0:0: Direct-Access SanDisk Cruzer Fit 1.27 PQ: 0 ANSI: 6 [ 7.874380] sd 2:0:0:0: Attached scsi generic sg2 type 0 [ 7.875645] sd 3:0:0:0: Attached scsi generic sg3 type 0 [ 7.876241] sd 2:0:0:0: [sdc] 61056064 512-byte logical blocks: (31.2 GB/29.1 GiB) [ 7.876886] sd 3:0:0:0: [sdd] 61056064 512-byte logical blocks: (31.2 GB/29.1 GiB) [ 7.877015] sd 2:0:0:0: [sdc] Write Protect is off [ 7.877033] sd 2:0:0:0: [sdc] Mode Sense: 43 00 00 00 [ 7.877632] sd 3:0:0:0: [sdd] Write Protect is off [ 7.877651] sd 3:0:0:0: [sdd] Mode Sense: 43 00 00 00 [ 7.877881] sd 2:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 7.878766] sd 3:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 7.892636] sd 3:0:0:0: [sdd] Attached SCSI removable disk [ 7.896288] sd 2:0:0:0: [sdc] Attached SCSI removable disk [ 7.927904] md: bind<sdd> [ 7.938387] md: bind<sdc> [ 8.068936] scsi 4:0:0:0: Direct-Access SanDisk Cruzer Fit 1.27 PQ: 0 ANSI: 6 [ 8.070109] sd 4:0:0:0: Attached scsi generic sg4 type 0 [ 8.070636] sd 4:0:0:0: [sde] 61056064 512-byte logical blocks: (31.2 GB/29.1 GiB) [ 8.071369] sd 4:0:0:0: [sde] Write Protect is off [ 8.071386] sd 4:0:0:0: [sde] Mode Sense: 43 00 00 00 [ 8.072145] sd 4:0:0:0: [sde] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 8.082631] sd 4:0:0:0: [sde] Attached SCSI removable disk [ 8.119009] md: bind<sde> [ 8.122659] sd 1:0:0:0: [sdb] 122519552 512-byte logical blocks: (62.7 GB/58.4 GiB) [ 8.123764] sd 1:0:0:0: [sdb] Write Protect is off [ 8.123780] sd 1:0:0:0: [sdb] Mode Sense: 0b 00 00 08 [ 8.125874] sd 1:0:0:0: [sdb] No Caching mode page found [ 8.125892] sd 1:0:0:0: [sdb] Assuming drive cache: write through [ 8.136889] sdb: sdb1 sdb2 sdb3 < sdb5 sdb6 sdb7 > [ 8.142922] sd 1:0:0:0: [sdb] Attached SCSI removable disk [ 8.661076] scsi 5:0:0:0: Direct-Access SanDisk Cruzer Fit 1.27 PQ: 0 ANSI: 6 [ 8.662322] sd 5:0:0:0: Attached scsi generic sg5 type 0 [ 8.663763] sd 5:0:0:0: [sdf] 61056064 512-byte logical blocks: (31.2 GB/29.1 GiB) [ 8.665357] sd 5:0:0:0: [sdf] Write Protect is off [ 8.665376] sd 5:0:0:0: [sdf] Mode Sense: 43 00 00 00 [ 8.667127] sd 5:0:0:0: [sdf] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 8.675501] sd 5:0:0:0: [sdf] Attached SCSI removable disk [ 8.713134] md: bind<sdf> [ 8.857145] scsi 6:0:0:0: Direct-Access SanDisk Cruzer Fit 1.27 PQ: 0 ANSI: 6 [ 8.858854] sd 6:0:0:0: Attached scsi generic sg6 type 0 [ 8.867907] sd 6:0:0:0: [sdg] 61056064 512-byte logical blocks: (31.2 GB/29.1 GiB) [ 8.869378] sd 6:0:0:0: [sdg] Write Protect is off [ 8.869396] sd 6:0:0:0: [sdg] Mode Sense: 43 00 00 00 [ 8.870125] sd 6:0:0:0: [sdg] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 8.879879] sd 6:0:0:0: [sdg] Attached SCSI removable disk [ 8.915640] md: bind<sdg> [ 9.076560] raid6: int32x1 106 MB/s [ 9.144345] raid6: int32x2 129 MB/s [ 9.187471] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null) [ 9.212032] raid6: int32x4 152 MB/s [ 9.280348] raid6: int32x8 166 MB/s [ 9.280364] raid6: using algorithm int32x8 (166 MB/s) [ 9.280371] raid6: using intx1 recovery algorithm [ 9.283187] EXT4-fs (sdb1): mounting ext2 file system using the ext4 subsystem [ 9.286873] EXT4-fs (sdb6): mounted filesystem with ordered data mode. Opts: (null) [ 9.294210] async_tx: api initialized (async) [ 9.302629] xor: measuring software checksum speed [ 9.305068] EXT4-fs (sdb1): mounted filesystem without journal. Opts: (null) [ 9.339994] arm4regs : 1341.000 MB/sec [ 9.377678] EXT4-fs (sdb7): mounted filesystem with ordered data mode. Opts: (null) [ 9.380018] 8regs : 959.000 MB/sec [ 9.419992] 32regs : 908.000 MB/sec [ 9.420007] xor: using function: arm4regs (1341.000 MB/sec) [ 9.446535] md: raid6 personality registered for level 6 [ 9.446551] md: raid5 personality registered for level 5 [ 9.446558] md: raid4 personality registered for level 4 [ 9.448432] md/raid:md127: device sdg operational as raid disk 4 [ 9.448447] md/raid:md127: device sdf operational as raid disk 3 [ 9.448458] md/raid:md127: device sde operational as raid disk 2 [ 9.448466] md/raid:md127: device sdc operational as raid disk 0 [ 9.448475] md/raid:md127: device sdd operational as raid disk 1 [ 9.450081] md/raid:md127: allocated 0kB [ 9.450212] md/raid:md127: raid level 6 active with 5 out of 5 devices, algorithm 2 [ 9.450223] RAID conf printout: [ 9.450230] --- level:6 rd:5 wd:5 [ 9.450238] disk 0, o:1, dev:sdc [ 9.450246] disk 1, o:1, dev:sdd [ 9.450254] disk 2, o:1, dev:sde [ 9.450261] disk 3, o:1, dev:sdf [ 9.450269] disk 4, o:1, dev:sdg [ 9.450474] md127: detected capacity change from 0 to 93731684352 [ 38.010920] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null) [ 68.533703] systemd-journald[163]: Received request to flush runtime journal from PID 1 [ 68.940854] fec 2188000.ethernet eth0: Freescale FEC PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=2188000.ethernet:00, irq=-1) [ 68.941067] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 69.760671] RPC: Registered named UNIX socket transport module. [ 69.760694] RPC: Registered udp transport module. [ 69.760719] RPC: Registered tcp transport module. [ 69.760742] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 69.789121] FS-Cache: Loaded [ 69.840280] FS-Cache: Netfs 'nfs' registered for caching [ 69.911176] Installing knfsd (copyright (C) 1996 o...@monad.swb.de). [ 72.940435] fec 2188000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 72.940469] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 74.433955] warning: process `colord-sane' used the deprecated sysctl system call with 8.1.2. ** Model information Hardware : Freescale i.MX6 Quad/DualLite (Device Tree) Revision : 0000 ** Loaded modules: nfsd auth_rpcgss oid_registry nfs_acl nfs lockd grace fscache sunrpc raid456 async_raid6_recov async_memcpy async_pq async_xor xor async_tx raid6_pq usb_storage dw_hdmi_imx snd_soc_fsl_spdif imx_pcm_dma snd_soc_imx_spdif snd_soc_core dw_hdmi imx_ipuv3_crtc imxdrm snd_compress drm_kms_helper evdev snd_pcm_dmaengine ir_sharp_decoder ir_sony_decoder drm snd_pcm ci_hdrc_imx pwm_imx ci_hdrc usbmisc_imx imx2_wdt ir_lirc_codec ir_mce_kbd_decoder ir_xmp_decoder lirc_dev ir_sanyo_decoder ir_jvc_decoder ir_rc6_decoder ir_nec_decoder ir_rc5_decoder imx_ipu_v3 gpio_ir_recv ehci_hcd i2c_imx snd_timer snd soundcore leds_pwm md_mod autofs4 ext4 crc16 mbcache jbd2 dm_mod sg sd_mod ahci_imx libahci_platform libahci libata sdhci_esdhc_imx scsi_mod sdhci_pltfm sdhci phy_mxs_usb at803x ** PCI devices: ** USB devices: Bus 002 Device 002: ID 05e3:0736 Genesys Logic, Inc. microSD Reader/Writer Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 008: ID 0781:5571 SanDisk Corp. Cruzer Fit Bus 001 Device 007: ID 0781:5571 SanDisk Corp. Cruzer Fit Bus 001 Device 006: ID 0409:005a NEC Corp. HighSpeed Hub Bus 001 Device 005: ID 0781:5571 SanDisk Corp. Cruzer Fit Bus 001 Device 004: ID 0781:5571 SanDisk Corp. Cruzer Fit Bus 001 Device 003: ID 0781:5571 SanDisk Corp. Cruzer Fit Bus 001 Device 002: ID 0409:005a NEC Corp. HighSpeed Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub -- System Information: Debian Release: stretch/sid APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'stable') Architecture: armhf (armv7l) Kernel: Linux 4.0.0-1-armmp (SMP w/4 CPU cores) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages linux-image-4.0.0-1-armmp depends on: ii debconf [debconf-2.0] 1.5.56 ii initramfs-tools [linux-initramfs-tool] 0.120 ii kmod 20-1 ii linux-base 3.5 Versions of packages linux-image-4.0.0-1-armmp recommends: ii firmware-linux-free 3.3 ii irqbalance 1.0.6-3 Versions of packages linux-image-4.0.0-1-armmp suggests: pn debian-kernel-handbook <none> pn fdutils <none> pn linux-doc-4.0 <none> Versions of packages linux-image-4.0.0-1-armmp is related to: pn firmware-atheros <none> pn firmware-bnx2 <none> pn firmware-bnx2x <none> pn firmware-brcm80211 <none> pn firmware-intelwimax <none> pn firmware-ipw2x00 <none> pn firmware-ivtv <none> pn firmware-iwlwifi <none> pn firmware-libertas <none> ii firmware-linux 0.44 ii firmware-linux-nonfree 0.44 pn firmware-myricom <none> pn firmware-netxen <none> pn firmware-qlogic <none> pn firmware-ralink <none> pn firmware-realtek <none> pn xen-hypervisor <none> -- debconf information: linux-image-4.0.0-1-armmp/prerm/removing-running-kernel-4.0.0-1-armmp: true linux-image-4.0.0-1-armmp/postinst/mips-initrd-4.0.0-1-armmp: linux-image-4.0.0-1-armmp/postinst/depmod-error-initrd-4.0.0-1-armmp: false -- To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150516005500.1136.66406.report...@cube.rcthomas.org