[U-Boot-Users] [PATCH] Pass full u-boot environment to booting kernel

Pantelis Antoniou panto at intracom.gr
Tue Sep 14 14:01:40 CEST 2004


Wolfgang Denk wrote:
> In message <4146C728.7010006 at intracom.gr> you wrote:
> 
>>The following patch allows the passing of the full u-boot
>>environment to the booting running kernel.
>>
>>What it does after that is a matter of discussion currently.
> 
> 
> Which discussion are you referring to? I  haven't  seen  any  related
> message yet.
> 

It's a discussion related to the kernel. Its mainly private email
exchanges.

The consensus is that there is no consensus for anything but the
fact that something like this is needed.

The other solution discussed is bi_recs.

> 
>>In the following days I'll also post patches for the kernel
>>and busybox showing what can be acheived.
> 
> 
> Please hold on for a moment.
> 
> I'm afraid I have to tell you that I don't think this makes sense  at
> all.
> 
> There are several reasons for me to tend to reject this patch:
> 
> * The Linux kernel's command line is limited in size. You cannot pass
>   arbitrary amounts of data to the kernel this way.

If you take a look at the patch you'll see that the environment is not
passed in the command line.

Merely a memory structure in a non-overwrittable area is created and
the (physical) address of it is passed to the kernel.

The only thing passed to the kernel is "u-boot-env=007a3140".

There are no adverse effects if the kernel image does not understand the
option.

And finally this functionality is controlled by a single define.
If you don't need it just don't define it.

> 
> * If you want to  make  the  U-Boot  environment  accessable  to  the
>   kernel,  there are other (better?) ways like making it available by
>   the kernel directory (reading directly through the  MTD  layer  for
>   flash, or from I2C for EEPROM, etc.).

No there not.

The point is not to pass the stored environment settings, but the ones
active at the moment of booting.

For example if the network settings are obtained by means of DHCP there
are not generally stored in the non-volatile environment.

> 
> * The U-Boot environment usually contains LOTS of  definitions  which
>   are definitely useless in the Linux kernel, so why pass random data
>   which will never be needed anyway?

It's not just for the kernel. The boot variables are invaluable for
your applications too.

> 
> Best regards,
> 
> Wolfgang Denk
> 

Regards

Pantelis




More information about the U-Boot mailing list