[meta-freescale] minimal DT changes to start booting kernel on D/L board on ttymxc3?

Robert P. J. Day rpjday at crashcourse.ca
Wed Oct 11 03:57:08 PDT 2017


  this *should* be a simple question but i just want to make sure i'm
not overlooking anything, costing myself hours of aggravation.

  for a freescale MCIMX6Q-SDB reference board in front of me, i've
trivially built a "core-image-minimal" using MACHINE=imx6qdlsabresd,
dd'ed the wic image to SD card, and booted perfectly successfully. so
i now have a kernel that should cover a wide range of i.MX6 targets,
differing only in the .dtb file passed to the kernel at boot time.

  the only detail of interest is that this board clearly has its
console on UART1, as /proc/cmdline contains:

  # cat /proc/cmdline
  console=ttymxc0,115200 root=PARTUUID=0b867308-02 rootwait rw
  #

where, as i read it, for i.MX6, the association is:

  UART1 -> ttymxc0
  UART2 -> ttymxc1
  UART3 -> ttymxc2
  UART4 -> ttymxc3

correct? and herein lies the issue.

  i have recently been handed a proprietary i.MX6-based board, built
around dual-lite but, as i've been told, trying to hang onto as much
of the MCIMX6Q-SDB design as possible to minimize the churn in the
device tree files. still, there's a ton of stuff that's been added to
the proprietary board, so certainly the DT files are going to be
different and will need major tweaking.

  what i want to do is start with a generic YP build as above, and
just boot using (i'm assuming) "imx6dl-sabresd.dtb" that was built as
above; in other words, i already have everything i need from the
current build, i just need to stop in u-boot and switch the .dtb file
being passed to the kernel.

  i'm prepared for all sorts of warnings and errors given that the DTB
file won't match the actual board, but the fundamental issue is that
the console port on this proprietary board was (apparently) moved from
UART1 to UART4, since (for this proprietary board and a working but
fairly old bootable image) u-boot sets "console=ttymxc3,115200". so my
plan is to simply define a new layer (meta-rday or whatever), which
defines a new MACHINE, and tweaks the meta-freescale kernel with a
single patch that defines UART4 as the console rather than UART1.

  does that make sense? as i said, the rest of the DT files will
certainly be out of whack and i'll start adjusting them as errors come
up and i add support for new subsystems, but just to start getting
kernel output, is it sufficient to just move the DT console definition
from UART1 to UART4? is there anything else that would need to change?

  oh, and while i'm about to dig into the device trees to see how to
do that, if anyone wants to just supply the kernel patch i would need
to apply, that would be just ducky. :-)

  does all this make sense?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



More information about the meta-freescale mailing list