I am following the procedure below for flashing the emmc on beagle bone black as shown below, i am using prebuilt binary provided in SDK
1. Prepare a SD card either with the create-sdcard.sh script or:
On the host PC with the SD card inserted:
1.01. sudo fdisc /dev/sdd (or /dev/mmcblk0)
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. +64M - 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 (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. sudo mkfs.vfat -F 16 /dev/mmcblk0p1 (or /dev/sdd1) - format the first partition
1.20. sudo mkfs.ext4 /dev/mmcblk0p2 (or /dev/sdd2) - format the second partition
1.21. copy the {MLO,u-boot.img,uEnv.txt} files to the first partition:
# mkdir boot
# sudo mount /dev/mmcblk0p1 boot
# cp {MLO,u-boot.img,uEnv.txt} boot
# sudo umount boot
1.22. copy the root file system to the second partition:
# mkdir root
# sudo mount /dev/mmcblk0p2 root
# tar -xf tisdk-rootfs-image-am335x-evm.tar.gz -C root
# sudo umount root
2. Run the BBB from the SD card (hold the USR button when powering the board up)
3. ssh into the board:
# ssh root@172.20.0.111
4. The eMMC is /dev/mmcblk1. Format it this way:
4.01. fdisk /dev/mmcblk1
4.02. o - this clears the existing partitions
4.03. p - this lists all partition tables on the card (there should be none)
4.04. n - create a new partition
4.05. p - primary partition
4.06. 1 - partition number
4.07. 2048 - default value for the first sector
4.08. +16M - last sector / partition size
4.09. t - change the partition type (select partition 1)
4.10. e - change tha partition type to "W95 FAT16 (LBA)"
4.11. a - set the bootable flag for the selected partition (1)
4.12. n - create a new partition
4.13. p - primary partition
4.14. 2 - partition number
4.15. hit Enter to choose the default (next available) value for the first sector
4.16. hit Enter to choose the default (last) value for the last sector
4.17. p - this lists all partition tables on the card (there should be two)
4.18. w - write all the above changes to disk
4.19. umount /dev/mmcblk1p1; mkfs.vfat -F 16 /dev/mmcblk1p1 - format the first partition
4.20. umount /dev/mmcblk1p2; mkfs.ext4 /dev/mmcblk1p2 - format the second partition
5. Copy the {MLO,u-boot.img,uEnv.txt} files to the first partition:
# mkdir boot
# mount /dev/mmcblk1p1 boot
# cp {MLO,u-boot.img,uEnv.txt} boot
# umount boot
6. Copy the root file system to the second partition:
# mkdir root
# mount /dev/mmcblk1p2 root
# tar -xf tisdk-rootfs-image-am335x-evm.tar.gz -C root
# umount root
7. Shutdown the BBB, remove the SD card and start it from the eMMC.
----------------------------------------------------------------------------------------------------------------------------------
After this emmc booting is not happening as expected,emmc boots and hangs showing kernel panic!!!
[ 1.574743] ALSA device list:
[ 1.577743] No soundcards found.
[ 1.581600] VFS: PARTUUID= is invalid.
[ 1.581600] Expected PARTUUID=<valid-uuid-id>[/PARTNROFF=%d]
[ 1.591151] Disabling rootwait; root= is invalid.
[ 1.596150] VFS: Cannot open root device "PARTUUID=" or unknown-block(0,0): error -6
[ 1.604072] Please append a correct "root=" boot option; here are the available partitions:
[ 1.612507] 0100 16384 ram0 (driver?)
[ 1.617153] 0101 16384 ram1 (driver?)
[ 1.621828] 0102 16384 ram2 (driver?)
[ 1.626468] 0103 16384 ram3 (driver?)
[ 1.631110] 0104 16384 ram4 (driver?)
[ 1.635765] 0105 16384 ram5 (driver?)
[ 1.640405] 0106 16384 ram6 (driver?)
[ 1.645057] 0107 16384 ram7 (driver?)
[ 1.649698] 0108 16384 ram8 (driver?)
[ 1.654349] 0109 16384 ram9 (driver?)
[ 1.658989] 010a 16384 ram10 (driver?)
[ 1.663729] 010b 16384 ram11 (driver?)
[ 1.668458] 010c 16384 ram12 (driver?)
[ 1.673199] 010d 16384 ram13 (driver?)
[ 1.677928] 010e 16384 ram14 (driver?)
[ 1.682668] 010f 16384 ram15 (driver?)
[ 1.687403] b300 3833856 mmcblk0 driver: mmcblk
[ 1.692756] b301 72261 mmcblk0p1 00000000-01
[ 1.698093] b302 3751177 mmcblk0p2 00000000-02
[ 1.703444] b310 1024 mmcblk0boot1 (driver?)
[ 1.708783] b308 1024 mmcblk0boot0 (driver?)
[ 1.714134] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 1.722434] drm_kms_helper: panic occurred, switching back to text console
[ 1.729362] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
please see the log attached for complete log.
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2016.01.13 16:20:12 =~=~=~=~=~=~=~=~=~=~=~= U-Boot SPL 2015.07-00114-gf5078ef-dirty (Jan 07 2016 - 11:32:53) *** Warning - bad CRC, using default environment reading u-boot.img reading u-boot.img U-Boot 2015.07-00114-gf5078ef-dirty (Jan 07 2016 - 11:32:53 +0530) Watchdog enabled I2C: ready DRAM: 512 MiB MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 *** Warning - bad CRC, using default environment Net: <ethaddr> not set. Validating first E-fuse MAC cpsw, usb_ether Hit any key to stop autoboot: 1 0 Card did not respond to voltage select! Card did not respond to voltage select! switch to partitions #0, OK mmc1(part 0) is current device SD/MMC found on device 1 reading boot.scr ** Unable to read file boot.scr ** reading uEnv.txt 156 bytes read in 4 ms (38.1 KiB/s) Loaded environment from uEnv.txt Importing environment from mmc ... 3232496 bytes read in 328 ms (9.4 MiB/s) Card did not respond to voltage select! ** Bad device mmc 0 ** 32990 bytes read in 67 ms (480.5 KiB/s) Kernel image @ 0x82000000 [ 0x000000 - 0x3152f0 ] ## Flattened Device Tree blob at 88000000 Booting using the fdt blob at 0x88000000 Loading Device Tree to 8fff4000, end 8ffff0dd ... OK Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 4.1.6-g52c4aa7 (gtbldadm@ubuntu-12) (gcc version 4.9.3 20150413 (prerelease) (Linaro GCC 4.9-2015.05) ) #1 PREEMPT Wed Oct 7 14:38:18 EDT 2015 [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] Machine model: TI AM335x BeagleBone Black [ 0.000000] cma: Reserved 24 MiB at 0x9e800000 [ 0.000000] Memory policy: Data cache writeback [ 0.000000] CPU: All CPU(s) started in SVC mode. [ 0.000000] AM335X ES2.1 (sgx neon ) [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129920 [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID= rw rootfstype=ext4 rootwait [ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes) [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0.000000] Memory: 485272K/524288K available (6247K kernel code, 254K rwdata, 2160K rodata, 260K init, 229K bss, 14440K reserved, 24576K cma-reserved, 0K highmem) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB) [ 0.000000] vmalloc : 0xe0800000 - 0xff000000 ( 488 MB) [ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0008000 - 0xc083e05c (8409 kB) [ 0.000000] .init : 0xc083f000 - 0xc0880000 ( 260 kB) [ 0.000000] .data : 0xc0880000 - 0xc08bfb28 ( 255 kB) [ 0.000000] .bss : 0xc08c2000 - 0xc08fb7f8 ( 230 kB) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] Additional per-CPU info printed with stalls. [ 0.000000] NR_IRQS:16 nr_irqs:16 16 [ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz [ 0.000013] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns [ 0.000031] clocksource timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.000040] OMAP clocksource: timer1 at 24000000 Hz [ 0.000204] Console: colour dummy device 80x30 [ 0.000226] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0' [ 0.000232] This ensures that you still see kernel messages. Please [ 0.000237] update your kernel commandline. [ 0.000254] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736) [ 0.089321] pid_max: default: 32768 minimum: 301 [ 0.089410] Security Framework initialized [ 0.089458] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.089467] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.090078] Initializing cgroup subsys blkio [ 0.090100] Initializing cgroup subsys memory [ 0.090135] Initializing cgroup subsys devices [ 0.090149] Initializing cgroup subsys freezer [ 0.090160] Initializing cgroup subsys perf_event [ 0.090183] CPU: Testing write buffer coherency: ok [ 0.090537] Setting up static identity map for 0x80008200 - 0x80008270 [ 0.091882] devtmpfs: initialized [ 0.099946] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3 [ 0.107314] omap_hwmod: tptc0 using broken dt data from edma [ 0.107409] omap_hwmod: tptc1 using broken dt data from edma [ 0.107489] omap_hwmod: tptc2 using broken dt data from edma [ 0.111753] omap_hwmod: debugss: _wait_target_disable failed [ 0.166094] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.168065] pinctrl core: initialized pinctrl subsystem [ 0.169195] NET: Registered protocol family 16 [ 0.171202] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.199309] cpuidle: using governor ladder [ 0.229299] cpuidle: using governor menu [ 0.232310] OMAP GPIO hardware version 0.1 [ 0.240115] No ATAGs? [ 0.240145] hw-breakpoint: debug architecture 0x4 unsupported. [ 0.276212] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver [ 0.278861] vgaarb: loaded [ 0.279400] SCSI subsystem initialized [ 0.279869] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe [ 0.280011] pps_core: LinuxPPS API ver. 1 registered [ 0.280019] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.280046] PTP clock support registered [ 0.280745] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400 [ 0.280931] Advanced Linux Sound Architecture Driver Initialized. [ 0.281646] Switched to clocksource timer1 [ 0.290399] NET: Registered protocol family 2 [ 0.291123] TCP established hash table entries: 4096 (order: 2, 16384 bytes) [ 0.291169] TCP bind hash table entries: 4096 (order: 2, 16384 bytes) [ 0.291207] TCP: Hash tables configured (established 4096 bind 4096) [ 0.291284] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.291301] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.291444] NET: Registered protocol family 1 [ 0.291858] RPC: Registered named UNIX socket transport module. [ 0.291871] RPC: Registered udp transport module. [ 0.291877] RPC: Registered tcp transport module. [ 0.291882] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.292646] CPU PMU: Failed to parse /pmu/interrupt-affinity[0] [ 0.292686] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available [ 0.294326] futex hash table entries: 256 (order: -1, 3072 bytes) [ 0.294404] audit: initializing netlink subsys (disabled) [ 0.294467] audit: type=2000 audit(0.280:1): initialized [ 0.300704] VFS: Disk quotas dquot_6.6.0 [ 0.300885] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 0.302902] NFS: Registering the id_resolver key type [ 0.302975] Key type id_resolver registered [ 0.302982] Key type id_legacy registered [ 0.303046] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc. [ 0.305251] NET: Registered protocol family 38 [ 0.305317] io scheduler noop registered [ 0.305330] io scheduler deadline registered [ 0.305381] io scheduler cfq registered (default) [ 0.306306] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568 [ 0.307978] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle [ 0.308905] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled [ 0.312072] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 155, base_baud = 3000000) is a 8250 [ 0.947064] console [ttyS0] enabled [ 0.951436] [drm] Initialized drm 1.1.0 20060810 [ 0.956438] slave hdmi: could not get i2c [ 0.969326] brd: module loaded [ 0.976784] loop: module loaded [ 0.980758] mtdoops: mtd device (mtddev=name/number) must be supplied [ 0.989082] mousedev: PS/2 mouse device common for all mice [ 0.994792] i2c /dev entries driver [ 0.999174] omap_hsmmc 48060000.mmc: Got CD GPIO [ 1.081929] ledtrig-cpu: registered to indicate activity on CPUs [ 1.088281] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2 [ 1.095431] omap-sham 53100000.sham: hw accel on OMAP rev 4.3 [ 1.105767] remoteproc0: wkup_m3 is available [ 1.110238] remoteproc0: Note: remoteproc is still under development and considered experimental. [ 1.119391] remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed. [ 1.130051] remoteproc0: Direct firmware load for am335x-pm-firmware.elf failed with error -2 [ 1.141431] oprofile: using arm/armv7 [ 1.146273] remoteproc0: Falling back to user helper [ 1.153772] Initializing XFRM netlink socket [ 1.158099] NET: Registered protocol family 17 [ 1.162966] NET: Registered protocol family 15 [ 1.167557] Key type dns_resolver registered [ 1.172093] omap_voltage_late_init: Voltage driver support not added [ 1.178897] ThumbEE CPU extension supported. [ 1.183290] Registering SWP/SWPB emulation handler [ 1.200964] mmc1: MAN_BKOPS_EN bit is not set [ 1.209426] mmc1: new high speed MMC card at address 0001 [ 1.215853] mmcblk0: mmc1:0001 MMC04G 3.65 GiB [ 1.220640] mmcblk0boot0: mmc1:0001 MMC04G partition 1 1.00 MiB [ 1.226878] mmcblk0boot1: mmc1:0001 MMC04G partition 2 1.00 MiB [ 1.234548] tps65217 0-0024: TPS65217 ID 0xe version 1.2 [ 1.239996] mmcblk0: p1 p2 [ 1.243112] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz [ 1.373963] tda998x 0-0070: found TDA19988 [ 1.379010] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [ 1.385686] [drm] No driver support for vblank timestamp query. [ 1.391961] tilcdc 4830e000.lcdc: No connectors reported connected with modes [ 1.399142] [drm] Cannot find any crtc or sizes - going 1024x768 [ 1.413535] Console: switching to colour frame buffer device 128x48 [ 1.425115] tilcdc 4830e000.lcdc: fb0: frame buffer device [ 1.430710] tilcdc 4830e000.lcdc: registered panic notifier [ 1.461676] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0 [ 1.531699] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6 [ 1.537834] davinci_mdio 4a101000.mdio: detected phy mask fffffffe [ 1.544840] libphy: 4a101000.mdio: probed [ 1.548880] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720 [ 1.558778] cpsw 4a100000.ethernet: Detected MACID = 78:a5:04:cf:61:a3 [ 1.566365] hctosys: unable to open rtc device (rtc0) [ 1.574743] ALSA device list: [ 1.577743] No soundcards found. [ 1.581600] VFS: PARTUUID= is invalid. [ 1.581600] Expected PARTUUID=<valid-uuid-id>[/PARTNROFF=%d] [ 1.591151] Disabling rootwait; root= is invalid. [ 1.596150] VFS: Cannot open root device "PARTUUID=" or unknown-block(0,0): error -6 [ 1.604072] Please append a correct "root=" boot option; here are the available partitions: [ 1.612507] 0100 16384 ram0 (driver?) [ 1.617153] 0101 16384 ram1 (driver?) [ 1.621828] 0102 16384 ram2 (driver?) [ 1.626468] 0103 16384 ram3 (driver?) [ 1.631110] 0104 16384 ram4 (driver?) [ 1.635765] 0105 16384 ram5 (driver?) [ 1.640405] 0106 16384 ram6 (driver?) [ 1.645057] 0107 16384 ram7 (driver?) [ 1.649698] 0108 16384 ram8 (driver?) [ 1.654349] 0109 16384 ram9 (driver?) [ 1.658989] 010a 16384 ram10 (driver?) [ 1.663729] 010b 16384 ram11 (driver?) [ 1.668458] 010c 16384 ram12 (driver?) [ 1.673199] 010d 16384 ram13 (driver?) [ 1.677928] 010e 16384 ram14 (driver?) [ 1.682668] 010f 16384 ram15 (driver?) [ 1.687403] b300 3833856 mmcblk0 driver: mmcblk [ 1.692756] b301 72261 mmcblk0p1 00000000-01 [ 1.698093] b302 3751177 mmcblk0p2 00000000-02 [ 1.703444] b310 1024 mmcblk0boot1 (driver?) [ 1.708783] b308 1024 mmcblk0boot0 (driver?) [ 1.714134] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) [ 1.722434] drm_kms_helper: panic occurred, switching back to text console [ 1.729362] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)