On Wednesday 03 February 2010 16:52:05 Heiko Schocher wrote:
> >> +
> >> +  str = getenv("mach_type");
> >> +  if (str != NULL) {
> >> +          mach_type = simple_strtoul(str, NULL, 10);
> >> +          printf("Overwriting MACH_TYPE with %d!!!\n", mach_type);
> >> +          gd->bd->bi_arch_number = mach_type;
> >> +  }
> >> +  return 0;
> >
> > Pls avoid this, the machine types should be predefined and registered
> > first for the board support that you are adding. Why do you need this in
> > environment?.
> 
> Stefan, can you answer this?

Yes.

The SUEN3 mach-type is already registered. But we wanted to use one U-Boot 
image on this system (early suen3), and boot the "normal" mainline Linux 
kernel (with the registered mach-type) and a specific Linux kernel image from 
the Linux kernel distributed from Marvell (2.6.22 based). And this kernel 
image had a different MACH_TYPE number. So we added this method to dynamically 
change the mach-type passed to the Linux kernel.

I have no idea if this is still needed for Keymile. But I also think this 
doesn't "hurt". So I'm voting to keep it for now.

Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to