amazfitDev / platform_kernel-3.10.14

This project aims at developing working kernels for Amazfit watches
Other
8 stars 4 forks source link

How to test without brick the watch #1

Open chenchix opened 5 years ago

chenchix commented 5 years ago

I have a verge and i got sources from ingenic too. I tried to compile a kernel by myself but when I flashed the boot.img my verge died. Do you use qemu or any other safe way to test it? I would like to help you with this project

GramThanos commented 5 years ago

First of all, you need to know the combination to enter fastboot, so that you can unbrick it.

As for the kernel, you don't have to flash the kernel, you copy it inside the watch and just boot it without flashing it.

I will upload a guide when I have time.

GreatApo commented 5 years ago

To provide more information over what Thanos wrote:

To boot directly to fastboot, follow the steps from this XDA thread. Is is a little difficult, but it works.

Then to test the kernel, use the "boot" command not the "flash" command.

There is also a flashing tool that can restore/unbrick your watch, the "Ingenic Cloner tool" . You can find a tutorial here.

chenchix commented 5 years ago

I know cloner tool, but as I said, my old verge unit died and any fastboot method did work. If you are sure that fastboot boot boot.img i can give a try.

I think I was able to extract a config file from /proc/config.gz, If i found it , i will add it as a PR here.

GramThanos commented 5 years ago

Boot command does not flash the image, thus you can use it to onetime test a kernel. But you may have to flash the appropriate filesystem before booting a kernel (or it may crash). It is also faster and easier for development than flashing.

Also, based on my tests, booting a kernel image from fastboot sometimes failed (the flashed kernel booted)

chenchix commented 5 years ago

Yeah, sure! First I want to test system.img and boot.img I built sometime ago. Let see...