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

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



On Tue, 2012-06-19 at 14:10 +0200, Loïc Minier wrote:
> Sorry for the delay
> 
> On Mon, Jun 04, 2012, Ian Campbell wrote:
> > +Machine: Globalscale Technologies Dreamplug
> > +Kernel-Flavors: kirkwood
> > +U-Boot-Kernel-Address: 0x00008000
> > +U-Boot-Initrd-Address: 0x0
> > +Boot-Kernel-Path: /boot/uImage
> > +Boot-Initrd-Path: /boot/uInitrd
> 
> Could we use Boot-Device + relative pathnames instead?  I find this to
> be a cleaner abstraction for the "firmware area", it mounts the firmware
> area only when needed, and doesn't impose as many constraints on it; if
> one uses /boot to mount the "firmware area" where the bootloader reads
> uImage and such, it has to be sufficiently large to carry all installed
> kernel packages, might require support for symlinks (problematic for
> vfat) or might break more easily with certain fs types (e.g. ext2) if
> the device isn't stopped properly.

I'll take a look into this.

Currently on my dreamplug I have:
$ mount
/dev/sdb2 on / type ext3 (rw,errors=remount-ro)
[...]
/dev/sdb1 on /boot type ext2 (rw)

Are you suggesting that I should move the non-flash-kernel related
content of /dev/sdb1 (e.g. vmlinuz, initramfs etc) to /dev/sdb2:/boot
and remove sdb1 from the fstab, leaving it unmounted the majority of the
time?

I'm happy to do that, just want to make sure I understand before I start
moving stuff about.

FYI /boot is 205M on this system (I don't recall if I partitioned it, or
if the installer did it or if it came that way), so I'm not worried
about space constraints (205M is bigger than the whole disk on my last
Pentium based firewall machine ;-)). I think the original partition was
VFAT though so that concern is valid.

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?

Looking at my sda it seems the partitioning scheme used by the supplier
there is 100M VFAT + 3.9G EXT.

There is also some /dev/mtd devices but I think they are tiny SPI things
and not useful for booting.

Cheers,
Ian.

> 
> > --- a/functions
> > +++ b/functions
> > @@ -21,6 +21,7 @@
> >  BOOTSCRIPTS_DIR="${FK_CHECKOUT:-$FK_DIR}/bootscript"
> >  MACHINE_DB="$(cat "${FK_CHECKOUT:-$FK_DIR}/db/"*.db)"
> >  PROC_CPUINFO="${FK_PROC_CPUINFO:-/proc/cpuinfo}"
> > +PROC_DTMODEL="${FK_PROC_DRMODEL:-/proc/device-tree/model}"
> >  PROC_MTD="/proc/mtd"
> >  
> >  
> > @@ -94,6 +95,16 @@ check_supported() {
> >  get_cpuinfo_hardware() {
> >  	grep "^Hardware" "$PROC_CPUINFO" | sed 's/Hardware\s*:\s*//'
> >  }
> > +get_dt_model() {
> > +	cat "$PROC_DTMODEL"
> > +}
> > +get_machine() {
> > +	if [ -f "$PROC_DTMODEL" ] ; then
> > +		get_dt_model
> > +	else
> > +		get_cpuinfo_hardware
> > +	fi
> > +}
> >  
> >  get_kfile_suffix() {
> >  	local kfile="$1"
> > @@ -302,7 +313,7 @@ elif [ -n "$FK_MACHINE" ]; then
> >  	machine="$FK_MACHINE"
> >  	[ "x$machine" = "xnone" ] && exit
> >  else
> > -	machine="$(get_cpuinfo_hardware)"
> > +	machine="$(get_machine)"
> >  fi
> >  
> >  if [ "x$1" = "x--supported" ]; then
> 
> This looks good!  Ideally we'd expand the testsuite
> 

-- 
Ian Campbell


The health of a democratic society may be measured by the quality
of functions performed by private citizens.
		-- Alexis de Tocqueville

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: