U-Boot runs a command-line interface on a console or a serial port. UEFI binaries like GRUB or the Linux kernel can be booted via the boot manager or from the command-line interface. U-Boot implements a subset of the UEFI specification as defined in the Embedded Base Boot Requirements (EBBR) specification. Regardless of whether the SPL is used, U-Boot performs both first-stage (e.g., configuring memory controllers and SDRAM) and second-stage booting (performing multiple steps to load a modern operating system from a variety of devices that must be configured, presenting a menu for users to interact with and control the boot process, etc.). DRAM initialization using CPU cache as RAM) and load the larger, fully featured version of U-Boot. If there are size constraints, U-Boot may be split into two stages: the platform would load a small SPL (Secondary Program Loader), which is a stripped-down version of U-Boot, and the SPL would do some initial hardware configuration (e.g. onchip ROM of the ARM CPU) from a supported boot device, such as an SD card, SATA drive, NOR flash (e.g. RO_PROTECTION=`cat /sys/block/mmcblk2/force_ro`ĭd if=/tmp/mmcblk2p2/boot/u-boot.imx of=/dev/mmcblk2 bs=512 seek=2 2>įinally we copy the zImage and the dtb into the first partition (boot partition)Ĭp /tmp/mmcblk2p2/boot/zImage /tmp/mmcblk2p1Ĭp -f /tmp/mmcblk2p2/boot/im圆*.U-Boot is both a first-stage and second-stage bootloader. Sfdisk -D -H 255 -S 63 /dev/mmcblk2 /sys/block/mmcblk2/force_roĭd if= of=/dev/mmcblk2 bs=512 seek=2 2> /dev/nullĮcho $RO_PROTECTION > /sys/block/mmcblk2/force_ro We transform this specifications into a sfdisk command: ![]() This setting aligns partitions to start and end on disk cylinder boundaries). (Use Cylinder alignment to maintain compatibility with operating systems released before the year 2000, such as DOS). Begin at the 16065 sector (leaving 8MB free before).Now we use sfdisk to create the partitions. We begin by unmounting and clearing the partition on the eMMC (mmcblk2 in this case) Knowing this we have to create the partitions in a different way, leaving 8MB before the beginning of the first partition. This chips specifies that the u-boot.imx file (MLO+img) has to be at the beginning without format. This tutorial is going to be focus in the i.MX chip boards. This steps has been followed using a Linux Kernel 4.9 and a IGEP SMARC MODULE iMX6įlashing into a eMMC is quite similar to flash a SD card. įlash into eMMC (Tested with iMX6-DualLite) Tar -xf /home/root/flash_files/my_rootfs.tar -C. Mount -t ubifs ubi0:rootfs /tmp/flashroot/ Note: In this case we skip the third partiton /dev/mtd2 that is prepared to include if it is needed a environment uEnv.txt We are using a UBIFS in order to do it:]] In order to flash the rootfs we use the UBIFS ( filesystem for unmanaged flash memory devices) in the last partition /dev/mtd3. Nandwrite -p /dev/mtd1 /home/root/flash_files/u-boot.img Then we will flash into the second partition /dev/mtd1 the u-boot.img: Nandwrite -p -s 0圆0000 /dev/mtd0 /home/root/flash_files/MLO Nandwrite -p -s 0x40000 /dev/mtd0 /home/root/flash_files/MLO Nandwrite -p -s 0x20000 /dev/mtd0 /home/root/flash_files/MLO Nandwrite -p -s 0x0 /dev/mtd0 /home/root/flash_files/MLO For each one of this addresses we have to write: In order to know the exact addresses we can check the documentation of the chip developer (in this case: AM335x U-Boot User's Guide (Texas Documentation) NAND Layout) and will get the offset addresses. It important to know that in this case (because it is a NAND flash and we have to record the MLO) we have to flash it four times in the first 4 blocks of this partition. Now we can flash the MLO in the first partition /dev/mtd0. It is recommendable to test the NAND flash and its partitions: Note: it will be used some special tools collected in the Mtdutils package. This steps has been followed using a Linux Kernel 4.9 and a IGEP SMARC MODULE AM335xįirst, we will start with the case of using a NAND flash as internal storage. tar.bz2 file.įlash into NAND (Tesdted with am335x based procesor)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |