mmcblk0p1 = is your "W95 FAT32 (LBA)" bootpatition with vfat Filesystem.
it contain the bootloader, firmware, kernel and config.
mmcblk0p2 = is your "Linux" System Partitions (most choice ext4).
it contein your rootfs
a better choice is to install openwrt manuell:
(I assume you use Linux on your PC, and the sd-card is in a adapter so the resulting device is /dev/sdb)
0.) Carry yourself with the special features of flash memory Familiar.
(sorry i self have this not really understand)
After parting, use this command:
parted /dev/sdb align-check opt
1
2
..
the result should be: (aligned)
1.) Format your SD-Card
be sure that the device what are you formating is the sdcard
use:
fdisk -c -u /dev/sdb
(delete all partions with 'd')
n (make a new partion)
1 (partion 1)
p (primary)
(accept the default value normally 2048)
+64M (it mean +64MB to the start value / choice a value beetween 32-64MB divisible by 4MB)
t (choice filesystem)
1 (on partition 1)
c (W95 FAT32 (LBA))
a (add bootflag (no idea if i reale need this))
1
n
2
p
(accept the default value)
(accept the default value (or enter +[YourValue]M valueshould divisible by 4MB))
w (write all your choices to /dev/sdb (be sure your sdcard is /dev/sdb))
and at the end:
end make a align check see 0.
2.) make the FS
mkfs.vfat /dev/sdb1
mkfs.ext4 -b 4096 -E stride=2,stripe-width=512 /dev/sdb2
(mkfs.ext4 /dev/sdb2 work too, but with parameter should be better for flash memory)
partprobe
and mount your partitions
3.) mount the Image and copy the data
download the openwrt-15.05-brcm2708-bcm2709-sdcard-vfat-ext4.img image
fdisk -l openwrt-15.05-brcm2708-bcm2709-sdcard-vfat-ext4.img
remember the start values (8192 for p1 / 57344 for p2)
and run:
mkdir -p /mnt/owrtimg/p1
mount -t vfat -o loop,offset=$(($8192 * 512)) openwrt-15.05-brcm2708-bcm2709-sdcard-vfat-ext4.img /mnt/owrtimg/p1
mkdir -p /mnt/owrtimg/p2
mount -t ext4 -o loop,offset=$(($57344 * 512)) openwrt-15.05-brcm2708-bcm2709-sdcard-vfat-ext4.img /mnt/owrtimg/p2
copy the data from /mnt/owrtimg/p1 to your first partition on sdcard
copy the data from /mnt/owrtimg/p2 to your second partition on sdcard.
Better them as the original image is your own hardfloat builded image.
see this thread