thefloweringash / rock64-nix

NixOS install image for rock64
22 stars 8 forks source link

Unstable boot #4

Closed tuuzdu closed 5 years ago

tuuzdu commented 6 years ago

Hello! I built image for Rock64 on Raspberry Pi 3 NixOS. I dumped image on sd card and started it on Rock64. Then I have problem with boot of device. Sometimes it boot, sometimes - doesn't. Also I had different errors withnixos-rebuild. Booting log:

DDR version 1.06 20170424
In
LPDDR3
786MHz
Bus Width=32 Col=11 Bank=8 Row=15/15 CS=2 Die Bus-Width=32 Size=4096MB
ddrconfig:7
OUT

U-Boot SPL 2017.09 (Jan 01 1970 - 00:00:01)
setup_ddr_param  1
booted from SD
Trying to boot from MMC2
NOTICE:  BL31: v1.3(release):
NOTICE:  BL31: Built : 00:00:01, Jan  1 1970
NOTICE:  BL31:Rockchip release version: v1.3

U-Boot 2017.09 (Jan 01 1970 - 00:00:01 +0000)

Model: Pine64 Rock64
DRAM:  4 GiB
MMC:   rksdmmc@ff520000: 0, rksdmmc@ff500000: 1
*** Warning - bad CRC, using default environment

In:    serial@ff130000
Out:   serial@ff130000
Err:   serial@ff130000
Model: Pine64 Rock64
misc_init_r
cpuid=00000000000000000000000000000000
serial=0
Net:   eth0: ethernet@ff540000
Hit any key to stop autoboot:  0
Card did not respond to voltage select!
mmc_init: -95, time 9
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:2...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
866 bytes read in 35 ms (23.4 KiB/s)
------------------------------------------------------------
1:      NixOS - Default
Enter choice: 1:        NixOS - Default
Retrieving file: /boot/extlinux/../nixos/6nsmfr18rsv6f7rdid8hij3jrdnhcby9-initrd-initrd
6689940 bytes read in 871 ms (7.3 MiB/s)
Retrieving file: /boot/extlinux/../nixos/cq80dg5r5b9ab3cdrix3xhczg445haig-linux-4.4.103-ayufan-rock64-Image
18934272 bytes read in 8919 ms (2 MiB/s)
append: systemConfig=/nix/store/wvqa7038lp8yg2aip3glsnqnf6791ky0-nixos-system-nixos-18.09pre56789.gfedcba init=/nix/store/wvqa7038lp8yg2aip3glsnqnf6791ky0-nixos-system-nixos-18.09pre56789.gfedcba/init earlycon=uart8250,mmio32,0xff130000 coherent_pool=1M ethaddr=86:e0:c0:ea:fa:a9 eth1addr=86:e0:c0:ea:fa:c9 serial=0 console=tty1 loglevel=4
Retrieving file: /boot/extlinux/../nixos/cq80dg5r5b9ab3cdrix3xhczg445haig-linux-4.4.103-ayufan-rock64-dtbs/rockchip/rk3328-rock64.dtb
44132 bytes read in 115 ms (374 KiB/s)
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Ramdisk to fc8a0000, end fcf01494 ... OK
   Loading Device Tree to 00000000fc892000, end 00000000fc89fc63 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.103 (nixbld1@nixos) (gcc version 7.3.0 (GCC) ) #2 SMP Thu Aug 9 03:01:03 UTC 2018
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] earlycon: Early serial console at MMIO32 0xff130000 (options '')
[    0.000000] bootconsole [uart0] enabled
<hit enter to activate fiq debugger>
[    0.220814] genirq: Setting trigger mode 8 for irq 177 failed (gic_set_type+0x0/0x64)
[    0.525227] dmi: Firmware registration failed.
[    1.246690] rockchip_mpp_vepu_reset_init:143: No aclk reset resource define
[    1.247328] rockchip_mpp_vepu_reset_init:148: No hclk reset resource define
[    1.258835] rockchip-vop ff370000.vop: invalid resource
[    1.259346] rockchip-vop ff370000.vop: invalid resource
[    1.260519] i2c i2c-4: of_i2c: modalias failure on /hdmi@ff3c0000/ports
[    1.410060] rk_gmac-dwmac ff550000.ethernet: Can not read property: tx_delay.
[    1.411011] rk_gmac-dwmac ff550000.ethernet: set tx_delay to 0x30
[    1.411808] rk_gmac-dwmac ff550000.ethernet: Can not read property: rx_delay.
[    1.412734] rk_gmac-dwmac ff550000.ethernet: set rx_delay to 0x10
[    1.413828] rk_gmac-dwmac ff550000.ethernet: cannot get clock clk_mac_refout
[    1.792169] gpiochip_find_base: cannot find free range
[    1.792881] gpiochip_add: GPIOs -1..0 (rk8xx-gpio) failed to register
[    1.793726] rk8xx-gpio rk8xx-gpio: register rk8xx gpiochip fail: -28
[    2.186467] rockchip-pm-domain ff100000.syscon:power-controller: failed to get ack on domain 'pd_video', val=0x0
[    2.197586] rockchip-pm-domain ff100000.syscon:power-controller: failed to get ack on domain 'pd_vpu', val=0x0
[    2.299903] devfreq ff300000.gpu: Couldn't update frequency transition information.

Sometimes it stops on devfreq ff300000.gpu: Couldn't update frequency transition information.. If it doesn't stop:

[   18.250549] cgroup: cgroup2: unknown option "nsdelegate"
<<< Welcome to NixOS 18.09pre56789.gfedcba (aarch64) - ttyFIQ0 >>>
The "root" account has an empty password.  
Run `nixos-help` or press <Alt-F8> for the NixOS manual.
nixos login: root (automatic login)
[root@nixos:~]# 

When I dump image on eMMC, I have errors below:

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.103 (nixbld1@nixos) (gcc version 7.3.0 (GCC) ) #2 SMP Thu Aug 9 03:01:03 UTC 2018
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] earlycon: Early serial console at MMIO32 0xff130000 (options '')
[    0.000000] bootconsole [uart0] enabled
<hit enter to activate fiq debugger>
[    0.220816] genirq: Setting trigger mode 8 for irq 177 failed (gic_set_type+0x0/0x64)
[    0.525239] dmi: Firmware registration failed.
[    1.247042] rockchip_mpp_vepu_reset_init:143: No aclk reset resource define
[    1.247708] rockchip_mpp_vepu_reset_init:148: No hclk reset resource define
[    1.259209] rockchip-vop ff370000.vop: invalid resource
[    1.259758] rockchip-vop ff370000.vop: invalid resource
[    1.260898] i2c i2c-4: of_i2c: modalias failure on /hdmi@ff3c0000/ports
[    1.411100] rk_gmac-dwmac ff550000.ethernet: Can not read property: tx_delay.
[    1.412064] rk_gmac-dwmac ff550000.ethernet: set tx_delay to 0x30
[    1.412862] rk_gmac-dwmac ff550000.ethernet: Can not read property: rx_delay.
[    1.413790] rk_gmac-dwmac ff550000.ethernet: set rx_delay to 0x10
[    1.414881] rk_gmac-dwmac ff550000.ethernet: cannot get clock clk_mac_refout
[    1.793516] gpiochip_find_base: cannot find free range
[    1.794199] gpiochip_add: GPIOs -1..0 (rk8xx-gpio) failed to register
[    1.795048] rk8xx-gpio rk8xx-gpio: register rk8xx gpiochip fail: -28
[    2.197509] rockchip-pm-domain ff100000.syscon:power-controller: failed to get ack on domain 'pd_video', val=0x0
[    2.208623] rockchip-pm-domain ff100000.syscon:power-controller: failed to get ack on domain 'pd_vpu', val=0x0
[    2.310919] devfreq ff300000.gpu: Couldn't update frequency transition information.
[    2.736481] mmcblk0: error -110 transferring data, sector 64, nr 56, cmd response 0x900, card status 0xb00
[    2.771835] blk_update_request: I/O error, dev mmcblk0boot0, sector 8064
[    3.984575] mmcblk0: error -110 transferring data, sector 1756952, nr 256, cmd response 0x900, card status 0xb00
[    4.250574] mmcblk0: error -110 transferring data, sector 1758856, nr 256, cmd response 0x900, card status 0xb00
[    4.526571] mmcblk0: error -110 transferring data, sector 1759112, nr 160, cmd response 0x900, card status 0xb00
[    5.427570] mmcblk0: error -110 transferring data, sector 29712, nr 16, cmd response 0x900, card status 0xb00
[    6.527588] mmcblk0: error -110 transferring data, sector 1802824, nr 184, cmd response 0x900, card status 0xb00
[    6.913457] mmcblk0: error -110 transferring data, sector 2324408, nr 256, cmd response 0x900, card status 0xb00
[    7.006695] blk_update_request: I/O error, dev mmcblk0rpmb, sector 0
[    7.175596] mmcblk0: error -110 transferring data, sector 1571120, nr 232, cmd response 0x900, card status 0xb00
[    7.291948] blk_update_request: I/O error, dev mmcblk0rpmb, sector 0
[    7.306059] blk_update_request: I/O error, dev mmcblk0rpmb, sector 0
[    7.611579] mmcblk0: error -110 transferring data, sector 186552, nr 192, cmd response 0x900, card status 0xb00
[    8.641603] mmcblk0: error -110 transferring data, sector 1471480, nr 256, cmd response 0x900, card status 0xb00
[    9.486589] mmcblk0: error -110 transferring data, sector 97664, nr 256, cmd response 0x900, card status 0xb00
[   10.014553] mmcblk0: error -110 transferring data, sector 86024, nr 112, cmd response 0x900, card status 0x0
[   10.453447] mmcblk0: error -110 transferring data, sector 2454984, nr 88, cmd response 0x900, card status 0xb00
[   10.726579] mmcblk0: error -110 transferring data, sector 2626992, nr 256, cmd response 0x900, card status 0xb00
[   10.992574] mmcblk0: error -110 transferring data, sector 2631088, nr 256, cmd response 0x900, card status 0xb00
[   11.125782] cgroup: cgroup2: unknown option "nsdelegate"
[   11.349539] mmcblk0: error -110 sending status command, retrying
[   11.365048] mmcblk0: error -110 transferring data, sector 2628768, nr 184, cmd response 0x900, card status 0xb00
[   11.664463] mmcblk0: error -110 sending status command, retrying
[   11.671330] mmcblk0: error -110 transferring data, sector 1047912, nr 256, cmd response 0x900, card status 0xb00
[   11.800121] systemd-gpt-auto-generator[575]: Failed to dissect: Input/output error
[   11.813319] systemd[571]: /nix/store/z7hj2mx7n4j6vpzqssr4bsc6anxdi58x-systemd-237/lib/systemd/system-generators/systemd-gpt-auto-generator failed with exit status 1.
[   12.371497] mmcblk0: error -110 transferring data, sector 2604168, nr 224, cmd response 0x900, card status 0xb00
[   12.625485] mmcblk0: error -110 transferring data, sector 2624496, nr 200, cmd response 0x900, card status 0xb00
[   12.922513] mmcblk0: error -110 transferring data, sector 622672, nr 208, cmd response 0x900, card status 0xb00
[   13.171582] mmcblk0: error -110 transferring data, sector 2620648, nr 32, cmd response 0x900, card status 0xb00
[   13.378530] mmcblk0: error -110 transferring data, sector 655824, nr 256, cmd response 0x900, card status 0xb00
[   13.679596] mmcblk0: error -110 transferring data, sector 1811560, nr 168, cmd response 0x900, card status 0xb00
[   13.965583] mmcblk0: error -110 transferring data, sector 1153608, nr 16, cmd response 0x900, card status 0xb00

