Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Copy u-boot-nodtb.bin spl/u-boot-spl.bin arch/arm/dts/imx8mqimx8mp-smarc.dtb to imx-mkimage/iMX8M directory and copy tools/mkimage to imx-mkimage/iMX8M/mkimage_uboot

...

Info
iconfalse
$ sync
$ sudo umount /media/boot
$ sudo umount /media/rootfs

Sample Examples Demo

 

Setup eMMC

 

...

 

Setting up eMMC usually is the last step at development stage after the development work is done at your SD card or NFS environments. From software point of view, eMMC is nothing but a non-removable SD card on board. For SMARC-iMX8MiMX8MP, the SD card is always emulated as /dev/mmcblk1 and on-module eMMC is always emulated as /dev/mmcblk0mmcblk2. Setting up eMMC now is nothing but changing the device descriptor. 

This section gives a step-by-step procedure to setup eMMC flash. Users can write a shell script your own at production to simplify the steps.

 

First, we need to backup the final firmware from your SD card or NFS.

 

Prepare for eMMC binaries from SD card (or NFS):

...

Note
titleNote
  1. If your rootfs is Ubuntu 1618.04, copy to /media/rootfs/home/ubuntu instead of /media/rootfs/home/root

...

Info
iconfalse

optargs="video=HDMI-A-1:1920x1080-32@60 consoleblank=0"
#optargs="video=HDMI-A-1:3840x2160-32@30 consoleblank=0"
#optargs="video=HDMI-A-1:3840x2160-32@60 consoleblank=0"
#console port SER3
console=ttymxc0ttymxc1,115200 earlycon=ec_imx6q,0x308600000x30890000,115200
#console port SER2
#console=ttymxc1ttymxc2,115200 earlycon=ec_imx6q,0x308900000x30880000,115200
#console port SER1
#console=ttymxc2ttymxc3,115200 earlycon=ec_imx6q,0x308800000x30a60000,115200
#console port SER0
#console=ttymxc3ttymxc0,115200 earlycon=ec_imx6q,0x30A600000x30860000,115200
mmcdev=02
mmcpart=1
image=Image
loadaddr=0x40480000
fdt_addr=0x43000000
mmcroot=/dev/mmcblk0p2 mmcblk2p2 rw
usbroot=/dev/sda2 rw
mmcrootfstype=ext4 rootwait fixrtc
netdev=eth0
ethact=FEC0
ipaddr=192.168.1.150
serverip=192.168.1.53
gatewayip=192.168.1.254
mmcargs=setenv bootargs cma=1280M console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs}
uenvcmd=run loadimage; run loadfdt; run mmcboot
# USB Boot
#usbargs=setenv bootargs console=${console} root=${usbroot} rootfstype=${mmcrootfstype} ${optargs}
#uenvcmd=run loadusbimage; run loadusbfdt; run usbboot

...

Info
iconfalse

$ sudo cp -v /media/boot/dtbs/imx8mqimx8mp-smarc.dtb /media/rootfs/home/root/imx8mqimx8mp-smarc.dtb

Copy real rootfs to rootfs partition:

...

Info
iconfalse

$ pushd /media/rootfs

$ sudo tar cvfz ~/smarcimx8mqsmarcimx8mp-emmc-rootfs.tar.gz .

$ sudo mv ~/smarcimx8mqsmarcimx8mp-emmc-rootfs.tar.gz /media/rootfs/home/root

$ popd

...

Info
iconfalse

$ sudo vim /media/rootfs/etc/udev/rules.d/70-persistent-net.rules

Delete all contents starting with "SUBSYSTEM=="

$ pushd /media/rootfs

$ sudo tar cvfz ~/smarcimx8mqsmarcimx8mp-emmc-rootfs.tar.gz .

$ sudo mv ~/smarcimx8mqsmarcimx8mp-emmc-rootfs.tar.gz /media/rootfs/home/ubuntu

$ popd

...

Now it will be almost the same as you did when setup your SD card, but the eMMC device descriptor is /dev/mmcblk0mmcblk2 now.

Info
iconfalse

$ export DISK=/dev/mmcblk0mmcblk2

Erase eMMC:

Info
iconfalse

$ sudo dd if=/dev/zero of=${DISK} bs=2M count=16

...

Info
iconfalse

$ sudo mkdir -p /media/boot/dtbs

$ sudo cp -v imx8mqimx8mp-smarc.dtb /media/boot/dtbs/

Setup eMMC

...

Info
iconfalse

$ sudo tar -zxvf smarcimx8mqsmarcimx8mp-emmc-rootfs.tar.gz -C /media/rootfs

...

Unmount eMMC:

Info
iconfalse
$ sync
$ sudo umount /media/boot
$ sudo umount /media/rootfs

 

Switch your Boot Select to eMMC and you will be able to boot up from eMMC now.


version 1.0a, 910/1325/20202021

Last updated 20202021-910-1325