Hi Michael, First of all thank for your feedback. I also don't like to modify the kernel this way, also because it's not portable.
I will look forward to develope a kernel module to do that task. >> I don't understand your question about machine_halt, but I will assume you are asking how important the lines of code are between your usermode helper call and machine_halt. The answer is very. All of those lines must execute successfully to have clean shutdown. Yes, I was referring to the execution of kernel_shutdown_prepare(SYSTEM_HALT); migrate_to_reboot_cpu(); syscore_shutdown(); kmsg_dump(KMSG_DUMP_HALT); machine_halt(); Because it's supposed that after sending the I2C command (to power off the board) before the execution of these function, they will not be executed. Thanks again. Simon El jue, 17-12-2015 a las 23:37 -0600, Michael Habibi escribió: > I think you are modifying code too deep in the kernel. By the time you > get to that function, the system should not be executing more tasks. > If it does, it will likely get terminated pretty quickly afterward, > regardless if it finished (no guarantee your process will run to > completion). It's also not great practice to actually modify the > kernel itself, because then it will only work with your one > machine/setup (unless that is acceptable). Kernel modules loaded in > may be better practice here. > > > I don't understand your question about machine_halt, but I will assume > you are asking how important the lines of code are between your > usermode helper -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto