imx-kobs
imx-kobs copied to clipboard
allow to specify the ROM version explicitly
Based on: https://github.com/benavrhm/kobs-ng-patches
This patch to kobs-ng allows you to specify the ROM version explicitly using a command line parameter. For example "kobs-ng -r mx28 init ...".
Using this patch allows you to avoid the broken heuristic on /proc/cpuinfo in src/plat_boot_config.c:discover_boot_rom_version() that results in the lame message:
"Couldn't find Boot ROM version We can not find the right ROM version!"
There is in fact no connection between the content of /proc/cpuinfo and the SoC ROM version, except in some particular versions of the kernel that were distributed by Freescale some time ago.
This patch was made for version kobs-ng-3.0.35-4.0.0 that is used in buildroot-2013.11.
I place this patch in the public domain in the hope that it will be useful, but there is no warranty. You use this patch at your own risk. Jonathan Ben-Avraham [email protected]
Please let us know which kernel exported wrong /proc/cpuinfo, the issue should be fixed in kernel rather than in kobs-ng. To let user choose the ROM version might be risky since the wrong one may corrupt the NAND BBM in worst case.
In our case an imx28 with linux kernel version 4.1.9
I am not sure if it is the kernel version or the devicetree we are using but this is the contents of proc/cpuinfo
# cat /proc/cpuinfo
processor : 0
model name : ARM926EJ-S rev 5 (v5l)
BogoMIPS : 226.30
Features : swp half fastmult edsp java
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant : 0x0
CPU part : 0x926
CPU revision : 5
Hardware : Freescale MXS (Device Tree)
Revision : 0000
Serial : 0000000000000000
Edit: ah it comes from using a vanilla kernel: arch/arm/mach-mxs/mach-mxs.c:
DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)")
.handle_irq = icoll_handle_irq,
.init_machine = mxs_machine_init,
.init_late = mxs_pm_init,
.dt_compat = mxs_dt_compat,
.restart = mxs_restart,
MACHINE_END
So basically kobs-ng is trying to find the cpu family based on a string that is not directly related to the actual cpu (as in: it is not actually trying to read a hardware register or anything)