-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
boot type is always 0 #10
Comments
This patch is probably how we fixed / used this on the ccgx: I would expect there to be a more mainstream solution in sysfs or proc which we should use on the bbb and other future hardware |
Right now I get '-3' on a clean power-up and '0' after a soft reboot. |
Yes, I see I missed that code when making the list above. I hadded -3 now. For background, see: So to test this, disable the vrmlogger:
|
Status at this moment is that the watchdog driver (omap_wdt.c) for this kernel does not implement an ioctl or sysfs interface to retrieve the boot status. Thus the generic wdt ioctl interface is called and that one will always reply '0' to an boot status (WDIOC_GETBOOTSTATUS) ioctl, hence our problem. |
The CCGX (TI AM3517) boot statuses are detailed in chapter 4.12.2.11.3 of the technical reference manual. Looking the VRM database, out of thousands of CCGX-es, there are only two reporting status 2. Which is Global software reset occurred. |
@luctius: you posted an email to a mailing list somewhere for this, right? Please post a link to that email in the ML archive here in this issue. |
@luctius fixed it: waiting for test and inclusion in master. |
With those patches applied on the beaglebone, I get these values: |
@mansr thanks. So unfortunately those values do not entirely match up to CCGX list. Which has become our enum definition, also in the frontend (vrm portal & database). So I'd like to keep, and extend, our already existing list to keep all values unique. Which means shifting some of the Beaglebone boot-reasons around.. See table below for my proposal. Codes 3, 4 and 5 are the new ones.
Can you arrange this? For example by making a beaglebone specific implementation of get_boot_type.c; or another way you think is best. In case you are wondering where 29997 and 30012 are coming from, see the init script in that same recipe. Make sure to add a link to this issue in the commit. And can you also add the necessary kernel changes to the linux branch we are currently at? While at that, pls see if you can review & add the commits made for #105 while at it. |
linux now reports the reboot in 2.01~10. We still need to translate the values though.. |
Translation added to |
@jhofstee please add to master. |
Seeing watchdog reboots is valuable for quality purposes.
For the CCGX, we have a mechanism to read the boot type, using IOCTL with WDIOC_GETBOOTSTATUS:
https://git.victronenergy.com/ccgx/meta-ccgx/blob/master/recipes-extended/watchdog/files/get_boot_type.c
Output (/tmp/last_boot_type) is then read by vrmlogger.py. Which then overwrittes it with a result code, and sends it to vrmportal.
On bbb the contents of /tmp/last_boot_type is 0, both on normal power up and after a reboot.
Definition of the numbers written to /tmp/last_boot_type are:
0=Old kernel, no boottype support;
1=Normal boot;
17=Watchdog reboot;
-1=Reading watchdog register failed (generated by get_boot_type);
-2=Reading tmp file failed (generated by vrmlogger.py)
-3=Reading tmp file succeeded (generated by vrmlogger.py, and used to make sure that boottype is only sent to the portal once)
The text was updated successfully, but these errors were encountered: