Are you getting enough sleep?

いつも眠い.これが睡眠負債というやつか.

OpenBlocks IoT BX1 のアップデート

バージョン 9 (stretch) にしようしようと思っていたけどしてなかった.
まずは,正式発売前のモデルで試してみようと説明通りにはじめたら,日本語読めてなかった.ファイル名が BXEX_UPDATER.zip なんだけど,解凍すると同じ名前のフォルダができる.そのままコピーしたらダメでしょ.接続して起動して,あれ?ってなってそうか〜,と.

下記のように問題なくアップデートできたので,その後 apt update で upgrade.
さて,BOOSTいれて加速度計を計測できるようにしないとな.

SIMさせるものだと思っていたら,その後購入したものだった.完全に確認不足.

73146999 bytes read in 1597 ms (43.7 MiB/s)
Valid Boot Flag
Setup Size = 0x00003c00
Magic signature found
Using boot protocol version 2.0c
Linux kernel version 3.10.17-poky-edison (root@release-firmware-all) #1 SMP PREEMPT Tue Aug 7 10:31:47 JST 2018
Building boot_params at 0x00090000
Loading bzImage at address 00100000 (4769504 bytes)
Magic signature found
Initial RAM disk at linear address 0x10000000, size 73146999 bytes
Kernel command line: "root=/dev/ram rw console=ttyMFD2 earlyprintk=ttyMFD2,keep loglevel=4 systemd.unit=multi-user.target hardware_id=00 g_multi.iSerialNumber=f1cc7e1951f804f942a18039debc8709 obsiot=bx1 modem=70"

Starting kernel ...

[    0.922164] pca953x 1-0020: failed reading register
[    0.927399] pca953x 1-0021: failed reading register
[    1.866741] pmic_ccsm pmic_ccsm: Error reading battery profile from battid frmwrk
[    1.875082] pmic_ccsm pmic_ccsm: Battery0 temperature inside boundary
INIT: version 2.88 booting
[ ok ] Starting the hotplug events dispatcher: udevd.
[ ok ] Synthesizing the initial hotplug events...done.
[....] Waiting for /dev to be fully populated...[   14.676747] sd 0:0:0:0: [sda] No Caching mode page found
[   14.676827] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   14.691415] sd 0:0:0:0: [sda] No Caching mode page found
[   14.691503] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   14.696471] sd 0:0:0:0: [sda] No Caching mode page found
[   14.696556] sd 0:0:0:0: [sda] Assuming drive cache: write through
done.

[ ok ] Starting watchdog sampling daemon for obsbx1: wd-keepalive.
fsck from util-linux 2.25.2
DEBIAN: clean, 54436/204800 files, 387875/818171 blocks
dumpe2fs 1.42.12 (29-Aug-2014)
++ dirname /mnt/init.sh
+ DIR=/mnt
+ cd /mnt
++ /sbin/findfs LABEL=DEBIAN
+ rwdev=/dev/mmcblk0p10
++ cat /etc/debian_version
+ debver=8.3
+ case "${debver}" in
+ '[' -n /dev/mmcblk0p10 ']'
+ /sbin/e2label /dev/mmcblk0p10 ''
+ exit 0
+ local_reboot
+ '[' -e /bin/systemctl ']'
+ /sbin/reboot
INIT: Sending processes the TERM signal
[ ok ] Stopping bluetooth: /usr/sbin/bluetoothd.
[FAIL] Stopping battery monitaring daemon for obsiot series: obsiot-power failed!

[ ok ] Stopping monitoring init button daemon for openblocks: pshd.
[ ok ] Stopping LED control daemon for openblocks: runled.
[....] Stopping watchdog sampling daemon for obsbx1: wd-keepalive[   27.699334] intel_scu_watchdog_evo: watchdog_stop
. ok
[....] Asking all remaining processes to terminate...wd-keepalive[388]: 122: nanosleep() receive EINTR
[   27.846922] intel_scu_watchdog_evo: watchdog_stop
[   27.856837] intel_scu_watchdog_evo: Closed, without starting timer
wd-keepalive[388]: 136: loop exit

