Skip to content
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

allow to specify the ROM version explicitly #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hmvp
Copy link

@hmvp hmvp commented Oct 28, 2016

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]

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]>
@allenxh
Copy link
Contributor

allenxh commented Oct 28, 2016

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.

@hmvp
Copy link
Author

hmvp commented Oct 28, 2016

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants