We are currently trying to get an LS1021ATWR development board to boot from an SD Card, but we are having a difficult time trying to figure out what is needed / how to build what is needed in order to do so.
We are currently trying to build our SD Deployment with SDK v1.7, Linux 3.12 and U-Boot 2014.07.
The first thing I think we need help with is building the proper PBL. We've seen the documentation here: http://www.freescale.com/infocenter/index.jsp?topic=%2FQORIQSDK%2F1323833.html but the CPUs listed aren't necessarily the same as the LS1021ATWR. Regardless we've tried to follow along as best we can.
Is "a known good RCW" one of the .bin files found in the /rcw directory under build<machine>release/deploy/images? We've been using the rcw_1000_sdboot.bin and importing that into an LS1021A QorIQ Configuration project, but when we import rcw_1000_sdboot.bin there are several fields that contain errors. The following fields are blank and result in an error:
-IFC_MODE under Boot Configuration
-DP_DIV under Clocking Configuration
-OCN_DIV under Clocking Configuration
-IFC_GRP_E1_EXT under Group B Pin Configuration under Pin Multiplexing Configuration
And in the documentation linked to above, there is a field called BOOT_LOC under Boot Configuration, which doesn't seem to exist in the properties of our configuration project.
There are probably many more questions to come, but this is where we are currently stuck.
Patrick
Solved! Go to Solution.
Hi Sinan
After finally hitting our head against a wall for so long, we changed the jumper settings of J19 and J20 back to shorting 2:3 and that seems to give us a u-boot prompt! Oh happy day. Now we can start crying about the next hurdle. Thank you so much for your help, both you and Adrian. I'm pretty sure we would've been much more lost without you
Patrick
Go to QorIQ-SDK-V1.7-20141218-yocto\meta-fsl-arm\conf\machine\ls1021atwr.conf and set UBOOT_CONFIG ??= "sdcard". After bitbake u-boot you can find the complete sd_uboot_image in \QorIQ-SDK-V1.7-20141218-yocto\build_ls1021atwr_release\tmp\work\ls1021atwr-fsl-linux-gnueabi\u-boot-ls1\2014.07-r0\git\.
The uboot image should be written on a sd card using:
Linux command:
sudo dd if=u-boot-with-spl-pbl.bin of=/dev/mmcblk0 bs=512 seek=8 conv=notrunc oflag=sync
or
Uboot command:
tftp 0x1000000 <sd_uboot_image>.bin
mmc write 0x1000000 8 0x400
Adrian
Hi Adrian,
Thanks so much for the response, and that seems to be giving us better results, in that the u-boot file created does appear to have the RCW and whatnot preppended to it (although the name of the file in the ...\u-boot-ls1\2014.07-r0\git\ directory is just called "u-boot.bin", is that an issue?).
Unfortunately, when we copy the u-boot file over to the SD card and start up the LS1021A development board, we still do not see any u-boot prompts that would allow us to set environment variables and other arguments. It's just a blank screen being output to the serial port.
Are there other configurations that we need to set that may change the RCW that ends up being placed at the beginning of the u-boot.bin file?
Patrick
Hi Patrick
Adrian will probably get you the most accurate respond but
I wonder if you set your switches correctly to boot from
SD card. You might want to verify if you have S2.1
set to OFF and S2.3 set to ON.
Hope this helps.
Sinan Akman
Hi Sinan,
I just double checked, and the switches are set correctly. We're able to run the OOBE example from the thumb drive and that boots from the sd card just fine. Our troubles seem to stem from when we try to build PBLs and Kernels and Root FS's and whatnot.
Upon further inspection of the RCWs, both the one we are capable of building and the one we received from you, it appears that support for the LPUART is turned off. When looking at the RCW that comes from clonezilla and the out of box example, it appears that the LPUART is turned on. And that seems to be the only difference, at least within the RCW data. Is there a way for us to turn on the LPUART support within the RCW somehow from the configuration files?
Patrick
You can build the rcw using Yocto with bitbake rcw, then go to QorIQ-SDK-V1.7-20141218-yocto\build_ls1021atwr_release\tmp\work\ls1021atwr-fsl-linux-gnueabi\rcw\git-r0\deploy-rcw\rcw\ls1021atwr\.
Adrian
Since the only options within the ls1021atwr.conf file are nor, sdcard or lpuart, does that mean that it is not possible for us to create an RCW using yocto that contains the same support as that from the out of box example?
And when the u-boot file is generated, where does it pull the RCW information from? Is it from those files that are built when we run bitbake RCW? Or is it from another location, and can we modify the values of that RCW before it is assembled into the u-boot file?
Patrick
Hi Patrick,
To customize the RCW which is used when u-boot for sdcard is built, go to the folder build_ls1021atwr_release/tmp/work/ls1021atwr-fsl-linux-gnueabi/u-boot-ls1/2013.10-r0/git and modify the file board/freescale/ls1021atwr/ls102xa_rcw_sd.cfg.
After that rebuild u-boot:
$ bitbake -c compile -f u-boot
Adrian
Hi Adrian!
We eventually did find that file and we were able to modify the RCW to resemble that of the out of box example. Unfortunately, when we build that image, it still does not behave in the same way that the out of box example does, in that it does not print out any u-boot prompts for editing and storing environment variables via the serial port connected to the K20 microcontroller.
Are there other u-boot settings and files somewhere that we might be missing?
Patrick
I guess our main question pertains to what information we need to put in some of the configuration files. Some of the documentation that we've read has stated that we need change the UBOOT_MACHINES variable in the associated config file to the machine we are trying to build this u-boot for. But we can't seem to figure out what are valid values for that variable. Somewhere on the internet, possibly within this community board, was talk that the values may need to be "LS1021ATWR LS1021ATWR_SDCARD", which we've tried with no success.
Do you have any config files that you may be able to give us that have these variables set up so we can get an idea of how things are supposed to look before we kick off the u-boot compile procedure?
Patrick
For Yocto build the config file for LS1021ATWR is QorIQ-SDK-V1.7-20141218-yocto\meta-fsl-arm\conf\machine\ls1021atwr.conf. The variable is UBOOT_CONFIG and can have 3 values: nor, sdcard or lpuart.
If you want to build u-boot and not use Yocto you can go to QorIQ-SDK-V1.7-20141218-yocto\build_ls1021atwr_release\tmp\work\ls1021atwr-fsl-linux-gnueabi\u-boot-ls1\2014.07-r0\git\ and use the steps below:
make ARCH=arm CROSS_COMPILE=<path_to_gcc_toolchain> distclean
make ARCH=arm CROSS_COMPILE=<path_to_gcc_toolchain> ls1021atwr_sdcard_config
make ARCH=arm CROSS_COMPILE=<path_to_gcc_toolchain>
Or if you take the u-boot from mainline, you should use the steps provided by sinanakman
Adrian
Hi Adrian
So we finally got around to attempting to build the u-boot without bitbake and Yocto and what-have-you, using the methods form you and Sinan, and the resulting file was the same (except for various timestamps) as the u-boot files that we generate using bitbake and Yocto.
Are there any other configuration files anywhere that we might have glanced over that might give us a similar u-boot image as that found from the out of box example? Or should we just resort to using that u-boot image from the out of box example in order to debug our kernel builds?
Patrick
Hi Patrick
Sorry to interrupt your discussion here with Adrian but when you
mention "similar u-boot image as that found from the out of box example"
what features you are referring to ? I don't know that out of box
image but I can take a look at the mainline u-boot and
see how you can get the features you are interested in.
The top of the tree mainline u-boot (v2015.01-rc2) should
have a fairly good support. In your previous message above
you are mentioning that "it does not print out any u-boot prompts [...]
via the serial port connected to the K20 microcontroller."
If you are referring to the (default) usb-serial port, I have
no problem of seeing the u-boot messages coming out
of this port.
If you prefer, please let me know what features you
are expecting from the mainline u-boot and I'll try to
test them out for you while Adrian is helping you with
an SDK based solution.
Regards
Sinan Akman
Hi Sinan
After finally hitting our head against a wall for so long, we changed the jumper settings of J19 and J20 back to shorting 2:3 and that seems to give us a u-boot prompt! Oh happy day. Now we can start crying about the next hurdle. Thank you so much for your help, both you and Adrian. I'm pretty sure we would've been much more lost without you
Patrick
Hi Patrick
Glad to know you resolved the issue. Yes you would need that jumper if
you need to utilize the serial lines over the tower connectors. There is
also mainline support for this. As for your future work please let me know
if you need help with you new issues. We are working on couple new LS102x
based designs so the chances are we will have come over some of those
as well. Wish you fun and best of success with your LS102x based design projects.
Regards
Sinan Akman
Hi Sinan,
No need to apologize, we'll take help wherever we can get it!
I guess what we're calling the "out of the box example" is what is provided on the thumb drive that is included within the development board. The thumb drive contains within it an iso to create a "clonezilla" cd which will write a demo PBL (that contains an RCW, PBIs and a U-Boot image) to an SD card. Some of the functionality of that demo PBL includes being able to communicate over the default usb serial port. Through the serial port support of the demo PBL we can modify and save environment variables, load files on the SD card to RAM offsets, pretty much all functionality that should be supported by u-boot.
When we try to build an entire u-boot image (containing RCW, PBIs and U-Boot image) to program to an SD card ourselves, whether it's with Yocto or toolchains, we seem to lose the support to communicate with the u-boot image over the usb serial port. Right now we're just really looking for a solution that will let us communicate with a u-boot image, that has been loaded from an SD card, over the usb serial port.
The out of the box example has us changing the jumpers at J19 and J20 from shorting 2-3 (UART) to shorting 1-2 (LPUART) for it to output to the usb serial port properly, if that points out any other places we may be experiencing missteps
Patrick
Hi Adrian,
Sorry for the slow response, but our company had the holiday off yesterday. But we're back and ready to get this issue figured out.
Using the u-boot file that you've provided, we still can't seem to get our LS1021ATWR development board to boot up properly. Using a hex editor, we were able to see that the file you provided and the one that we are currently capable of building using SDK 1.7 are the same size and, except for some time stamp information, and by performing a byte-wise compare of the 2 files, they appear to contain the same data.
We were able to extract the u-boot section of the working out of box example that is provided with the freescale thumbdrive and place that on the desired sd card, and that appears to u-boot properly and outputs information to the LPUART and lets us configure environment variables over a terminal. Are there some LPUART configuration variables somewhere that we might be missing? Like in menuconfig, or any other config files?
Speaking of, are there any files that we might be able to to provide that might, more easily, point out which things we are currently missing?
Patrick
Hi Patrick
Thanks for the update. Until you get your response from Adrian
for SDK, perhaps you can just give a try to mainline u-boot. As
mentioned I am able to build and boot fine on my LS1021ATWR
board.
Regards
Sinan Akman
Hi Patrick
I don't use SDK and I only use mainline u-boot so
it may not be exactly what you are asking but here
are the steps I follow with mainline u-boot :
- compile for SD card config, e.g. :
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- distclean
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- ls1021atwr_sdcard_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- all
this produces : u-boot-with-spl-pbl.bin
- copy to SD card, e.g. :
sudo dd if=u-boot-with-spl-pbl.bin of=/dev/sdb bs=512 seek=8
Hope this helps
Sinan Akman