BPI-R2 boot / power suppy

@bburky’s solution is to poweron on power available (without pressing the power-button 10 seconds)

for HDD you need the solution from @sunarowicz (external power-supply for the hdds)

1 Like

Power button is so confusing because the board is “on” before the 10 count but if you let it go at the wrong time it turns back off. I would be happy with just reprogramming the power button so I don’t have to hold it for 10 seconds.

Does anyone know if that can be done?

Just for your info. If you bridge powerbutton you may encounter problems like a bootloop.

More info and solution here: https://github.com/frank-w/BPI-R2-4.14/issues/35

Sorry for my answer in old topic, but the problem regarding to it

I have compiled kernel 4.19.16 (branch 4.19-main) from @frank-w repo. Kernel config not changed. What I do:

./build.sh importconfig
./build.sh build
./build.sh pack

and then extract kernel archive to SD card (boot part on boot partition, and root on root partition). When I run “shutdown -h 0” I got kernel panic. acpid is not installed. I use slackarm distro.

Kernel panic output:

INIT: Switching to run[  112.695791] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
[  112.695791]
[  112.695806] CPU: 2 PID: 1 Comm: init Not tainted 4.19.16-bpi-r2-main #1
[  112.695810] Hardware name: Mediatek Cortex-A7 (Device Tree)
[  112.695846] [<c0114bbc>] (unwind_backtrace) from [<c010ea18>] (show_stack+0x20/0x24)
[  112.695862] [<c010ea18>] (show_stack) from [<c0b51c30>] (dump_stack+0x90/0xa4)
[  112.695878] [<c0b51c30>] (dump_stack) from [<c01286ac>] (panic+0x100/0x284)
[  112.695893] [<c01286ac>] (panic) from [<c012df00>] (complete_and_exit+0x0/0x2c)
[  112.695908] [<c012df00>] (complete_and_exit) from [<c012df9c>] (do_group_exit+0x50/0xe0)
[  112.695922] [<c012df9c>] (do_group_exit) from [<c013a4cc>] (get_signal+0x364/0x6bc)
[  112.695936] [<c013a4cc>] (get_signal) from [<c010dc54>] (do_signal+0x294/0x4a4)
[  112.695948] [<c010dc54>] (do_signal) from [<c010e070>] (do_work_pending+0xdc/0xf4)
[  112.695961] [<c010e070>] (do_work_pending) from [<c010106c>] (slow_work_pending+0xc/0x20)
[  112.695967] Exception stack(0xde913fb0 to 0xde913ff8)
[  112.695976] 3fa0:                                     00000000 bea19228 00000005 b6f380c8
[  112.695988] 3fc0: bea193bc bea19480 b6f6a000 00000092 00000001 b6f1e292 bea19480 bea19500
[  112.695998] 3fe0: 00000000 bea19338 bea19228 b6decfb8 600f0010 ffffffff
[  112.696018] CPU3: stopping
[  112.696029] CPU: 3 PID: 513 Comm: bash Not tainted 4.19.16-bpi-r2-main #1
[  112.696033] Hardware name: Mediatek Cortex-A7 (Device Tree)
[  112.696051] [<c0114bbc>] (unwind_backtrace) from [<c010ea18>] (show_stack+0x20/0x24)
[  112.696063] [<c010ea18>] (show_stack) from [<c0b51c30>] (dump_stack+0x90/0xa4)
[  112.696077] [<c0b51c30>] (dump_stack) from [<c01129b4>] (handle_IPI+0x334/0x3b4)
[  112.696091] [<c01129b4>] (handle_IPI) from [<c01022a8>] (gic_handle_irq+0x9c/0xa0)
[  112.696103] [<c01022a8>] (gic_handle_irq) from [<c0101a0c>] (__irq_svc+0x6c/0x90)
[  112.696108] Exception stack(0xdbdb39a8 to 0xdbdb39f0)
[  112.696119] 39a0:                   e16dfebc 00000010 00000000 00000000 00aaaaaa 00000001
[  112.696131] 39c0: e16dfec0 e16dfdc0 00000000 00000001 c0c4ba60 dbdb3a4c dbac03a3 dbdb39f8
[  112.696138] 39e0: 00000009 c0550664 600c0013 ffffffff
[  112.696153] [<c0101a0c>] (__irq_svc) from [<c0550664>] (cfb_imageblit+0x2fc/0x4e4)
[  112.696172] [<c0550664>] (cfb_imageblit) from [<c05bdf98>] (drm_fb_helper_cfb_imageblit+0x24/0x44)
[  112.696187] [<c05bdf98>] (drm_fb_helper_cfb_imageblit) from [<c054ed7c>] (bit_putcs+0x280/0x42c)
[  112.696200] [<c054ed7c>] (bit_putcs) from [<c0548674>] (fbcon_putcs+0x104/0x11c)
[  112.696213] [<c0548674>] (fbcon_putcs) from [<c054aa48>] (fbcon_redraw+0xe8/0x1cc)
[  112.696226] [<c054aa48>] (fbcon_redraw) from [<c054d718>] (fbcon_scroll+0x288/0xd30)
[  112.696242] [<c054d718>] (fbcon_scroll) from [<c05899c8>] (con_scroll+0x1d0/0x1dc)
[  112.696258] [<c05899c8>] (con_scroll) from [<c0589a88>] (lf+0xb4/0xc0)
[  112.696271] [<c0589a88>] (lf) from [<c058d9f8>] (do_con_trol+0xc0/0x1718)
[  112.696284] [<c058d9f8>] (do_con_trol) from [<c058f230>] (do_con_write.part.10+0x1e0/0x910)
[  112.696296] [<c058f230>] (do_con_write.part.10) from [<c058fa54>] (con_write+0x88/0x98)
[  112.696310] [<c058fa54>] (con_write) from [<c0575764>] (do_output_char+0x16c/0x1fc)
[  112.696324] [<c0575764>] (do_output_char) from [<c05769f0>] (n_tty_write+0x230/0x498)
[  112.696337] [<c05769f0>] (n_tty_write) from [<c057282c>] (tty_write+0x1f4/0x308)
[  112.696352] [<c057282c>] (tty_write) from [<c02cde30>] (__vfs_write+0x4c/0x170)
[  112.696367] [<c02cde30>] (__vfs_write) from [<c02ce0e8>] (vfs_write+0xb4/0x190)
[  112.696380] [<c02ce0e8>] (vfs_write) from [<c02ce33c>] (ksys_write+0x5c/0xbc)
[  112.696394] [<c02ce33c>] (ksys_write) from [<c02ce3b4>] (sys_write+0x18/0x1c)
[  112.696407] [<c02ce3b4>] (sys_write) from [<c0101000>] (ret_fast_syscall+0x0/0x54)
[  112.696412] Exception stack(0xdbdb3fa8 to 0xdbdb3ff0)
[  112.696422] 3fa0:                   0000002a 0010b408 00000001 0010b408 0000002a 00000000
[  112.696434] 3fc0: 0000002a 0010b408 b6f15da0 00000004 b6f13b2c 00000000 00108088 000d5154
[  112.696441] 3fe0: b6f15000 bea5d248 b6e274a4 b6e8dc2c
[  112.696449] CPU0: stopping
[  112.696461] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.16-bpi-r2-main #1
[  112.696465] Hardware name: Mediatek Cortex-A7 (Device Tree)
[  112.696483] [<c0114bbc>] (unwind_backtrace) from [<c010ea18>] (show_stack+0x20/0x24)
[  112.696495] [<c010ea18>] (show_stack) from [<c0b51c30>] (dump_stack+0x90/0xa4)
[  112.696509] [<c0b51c30>] (dump_stack) from [<c01129b4>] (handle_IPI+0x334/0x3b4)
[  112.696522] [<c01129b4>] (handle_IPI) from [<c01022a8>] (gic_handle_irq+0x9c/0xa0)
[  112.696534] [<c01022a8>] (gic_handle_irq) from [<c0101a0c>] (__irq_svc+0x6c/0x90)
[  112.696539] Exception stack(0xc1201ee0 to 0xc1201f28)
[  112.696552] 1ee0: 00000000 0000e814 df59e408 c01217a0 c1200000 c1204c70 c1204cb8 00000001
[  112.696564] 1f00: c12b59e3 c0e43870 c1177e38 c1201f3c c1201f40 c1201f30 c010aa30 c010aa34
[  112.696569] 1f20: 600b0013 ffffffff
[  112.696584] [<c0101a0c>] (__irq_svc) from [<c010aa34>] (arch_cpu_idle+0x48/0x4c)
[  112.696602] [<c010aa34>] (arch_cpu_idle) from [<c0b6eda0>] (default_idle_call+0x30/0x3c)
[  112.696620] [<c0b6eda0>] (default_idle_call) from [<c015c88c>] (do_idle+0xec/0x16c)
[  112.696636] [<c015c88c>] (do_idle) from [<c015cbcc>] (cpu_startup_entry+0x28/0x2c)
[  112.696650] [<c015cbcc>] (cpu_startup_entry) from [<c0b68760>] (rest_init+0xbc/0xc0)
[  112.696666] [<c0b68760>] (rest_init) from [<c1101008>] (start_kernel+0x46c/0x49c)
[  112.696675] CPU1: stopping
[  112.696687] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.19.16-bpi-r2-main #1
[  112.696691] Hardware name: Mediatek Cortex-A7 (Device Tree)
[  112.696709] [<c0114bbc>] (unwind_backtrace) from [<c010ea18>] (show_stack+0x20/0x24)
[  112.696722] [<c010ea18>] (show_stack) from [<c0b51c30>] (dump_stack+0x90/0xa4)
[  112.696735] [<c0b51c30>] (dump_stack) from [<c01129b4>] (handle_IPI+0x334/0x3b4)
[  112.696748] [<c01129b4>] (handle_IPI) from [<c01022a8>] (gic_handle_irq+0x9c/0xa0)
[  112.696760] [<c01022a8>] (gic_handle_irq) from [<c0101a0c>] (__irq_svc+0x6c/0x90)
[  112.696765] Exception stack(0xde94bf38 to 0xde94bf80)
[  112.696773] bf20:                                                       00000000 0000e168
[  112.696785] bf40: df5af408 c01217a0 de94a000 c1204c70 c1204cb8 00000002 c12b59e3 c0e43870
[  112.696796] bf60: 00000000 de94bf94 de94bf98 de94bf88 c010aa30 c010aa34 60000013 ffffffff
[  112.696810] [<c0101a0c>] (__irq_svc) from [<c010aa34>] (arch_cpu_idle+0x48/0x4c)
[  112.696826] [<c010aa34>] (arch_cpu_idle) from [<c0b6eda0>] (default_idle_call+0x30/0x3c)
[  112.696842] [<c0b6eda0>] (default_idle_call) from [<c015c88c>] (do_idle+0xec/0x16c)
[  112.696857] [<c015c88c>] (do_idle) from [<c015cbcc>] (cpu_startup_entry+0x28/0x2c)
[  112.696872] [<c015cbcc>] (cpu_startup_entry) from [<c01123bc>] (secondary_start_kernel+0x170/0x194)
[  112.696885] [<c01123bc>] (secondary_start_kernel) from [<801026cc>] (0x801026cc)
[  114.195564] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
[  114.195564]  ]---

