All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Guillaume Fournier" <gfournier@brioconcept.com>
To: <meta-freescale@yoctoproject.org>
Subject: Unable to get u-boot running on i.MX6 SABRE for Smart Devices Eval Board
Date: Tue, 4 Nov 2014 17:44:08 -0500	[thread overview]
Message-ID: <000a01cff880$d8b22690$8a1673b0$@brioconcept.com> (raw)

Hello,

I am new to Yocto and I am having a hard time getting a basic environment
setup.  I have read a lot of documentation but I'm still stock so I'd like
to seek your help.

Problem: I can't get u-boot to start on my evaluation board.  No output
whatsoever on the UART.
Board used: i.MX6 Series SABRE for Smart Devices (MCIMX6DL-SDP)

Here are the steps I followed to get to the point where I am:
***********************************************************************
BSP setup on a Ubuntu 12.04.5 LTS
***********************************************************************
1) Made sure following required packages were installed
   $ sudo apt-get install gawk wget git-core diffstat unzip texinfo
build-essential chrpath libsdl1.2-dev xterm curl
2) Created a working directory
   $ mkdir ~/axion-dev
3) CD to that directory
4) Installed the REPO tool
   $ mkdir ~/axion-dev/bin
   $ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo >
~/axion-dev/bin/repo
   $ chmod a+x ~/axion-dev/bin/repo
5) Downloaded BSP source code
   $ PATH=${PATH}:~/axion-dev/bin
   $ mkdir ~/axion-dev/fsl-community-bsp
   $ cd ~/axion-dev/fsl-community-bsp
   $ git config --global user.email "gfournier@brioconcept.com"
   $ git config --global user.name "Guillaume Fournier"
   $ repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b
daisy
   $ repo sync
   $ repo start axion --all

***********************************************************************
Built and installed cross development toolchain
***********************************************************************
1) Setup the build environment (this changes the current working directory)
   $ source ./setup-environment build
   Accepted the EULA
2) Choose "imx6dlsabresd" as the machine.
3) Modified ~/axion-dev/fsl-community-bsp/build/conf/local.conf to change
   the MACHINE parameter with the name of the selected machine.  For
instance:
   MACHINE ??= 'imx6dlsabresd'
4) Launched the build
   $ bitbake meta-toolchain
5) Grabbed a coffee and waited...
6) Launched
~/axion-dev/fsl-community-bsp/build/tmp/deploy/sdk/poky-eglibc-x86_64-meta-t
oolchain-cortexa9hf-vfp-neon-toolchain-1.6.1.sh
   When asked where to install, I choose ~/axion-dev/toolchain
   
***********************************************************************
Got and built u-boot
***********************************************************************
1) Got Freescale u-boot
   $ cd ~/axion-dev
   $ git clone https://github.com/Freescale/u-boot-fslc.git
2) Ran toolchain environment script.  This sets all relevant environment
variables for cross-compilation
   $
~/axion-dev/toolchain/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnuea
bi
3) Built u-boot
   $ cd ~/axion-dev/u-boot-fslc
   $ make LDFLAGS="" CC="$CC" mrproper
   $ make LDFLAGS="" CC="$CC" mx6dlsabresd_config
   $ make LDFLAGS="" CC="$CC"
   
   The reason behind the [LDFLAGS="" CC="$CC"] is this:
   
   u-boot top level Makefile contains:
   PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(CFLAGS)
-print-libgcc-file-name`) -lgcc
   The above call gets resolved to "-L ."  Doing ${CC}
-print-libgcc-file-name shows the proper value. The reason
   for this is that U-Boot does not pickup $CC from our environment (which
is including the --sysroot option). Without this
   option -print-libgcc-file-name resolve to a simple file name without a
path. And thus dirname resolve it further to "."
   So the fix is to do: make LDFLAGS="" CC="$CC"
   This passes the ${CC} environment variable to the Makefile which in turns
resolve the PLATFORM_LIBGCC correctly

   As read here:
https://lists.yoctoproject.org/pipermail/yocto/2013-October/016385.html

***********************************************************************
Flashed an SD card with u-boot
***********************************************************************
1) Downloaded Mfgtools-Rel-4.1.0_130816_MX6DL_UPDATER.gz from Freescale onto
a Windows machine
   Also called IMX_6DL_6S_MFG_TOOL: Tool and documentation for downloading
OS images to the i.MX 6DualLite and i.MX6Solo. 
   Size (K): 73917 Format: gz Rev #: L3.0.35_4.1.0 Modified: 9/5/2013
 
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=RDIMX6SABREPL
AT&fpsp=1&tab=Design_Tools_Tab
2) Uncompressed it
3) Modified {INSTALL_FOLDER}\cfg.ini so it looks like this:
   [profiles]
   chip = MX6DL Linux Update

   [platform]
   board = SabreSD

   [LIST]
   name = AXION-i.MX6DL-SABRESD-SD
4) Modified {INSTALL_FOLDER}\Profiles\MX6DL Linux Update\OS
Firmware\ucl2.xml to add this list entry:
   <LIST name="AXION-i.MX6DL-SABRESD-SD" desc="Choose SD as media">  
        <CMD state="BootStrap" type="boot" body="BootStrap" file
="u-boot-mx6dl-sabresd.bin" >Loading U-boot</CMD>
        <CMD state="BootStrap" type="load" file="uImage"
address="0x10800000" loadSection="OTH" setSection="OTH"
HasFlashHeader="FALSE" >Loading Kernel.</CMD>
        <CMD state="BootStrap" type="load" file="initramfs.cpio.gz.uboot"
address="0x10C00000" loadSection="OTH" setSection="OTH"
HasFlashHeader="FALSE" >Loading Initramfs.</CMD>
        <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>

        <CMD state="Updater" type="push" body="send"
file="mksdcard.sh.tar">Sending partition shell</CMD>
        <CMD state="Updater" type="push" body="$ tar xf $FILE ">
Partitioning...</CMD>
        <CMD state="Updater" type="push" body="$ sh mksdcard.sh
/dev/mmcblk1"> Partitioning...</CMD>
        <CMD state="Updater" type="push" body="send"
file="axion/u-boot.bin">Sending u-boot.bin</CMD>
        <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk1
bs=1k seek=1 skip=1 conv=fsync">write u-boot.bin to sd card</CMD>
        <CMD state="Updater" type="push" body="send"
file="files/uImage">Sending kernel uImage</CMD>
        <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk1
bs=1M seek=1 conv=fsync">write kernel image to sd card</CMD>
        <CMD state="Updater" type="push" body="$ mkfs.ext3 -j
/dev/mmcblk1p1">Formatting rootfs partition</CMD>
        <CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblk1p1"/> 
        <CMD state="Updater" type="push" body="$ mount -t ext3
/dev/mmcblk1p1 /mnt/mmcblk1p1"/>
        <CMD state="Updater" type="push" body="pipe tar -jxv -C
/mnt/mmcblk1p1" file="files/rootfs.tar.bz2">Sending and writing rootfs</CMD>
        <CMD state="Updater" type="push" body="frf">Finishing rootfs
write</CMD>
        <CMD state="Updater" type="push" body="$ umount
/mnt/mmcblk1p1">Unmounting rootfs partition</CMD>
        <CMD state="Updater" type="push" body="$ echo Update
Complete!">Done</CMD>
   </LIST>
5) Created a directory under {INSTALL_FOLDER}\Profiles\MX6DL Linux Update\OS
Firmware\ named "axion"
6) Copied u-boot.bin from Linux box ~/axion-dev/u-boot-fslc to Windows box
{INSTALL_FOLDER}\Profiles\MX6DL Linux Update\OS Firmware\axion
7) Connected eval board to the Windows box using USB cable (on USB OTG
connector)
8) Set all DIP switches on the eval board to OFF (SW6)
9) Powered the board
10)Ran MfgTool2.exe and hit Start
11)Once done, unpowered the board
12)Flip SW6 to '01000010'
13)Connected eval board to the Windows box using USB cable (USB TO UART
connector)
14)Launched a terminal (I used PuTTY) on the virtual com port created
(115200 N81)
15)Powered the board

I would expect u-boot to come up here and it doesn't.  I don't have anything
output on the serial port.  I have tried with supplied i.MX6DL-SABRESD-SD
profile in IMX_6DL_6S_MFG_TOOL and it works fine, I get the expected u-boot
printouts.

What am I doing wrong ?

Guillaume Fournier
Hardware Designer
Brioconcept Consulting Inc.



             reply	other threads:[~2014-11-04 23:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04 22:44 Guillaume Fournier [this message]
2014-11-05  0:03 ` Unable to get u-boot running on i.MX6 SABRE for Smart Devices Eval Board Fabio Estevam
2014-11-05 14:38   ` Guillaume Fournier
2014-11-05 14:52     ` Wally Yeh
2014-11-05 15:24       ` Guillaume Fournier
2014-11-05 14:56     ` Daiane Angolini
2014-11-05 15:37       ` Guillaume Fournier
2014-11-05 15:45         ` Otavio Salvador
2014-11-05 16:05           ` Guillaume Fournier
2014-11-05 15:42     ` Otavio Salvador
2014-11-05 15:50       ` Guillaume Fournier
2014-11-05 15:54         ` Otavio Salvador
2014-11-05 15:59           ` Wally Yeh
2014-11-05 16:15           ` Guillaume Fournier
2014-11-05 16:21             ` Gary Thomas
2014-11-05 16:40               ` Otavio Salvador
2014-11-05 16:41               ` Guillaume Fournier
2014-11-05  0:23 ` Eric Bénard
2014-11-05 14:51   ` Guillaume Fournier
2014-11-05 17:25     ` Eric Bénard
  -- strict thread matches above, loose matches on Subject: below --
2014-11-05 20:43 Guillaume Fournier
2014-11-05 21:04 ` Otavio Salvador
2014-11-05 21:50   ` Guillaume Fournier
2014-11-06 17:31 Guillaume Fournier
2014-11-06 17:47 ` Otavio Salvador
2014-11-06 17:53   ` Gary Thomas
2014-11-06 17:56     ` Otavio Salvador

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000a01cff880$d8b22690$8a1673b0$@brioconcept.com' \
    --to=gfournier@brioconcept.com \
    --cc=meta-freescale@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.