RobertCNelson / boot-scripts

Just a bunch of useful scripts placed under /opt/scripts/
124 stars 131 forks source link

writing to [/dev/mmcblk1] failed #89

Closed davewthompson closed 3 years ago

davewthompson commented 5 years ago

Can anyone advise on why I'm getting the following error message - I'm trying to flash the Debian image to a BeagleBone Black using a brand new MicroSD and an image written using Etcher on a Mac and a Linux laptop:

==> rsync: / -> /tmp/rootfs

writing to [/dev/mmcblk1] failed

...and that's all the error logging I get.

Any ideas? Or should I just dump the BeagleBoard in the trash and get another Pi?

RobertCNelson commented 5 years ago

@davewthompson which image? The most common reason for this error occurs when you try to boot a really really old 3.8.13 image with a newer BBB with an eMMC based off the 5.1* spec.. Which i fixed on Jun 15, 2016.

If you show me the full serial boot log i can verify what issue you have..

 * Micron/Kingston/<insert eMMC manufacture>, eol products on a quarterly basis.

Regards,

davewthompson commented 5 years ago

Thank you very much for your reply, Rob!

The image is: bone-debian-9.5-iot-armhf-2018-10-07-4gb.img.xz.

'Burns' to a brand new Transcend MicroSD HC device fine, boots, but then gets stuck when copying the initial image to the eMMC.

Can you advise how I can get the boot log for you?

RobertCNelson commented 5 years ago

@davewthompson okay, that doesn't make any sense..

First, how did you enable the eMMC flasher routine?

I do have a matching image that's flasher enabled here:

https://rcn-ee.net/rootfs/bb.org/testing/2018-10-07/stretch-iot/BBB-blank-debian-9.5-iot-armhf-2018-10-07-4gb.img.xz

Do you have a USB serial port adapter to read J1 debug?

Here's the debug/serial hardware readme:

https://elinux.org/Beagleboard:BeagleBone_Black_Serial

Regards,

RobertCNelson commented 5 years ago

Just verified BBB-blank-debian-9.5-iot-armhf-2018-10-07-4gb.img.xz

U-Boot SPL 2018.09-00002-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500)
Trying to boot from MMC2
Loading Environment from EXT4... ** File not found /boot/uboot.env **

** Unable to read "/boot/uboot.env" from mmc0:1 **

U-Boot 2018.09-00002-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500), Build: jenkins-github_Bootloader-Builder-65

CPU  : AM335X-GP rev 2.1
I2C:   ready
DRAM:  512 MiB
No match for driver 'omap_hsmmc'
No match for driver 'omap_hsmmc'
Some drivers were not found
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4... ** File not found /boot/uboot.env **

