Understanding how to partition the eMMC/SD card

Hi

I’ve been following the steps at https://eewiki.net/display/linuxonarm/BeagleBone+Black; Trying build the latest mainline kernel with the minimum Debian filesystem.

I don’t quite understand what is happening in the following steps under “Setup microSD/SD card”

sudo dd if=/dev/zero of=${DISK} bs=1M count=10
sudo dd if=./u-boot/MLO of=${DISK} count=1 seek=1 conv=notrunc bs=128k
sudo dd if=./u-boot/u-boot.img of=${DISK} count=2 seek=1 conv=notrunc bs=384k

Create Partition Layout:
sudo sfdisk --in-order --Linux --unit M ${DISK} <<-EOF
1,0x83,*
EOF

Format Partitions:
for: DISK=/dev/mmcblk0
sudo mkfs.ext4 ${DISK}p1 -L rootfs

I realise the a card is being wiped and then formatted but I’m not sure why.
The default Debian sd card image (and other images I found) Have separate boot partition, however in this example only one partition is created.

Why is this tutorial different?

Is it just a new feature of U-boot?

Also after following the all the steps in the tutorial the the beagelbone black will boot from the SD card but it will hang on the line “net eth0: phy 4a101000.mdio:01 not found on slave 1” for about 30 sec before showing the login prompt but that is probably a question for another thread.

David

Hi

I've been following the steps at
https://eewiki.net/display/linuxonarm/BeagleBone+Black; Trying build the
latest mainline kernel with the minimum Debian filesystem.

I don't quite understand what is happening in the following steps under
"Setup microSD/SD card"

sudo dd if=/dev/zero of=${DISK} bs=1M count=10
sudo dd if=./u-boot/MLO of=${DISK} count=1 seek=1 conv=notrunc bs=128k
sudo dd if=./u-boot/u-boot.img of=${DISK} count=2 seek=1 conv=notrunc
bs=384k

Create Partition Layout:
sudo sfdisk --in-order --Linux --unit M ${DISK} <<-__EOF__
1,0x83,*
__EOF__

Format Partitions:
for: DISK=/dev/mmcblk0
sudo mkfs.ext4 ${DISK}p1 -L rootfs

I realise the a card is being wiped and then formatted but I'm not sure why.
The default Debian sd card image (and other images I found) Have separate
boot partition, however in this example only one partition is created.

Why is this tutorial different?

It's the same setup used on 'newer' snapshots..

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Debian_Image_Testing_Snapshots

Is it just a new feature of U-boot?

it's a feature available to newer ti bootrom's, (omap4 generation + )
which we are utilizing to make it easier for windows users to not
accidentally delete MLO/u-boot.img and soft-bricking there board.

Also after following the all the steps in the tutorial the the beagelbone
black will boot from the SD card but it will hang on the line "net eth0: phy
4a101000.mdio:01 not found on slave 1" for about 30 sec before showing the
login prompt but that is probably a question for another thread.

dhcp is still slow, it takes a few seconds for the eth0 to get an ip address.

Regards,

> Also after following the all the steps in the tutorial the the beagelbone

Thanks that make sense.

Once the image is working is there a way to copy the SD card to the eMMC? The scripts at https://github.com/RobertCNelson/tools/blob/master/scripts don’t seem to work for the single partition image.

Regards
David

I should delete that repo..

use the file under /opt/scripts/

https://github.com/RobertCNelson/boot-scripts/tree/master/tools/eMMC

Regards,