What is wrong? What is yours method of building image?

thefloweringash commented 6 years ago

Hi. Thanks for trying this project out. I haven't seen these kinds of problems, so I don't have any particular recommendations to fix them. It's a good idea to rule out any hardware issues first, like a bad sd card or power supply. Does it work if you use a different linux distribution, for example, [ayufan's bionic minimal image][]?

I build the image on a hydra running on the rock64 itself. If you want to try an image built on my hydra, there's one here.

[ayufan's bionic minimal image]: https://github.com/ayufan-rock64/linux-build/releases/download/0.7.9/bionic-minimal-rock64-0.7.9-1067-arm64.img.xz

tuuzdu commented 6 years ago

I used my rock64 with Iota node a lot of time and I am sure in eMMC and power supply. I will try yours image at first and then write about it. Thanks you.

tuuzdu commented 6 years ago

I tried yours image with new sd card and it's working! Can you show me boot log from yours device for compare?

About eMMC, I think than it has problems yet :( I have same issue. Are you use sd card or eMMC?

thefloweringash commented 6 years ago

It's been a while since I've given this project much attention. In that time:

I've pushed a branch to switch to the upstream boot loader, and I'll work on updating the kernel.

As for my system. I have my uboot, linux kernel, and initrd on a microSD card, which then boots from a USB3 attached sata ssd.

tuuzdu commented 6 years ago

Thanks, I will try new branch to build image.

I don't have USB3-SATA cable yet, but I view at choice with SSD, because I want to try launch Ethereum client, that require a lot of space.

thefloweringash commented 6 years ago

I've updated the kernel and boot loader, and tested booting it on my rock64.

tuuzdu commented 6 years ago

Great work! I have built image with updated boot before and have same problems with emmc. Probably it is hardware problem in rock64 because emmc is ok. I will try new image and solve problems with emmc in near time.

tuuzdu commented 6 years ago

Now boot is stable. I catch these errors only. Is it ok?

[    0.198101] Failed to find legacy iommu devices
[    0.536827] vcc_sd: regulator get failed, ret=-517
[    1.270553] rk-vcodec vpu_combo: failed on clk_get clk_cabac
[    1.270588] rk-vcodec vpu_combo: failed on clk_get clk_core
[    1.274520] rk-vcodec vpu_combo: could not find power_model node
[    1.294283] rockchip-vop ff370000.vop: invalid resource
[    1.294325] rockchip-vop ff370000.vop: invalid resource
[    1.294614] rockchip-vop ff370000.vop: unable to request PWM
[    1.295096] i2c i2c-4: of_i2c: modalias failure on /hdmi@ff3c0000/ports
[    1.367918] rk_gmac-dwmac ff540000.ethernet: cannot get clock clk_mac_speed
[    1.584420] cpu cpu0: Failed to get leakage
[    1.584798] cpu cpu0: Failed to get pvtm
[    1.659111] Error: Driver 'ov4689' is already registered, aborting...
[    1.659322] Error: Driver 'ov13850' is already registered, aborting...
[    6.220127] cgroup: cgroup2: unknown option "nsdelegate"
[    9.538696] mali-utgard ff300000.gpu: Failed to get leakage
[    9.547877] mali-utgard ff300000.gpu: Failed to get pvtm
[    9.657732] devfreq ff300000.gpu: Couldn't update frequency transition information.
tuuzdu commented 5 years ago

I have tested image more with latest version of repository. Booting is working good.