Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

Linux/PROCESSOR-SDK-AM335X: eMMC formatting fails

$
0
0

Part Number:PROCESSOR-SDK-AM335X

Tool/software: Linux

Hi Ti Team,

I use the SDK pre-image put in SD card and  boot on into share the environment  

Now I want to boot my system from eMMC.  I made two partitions (mmcblk1p1 and mmcblk1p2). as per below guidelines:

  1. The eMMC is /dev/mmcblk1. Format it this way:
    1.01. fdisk /dev/mmcblk1
    1.02. o - this clears the existing partitions
    1.03. p - this lists all partition tables on the card (there should be none)
    1.04. n - create a new partition
    1.05. p - primary partition
    1.06. 1 - partition number
    1.07. 2048 - default value for the first sector
    1.08. +16M - last sector / partition size
    1.09. t - change the partition type (select partition 1)
    1.10. e - change tha partition type to "W95 FAT16 (LBA)"
    1.11. a - set the bootable flag for the selected partition (select partition 1)
    1.12. n - create a new partition
    1.13. p - primary partition
    1.14. 2 - partition number
    1.15. hit Enter to choose the default (next available) value for the first sector
    1.16. hit Enter to choose the default (last) value for the last sector
    1.17. p - this lists all partition tables on the card (there should be two)
    1.18. w - write all the above changes to disk
    1.19. umount /dev/mmcblk1p1 - if mounted
    1.20. mkfs.vfat -F 16 /dev/mmcblk1p1 - format the first partition
    1.21. umount /dev/mmcblk1p2 - if mounted
    1.22. mkfs.ext4 /dev/mmcblk1p2 - format the second partition 

But I executed the error to step 1.18. and step 1.19 

The following is the record of my implementation process :

===============================================================================================

_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|

Arago Project http://arago-project.org am335x-evm ttyS0

Arago 2017.12 am335x-evm ttyS0

am335x-evm login: root

root@am335x-evm:~# fdisk /dev/mmcblk1

Welcome to fdisk (util-linux 2.28.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): o
Created a new DOS disklabel with disk identifier 0x9a61e951.

Command (m for help): p
Disk /dev/mmcblk1: 14.7 GiB, 15762194432 bytes, 30785536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9a61e951

Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): 1
Value out of range.
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-30785535, default 2048): 2048
Last sector, +sectors or +size{K,M,G,T,P} (2048-30785535, default 30785535): +16M

Created a new partition 1 of type 'Linux' and of size 16 MiB.

Command (m for help): t
Selected partition 1
Partition type (type L to list all types): e
Changed type of partition 'Linux' to 'W95 FAT16 (LBA)'.

Command (m for help): a
Selected partition 1
The bootable flag on partition 1 is enabled now.

Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (34816-30785535, default 34816):
Last sector, +sectors or +size{K,M,G,T,P} (34816-30785535, default 30785535):

Created a new partition 2 of type 'Linux' and of size 14.7 GiB.

Command (m for help): p
Disk /dev/mmcblk1: 14.7 GiB, 15762194432 bytes, 30785536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9a61e951

Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 * 2048 34815 32768 16M e W95 FAT16 (LBA)
/dev/mmcblk1p2 34816 30785535 30750720 14.7G 83 Linux

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy


root@am335x-evm:~# umount /dev/mmcblk1
mmcblk1 mmcblk1boot0 mmcblk1boot1 mmcblk1rpmb
root@am335x-evm:~# umount /dev/mmcblk1p1 -if mounted
umount: /dev/mmcblk1p1: mountpoint not found
umount: mounted: mountpoint not found

How do I solve this problem?

Regards,

Egbert Liu


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>