Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No good in the latest ubuntu #29

Open
joesphan opened this issue Oct 28, 2020 · 4 comments
Open

No good in the latest ubuntu #29

joesphan opened this issue Oct 28, 2020 · 4 comments

Comments

@joesphan
Copy link

Hello!
The script doesn't work in the latest ubuntu, 20.10. I am no good with linux, so can't really tell you what went wrong, but installing 18.04 and running the script worked perfectly fine. If someone could check that out I'm sure it can be beneficial for the future.

@Toshibile
Copy link

Toshibile commented Dec 11, 2020

I've tested it succesfully under ubuntu 20.10 AMD 64 (installed, not live).
From a fresh, clean, install I had to update and install git in order to download and run the scripts from this repo.
I had issues with flashing, it kept on spitting "usb_bulk_send() ERROR -7: Operation timed out" which was not caused by a bad cable or power supply, so as stated in the main page, I had to downgrade sunxi-tools, first by installing it's old version with the commands under "Install sunxi-tools v1.4.1" (had to install some dependencies first, gcc and libusb-1.0-0-dev) and then by modifying the Flash.sh script so that it would not re-update it (commented out the "sunxi-tools" line under "apt install").

Hope this helps

@eparadis
Copy link

eparadis commented Oct 24, 2021

I set up a debian/buster64 machine using vagrant and VirtualBox. (vagrant init debian/buster64)
I needed to use the VirtualBox UI to enable USB for the machine as well as "add" a filter for the CHIP, which shows up as some type of tablet "in flashing mode".

In the VM I had to install the following packages:

  • gcc
  • libusb-1.0-0-dev
  • pkg-config

I still got an error make: arm-none-eabi-gcc: Command not found when doing sudo make install-all and I ran sudo make install-misc separately so it would go through.

I did change that line in Flash.sh as mentioned.

Sometimes, while it was "waiting for fel", and with the FEL pin grounded, I unplugged and inserted the USB cable to get it to recognize.

I have three CHIPs and all three of them would erase the NAND but would fail trying to "flash buildroot".
They all time out at waiting for fastboot.....

It doesn't seem to matter which image I use (buildroot, server, desktop, or pocketchip).

I'm not getting any errors - it's just not coming back around in the fastboot stage.

@eparadis
Copy link

I repeated these steps using a Raspberry Pi 3 instead of a virtual machine was able to successfully flash the Buildroot image. I suspect the issue is configuring the VM properly to allow pass-through USB during the Fastboot phase.

@Toshibile
Copy link

Toshibile commented Oct 30, 2021

@eparadis your timing is unbelievable to say the least.

I was trying to re-flash my CHIP last week and I also tried via VM but it failed by timeout at waiting for fastboot..... after a successfull NAND erasure exactly like it did for you.
I was running W10 on the host machine and I noticed that after the NAND erasure, CHIP "reboots" and plugs into windows as a different device for which the drivers kept failing, thus making it impossible to be passed the VM in order to end the procedure.
So I can confirm that USB pass-trough is what causes the issue when flashing from a VM on a W10 host.

I then booted a PC running the latest Ubuntu but flashing from it was not a breeze either:
I also encountered the same problem with make install-all you had, I tried solving the problem by installing the gcc-arm-none-eabi package (IIRC) but make install-all would still fail, this time because something looks for <sys/mman.h> but it's unable to find it no matter what.
I also tried going forward regardless by running just make install and make install-misc, because, IIRC, what will give you the error are the target-tools, which are installed by the install-all but not by the 2 commands above.

Flashing still didn't work though, but somehow at least I got to the a point where the flasher always failed by timing out after spewing fastboot: invalid option -- i for a while, which means that you're on the good track, apparently.

As I found out after a bit of googling, someone in the MAC version of this repo from Thore-Krug opened a few Issues with install-all and fastboot: invalid option -- i, the very same problems I had.

It seems that because fastboot has been updated, now it doesn't have the -i option anymore (can be confirmed by running fastboot --help, the -i option won't appear), so you have to downgrade it to the v26 version manually by downloading the platform-tools and overwriting whatever version of them you have.

After that, despite never really fixing the make install-all issues, the flasher finally worked.

I am sorry that I can't provide any more info on how exactly I managed to get it to work, but at least I can attest that flashing also works a PC running the latest Ubuntu, it's just quite fiddly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants