[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#667681: Updated patches for Dreamplug / Marvell Kirkwood FDT



On Sat, 2012-06-23 at 18:19 +0100, Ian Campbell wrote:
> 
> > > It is possible that other DP users will want /dev/sda* (the internal
> > > sdcard) instead of /dev/sdb* (the external sdcard). Can I express sda vs
> > > sdb in the flash-kernel db somehow?
> > 
> > Ah, yes; that's indeed a problem.  That means we need some config file
> > to override the boot device (ideally an installer would create this file
> > for you).  This is currently missing in flash-kernel, but here I think
> > it should allow overriding parts of the machine db entry.
> 
> That sounds very sensible, I didn't look at that here though. Seems like
> it shouldn't be too hard to add to get_machine_field(). 

Depending on the desired semantic this could be more or less trivial.

If we want /etc/flash-kernel/local.db (say) to require stanzas indexed
by machine just like all.db then it seems like it should be sufficient
to make MACHINE_DB into a function:
	if [ -f /etc/flash-kernel/local.db ] ; then
		cat /etc/flash-kernel/local.db
		echo # ensure a blank line between local.db and all.db
	fi
	cat "${FK_CHECKOUT:-$FK_DIR}/db/"*.db

This might seem a bit odd since you would require the Machine: line even
though it ought to be obvious it applies to this machine, e.g. you'd
need
	Machine: Globalscale Technologies Dreamplug
	DTB-Append: no
to override DTB-Append. The flip side is you could override different
settings for different machines (which seems fairly useless to me.

It'd be a bit more code, but still pretty trivial to
parse /e/f-k/local.db in all of the places which currently just parse
$MACHINE_DB it, so you could just provide "DTB-Append: no" in the config
file.

If you let me know your preference I'll hack something together.

Ian.




Reply to: