SDcard boot SDK 1.8 LS1021a

cancel
Showing results for 
Search instead for 
Did you mean: 

SDcard boot SDK 1.8 LS1021a

Jump to solution
2,026 Views
jparrish88
Contributor IV

Hello all,

I am having quite a bit of trouble building a uboot, kernel, and rootfs in Yocto (SDK 1.8) and then deploying it onto an SD card and booting it on the LS1021atwr board X2.

I've tried deploying just uboot to the sd card by writing it directly to the card using a dd command:

dd if=u-boot.bin of=/dev/sdb bs=1024 seek=8

I built uboot by changing it's config to sdcard: UBOOT_CONFIG ??= "sdcard"   and then forcing a rebuild.

But for some reason I can't get just my uboot to boot. I've tried a ton of different switch settings and still can't seem to figure it out.

Could someone please detail the steps necessary to deploy a built system(uboot, kernel, and rootfs) to an SD card and boot it on the LS1021atwr?

Labels (1)
Tags (2)
0 Kudos
1 Solution
871 Views
sharper
Contributor III

Hello jparrish88,

I know that we have resolved this issue offline but I thought I might post the findings here in the case that  anyone else might benefit from them.

Switch settings on the LS1021A-TWR board should be:

SW2[1-8]: 00101111

SW3[1-8]: 01100001

J19/J20: 2-3

Attachments:

u-boot_prebuilt.bin is pulled from a similar post on the Freescale Community Forums.

u-boot_SDK_v1.8.bin is one that I built using the v1.8 SDK

(with UBOOT_CONFIG ??= "sdcard" in local.conf)

As we discovered, the issue here is with dd.

The command should be:

sudo dd if=u-boot_prebuilt.bin of=/dev/sdc bs=512 seek=8 && sync

Where if="your SD card u-boot image" and of="the location of your SD card"

For some, the default block size in dd may not be set to 512, so it should be set explicitly.

From the dd man page:

seek=n

    Skip n blocks (using the specified output block size) from the beginning of the output file before copying.

The "Programming a New U-boot and RCW" page in the TWR-LS1021A section on the Technical Information Center shows:

dd if=u-boot-with-spl-pbl-sd.bin of=/dev/sdb bs=1024 seek=8

Programming a New U-boot and RCW

Which seems like it may lead to some confusion perhaps.

Finally, sync should be called to ensure output buffers are flushed to disk before removing the SD card.

View solution in original post

3 Replies
871 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello jparrish88,

Please build SD u-boot image with the following procedure.

1. bitbake u-boot -c cleansstate

2. Edit the variable BOOT_CONFIG ??= "sdcard" in the file meta-fsl-arm/conf/machine/ls1021atwr.conf.

3. Rebuild u-boot with "bitbake u-boot " and get u-boot.bin in build_ls1021atwr_release/tmp/deploy/images/ls1021atwr/.

I attached SD u-boot image which I built in SDK 1.8 and verified on LS1021ATWR X2 board.

Deploy u-boot image to SD card.

In u-boot

=>tftp 82000000 u-boot.bin

=>mmc write 82000000 8 800

Or in Linux

dd if=u-boot-with-spl-pbl-sd.bin of=/dev/sdb bs=512 seek=8

Insert SD card and configure the switch setting Set SW2[1:8]+SW3[1]=0b'0010_0000_0

For Kernel and rootfs deployment, you could refer to the section "3. Deploy Rootfs to boot Kernel and filesystem from SD/MMC" in the document System Boot from SD/MMC Card with SDK 1.6 images.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

871 Views
jparrish88
Contributor IV

Hi Yiping, et.al,

I followed your instructions yet I still receive nothing in the serial buffer. To be sure, I changed the jumper for J20 and J19 to no avail.

Hoping that something might work I also tried these switch settings:

SW2[1:8] = 0b'0010_1111 ; off off on off on on on on

SW3[1:8] = 0b'0110_0001 ; off on on off off off off on

If I switch to: SW2[1:8] = 0b'1000_1111 and SW3[1:8] = 0b'0110_0001 the board boots with NOR without any problems.

Additionally, I tried writing your uboot directly to the sd card, using the above command. Still I cannot boot the board through the either the switch settings above, or the near default switch settings.

0 Kudos
872 Views
sharper
Contributor III

Hello jparrish88,

I know that we have resolved this issue offline but I thought I might post the findings here in the case that  anyone else might benefit from them.

Switch settings on the LS1021A-TWR board should be:

SW2[1-8]: 00101111

SW3[1-8]: 01100001

J19/J20: 2-3

Attachments:

u-boot_prebuilt.bin is pulled from a similar post on the Freescale Community Forums.

u-boot_SDK_v1.8.bin is one that I built using the v1.8 SDK

(with UBOOT_CONFIG ??= "sdcard" in local.conf)

As we discovered, the issue here is with dd.

The command should be:

sudo dd if=u-boot_prebuilt.bin of=/dev/sdc bs=512 seek=8 && sync

Where if="your SD card u-boot image" and of="the location of your SD card"

For some, the default block size in dd may not be set to 512, so it should be set explicitly.

From the dd man page:

seek=n

    Skip n blocks (using the specified output block size) from the beginning of the output file before copying.

The "Programming a New U-boot and RCW" page in the TWR-LS1021A section on the Technical Information Center shows:

dd if=u-boot-with-spl-pbl-sd.bin of=/dev/sdb bs=1024 seek=8

Programming a New U-boot and RCW

Which seems like it may lead to some confusion perhaps.

Finally, sync should be called to ensure output buffers are flushed to disk before removing the SD card.