done.
[ ok ] All processes ended within 1 seconds...done.
[ ok ] Stopping enhanced syslogd: rsyslogd already stopped.
[info] Saving the system clock.
[info] Hardware Clock updated to Sun Feb 10 14:07:50 JST 2019.
[....] Deconfiguring network interfaces...ifdown: failed to open lockfile /run/network/.ifstate.lock: No such file or directory
failed.
[ ok ] Deactivating swap...done.
[ ok ] Unmounting /.rw filesystem...done.
[ ok ] Unmounting local filesystems...done.
[info] Will now restart.


******************************
PSH KERNEL VERSION: b0182727
                WR: 20104000
******************************

SCU IPC: 0x800000d0  0xfffce92c

PSH miaHOB version: TNG.B0.VVBD.0000000c

microkernel built 23:15:13 Apr 24 2014

******* PSH loader *******
PCM page cache size = 192 KB
Cache Constraint = 0 Pages
Arming IPC driver ..
Adding page store pool ..
PagestoreAddr(IMR Start Address) = 0x04899000
pageStoreSize(IMR Size)          = 0x00080000

*** Ready to receive application ***


U-Boot 2014.04 (Aug 20 2014 - 16:08:32)

       Watchdog enabled
DRAM:  980.6 MiB
MMC:   tangier_sdhci: 0
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
Target:blank
Partitioning already done...
Flashing already done...
GADGET DRIVER: usb_dnl_dfu
reading bzImage
4784864 bytes read in 120 ms (38 MiB/s)
reading initrd.gz
73146999 bytes read in 1597 ms (43.7 MiB/s)
Valid Boot Flag
Setup Size = 0x00003c00
Magic signature found
Using boot protocol version 2.0c
Linux kernel version 3.10.17-poky-edison (root@release-firmware-all) #1 SMP PREEMPT Tue Aug 7 10:31:47 JST 2018
Building boot_params at 0x00090000
Loading bzImage at address 00100000 (4769504 bytes)
Magic signature found
Initial RAM disk at linear address 0x10000000, size 73146999 bytes
Kernel command line: "root=/dev/ram rw console=ttyMFD2 earlyprintk=ttyMFD2,keep loglevel=4 systemd.unit=multi-user.target hardware_id=00 g_multi.iSerialNumber=f1cc7e1951f804f942a18039debc8709 obsiot=bx1 modem=70"

Starting kernel ...

[    0.929640] pca953x 1-0020: failed reading register
[    0.934757] pca953x 1-0021: failed reading register
[    1.836970] pmic_ccsm pmic_ccsm: Error reading battery profile from battid frmwrk
[    1.852695] pmic_ccsm pmic_ccsm: Battery0 temperature outside boundary
INIT: version 2.88 booting
[ ok ] Starting the hotplug events dispatcher: udevd.
[ ok ] Synthesizing the initial hotplug events...done.
[....] Waiting for /dev to be fully populated...[   14.828895] sd 0:0:0:0: [sda] No Caching mode page found
[   14.828977] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   14.844959] sd 0:0:0:0: [sda] No Caching mode page found
[   14.845045] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   14.849341] sd 0:0:0:0: [sda] No Caching mode page found
[   14.849425] sd 0:0:0:0: [sda] Assuming drive cache: write through
done.

[ ok ] Starting watchdog sampling daemon for obsbx1: wd-keepalive.
Extract userland files... fail(or empty).
Extract /etc files... fail(or empty).
++ dirname /mnt/init.sh
+ DIR=/mnt
+ cd /mnt
++ /sbin/findfs LABEL=DEBIAN
findfs: unable to resolve 'LABEL=DEBIAN'
+ rwdev=
++ cat /etc/debian_version
+ debver=8.3
+ case "${debver}" in
+ '[' -n '' ']'
+ /etc/init.d/nitz start
nitz: 3G modem power on : done
nitz: check SIM card : fail
+ /etc/init.d/runled start
[ ok ] Starting LED control daemon for openblocks: runled.
+ sleep 3
+ echo -e '300\n300\n1\n1'
+ sleep 3
+ rwdev=/dev/mmcblk0p10
+ rwkadev=/dev/mmcblk0p7
+ rwkbdev=/dev/mmcblk0p9
+ userland=obsbxex_userland_3.3.0-13_20181226.tgz
+ ekernel=ermegency/bzImage
+ eramimg=ermegency/initrd.gz
+ ramimg=initrd.gz
+ kernel=bzImage
+ envsh=update_ubootenv.sh
+ release=openblocks-release
+ '[' -f ermegency/bzImage -a -f ermegency/initrd.gz ']'
+ mkdir -p /tmp//dev/mmcblk0p9
+ mount /dev/mmcblk0p9 /tmp//dev/mmcblk0p9
+ rm -f /tmp//dev/mmcblk0p9/bzImage
+ rm -f /tmp//dev/mmcblk0p9/initrd.gz
+ cp -p ermegency/bzImage /tmp//dev/mmcblk0p9
+ cp -p ermegency/initrd.gz /tmp//dev/mmcblk0p9
+ sync
+ umount /tmp//dev/mmcblk0p9
+ sync
+ '[' -f bzImage -a -f obsbxex_userland_3.3.0-13_20181226.tgz -a -f update_ubootenv.sh -a -f openblocks-release ']'
+ mkdir -p /tmp//dev/mmcblk0p7
+ mount /dev/mmcblk0p7 /tmp//dev/mmcblk0p7
+ rm -f /tmp//dev/mmcblk0p7/bzImage
+ rm -f /tmp//dev/mmcblk0p7/openblocks-release
+ rm -f /tmp//dev/mmcblk0p7/initrd.gz
+ sync
+ cp -p bzImage /tmp//dev/mmcblk0p7
+ cp -p openblocks-release /tmp//dev/mmcblk0p7
+ sync
+ umount /tmp//dev/mmcblk0p7
+ sync
+ ./update_ubootenv.sh --edison-default
1+0 records in
1+0 records out
65536 bytes (66 kB) copied, 0.00454045 s, 14.4 MB/s
1+0 records in
1+0 records out
65536 bytes (66 kB) copied, 0.0151048 s, 4.3 MB/s
Warning: Bad CRC, using default environment
+ ./update_ubootenv.sh -a
+ sync
+ '[' -f obsbxex_userland_3.3.0-13_20181226.tgz -a -f update_ubootenv.sh ']'
+ mkfs -t ext4 /dev/mmcblk0p10
+ yes
mke2fs 1.42.12 (29-Aug-2014)
Discarding device blocks: done
Creating filesystem with 818171 4k blocks and 204800 inodes
Filesystem UUID: 6b97dea7-658d-488f-8201-ba976460ab09
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

+ sleep 1
+ mkdir -p /tmp//dev/mmcblk0p10
+ mount /dev/mmcblk0p10 /tmp//dev/mmcblk0p10
+ tar --numeric-owner -xpzf obsbxex_userland_3.3.0-13_20181226.tgz -C /tmp//dev/mmcblk0p10
+ sync
+ umount /tmp//dev/mmcblk0p10
+ ./update_ubootenv.sh --edison-default
1+0 records in
1+0 records out
65536 bytes (66 kB) copied, 0.00466153 s, 14.1 MB/s
1+0 records in
1+0 records out
65536 bytes (66 kB) copied, 0.00607237 s, 10.8 MB/s
Warning: Bad CRC, using default environment
+ ./update_ubootenv.sh -a
+ sync
+ sync
+ exit 0
+ local_halt
+ '[' -e /bin/systemctl ']'
+ /sbin/poweroff
INIT: Sending processes the TERM signal
[ ok ] Stopping bluetooth: /usr/sbin/bluetoothd.
[FAIL] Stopping battery monitaring daemon for obsiot series: obsiot-power failed!

[ ok ] Stopping monitoring init button daemon for openblocks: pshd.
[ ok ] Stopping LED control daemon for openblocks: runled.
[....] Stopping watchdog sampling daemon for obsbx1: wd-keepalive[  154.078331] intel_scu_watchdog_evo: watchdog_stop
. ok
[....] Asking all remaining processes to terminate...wd-keepalive[388]: 122: nanosleep() receive EINTR
[  154.233980] intel_scu_watchdog_evo: watchdog_stop
[  154.247966] intel_scu_watchdog_evo: Closed, without starting timer
wd-keepalive[388]: 136: loop exit

done.
[ ok ] All processes ended within 1 seconds...done.
[ ok ] Stopping enhanced syslogd: rsyslogd already stopped.
[info] Saving the system clock.
[info] Hardware Clock updated to Sun Feb 10 23:10:36 JST 2019.
[....] Deconfiguring network interfaces...ifdown: failed to open lockfile /run/network/.ifstate.lock: No such file or directory
failed.
[ ok ] Deactivating swap...done.
[ ok ] Unmounting local filesystems...done.
[info] Will now halt.