Passing parameters from Uboot to Linux kernel

Hi.

I need to pass a parameter from the U-boot to Linux kernel. The problem is, it's not one of the parameters defined in struct bd_info (bd_t). Changing the bd_t definition in both the U-boot and the kernel will work, but it doesn't seem to be a clean and portable solution.

My questions are:

  1. Shouldn't bd_t contain a field (say unsigned long) for user-defined/ general purpose parameter? It seems to be very useful.
  2. Actually, what I'm trying to pass to the kernel is the board version. I have different HW configurations for different versions, and I'd like to choose the right configuration at runtime. The board version is stored as Uboot environment parameter, so passing it from the U-boot seems like the best solution. Is there any alternative mechanism I can use (given I don't have a dedicated register for versioning)?

Thanks, Michael

Reply to
Mic
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.