** Unable to read "/boot/uboot.env" from mmc0:1 **
Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net:   eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
board_name=[A335BNLT] ...
board_rev=[000C] ...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
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
2041 bytes read in 20 ms (99.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.14.71-ti-r80 ...
10416640 bytes read in 671 ms (14.8 MiB/s)
debug: [enable_uboot_overlays=1] ...
debug: [enable_uboot_cape_universal=1] ...
debug: [uboot_base_dtb_univ=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot-univ.dtb ...
loading /boot/dtbs/4.14.71-ti-r80/am335x-boneblack-uboot-univ.dtb ...
161723 bytes read in 54 ms (2.9 MiB/s)
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: loading /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo ...
1440 bytes read in 128 ms (10.7 KiB/s)
uboot_overlays: loading /lib/firmware/BB-HDMI-TDA998x-00A0.dtbo ...
5127 bytes read in 124 ms (40 KiB/s)
uboot_overlays: loading /lib/firmware/BB-ADC-00A0.dtbo ...
711 bytes read in 164 ms (3.9 KiB/s)
uboot_overlays: loading /lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo ...
3513 bytes read in 65 ms (52.7 KiB/s)
loading /boot/initrd.img-4.14.71-ti-r80 ...
4530240 bytes read in 301 ms (14.4 MiB/s)
debug: [console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh] ...
debug: [bootz 0x82000000 0x88080000:452040 88000000] ...
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8fbad000, end 8ffff040 ... OK
   reserving fdt memory region: addr=88000000 size=89000
   Loading Device Tree to 8fb21000, end 8fbacfff ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.71-ti-r80 (root@b2-am57xx-beagle-x15-2gb) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 SMP PREEMPT Fri Oct 5 23:50:11 UTC 2018
[    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] OF: fdt: Machine model: TI AM335x BeagleBone Black
[    0.000000] Memory policy: Data cache writeback
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 48 MiB at 0x9c800000
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (sgx neon)
[    0.000000] random: get_random_bytes called from start_kernel+0xac/0x458 with crng_init=0
[    0.000000] percpu: Embedded 18 pages/cpu @df8e7000 s41548 r8192 d23988 u73728
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129412
[    0.000000] Kernel command line: console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 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: 440272K/522240K available (13312K kernel code, 1169K rwdata, 4364K rodata, 1024K init, 361K bss, 32816K 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 : 0xe0000000 - 0xff800000   ( 504 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xdfe00000   ( 510 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0e00000   (14304 kB)
[    0.000000]       .init : 0xc1400000 - 0xc1500000   (1024 kB)
[    0.000000]       .data : 0xc1500000 - 0xc1624498   (1170 kB)
[    0.000000]        .bss : 0xc162eb2c - 0xc1689000   ( 362 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] ftrace: allocating 42734 entries in 126 pages
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[    0.000000]  Tasks RCU enabled.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 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.000024] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000052] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000066] OMAP clocksource: timer1 at 24000000 Hz
[    0.002113] timer_probe: no matching timers found
[    0.002454] Console: colour dummy device 80x30
[    0.002489] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[    0.002497] This ensures that you still see kernel messages. Please
[    0.002505] update your kernel commandline.
[    0.002535] Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)
[    0.021106] pid_max: default: 32768 minimum: 301
[    0.021379] Security Framework initialized
[    0.021400] Yama: becoming mindful.
[    0.021442] AppArmor: AppArmor disabled by boot time parameter
[    0.021522] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.021537] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.022557] CPU: Testing write buffer coherency: ok
[    0.023083] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.037188] Setting up static identity map for 0x80100000 - 0x80100060
[    0.045103] Hierarchical SRCU implementation.
[    0.056227] EFI services will not be available.
[    0.061110] smp: Bringing up secondary CPUs ...
[    0.061134] smp: Brought up 1 node, 1 CPU
[    0.061146] SMP: Total of 1 processors activated (995.32 BogoMIPS).
[    0.061158] CPU: All CPU(s) started in SVC mode.
[    0.062735] devtmpfs: initialized
[    0.101379] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.101862] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.101894] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.105816] xor: measuring software checksum speed
[    0.145119]    arm4regs  :  1200.000 MB/sec
[    0.185079]    8regs     :  1075.000 MB/sec
[    0.225078]    32regs    :   988.000 MB/sec
[    0.265077]    neon      :  1620.000 MB/sec
[    0.265088] xor: using function: neon (1620.000 MB/sec)
[    0.265109] pinctrl core: initialized pinctrl subsystem
[    0.266340] NET: Registered protocol family 16
[    0.269355] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.360489] omap_hwmod: debugss: _wait_target_disable failed
[    0.401273] cpuidle: using governor menu
[    0.407631] OMAP GPIO hardware version 0.1
[    0.433206] No ATAGs?
[    0.433227] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.434730] omap4_sram_init:Unable to allocate sram needed to handle errata I688
[    0.434756] omap4_sram_init:Unable to get sram pool needed to handle errata I688
[    0.529136] raid6: neonx2   gen()  1883 MB/s
[    0.597100] raid6: neonx2   xor()  1497 MB/s
[    0.597112] raid6: using algorithm neonx2 gen() 1883 MB/s
[    0.597121] raid6: .... xor() 1497 MB/s, rmw enabled
[    0.597131] raid6: using neon recovery algorithm
[    0.604905] edma 49000000.edma: TI EDMA DMA engine driver
[    0.611769] SCSI subsystem initialized
[    0.613574] usbcore: registered new interface driver usbfs
[    0.613650] usbcore: registered new interface driver hub
[    0.613767] usbcore: registered new device driver usb
[    0.614686] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[    0.615680] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[    0.616977] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[    0.617511] media: Linux media interface: v0.10
[    0.617575] Linux video capture interface: v2.00
[    0.617770] pps_core: LinuxPPS API ver. 1 registered
[    0.617784] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.617813] PTP clock support registered
[    0.618466] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[    0.621470] Advanced Linux Sound Architecture Driver Initialized.
[    0.622198] NetLabel: Initializing
[    0.622215] NetLabel:  domain hash size = 128
[    0.622225] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.622316] NetLabel:  unlabeled traffic allowed by default
[    0.625534] clocksource: Switched to clocksource timer1
[    0.789400] VFS: Disk quotas dquot_6.6.0
[    0.789649] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.802334] NET: Registered protocol family 2
[    0.803290] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.803344] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.803406] TCP: Hash tables configured (established 4096 bind 4096)
[    0.803530] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.803556] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.803768] NET: Registered protocol family 1
[    0.812736] RPC: Registered named UNIX socket transport module.
[    0.812758] RPC: Registered udp transport module.
[    0.812767] RPC: Registered tcp transport module.
[    0.812775] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.813832] Unpacking initramfs...
[    1.017604] random: fast init done
[    1.060902] Freeing initrd memory: 4428K
[    1.061495] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    1.061901] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    1.063998] audit: initializing netlink subsys (disabled)
[    1.065253] audit: type=2000 audit(1.064:1): state=initialized audit_enabled=0 res=1
[    1.065398] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    1.071472] zbud: loaded
[    1.079145] NFS: Registering the id_resolver key type
[    1.079197] Key type id_resolver registered
[    1.079208] Key type id_legacy registered
[    1.079230] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.079612] fuse init (API version 7.26)
[    1.080210] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    1.099350] Key type asymmetric registered
[    1.099380] Asymmetric key parser 'x509' registered
[    1.099515] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[    1.103867] io scheduler noop registered
[    1.103888] io scheduler deadline registered
[    1.104296] io scheduler cfq registered (default)
[    1.104310] io scheduler mq-deadline registered
[    1.107003] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    1.118863] gpio-of-helper ocp:cape-universal: ready
[    1.129767] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    1.132039] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
[    1.135767] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
[    1.987456] console [ttyS0] enabled
[    1.992151] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 31, base_baud = 3000000) is a 8250
[    2.002120] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 32, base_baud = 3000000) is a 8250
[    2.011959] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 33, base_baud = 3000000) is a 8250
[    2.021886] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 34, base_baud = 3000000) is a 8250
[    2.031694] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 35, base_baud = 3000000) is a 8250
[    2.043946] omap_rng 48310000.rng: Random Number Generator ver. 20
[    2.051575] [drm] Initialized vgem 1.0.0 20120112 for virtual device on minor 0
[    2.059206] usbcore: registered new interface driver udl
[    2.072311] at24 2-0054: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    2.079636] at24 2-0055: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    2.086825] at24 2-0056: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    2.093998] at24 2-0057: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    2.101483] eqep 48300180.eqep: ver. 1.0
[    2.105695] eqep 48300180.eqep: count_mode:0
[    2.110030] eqep 48300180.eqep: invert_qa:1
[    2.114258] eqep 48300180.eqep: invert_qb:1
[    2.118485] eqep 48300180.eqep: invert_qi:0
[    2.122712] eqep 48300180.eqep: invert_qs:0
[    2.126938] eqep 48300180.eqep: swap_inputs:0
[    2.131347] eqep 48300180.eqep: QDECCTL:0x0180
[    2.135834] eqep 48300180.eqep: QPOSINIT:0x00000000
[    2.140756] eqep 48300180.eqep: QPOSMAX:0xffffffff
[    2.145593] eqep 48300180.eqep: QPOSCNT:0x00000000
[    2.150429] eqep 48300180.eqep: omit_interrupt:0
[    2.155091] eqep 48300180.eqep: QEINT:0x0800
[    2.159402] eqep 48300180.eqep: QUPRD:0x05f5e100
[    2.164063] eqep 48300180.eqep: QEPCTL:0x009e write
[    2.168984] eqep 48300180.eqep: QEPCTL:0x009e read
[    2.173838] eqep 48300180.eqep: irq:135, clk_rate:100000000
[    2.179700] eqep 48302180.eqep: ver. 1.0
[    2.183824] eqep 48302180.eqep: count_mode:0
[    2.188155] eqep 48302180.eqep: invert_qa:1
[    2.192383] eqep 48302180.eqep: invert_qb:1
[    2.196610] eqep 48302180.eqep: invert_qi:0
[    2.200836] eqep 48302180.eqep: invert_qs:0
[    2.205062] eqep 48302180.eqep: swap_inputs:0
[    2.209461] eqep 48302180.eqep: QDECCTL:0x0180
[    2.213950] eqep 48302180.eqep: QPOSINIT:0x00000000
[    2.218872] eqep 48302180.eqep: QPOSMAX:0xffffffff
[    2.223705] eqep 48302180.eqep: QPOSCNT:0x00000000
[    2.228540] eqep 48302180.eqep: omit_interrupt:0
[    2.233201] eqep 48302180.eqep: QEINT:0x0800
[    2.237524] eqep 48302180.eqep: QUPRD:0x05f5e100
[    2.242183] eqep 48302180.eqep: QEPCTL:0x009e write
[    2.247106] eqep 48302180.eqep: QEPCTL:0x009e read
[    2.251953] eqep 48302180.eqep: irq:137, clk_rate:100000000
[    2.257774] eqep 48304180.eqep: ver. 1.0
[    2.261871] eqep 48304180.eqep: count_mode:0
[    2.266198] eqep 48304180.eqep: invert_qa:1
[    2.270425] eqep 48304180.eqep: invert_qb:1
[    2.274652] eqep 48304180.eqep: invert_qi:0
[    2.278877] eqep 48304180.eqep: invert_qs:0
[    2.283103] eqep 48304180.eqep: swap_inputs:0
[    2.287501] eqep 48304180.eqep: QDECCTL:0x0180
[    2.291988] eqep 48304180.eqep: QPOSINIT:0x00000000
[    2.296910] eqep 48304180.eqep: QPOSMAX:0xffffffff
[    2.301744] eqep 48304180.eqep: QPOSCNT:0x00000000
[    2.306581] eqep 48304180.eqep: omit_interrupt:0
[    2.311241] eqep 48304180.eqep: QEINT:0x0800
[    2.315552] eqep 48304180.eqep: QUPRD:0x05f5e100
[    2.320212] eqep 48304180.eqep: QEPCTL:0x009e write
[    2.325134] eqep 48304180.eqep: QEPCTL:0x009e read
[    2.329982] eqep 48304180.eqep: irq:139, clk_rate:100000000
[    2.364650] libphy: Fixed MDIO Bus: probed
[    2.369867] CAN device driver interface
[    2.375036] c_can_platform 481cc000.can: c_can_platform device registered (regs=fa1cc000, irq=42)
[    2.384998] c_can_platform 481d0000.can: c_can_platform device registered (regs=fa1d0000, irq=43)
[    2.449641] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[    2.457393] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[    2.464644] MDIO: davinci_mdio: dt: updated phy_id[0] from phy_mask[fffffffe]
[    2.486514] libphy: 4a101000.mdio: probed
[    2.490846] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[    2.501348] cpsw 4a100000.ethernet: Detected MACID = c8:df:84:e3:0d:c8
[    2.508216] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[    2.514698] cpsw 4a100000.ethernet: ALE Table size 1024
[    2.520038] cpsw 4a100000.ethernet: cpts: overflow check period 1250 (jiffies)
[    2.530896] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.537595] ehci-platform: EHCI generic platform driver
[    2.543259] ehci-omap: OMAP-EHCI Host Controller driver
[    2.549498] usbcore: registered new interface driver usb-storage
[    2.558923] am335x-phy-driver 47401300.usb-phy: 47401300.usb-phy supply vcc not found, using dummy regulator
[    2.572361] am335x-phy-driver 47401b00.usb-phy: 47401b00.usb-phy supply vcc not found, using dummy regulator
[    2.586869] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[    2.592304] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[    2.600093] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.606958] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.614240] usb usb1: Product: MUSB HDRC host driver
[    2.619251] usb usb1: Manufacturer: Linux 4.14.71-ti-r80 musb-hcd
[    2.625395] usb usb1: SerialNumber: musb-hdrc.1
[    2.630905] hub 1-0:1.0: USB hub found
[    2.634886] hub 1-0:1.0: 1 port detected
[    2.651104] omap_rtc 44e3e000.rtc: registered as rtc0
[    2.657820] i2c /dev entries driver
[    2.662582] Driver for 1-wire Dallas network protocol.
[    2.671240] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    2.678864] softdog: initialized. soft_noboot=0 soft_margin=60 sec soft_panic=0 (nowayout=0)
[    2.688930] cpuidle: enable-method property 'ti,am3352' found operations
[    2.696643] sdhci: Secure Digital Host Controller Interface driver
[    2.702935] sdhci: Copyright(c) Pierre Ossman
[    2.708204] omap_hsmmc 48060000.mmc: Got CD GPIO
[    2.794217] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.802484] ledtrig-cpu: registered to indicate activity on CPUs
[    2.812842] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[    2.819039] omap-aes 53500000.aes: will run requests pump with realtime priority
[    2.829899] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[    2.843487] hidraw: raw HID events driver (C) Jiri Kosina
[    2.849186] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.857833] mmc0: new high speed SDHC card at address aaaa
[    2.864697] mmcblk0: mmc0:aaaa SC16G 14.8 GiB 
[    2.870586]  mmcblk0: p1
[    2.874790] usbcore: registered new interface driver usbhid
[    2.880524] usbhid: USB HID core driver
[    2.885144] remoteproc remoteproc0: wkup_m3 is available
[    2.894182] mmc1: new high speed MMC card at address 0001
[    2.906271] mmcblk1: mmc1:0001 M62704 3.56 GiB 
[    2.912474] wireguard: WireGuard 0.0.20180925 loaded. See www.wireguard.com for information.
[    2.912479] wireguard: Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    2.913308] NET: Registered protocol family 10
[    2.933187] Segment Routing with IPv6
[    2.933264] mip6: Mobile IPv6
[    2.933280] NET: Registered protocol family 17
[    2.933295] can: controller area network core (rev 20170425 abi 9)
[    2.933384] NET: Registered protocol family 29
[    2.933584] Key type dns_resolver registered
[    2.933589] mpls_gso: MPLS GSO support
[    2.933826] omap_voltage_late_init: Voltage driver support not added
[    2.934319] PM: Cannot get wkup_m3_ipc handle
[    2.934511] ThumbEE CPU extension supported.
[    2.934536] Registering SWP/SWPB emulation handler
[    2.935581] registered taskstats version 1
[    2.935714] zswap: loaded using pool lzo/zbud
[    2.942783] Btrfs loaded, crc32c=crc32c-generic
[    2.942879] ima: No TPM chip found, activating TPM-bypass! (rc=-19)
[    2.942903] ima: Allocated hash algorithm: sha256
[    3.026399] mmcblk1boot0: mmc1:0001 M62704 partition 1 2.00 MiB
[    3.036066] mmcblk1boot1: mmc1:0001 M62704 partition 2 2.00 MiB
[    3.042672] mmcblk1rpmb: mmc1:0001 M62704 partition 3 512 KiB
[    3.050120]  mmcblk1: p1
[    3.180461] tda998x 0-0070: found TDA19988
[    3.186318] tilcdc 4830e000.lcdc: bound 0-0070 (ops tda998x_ops)
[    3.192457] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    3.199146] [drm] No driver support for vblank timestamp query.
[    3.205607] [drm] Cannot find any crtc or sizes
[    3.210896] [drm] Initialized tilcdc 1.0.0 20121205 for 4830e000.lcdc on minor 1
[    3.233072] input: tps65217_pwr_but as /devices/platform/ocp/44e0b000.i2c/i2c-0/0-0024/tps65217-pwrbutton/input/input0
[    3.244526] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[    3.250432] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    3.257540] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    3.264905] remoteproc remoteproc0: powering up wkup_m3
[    3.273643] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217168
[    3.285173] hdmi-audio-codec hdmi-audio-codec.0.auto: ASoC: no source widget found for Playback
[    3.294373] remoteproc remoteproc0: remote processor wkup_m3 is now up
[    3.294395] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x193
[    3.308213] hdmi-audio-codec hdmi-audio-codec.0.auto: ASoC: Failed to add route Playback -> direct -> TX
[    3.318594] asoc-simple-card sound: i2s-hifi <-> 48038000.mcasp mapping ok
[    3.327647] PM: bootloader does not support rtc-only!
[    3.334204] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801)
[    3.342992] of_cfs_init
[    3.345640] of_cfs_init: OK
[    3.349916] ALSA device list:
[    3.352921]   #0: TI BeagleBone Black
[    3.361312] Freeing unused kernel memory: 1024K
Loading, please wait...
starting version 232
[    3.821938] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    3.838878] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    3.847980] random: udevadm: uninitialized urandom read (16 bytes read)
[    4.222311] [drm] Cannot find any crtc or sizes

