RobertCNelson / boot-scripts

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

init-EMMC-flasher doesn't work with kernel 5. #115

Closed TD-3294 closed 4 years ago

TD-3294 commented 4 years ago

Hi,

First of all, thanks many for the tools you have developed. This is great. I have been using an image built with kernel 4.9, and just upgraded my image with kernel 5.4.28-ti-rt-r7. But it gets stuck at boot time, and doesn't flash the BBB. The log is below.

Checking for Valid bbb-eeprom header Traceback (last called is first): do_we_have_eeprom() in /opt/scripts/tools/eMMC/functions.sh:483 do_we_have_am335x_eeprom() in /opt/scripts/tools/eMMC/functions.sh:491 check_am335x_eeprom() in /opt/scripts/tools/eMMC/functions.sh:499 check_eeprom() in /opt/scripts/tools/eMMC/functions.sh:535 main() in /opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh:46 The command ls /sys/devices/ocp/44e0b000.i2c/i2c-0/0-0050/eeprom 2> /dev/null exited with exit code 2. 100000+0 records in 100000+0 records out 51200000 bytes (51 MB, 49 MiB) copied, 1.54175 s, 33.2 MB/s Traceback (last called is first): do_we_have_eeprom() in /opt/scripts/tools/eMMC/functions.sh:483 do_we_have_am335x_eeprom() in /opt/scripts/tools/eMMC/functions.sh:491 check_am335x_eeprom() in /opt/scripts/tools/eMMC/functions.sh:499 check_eeprom() in /opt/scripts/tools/eMMC/functions.sh:535 main() in /opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh:46 The command eeprom_location=$(ls /sys/devices/ocp/44e0b000.i2c/i2c-0/0-0050/eeprom 2> /dev/null) exited with exit code 2.

Looking at the script (line 477 of EMMC/functions.sh) it seems that it checks for version 4.4 of the kernel, but not for 5.x. Don't know if that is intentional or simply unsupported.

Is there a way to build the flasher with kernel 4.x and the image with 5.x ?

Thanks,

Juan

RobertCNelson commented 4 years ago

@TD-3294 sorry, i haven't really started full testing of 5.4.x-ti, i bet something did change..

(in know 4.14.x-ti/4.19.x-ti works as we shipped flashers as of April 2020)

Regards,

TD-3294 commented 4 years ago

Yep, that one is working fine (just tested it). Thanks!

Juan

ppBBB commented 4 years ago

Hi, thank you for the great work you are doing. I have a BBB and tried to flash the testing console image buster 10.4 with kernel 5.x. It seems to get stuck somehow during flashing. Running debian from same non flasher image works. Changing last line of uEnv.txt of the working image gives same result: system hang up.

I tried buster 10.3 with kernel 4.x flashing emmc works. How can I solve the issue? Or do you plan to update the flashing procedure?

RobertCNelson commented 4 years ago

@ppBBB please add the file name of the image you tried. Thanks

ppBBB commented 4 years ago

Thank you for your fast reply. BBB RevC 4GB bone-debian-9.12-console-armhf-2020-04-06-1gb.img.xz boot ok + enabled flash ok, also EMMC-flasher version bone-eMMC-flasher-debian-10.3-console-armhf-2020-04-06-1gb.img.xz -> flash ok bone-eMMC-flasher-debian-10.4-console-armhf-2020-05-18-1gb.img.xz -> flash hang up bone-debian-10.4-console-armhf-2020-05-18-1gb.img.xz boot from sd card ok, works fine, python3 already installed. -> enable last line in /boot/uEnv.txt on sdcard for flashing -> reboot -> hang up, same as above, all 4 blue leds on, cpu gets hot.

RobertCNelson commented 4 years ago

This is now fixed with: https://github.com/RobertCNelson/boot-scripts/commit/9b2c9d6a090fe468944b97408b3dcda2d2ec9fce

from /opt/scripts/ run "git pull"

Also fixed up the am57xx's eeprom location in newer kernels'.

ppBBB commented 4 years ago

works great! Thank your for your help.