Hi Experts,
I have created a single user partition for rootfs and i am able to boot from that partitions.Now i need to create another partition for different root file systems.
I have followed these steps for creating the emmc partition
3.7.3.2. Flash Kernel, Device Tree and Root Filesystem to eMMC
While U-Boot is programmed to the eMMC boot0 partition, the Linux kernel, device tree, and root filesystem need to be written to the eMMC user partition. First, an ext4 partition needs to be created in the user partition. This can be done with the fdisk
command:
# fdisk /dev/mmcblk0
Use the following options for this interactive command to delete existing partitions and create a new one:
Enter “p” to display current partitions
Enter “n” to create a new partition (or enter “d” first to delete existing partitions)
Use default for all subsequent options
Enter “w” to write the partition table to disk and exit
After a new partition is created, ls /dev/mmcblk*
should show the new partition in eMMC. For example, if eMMC is mmcblk0, the newly created partition would be mmcblk0p1
:
# ls -l /dev/mmcblk0*
brw-rw---- 1 root disk 179, 32 Nov 16 02:02 /dev/mmcblk0
brw-rw---- 1 root disk 179, 64 Nov 16 02:01 /dev/mmcblk0boot0
brw-rw---- 1 root disk 179, 96 Nov 16 01:44 /dev/mmcblk0boot1
brw-rw---- 1 root disk 179, 33 Nov 16 02:02 /dev/mmcblk0p1
crw------- 1 root root 237, 0 Nov 16 01:44 /dev/mmcblk0rpmb
An ext4 filesystem needs to be created in the new partition:
# mkfs.ext4 /dev/mmcblk0p1
Now that an ext4 partition is created, the Linux kernel, device tree, and root filesystem can be written to this partition. Copy the Linux image from the host to the EVM. For example, the default image for AM64x:
-
tisdk-default-image-am64xx-evm.tar.xz
Please refer to Root Filesystem regarding Linux images from the Processor SDK.
Untar this image to the newly created eMMC partition. Below is an example on how this can be done, assuming the Linux image has been copied to /home/root
folder on the EVM.
# mkdir -p /mnt/temp
# mount -t ext4 /dev/mmcblk0p1 /mnt/temp
# cd /mnt/temp
# tar xf <Linux image file copied from the host>
# cd ..
# umount temp
3.7.3.3. Change Boot Mode and U-Boot Env
Now that the complete Linux system has been installed to the eMMC, the final step is to set the EVM boot mode and change the U-Boot environment so that Linux will boot from eMMC.
Reboot the EVM and stop the autoboot to go to U-Boot prompt. Issue the following commands to give ROM access to the eMMC boot partition (this only needs to be done once):
=> mmc partconf 0 1 1 1
=> mmc bootbus 0 2 0 0
Next switch to eMMC boot mode. Please refer to EVM Boot Mode Switches for how to set the EVM bootmode switches to boot from eMMC.
Power cycle the EVM to boot to U-Boot prompt again, then issue the following commands to change the U-Boot environment variables for eMMC boot:
=> setenv mmcdev 0
=> setenv bootpart 0
=> boot
Now reset or power cycle the EVM, Linux should boot from the eMMC.
i am abe to create the another partition but how to boot kernel and rootfs from that partition,Please suggest some steps
Thanks in advance