================================================================================
Starting eMMC Flasher from microSD media
Version: [1.20180412: all ssh regneration override...]
================================================================================

================================================================================
Prepare environment for flashing
Starting at Sat Jan  1 00:00:26 UTC 2000
----------------------------------------
==> Giving system time to stablize...
5 4 3 2 1 
==> Preparing /tmp
==> Preparing sysctl
==> sysctl: vm.min_free_kbytes=[2654]
==> sysctl: setting: [sysctl -w vm.min_free_kbytes=16384]
vm.min_free_kbytes = 16384
----------------------------------------
==> Determining root drive
==> console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh
----------------------------------------
==> root_drive=[/dev/mmcblk0p1]
====> Root drive identified at [/dev/mmcblk0p1]
==> Boot Drive [/dev/mmcblk0p1]
==> Figuring out Source and Destination devices
====> Source identified: [/dev/mmcblk0]
====> Destination identified: [/dev/mmcblk1]
==> Figuring out machine
====> Machine is TI_AM335x_BeagleBone_Black
====> Machine is compatible with BeagleBone Black
================================================================================
5 4 3 2 1 

========================================
Checking for Valid bbb-eeprom header
==> Valid bbb-eeprom header found [335]
========================================

================================================================================
Checking running system
==> Copying: [/dev/mmcblk0] -> [/dev/mmcblk1]
==> lsblk:
----------------------------------------
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk0      179:0    0 14.9G  0 disk 
`-mmcblk0p1  179:1    0  3.3G  0 part /
mmcblk1      179:8    0  3.6G  0 disk 
`-mmcblk1p1  179:9    0  3.6G  0 part 
mmcblk1boot0 179:16   0    2M  1 disk 
mmcblk1boot1 179:24   0    2M  1 disk 
mmcblk1rpmb  179:32   0  512K  0 disk 
----------------------------------------
==> df -h | grep rootfs:
----------------------------------------
==> Giving you time to check...
10 9 8 7 6 5 4 3 2 1 
================================================================================

================================================================================
Preparing drives

----------------------------------------
==> Erasing: /dev/mmcblk1
----------------------------------------
[   52.301605] random: crng init done
[   52.305056] random: 7 urandom warning(s) missed due to ratelimiting
108+0 records in
108+0 records out
113246208 bytes (113 MB, 108 MiB) copied, 4.58905 s, 24.7 MB/s
----------------------------------------
108+0 records in
108+0 records out
113246208 bytes (113 MB, 108 MiB) copied, 2.72833 s, 41.5 MB/s
----------------------------------------
==> Erasing: /dev/mmcblk1 complete
----------------------------------------

----------------------------------------
==> Loading /boot/SOC.sh
************************************************************
#!/bin/sh
format=1.0

board=am335x_evm

bootloader_location=dd_spl_uboot_boot
bootrom_gpt=

dd_spl_uboot_count=1
dd_spl_uboot_seek=1
dd_spl_uboot_conf=notrunc
dd_spl_uboot_bs=128k
dd_spl_uboot_backup=/opt/backup/uboot/MLO

dd_uboot_count=2
dd_uboot_seek=1
dd_uboot_conf=notrunc
dd_uboot_bs=384k
dd_uboot_backup=/opt/backup/uboot/u-boot.img

boot_fstype=ext4
conf_boot_startmb=4
conf_boot_endmb=
sfdisk_fstype=L

