Booting both u-boot and Linux from SD P2041RDB

cancel
Showing results for 
Search instead for 
Did you mean: 

Booting both u-boot and Linux from SD P2041RDB

Jump to solution
1,658 Views
Contributor I

Hello,

I previously made a thread here: Boot P2041RDB-PB from SD Card? and got my question answered about how to boot u-boot from an SD card on the Freescale P2041RDB board. Now I am trying to load Linux onto the same SD card, and boot everything from it, so that it is easier to distribute a complete working image to our customers. I noticed this page, Booting to Linux from an SD Card/MMC for P2040/P2041 , but it only shows how to boot Linux with JUST Linux, no u-boot on the SD card. What is the process to load the kernel, rootfs, and fdt from the SD card?

If you need anymore information please ask and I'll be happy to provide it.

Thank you so much for your help,

Connor

Labels (1)
0 Kudos
1 Solution
17 Views
NXP TechSupport
NXP TechSupport

Please refer to the following procedure

1. Connect the card reader with SD card to the Linux Host PC.

2. Create the partitions by "fdisk /dev/sdb", one MS-DOS partition(sdb1 and this partition usually for u-boot) and one ext2 partition(sdb2) in the SD card.

  #fdisk /dev/sdb

3. Use the mkfs.ext2 command to create the filesystems.

  # mkfs.vfat /dev/sdb1

  # mkfs.ext2 /dev/sdb2

4. Write u-boot.bin to SD with the method you mentioned.

5. Copy the file system to SD card by extracing the QorIQ_SDK_V1.5_E500MC_20131219_ROOTFS_Image.tar.gz ,Remove the tarball after extracting rootfs.

  # cp QorIQ_SDK_V1.5_E500MC_20131219_ROOTFS_Image.tar.gz  .

  # tar -zxvf QorIQ_SDK_V1.5_E500MC_20131219_ROOTFS_Image.tar.gz

  # rm QorIQ_SDK_V1.5_E500MC_20131219_ROOTFS_Image.tar.gz

  Note:You could find this image in the ISO QorIQ-SDK-V1.5-PPCE500MC-IMAGE-20131219-yocto.iso

6. Plug in the SD card to the target board and power on.

7. Set the environment in uboot for SD boot.

  # setenv bootfile uImage

  # setenv fdtfile uImage.dtb

  # setenv bootcmd 'setenv bootargs root=/dev/mmcblk0p2 rw rootdelay=5 console=$consoledev,$baudrate;mmcinfo;ext2load mmc 0:2 $loadaddr  /boot/$bootfile;ext2load mmc 0:2 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr'

  # boot

Note: uImage and dtb have already built into the above rootfs filesystem /boot folder.


Have a great day,
Yiping Wang

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

View solution in original post

0 Kudos
2 Replies
18 Views
NXP TechSupport
NXP TechSupport

Please refer to the following procedure

1. Connect the card reader with SD card to the Linux Host PC.

2. Create the partitions by "fdisk /dev/sdb", one MS-DOS partition(sdb1 and this partition usually for u-boot) and one ext2 partition(sdb2) in the SD card.

  #fdisk /dev/sdb

3. Use the mkfs.ext2 command to create the filesystems.

  # mkfs.vfat /dev/sdb1

  # mkfs.ext2 /dev/sdb2

4. Write u-boot.bin to SD with the method you mentioned.

5. Copy the file system to SD card by extracing the QorIQ_SDK_V1.5_E500MC_20131219_ROOTFS_Image.tar.gz ,Remove the tarball after extracting rootfs.

  # cp QorIQ_SDK_V1.5_E500MC_20131219_ROOTFS_Image.tar.gz  .

  # tar -zxvf QorIQ_SDK_V1.5_E500MC_20131219_ROOTFS_Image.tar.gz

  # rm QorIQ_SDK_V1.5_E500MC_20131219_ROOTFS_Image.tar.gz

  Note:You could find this image in the ISO QorIQ-SDK-V1.5-PPCE500MC-IMAGE-20131219-yocto.iso

6. Plug in the SD card to the target board and power on.

7. Set the environment in uboot for SD boot.

  # setenv bootfile uImage

  # setenv fdtfile uImage.dtb

  # setenv bootcmd 'setenv bootargs root=/dev/mmcblk0p2 rw rootdelay=5 console=$consoledev,$baudrate;mmcinfo;ext2load mmc 0:2 $loadaddr  /boot/$bootfile;ext2load mmc 0:2 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr'

  # boot

Note: uImage and dtb have already built into the above rootfs filesystem /boot folder.


Have a great day,
Yiping Wang

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

View solution in original post

0 Kudos
17 Views
Contributor I

That works flawlessly, thank you so much!

0 Kudos