RobertCNelson / boot-scripts

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

eMMC flasher fails with 4.4.110 on Beaglebone black #84

Closed SanchayanMaity closed 6 years ago

SanchayanMaity commented 6 years ago

The Debian stretch IoT image comes with 4.4.91-ti-r133. I updated the kernel to 4.4.110 with kernel build from the github Beagleboard kernel repo and use the am335x-boneblack-custom.dtb with some changes of my own. All of this was while booting of the MicroSD card. Since the eMMC had an older image and wanting to update, while trying to use the eMMC flasher script, the flashing process failed. It seemed to be not able to determine the root_drive as it could not find /proc/cmdline in find_root_drive in functions.sh. Somehow it seems proc is not mounted by default. I used the kernel compiled with bb.org_defconfig and additional charger config enabled.

At first I suspected something is wrong with my device tree, but, using the device tree with 4.4.91 did not result in problems. But, using 4.4.110 kernel results in /proc being empty.

I had to add a manual mount proc command before the check for /proc/cmdline for it to work. boot-scripts is latest with last commit being 5935e83.

minicom log of flashing failure is attached. minicom-custom2.log

Has anyone experience a similar issue?

RobertCNelson commented 6 years ago

@SanchayanMaity this fails since you don't have an initrd:

Running uname_boot ...
loading /boot/vmlinuz-4.4.110+ ...
8901232 bytes read in 606 ms (14 MiB/s)
loading /boot/dtbs/4.4.110+/am335x-boneblack-custom.dtb ...
55159 bytes read in 95 ms (566.4 KiB/s)
uboot_overlays: add [enable_uboot_overlays=1] to /boot/uEnv.txt to enable...
debug: [console=ttyO0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh] ...
debug: [bootz 0x82000000 - 0x88000000] ...
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Device Tree to 8ffef000, end 8ffff776 ... OK

Disable flashing, run:

sudo update-initramfs -ck `uname -r`

then re-enable flashing and reboot..

Regards,

SanchayanMaity commented 6 years ago

@RobertCNelson Thanks that solves the issue.