boot_label=BOOT
rootfs_label=rootfs

#Kernel
dtb=
serial_tty=ttyO0
usbnet_mem=

#Advanced options
#disable_ssh_regeneration=true

************************************************************
==> Loaded

----------------------------------------

================================================================================
Writing bootloader to [/dev/mmcblk1]
----------------------------------------
==> Figuring out options for SPL U-Boot copy ...
===> Will use : count=1 seek=1 conv=notrunc bs=128k
==> Figuring out options for U-Boot copy ...
===> Will use : count=2 seek=1 conv=notrunc bs=384k
==> Copying SPL U-Boot with dd if=/opt/backup/uboot/MLO of=/dev/mmcblk1 count=1 seek=1 conv=notrunc bs=128k
------------------------------------------------------------
0+1 records in
0+1 records out
90932 bytes (91 kB, 89 KiB) copied, 0.0125242 s, 7.3 MB/s
------------------------------------------------------------
==> Copying U-Boot with dd if=/opt/backup/uboot/u-boot.img of=/dev/mmcblk1 count=2 seek=1 conv=notrunc bs=384k
------------------------------------------------------------
1+1 records in
1+1 records out
447372 bytes (447 kB, 437 KiB) copied, 0.0433108 s, 10.3 MB/s
------------------------------------------------------------
Writing bootloader completed
================================================================================

================================================================================
Partitionning /dev/mmcblk1
----------------------------------------
sfdisk: [2.26.x or greater]
==> sfdisk parameters:
sfdisk: [sfdisk from util-linux 2.29.2]
sfdisk: [sfdisk --force /dev/mmcblk1]
sfdisk: [4M,,L,*]
==> Partitionning
------------------------------------------------------------
Checking that no-one is using this disk right now ... OK

Disk /dev/mmcblk1: 3.6 GiB, 3825205248 bytes, 7471104 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

>>> Created a new DOS disklabel with disk identifier 0x0047c8c8.
/dev/mmcblk1p1: Created a new partition 1 of type 'Linux' and of size 3.6 GiB.
/dev/mmcblk1p2: Done.

New situation:

Device         Boot St[   58.009154]  mmcblk1: p1
art     End Sectors  Size Id Type
/dev/mmcblk1p1 *     8192 7471103 7462912  3.6G 83 Linux

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
------------------------------------------------------------

==> Partitionning Completed
==> Generated Partitions:
------------------------------------------------------------
Disk /dev/mmcblk1: 3.6 GiB, 3825205248 bytes, 7471104 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: 0x0047c8c8

Device         Boot Start     End Sectors  Size Id Type
/dev/mmcblk1p1 *     8192 7471103 7462912  3.6G 83 Linux
------------------------------------------------------------
================================================================================