crash seem to happen in framebuffer-console, have you a monitor connected? have you same problem on “poweroff”-command?

have you problem on another ḱernel-version?

Yes. I have connected monitor via hdmi and serial console too. On “poweroff” it is the same kernel panic. I check what happens on kernel 4.16 and back with the result.

i have tested on my debian-system (also actual 4.19.16) with installed acpi, no crash…can you enable drm-debug (drm.debug=0x7) via your uenv.txt?

where do you get your image or how have you build it?

you see crash only on serial, right? does it happen after a clean boot? or do you have errors on boot too? anything done between bootup and poweroff?

I haven’t installed acpi on my slackarm. Yes, sure. I can enable drm-debug if you can tell me how.

I’m build the kernel on Virtual Machine with Ubuntu 16.04 using your build.sh script.

I see the crash on hdmi and serial console too. But only from serial console I will be able to put it here :slight_smile:

On kernel 4.16.18 I have the same kernel panic on poweroff and shutdown commands :expressionless:

just add “drm.debug=0x7” to your bootargs (uboot-config uEnv.txt)

i expected that fbcon is closed so you see the error only on serial…as you said, you see it on hdmi too fbcon is not killed at this moment

you do not get the last “Power down”-mesage right? means your device stays powered on

this is how it looks on my debian-system

[  840.177708] systemd-shutdown[1]: All filesystems unmounted.                                                                        
[  840.189043] systemd-shutdown[1]: Deactivating swaps.                                                                               
[  840.199807] systemd-shutdown[1]: All swaps deactivated.                                                                            
[  840.210666] systemd-shutdown[1]: Detaching loop devices.                                                                           
[  840.227518] systemd-shutdown[1]: All loop devices detached.                                                                        
[  841.258544] reboot: Power down

i guess slackarm does anything different which causes the crash

I try recorded shutdown process :slight_smile: and before the kernel panic I see:

The system is going down for system halt NOW!

I’m not see “Power down” message :frowning:

kernel panic message with enabled drm debug:

[  113.978089] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
[  113.978089] 
[  114.060928] CPU: 0 PID: 1 Comm: init Not tainted 4.16.18-bpi-r2-main #7
[  114.105429] Hardware name: Mediatek Cortex-A7 (Device Tree)
[  114.148972] [<c0113d94>] (unwind_backtrace) from [<c010e4d8>] (show_stack+0x20/0x24)
[  114.195234] [<c010e4d8>] (show_stack) from [<c09e123c>] (dump_stack+0x90/0xa4)
[  114.240854] [<c09e123c>] (dump_stack) from [<c012cf08>] (panic+0x100/0x284)
[  114.285869] [<c012cf08>] (panic) from [<c01315d8>] (complete_and_exit+0x0/0x2c)
[  114.331287] [<c01315d8>] (complete_and_exit) from [<c013258c>] (do_group_exit+0x50/0xe0)
[  114.377686] [<c013258c>] (do_group_exit) from [<c013e860>] (get_signal+0x35c/0x6b0)
[  114.424116] [<c013e860>] (get_signal) from [<c010d4b4>] (do_signal+0xe8/0x468)
[  114.470536] [<c010d4b4>] (do_signal) from [<c010da20>] (do_work_pending+0xbc/0xcc)
[  114.517797] [<c010da20>] (do_work_pending) from [<c010106c>] (slow_work_pending+0xc/0x20)
[  114.566194] Exception stack(0xde911fb0 to 0xde911ff8)
[  114.611719] 1fa0:                                     00000000 bef32228 00000005 b6eda0c8
[  114.661275] 1fc0: bef323bc bef32480 b6f0c000 00000092 00000001 b6ec0292 bef32480 bef32500
[  114.710653] 1fe0: 00000000 bef32338 bef32228 b6d8efb8 600f0010 ffffffff
[  114.758144] CPU2: stopping
[  114.801271] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.16.18-bpi-r2-main #7
[  114.849307] Hardware name: Mediatek Cortex-A7 (Device Tree)
[  114.895959] [<c0113d94>] (unwind_backtrace) from [<c010e4d8>] (show_stack+0x20/0x24)
[  114.945506] [<c010e4d8>] (show_stack) from [<c09e123c>] (dump_stack+0x90/0xa4)
[  114.994975] [<c09e123c>] (dump_stack) from [<c0111b8c>] (handle_IPI+0x2b0/0x2d0)
[  115.044348] [<c0111b8c>] (handle_IPI) from [<c01022a8>] (gic_handle_irq+0x9c/0xa0)
[  115.093732] [<c01022a8>] (gic_handle_irq) from [<c0101a0c>] (__irq_svc+0x6c/0x90)
[  115.143015] Exception stack(0xde937f38 to 0xde937f80)
[  115.189933] 7f20:                                                       00000000 000038bc
[  115.240568] 7f40: df7c23d8 c01206a0 de936000 c0f04c6c c0f04cd8 00000004 c0f8b3a9 c0bef150
[  115.291372] 7f60: 00000000 de937f94 de937f98 de937f88 c010a2d8 c010a2dc 60000013 ffffffff
[  115.342684] [<c0101a0c>] (__irq_svc) from [<c010a2dc>] (arch_cpu_idle+0x48/0x4c)
[  115.393309] [<c010a2dc>] (arch_cpu_idle) from [<c09fd958>] (default_idle_call+0x30/0x3c)
[  115.445025] [<c09fd958>] (default_idle_call) from [<c0170e6c>] (do_idle+0xe4/0x158)
[  115.495713] [<c0170e6c>] (do_idle) from [<c01711a0>] (cpu_startup_entry+0x28/0x2c)
[  115.545616] [<c01711a0>] (cpu_startup_entry) from [<c0111650>] (secondary_start_kernel+0x16c/0x190)
[  115.597604] [<c0111650>] (secondary_start_kernel) from [<801026cc>] (0x801026cc)
[  115.647355] CPU3: stopping
[  115.691453] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.16.18-bpi-r2-main #7
[  115.740401] Hardware name: Mediatek Cortex-A7 (Device Tree)
[  115.788034] [<c0113d94>] (unwind_backtrace) from [<c010e4d8>] (show_stack+0x20/0x24)
[  115.838458] [<c010e4d8>] (show_stack) from [<c09e123c>] (dump_stack+0x90/0xa4)
[  115.888500] [<c09e123c>] (dump_stack) from [<c0111b8c>] (handle_IPI+0x2b0/0x2d0)
[  115.938176] [<c0111b8c>] (handle_IPI) from [<c01022a8>] (gic_handle_irq+0x9c/0xa0)
[  115.988481] [<c01022a8>] (gic_handle_irq) from [<c0101a0c>] (__irq_svc+0x6c/0x90)
[  116.039229] Exception stack(0xde939f38 to 0xde939f80)
[  116.087952] 9f20:                                                       00000000 0000d0f8
[  116.140718] 9f40: df7d33d8 c01206a0 de938000 c0f04c6c c0f04cd8 00000008 c0f8b3a9 c0bef150
[  116.192875] 9f60: 00000000 de939f94 de939f98 de939f88 c010a2d8 c010a2dc 600d0013 ffffffff
[  116.244736] [<c0101a0c>] (__irq_svc) from [<c010a2dc>] (arch_cpu_idle+0x48/0x4c)
[  116.295289] [<c010a2dc>] (arch_cpu_idle) from [<c09fd958>] (default_idle_call+0x30/0x3c)
[  116.346876] [<c09fd958>] (default_idle_call) from [<c0170e6c>] (do_idle+0xe4/0x158)
[  116.398172] [<c0170e6c>] (do_idle) from [<c01711a0>] (cpu_startup_entry+0x28/0x2c)
[  116.422914] SMP: failed to stop secondary CPUs
[  116.497294] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
[  116.[  116.497294] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
[  116.497294] 
[  116.551157] [<c0111650>] (secondary_start_kernel) from [<801026cc>] (0x801026cc)
[  116.603597] CPU1: stopping
[  116.651188] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.16.18-bpi-r2-main #7
[  116.704013] Hardware name: Mediatek Cortex-A7 (Device Tree)
[  116.755751] [<c0113d94>] (unwind_backtrace) from [<c010e4d8>] (show_stack+0x20/0x24)
[  116.810399] [<c010e4d8>] (show_stack) from [<c09e123c>] (dump_stack+0x90/0xa4)
[  116.864637] [<c09e123c>] (dump_stack) from [<c0111b8c>] (handle_IPI+0x2b0/0x2d0)
[  116.918972] [<c0111b8c>] (handle_IPI) from [<c01022a8>] (gic_handle_irq+0x9c/0xa0)
[  116.973716] [<c01022a8>] (gic_handle_irq) from [<c0101a0c>] (__irq_svc+0x6c/0x90)
[  117.028676] Exception stack(0xde935f38 to 0xde935f80)
[  117.080990] 5f20:                                                       00000000 00005368
[  117.136422] 5f40: df7b13d8 c01206a0 de934000 c0f04c6c c0f04cd8 00000002 c0f8b3a9 c0bef150
[  117.191647] 5f60: 00000000 de935f94 de935f98 de935f88 c010a2d8 c010a2dc 60060013 ffffffff
[  117.246899] [<c0101a0c>] (__irq_svc) from [<c010a2dc>] (arch_cpu_idle+0x48/0x4c)
[  117.301467] [<c010a2dc>] (arch_cpu_idle) from [<c09fd958>] (default_idle_call+0x30/0x3c)
[  117.356760] [<c09fd958>] (default_idle_call) from [<c0170e6c>] (do_idle+0xe4/0x158)
[  117.411624] [<c0170e6c>] (do_idle) from [<c01711a0>] (cpu_startup_entry+0x28/0x2c)
[  117.466587] [<c01711a0>] (cpu_startup_entry) from [<c0111650>] (secondary_start_kernel+0x16c/0x190)
[  117.523375] [<c0111650>] (secondary_start_kernel) from [<801026cc>] (0x801026cc)

And content of my uEnv.txt file:

#
## uEnv.txt
#
bpi=bananapi
board=bpi-r2
chip=mt7623n
service=linux
#
##
#
kernel=uImage-4.16.18
#
##
#
kaddr=0x84000000
rdaddr=0x86000000
#
##
#
#root=/dev/ram
root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
console=earlyprintk console=tty1 fbcon=map:0 console=ttyS0,115200
bootopts=vmalloc=496M debug=7 initcall_debug=0 video=1280x1024-32 drm.debug=0x7
#
##
#
abootargs=setenv bootargs board=${board} console=${console} root=${root} service=${service} ${bootopts}
#
##
#
ahello=echo Banana Pi ${board} chip: $chip Service: $service
#
##
#
aboot=if fatload $device $partition $rdaddr ${bpi}/berryboot.img; then bootm $kaddr $rdaddr ; else bootm $kaddr; fi
#
##
#
aload_kernel=fatload $device $partition $kaddr ${bpi}/${board}/${service}/${kernel}
#
##
#
uenvcmd=run ahello abootargs aload_kernel aboot
#
## END
#

Nothing from drm.debug? how do you get slack-image?

Please verify your drm.debug option is passed to kernel

uname -r
cat /proc/cmdline

please attach full log…i need to see whats happen directly before crash

The arm image of slack is downloadable from here: http://arm.slackware.com/installation/ At the bottom of this page is " click here to download the root filesystem images." and on “here” is link to minirootfs: ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-devtools/minirootfs/roots I use slackware-current image because this provide hardware float support. How can I grab the full log which will help to find the reason of this issue?

root@slackarm:~# uname -r
4.16.18-bpi-r2-main
root@slackarm:~# cat /proc/cmdline 
board=bpi-r2 console=earlyprintk console=tty1 fbcon=map:0 console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait service=linux vmalloc=496M debug=7 initcall_debug=0 video=1280x1024-32 drm.debug=0x7

bootup-log you can write to file

dmesg > file.txt

for power-down log just select in your terminal-application (putty/minicom) and copy to a textfile on client like you did for crash, but not only the crash…also lines before (starting at your poweroff-command)

OK, BootUP log is here: https://drive.google.com/file/d/1-w5Nr1ZIVx7s2CKsF-GlZzn7Zio3uNxY/view?usp=sharing

But power-down log is not easy to have as a part of messages I have on serial console but other part on hdmi port. So firstly will be good to fix this issue. What I should change in my uEnv.txt file to have all messages on serial console. Now, I’m not able to login to the OS on serial console. Login screen is only on hdmi port.

bootup-log looks clear so far…

you should see all messages also on serial-console. you could try

dmesg -E

before running poweroff-command, i have no other idea because i see all messages also on serial (and some additional after fbcon is disabled)…

for login on serial, maybe its hidden because of drm-messages…just press enter and you should see login-prompt on serial

it seems that there is a process that prevent you to login from console (after starting xserver).

my bootargs are similar for console

root@bpi-r2:~# cat /proc/cmdline                                                                                                               
board=bpi-r2 console=earlyprintk console=tty1 fbcon=map:0 console=ttyS0,115200 kgdboc=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait vmalloc=496M debug=7 initcall_debug=0 video=1280x1024 drm.debug=0x7

After enter I’m not see login prompt on serial console. I see:

Starting OpenSSH SSH daemon:  /usr/sbin/sshd
Enabled CPU frequency scaling governor:  ondemand
Starting crond:  /usr/sbin/crond -l notice
Loading /usr/share/kbd/keymaps/i386/qwerty/uk.map.gz

as a last commands from boot process and then I’m able to logon only on hdmi. And when I run poweroff/shutdown on serial console I got:

INIT: Switching to run[ 2168.352919] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
[ 2168.352919] 
...

for serial-problem you should ask in slacks forum and maybe for process of powerdown…there seems to be a difference to debian-systems

there is a crash on killing init-process, with drm.debug the fbcon-lines are missing…strange.

[  112.696153] [<c0101a0c>] (__irq_svc) from [<c0550664>] (cfb_imageblit+0x2fc/0x4e4)
[  112.696172] [<c0550664>] (cfb_imageblit) from [<c05bdf98>] (drm_fb_helper_cfb_imageblit+0x24/0x44)
[  112.696187] [<c05bdf98>] (drm_fb_helper_cfb_imageblit) from [<c054ed7c>] (bit_putcs+0x280/0x42c)

i guess it tries to display a bootlogo or splash-screen which is not available in my kernel…imho you should ask in slackware-forum for serial-problem and kernel-crash

maybe @DeadMeat can help here, currently he tries to change framebuffer-driver to new generic framework…maybe in old driver the bitblt-functions are missing

I checked again with Raspbian (stretch) : -> on kernel 4.4.70 after powerdown command I got

[  OK  ] Reached target Shutdown.
[  275.514617] reboot: System halted

and BPI is not powered off.

-> on kernel 4.19.16 after powerdown command I got

root@bpi-iot-ros-ai:~# poweroff 
[  OK  ] Started Show Plymouth Power Off Screen.
[  OK  ] Deactivated swap /var/swap.
[  OK  ] Stopped LSB: Autogenerate and use a swap file.
[  OK  ] Unmounted /run/user/1000/gvfs.
[  OK  ] Unmounted RPC Pipe File System.
[  OK  ] Stopped User Manager for UID 1000.
[  OK  ] Stopped User Manager for UID 0.
[  OK  ] Removed slice User Slice of root.
[  OK  ] Removed slice User Slice of pi.
         Stopping Permit User Sessions...
         Stopping Login Service...
[  OK  ] Stopped Login Service.
[  OK  ] Stopped Permit User Sessions.
[  OK  ] Stopped target Network.
         Stopping Raise network interfaces...
         Stopping dhcpcd on all interfaces...
[  OK  ] Stopped target Remote File Systems.
[  OK  ] Stopped target Remote File Systems (Pre).
[  OK  ] Stopped target NFS client services.
[  OK  ] Stopped Raise network interfaces.
[  OK  ] Stopped dhcpcd on all interfaces.
[  OK  ] Stopped target Basic System.
[  OK  ] Stopped target Sockets.
[  OK  ] Closed D-Bus System Message Bus Socket.
[  OK  ] Closed Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Closed triggerhappy.socket.
[  OK  ] Closed Syslog Socket.
[  OK  ] Stopped target System Initialization.
[  OK  ] Stopped target Swap.
[  OK  ] Stopped Apply Kernel Variables.
[  OK  ] Stopped target Encrypted Volumes.
         Stopping Update UTMP about System Boot/Shutdown...
         Stopping Load/Save Random Seed...
         Stopping Restore / save the current clock...
         Stopping Network Time Synchronization...
[  OK  ] Stopped Load Kernel Modules.
[  OK  ] Stopped target Slices.
[  OK  ] Removed slice User and Session Slice.
[  OK  ] Stopped Forward Password Requests to Plymouth Directory Watch.
[  OK  ] Stopped target Paths.
[  OK  ] Stopped Forward Password Requests to Wall Directory Watch.
[  OK  ] Stopped Load/Save Random Seed.
[  OK  ] Stopped Restore / save the current clock.
[  OK  ] Stopped Update UTMP about System Boot/Shutdown.
[  OK  ] Stopped Network Time Synchronization.
[  OK  ] Stopped Create Volatile Files and Directories.
[  OK  ] Stopped target Local File Systems.
         Unmounting /boot...
         Unmounting /media/pi/BPI-BOOT...
         Unmounting /run/user/1000...
         Unmounting /run/user/0...
[  OK  ] Unmounted /run/user/1000.
[  OK  ] Unmounted /media/pi/BPI-BOOT.
[  OK  ] Unmounted /run/user/0.
[  OK  ] Unmounted /boot.
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Stopped File System Check on /dev/mmcblk0p1.
[  OK  ] Removed slice system-systemd\x2dfsck.slice.
[  OK  ] Stopped target Local File Systems (Pre).
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Stopped Remount Root and Kernel File Systems.
[  OK  ] Reached target Shutdown.
[  OK  ] Reached target Final Step.
         Starting Power-Off...

Here, after wait a few seconds:

[   91.252329] reboot: Power down
[   92.259992] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
[   92.259992] 
[   92.273118] CPU: 0 PID: 1 Comm: systemd-shutdow Tainted: G        W         4.19.16-bpi-r2-main #1
[   92.286032] Hardware name: Mediatek Cortex-A7 (Device Tree)
[   92.295587] [<c0114bbc>] (unwind_backtrace) from [<c010ea18>] (show_stack+0x20/0x24)
[   92.307376] [<c010ea18>] (show_stack) from [<c0b51c30>] (dump_stack+0x90/0xa4)
[   92.318713] [<c0b51c30>] (dump_stack) from [<c01286ac>] (panic+0x100/0x284)
[   92.329801] [<c01286ac>] (panic) from [<c012df00>] (complete_and_exit+0x0/0x2c)
[   92.341331] [<c012df00>] (complete_and_exit) from [<c014ece0>] (sys_reboot+0x170/0x218)
[   92.353621] [<c014ece0>] (sys_reboot) from [<c0101000>] (ret_fast_syscall+0x0/0x54)
[   92.365650] Exception stack(0xde913fa8 to 0xde913ff0)
[   92.375103] 3fa0:                   ffffffff 00000000 fee1dead 28121969 4321fedc 4321fedc
[   92.387799] 3fc0: ffffffff 00000000 00495038 00000058 bef56c88 00495028 fffff000 bef56e74
[   92.400551] 3fe0: 00493f20 bef56ba0 0048fb18 b6c9e598
[   92.410235] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
[   92.410235]  ]---

and BPI is not powered off. My BPI-R2 is rev V1.1

I have soldered power-button so I blacklist mtk_pmic_keys module to avoid boot loop.

I done more tests - distribution the same as in my previous post: Raspbian with kernel 4.19.16 and two BPI-R2 motherboards: 1st MB - on this I have burned BPI-R2-EMMC-boot0-DDR1600-0k-0905.img.gz to /dev/mmcblk1boot0 to be able to boot from eMMC (it was described here: BPI-R2 new image : ubuntu 16.04 V1.2.1 BT and WIFI AP mode are working fine 2017-11-27 in point “5. FAQ” subpoint “g”) 2nd MB - really new one, eMMC not touched only SD with OS inserted

and on the 1st MB I have kernel panic but the 2nd MB orrectly powered off on poweroff command.

Which one image I can use to test (for mmcblk1boot0) but having the possibility to boot from eMMC too?

as i have not soldered my power-switch i cannot test this…

is your second board also hw rev 1.1? if it is rev 1.2 you have a switch for selecting boot-device if both having a valid preloader installed.

in rev 1.1 emmc is only used, if sd-boot is not possible (not inserted or at least no preloader).

to boot from emmc you need preloader on emmc (boot0-partition) and uboot with pointing to emmcs-root-device (depending on kernel used). official and my kernel have mmc swapped (sd=mmcblk0,emmc=mmcblk1). so you need to load kernel with uboot from right device (in uboot sd=mmc dev 1, emmc=mmc dev 0) and set your root in bootargs to right partition (from kernel view)