eMMC Image flasher Problems

I am migrating all my stuff to the 2016-11-06 4.4.30-ti-r64 Debian IOT 8.6 image.

I was using the beaglebone-black-make-microSD-flasher-from-eMMC.sh script back in 2015-11-12 (4.1.12-ti-r29) without a glich and Can’t get it working in the new release. Since I added some stuff to the uEnv.txt file, I tried the following:

  1. dd zero to first 32MB of SDCard

  2. Formatted SDCard with SDFormatter on Windows PC

  3. Flashed a BBG from the 2016-11-06 4.4.30-ti-r64 Debian IOT 8.6 image.

  4. Ran git pull in /opt/scripts

  5. Inserted 4GB sdCard

  6. Ran /opt/scripts/tools/eMMC/beaglebone-black-eMMC-flasher.sh as root

  7. SDCard seems ok, no errors.

  8. BBG shuts down after SDCard creation

  9. Power-on

  10. Here is the complete boot log:

`

U-Boot SPL 2016.03-00001-gd12d09f (Mar 17 2016 - 16:16:15)
Trying to boot from MMC
bad magic

U-Boot 2016.03-00001-gd12d09f (Mar 17 2016 - 16:16:15 -0500), Build: jenkins-github_Bootloader-Builder-351

Watchdog enabled
I2C: ready
DRAM: 512 MiB
Reset Source: Global external warm reset has occurred.
Reset Source: Power-on reset has occurred.
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment

Net: not set. Validating first E-fuse MAC
Could not get PHY for cpsw: addr 0
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1…
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt …
Checking for: /boot.scr …
Checking for: /boot/boot.scr …
Checking for: /boot/uEnv.txt …
gpio: pin 55 (gpio 55) value is 1
1301 bytes read in 21 ms (59.6 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt…
gpio: pin 56 (gpio 56) value is 1
Running uname_boot …
loading /boot/vmlinuz-4.4.30-ti-r64 …
8644992 bytes read in 500 ms (16.5 MiB/s)
loading /boot/dtbs/4.4.30-ti-r64/am335x-bonegreen.dtb …
60770 bytes read in 47 ms (1.2 MiB/s)
loading /boot/initrd.img-4.4.30-ti-r64 …
5228110 bytes read in 310 ms (16.1 MiB/s)
debug: [console=ttyO0,115200n8 root=UUID=106228b0-4b64-44dc-831e-74deb47ba034 ro rootfstype=ext4 rootwait init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh] …
debug: [bootz 0x82000000 0x88080000:4fc64e 0x88000000] …
Kernel image @ 0x82000000 [ 0x000000 - 0x83e980 ]

Flattened Device Tree blob at 88000000

Booting using the fdt blob at 0x88000000
Loading Ramdisk to 8fb03000, end 8ffff64e … OK
Loading Device Tree to 8faf1000, end 8fb02d61 … 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.4.30-ti-r64 (root@a2-imx6q-wandboard-2gb) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 SMP Fri Nov 4 21:23:33 UTC 2016
[ 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 Green
[ 0.000000] cma: Reserved 48 MiB at 0x9c800000
[ 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] PERCPU: Embedded 13 pages/cpu @df918000 s24320 r8192 d20736 u53248
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129408
[ 0.000000] Kernel command line: console=ttyO0,115200n8 root=UUID=106228b0-4b64-44dc-831e-74deb47ba034 ro rootfstype=ext4 rootwait init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh
[ 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: 444752K/522240K available (11361K kernel code, 917K rwdata, 3796K rodata, 744K init, 907K bss, 28336K reserved, 49152K 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 - 0xff800000 ( 496 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 - 0xc0ed58e8 (15159 kB)
[ 0.000000] .init : 0xc0ed6000 - 0xc0f90000 ( 744 kB)
[ 0.000000] .data : 0xc0f90000 - 0xc1075528 ( 918 kB)
[ 0.000000] .bss : 0xc1078000 - 0xc115afa8 ( 908 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=1
[ 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.000017] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000038] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000051] OMAP clocksource: timer1 at 24000000 Hz
[ 0.001340] clocksource_probe: no matching clocksources found
[ 0.001554] Console: colour dummy device 80x30
[ 0.001582] WARNING: Your ‘console=ttyO0’ has been replaced by ‘ttyS0’
[ 0.001590] This ensures that you still see kernel messages. Please
[ 0.001596] update your kernel commandline.
[ 0.001617] Calibrating delay loop… 995.32 BogoMIPS (lpj=1990656)
[ 0.046819] pid_max: default: 32768 minimum: 301
[ 0.046971] Security Framework initialized
[ 0.046985] Yama: becoming mindful.
[ 0.047022] AppArmor: AppArmor disabled by boot time parameter
[ 0.047190] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.047202] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.048054] Initializing cgroup subsys io
[ 0.048089] Initializing cgroup subsys memory
[ 0.048134] Initializing cgroup subsys devices
[ 0.048152] Initializing cgroup subsys freezer
[ 0.048169] Initializing cgroup subsys net_cls
[ 0.048183] Initializing cgroup subsys perf_event
[ 0.048197] Initializing cgroup subsys net_prio
[ 0.048222] Initializing cgroup subsys pids
[ 0.048279] CPU: Testing write buffer coherency: ok
[ 0.048338] ftrace: allocating 34628 entries in 102 pages
[ 0.146197] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[ 0.146333] Setting up static identity map for 0x80008280 - 0x800082d8
[ 0.150477] Brought up 1 CPUs
[ 0.150502] SMP: Total of 1 processors activated (995.32 BogoMIPS).
[ 0.150511] CPU: All CPU(s) started in SVC mode.
[ 0.152256] devtmpfs: initialized
[ 0.172643] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 0.191766] omap_hwmod: debugss: _wait_target_disable failed
[ 0.245662] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.249637] xor: measuring software checksum speed
[ 0.286822] arm4regs : 1194.000 MB/sec
[ 0.326817] 8regs : 1072.000 MB/sec
[ 0.366815] 32regs : 1069.000 MB/sec
[ 0.406815] neon : 1708.000 MB/sec
[ 0.406823] xor: using function: neon (1708.000 MB/sec)
[ 0.406951] pinctrl core: initialized pinctrl subsystem
[ 0.409068] NET: Registered protocol family 16
[ 0.411912] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.413237] cpuidle: using governor ladder
[ 0.413260] cpuidle: using governor menu
[ 0.418797] OMAP GPIO hardware version 0.1
[ 0.430317] No ATAGs?
[ 0.430352] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.431038] omap4_sram_init:Unable to allocate sram needed to handle errata I688
[ 0.431054] omap4_sram_init:Unable to get sram pool needed to handle errata I688
[ 0.507061] raid6: int32x1 gen() 230 MB/s
[ 0.574907] raid6: int32x1 xor() 176 MB/s
[ 0.642975] raid6: int32x2 gen() 304 MB/s
[ 0.710972] raid6: int32x2 xor() 199 MB/s
[ 0.778948] raid6: int32x4 gen() 284 MB/s
[ 0.846924] raid6: int32x4 xor() 199 MB/s
[ 0.914939] raid6: int32x8 gen() 282 MB/s
[ 0.982921] raid6: int32x8 xor() 186 MB/s
[ 1.050853] raid6: neonx1 gen() 1461 MB/s
[ 1.118827] raid6: neonx1 xor() 846 MB/s
[ 1.186839] raid6: neonx2 gen() 1886 MB/s
[ 1.254823] raid6: neonx2 xor() 1174 MB/s
[ 1.322815] raid6: neonx4 gen() 1927 MB/s
[ 1.390838] raid6: neonx4 xor() 1205 MB/s
[ 1.458862] raid6: neonx8 gen() 1188 MB/s
[ 1.526814] raid6: neonx8 xor() 844 MB/s
[ 1.526822] raid6: using algorithm neonx4 gen() 1927 MB/s
[ 1.526830] raid6: … xor() 1205 MB/s, rmw enabled
[ 1.526836] raid6: using intx1 recovery algorithm
[ 1.536052] edma 49000000.edma: TI EDMA DMA engine driver
[ 1.540955] SCSI subsystem initialized
[ 1.541754] usbcore: registered new interface driver usbfs
[ 1.541831] usbcore: registered new interface driver hub
[ 1.541940] usbcore: registered new device driver usb
[ 1.542508] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[ 1.542561] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
[ 1.542671] media: Linux media interface: v0.10
[ 1.542733] Linux video capture interface: v2.00
[ 1.542939] pps_core: LinuxPPS API ver. 1 registered

Just re-ran this and it worked, nothing sticks out on what you did, so
it should have worked..

recap:

1: started with 2016-11-06 4.4.30-ti-r64 Debian IOT 8.6 image, dd'ed to microSD
2: booted via microSD, updated /opt/scripts/
3: un-commnented
"cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh" in
/boot/uEnv.txt rebooted..
4: eMMC flashed..
5: booted via eMMC
6: stuck in microSD, and ran
/opt/scripts/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh
7: board shutdown
8: unpluged board, plugged in board, microSD proceded to flash the eMMC..

Regards,

Powered by the barrel jack ?

BeagleBoard Green powered by micro-USB.

I saw nothing in the forums about this so I wasn’t expecting a problem with the scripts but maybe with my procedure…

I will get my hands on another card and try again.

As with all beaglebones flashing needs to be done using at LEAST a 1a 5v
supply or if you search the groups as Gerald says
A 2 amp supply. I have used a good 1 amp supply with no issues but your
mileage may vary.

Ok a few more tries and have had mixed success! I followed your exact steps with the following possible exceptions:

  • Using BeagleBone Green (a new one)

  • Power from Bench Power-Supply (high quality output, up to 5A) through pins p9.1(GND) and p9.5(VDD_5V)

I tried using said microSD card on another BBG and on an revC BBB with broken power section (yeah I know, connected through p9.7 SYS_5V) with the same fstab problem.

I mounted the microSD card, extracted the /boot/initrd file with gunzip and cpio and the fstab is indeed empty!
I reran the beaglebone-black-make-microSD-flasher-from-eMMC.sh script again and this time managed to flash the BBG!
I then proceeded to flash another one and even my broken-down BBB. Everything worked.

Funny thing is that when I look at the fstab in this initrd, it is still empty. so it probably wasn’t the one being looked at and I should do some more reading on the full boot sequence…

`

`

What else can I check to fix this? I am out of ideas! Coul I manually generate an fstab file with the correct UUID ?
In the end, what I want is an easy way to replicate a “reference” board to may others. Is there another way?