================================================================================
Preparing future rootfs to receive files
----------------------------------------

==> Formatting rootfs with mkfs.ext4  -O ^metadata_csum,^64bit /dev/mmcblk1p1 -L rootfs
--------------------------------------------------------------------------------

mke2fs 1.43.4 (31-Jan-2017)
ext2fs_check_if_mount: Can't check if filesystem is mounted due to missing mtab file while determining whether /dev/mmcblk1p1 is mounted.
Discarding device blocks: done                            
Creating filesystem with 932864 4k blocks and 233392 inodes
Filesystem UUID: 7d305e80-a642-4061-8deb-8f859c12422e
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

--------------------------------------------------------------------------------
==> Formatting rootfs: /dev/mmcblk1p1 complete
==> Creating temporary rootfs directory (/tmp/rootfs)
==> Mounting /dev/mmcblk1p1 to /tmp/rootfs
[   67.914407] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. Opts: (null)

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

================================================================================
Copying: Current rootfs to /dev/mmcblk1p1
----------------------------------------
==> rsync: / -> /tmp/rootfs
----------------------------------------
davewthompson commented 5 years ago

Let me try the ISO you uploaded. Otherwise, I can buy a USB serial adapter and investigate, but with Thanksgiving in the US tomorrow I think it'll be a few days...

Thank you for your help!

RobertCNelson commented 5 years ago

More than likely, your eMMC's version of u-boot is messing things up.. Hold the boot button with your finger nail before power on and lift up after the 4 leds come up..

Regards,

davewthompson commented 5 years ago

Got a new one this time... /dev/mmcblk0 does not exist!?

RobertCNelson commented 5 years ago

That's the microSD card.. Crazy.. Here grab this small image for a quick test:

https://rcn-ee.net/rootfs/bb.org/testing/2018-11-18/stretch-console/bone-debian-9.6-console-armhf-2018-11-18-1gb.img.xz

then run this debug tool:

sudo /opt/scripts/tools/version.sh

So we can see what's going on with the eMMC..

Regards,

davewthompson commented 5 years ago

Here it is... attached.. version-sh.txt

RobertCNelson commented 5 years ago

Thanks @davewthompson , nothing odd about that board. I'm going to go grab an old A5A from my collection and give it a test..

But while it's booted up, try running:

sudo dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=10

As this will clear out the eMMC bootloader, and then try flashing again...

Regards,

RobertCNelson commented 5 years ago

@davewthompson we have another problem for the A5A, not enough eMMC space..

