[PATCH 09/11] defaultenv-2: boot/net add bootp support

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Sat Sep 8 13:12:29 EDT 2012


On 17:27 Sat 08 Sep     , Sascha Hauer wrote:
> On Sat, Sep 08, 2012 at 04:51:25PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > 
> > > The current /env/boot/* scripts are written with the intention that they
> > > should be simple scripts which are easily adjustable. They are also
> > > meant as templates to add other board/company/project specific files.
> > > 
> > > Now it only takes one patch series to turn them into complex scripts
> > > which after staring at them for half an hour I still not fully
> > > understand. I don't understand why this must be so, because it seems
> > > what the scripts do is a complex way of saying:
> > > 
> > > path=/mnt/tftp
> > > global.bootm.image="${path}/${global.dhcp.bootfile}"
> > > global.bootm.oftree="${path}/${global.dhcp.oftree_file}"
> > > nfsroot="${global.dhcp.rootpath}"
> > > bootargs-ip
> > > bootargs-root-nfs -n "$nfsroot"
> > > 
> > > Since you introduced a boot sequence support it should be easy to try
> > > bootp like above and fall back to the regular net boot if it fails.
> > no as the the nfsroot or global.bootm.oftree or global.bootm.image
> > may or may not specified via dhcp
> > 
> > the oftre is the perfect example you want use the one in the env if
> > not specify it via dhcp and so on
> > 
> > This was a feature of the defaultenv that I use for long time
> > I need to keep it
> 
> Look, there are so many possible setups.
> 
> - kernel on tftp, disk, nand
> - oftree on tftp, disk, nand, none at all
> - root on nfs, disk, nand
> 
> Even the above makes for 36 combinations, different names/partitions not
> counted. The setups are board specific, company specific, project
> specific or person specific. There is no way of making all happy with a
> single script. Instead the bootscripts are meant as an *example* to get
> started, they are *not* meant to fit all your and everyone elses needs.
> 
> You want to get your oftree path from a dhcp request? Then fine, change
> global.bootm.oftree to "${path}/${global.dhcp.oftree_file}". You want
> to use the one from /env/oftree? Then change global.bootm.oftree
> accordingly. You want to use one as a fallback from another one? Also
> fine, do some if/else.
> 
> But please don't try to force your specific setup to other people.
I force nothing I just add the generic bootp support

if someone want specific they modify

this implementatation just repect the previsou one

when booting via network if the dhcp is used in barebox and the dhcp provide
bootp information use it otherwise fallback to the one provided by the board

There is no specific setup here just how the bootp is suppose to work

Best Regards,
J.



More information about the barebox mailing list