...
Note |
---|
The target Linux commands listed in this section will only work correctly if Linux is booted from SD card on the target hardware. |
The phyCORE-AM57xx RDK AM57x development kit is delivered with a pre-flashed bootloader and root file system. The following instructions will be useful if you would like to:
...
Make temporary directories to store your work:
Code Block language bash title Host mkdir -p ~/nand/temp cd ~/nand
Place your root file system in the temporary directory created in the previous step:
Code Block language bash title Host tar -xf phytec-tisdk-image-am5728am57xx-phycore-rdkkit.tar.xz -C ~/nand/temp
Create a UBI File System (UBIFS) image from your root file system directory:
Code Block language bash title Host mkfs.ubifs -m 4096 -c 4083 -e 258048 -r ~/nand/temp phytec-tisdk-image-am5728am57xx-phycore-rdkkit.ubifs
Create and save a file named ubi.ini in your current working directory with the following contents:
Code Block language text title Host (ubi.ini) [rootfs] mode=ubi image=phytec-tisdk-image-am5728am57xx-phycore-rdkkit.ubifs vol_id=1 vol_type=dynamic vol_name=rootfs vol_flags=autoresize vol_alignment=1
Create an unsorted block image (UBI) from your UBIFS image:
Code Block language bash title Host ubinize -o phytec-tisdk-image-am5728am57xx-phycore-rdkkit.ubi -p 256KiB -m 4096 -s 1024 ubi.ini
...
Copy the NAND-specific MLO and u-boot.img files to the rootfs partition on the SD card. In order to read from and write to the NAND by default, bootloader images that are compiled with NAND support are needed. The images needed are available in the release binaries and the filenames may vary.
Code Block language bash title Host cp MLO-am572xam5728_phycore_rdk_nand /media/<user>/boot/MLO && sync cp u-boot.img-am572xam5728_phycore_rdk_nand /media/<user>/boot/u-boot.img && sync
Copy the NAND-specific root file system image to a convenient place on the SD card. We recommend using the root user's home directory as you will not need to change directories after logging in to follow the rest of this guide.
Code Block language bash title Host sudo cp phytec-tisdk-image-am5728am57xx-phycore-rdkkit.ubi /media/<user>/rootfs/home/root/ && sync
...
- Set the boot switches to boot from the SD card and power on the board and boot into Linux.
Flash MLO image to NAND:
Code Block language bash title Target flash_erase /dev/mtd0 0 0 nandwrite -p /dev/mtd0 MLO
Flash u-boot.img image to NAND:
Code Block language bash title Target flash_erase /dev/mtd4 0 0 nandwrite -p /dev/mtd4 u-boot.img
Flash the root file system image to NAND:
Code Block language bash title Target flash_erase /dev/mtd6 0 0 ubiformat /dev/mtd6 -f phytec-tisdk-image-am5728am57xx-phycore-rdkkit.ubi
- Power off the board, set the boot switches to boot from NAND, and power the board back on.