Copying: Current rootfs to /dev/mmcblk1p1
----------------------------------------
==> rsync: / -> /tmp/rootfs
----------------------------------------
rsync: write failed on "/tmp/rootfs/usr/share/vim/vim80/syntax/csdl.vim": No space left on device (28)
rsync error: error in file IO (code 11) at receiver.c(393) [receiver=3.1.2]
writing to [/dev/mmcblk1] failed...
==> Stopping Cylon LEDs ...
==> Setting LEDs to 
/opt/scripts/tools/eMMC/functions.sh: line 391:   959 Terminated              cylon_leds
----------------------------------------

Sadly, 3.3Gb is > 2.0Gb...

Regards,

davewthompson commented 5 years ago

Ah.... I see. I don't have any error messages, it just fails. However, that would make sense... as both the eMMC and the SD card check out.

What would you advise the best course of action to be?

RobertCNelson commented 5 years ago

3 Choices, use the console image at 1GB, or the lxqt-2gb at 2GB or just use a microSD and just use the eMMC as extra storage.

https://rcn-ee.net/rootfs/bb.org/testing/2018-11-18/stretch-console/

https://rcn-ee.net/rootfs/bb.org/testing/2018-11-18/stretch-lxqt-2gb/

Regards,

davewthompson commented 5 years ago

I shall give the console image a try. Thank you very much for all your help.

adroutley commented 3 years ago

Hello,

This is a repeat of the very problem reported by davewthompson above, but it must have a different root cause.

i am flashing one image after the other onto my BBB, but each image gives me this during the flashing process:

==> rsync: / -> /tmp/rootfs writing to [/dev/mmcblk1] failed ==> Stopping Cylon LEDs ... ==> Setting LEDs to

...and then it just hangs. here is a small list of images tried so far:

BBB-blank-debian-9.5-iot-armhf-2018-10-07-4gb.img.xz bone-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz bone-eMMC-flasher-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz openSUSE-Tumbleweed-ARM-JeOS-beaglebone.armv7l-2021.04.06-Snapshot20210406.raw.xz

i even called in a napalm strike on the eMMC memory as per the advice above:-

sudo dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=10

...but no joy.

any ideas ? i am now officially desperate....

RobertCNelson commented 3 years ago

Hi @adroutley please post your full serial boot log, (from J1)..

Regards,

adroutley commented 3 years ago

thanks for the help @RobertCNelson here it is (had to look in the broom closet for an FDTI cable....).

bbb.txt.gz

so now i notice the error in the serial port is different than the one i see on the HDMI monitor (????).

RobertCNelson commented 3 years ago
==> Copying: Kernel modules
===> Creating directory for modules
===> rsync: /lib/modules/4.19.94-ti-r42/ -> /tmp/rootfs/lib/modules/4.19.94-ti-r42/
----------------------------------------
rsync: link_stat "/lib/modules/4.19.94-ti-r42/*" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
writing to [/dev/mmcblk1] failed...

Why don't you have "/lib/modules/4.19.94-ti-r42/" ?

This is where the script get's stuck..

https://github.com/RobertCNelson/boot-scripts/blob/master/tools/eMMC/functions.sh#L1009

You have:

loading /boot/vmlinuz-4.19.94-ti-r42 ...
loading /boot/dtbs/4.19.94-ti-r42/am335x-boneblack-uboot-univ.dtb ...
loading /boot/initrd.img-4.19.94-ti-r42 ...

but no, matching "/lib/modules/4.19.94-ti-r42/" ?

PS, neither of these 3 images will work on your board:

BBB-blank-debian-9.5-iot-armhf-2018-10-07-4gb.img.xz
bone-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz
bone-eMMC-flasher-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz

They ALL require 4GB eMMC.. You have 2GB eMMC:

NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk0      179:0    0 59.5G  0 disk 
`-mmcblk0p1  179:1    0 59.5G  0 part /
mmcblk1      179:8    0  1.8G  0 disk 
`-mmcblk1p1  179:9    0  1.8G  0 part 
mmcblk1boot0 179:16   0    1M  1 disk 
mmcblk1boot1 179:24   0    1M  1 disk 

Feel free to use the console image:

https://rcn-ee.net/rootfs/bb.org/testing/2021-04-27/

or just use a microSD.

Regards,

adroutley commented 3 years ago

hi @RobertCNelson your 1G image works (i guess i should have fetched the FDTI cable a little earlier to save me some time). OK i will run the larger images right off the card instead. thx for getting me over the hump.

RobertCNelson commented 3 years ago

Glad the 1GB images are working for you @adroutley !