termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.02k stars 2.99k forks source link

Package request: flashrom #5284

Open S-trace opened 4 years ago

S-trace commented 4 years ago

Package description flashrom is a utility for detecting, reading, writing, verifying and erasing flash chips. It is often used to flash BIOS/EFI/coreboot/firmware images in-system using a supported mainboard, but it also supports flashing of network cards (NICs), SATA controller cards, and other external devices which can program flash chips.

Link to home page and sources

  1. Home page: https://flashrom.org/Flashrom
  2. Source code: https://github.com/flashrom/flashrom

Additional information Have you compiled or tried to compile the package on device? Yes, it works. I built it in the LineageOS 17.1 source tree with following Android.mk: https://raw.githubusercontent.com/S-trace/android_external_flashrom/master/Android.mk No other patches were required - just a properly configured Android.mk file. This package depends on the libusb, which is not part of the NDK.

Droid-MAX commented 4 years ago

I try to statically compiled flashrom without any libusb support, and it works with specific programmer parameter, e.g. flashrom -p serprog:dev=xxx.., and also need root permission. I hope it can be adapted to an independent Android App. In doing so, the source code may have to be rewritten on a large scale.

Ikhsanm03 commented 3 years ago

In android you can use ComboTool from AppCombo to flash with ch341a eeprom programmer. Maybe you can refer from that app.

rhjdvsgsgks commented 3 years ago

i tried to build it too, just need install libusb and build it by a single line make CONFIG_ENABLE_LIBPCI_PROGRAMMERS=no i also tried combotool , unfortunately it doesn't support w25qxx series, and much more slower than flashrom, take about 1 hour to flash a 16mb rom

Ikhsanm03 commented 3 years ago

i tried to build it too, just need install libusb and build it by a single line make CONFIG_ENABLE_LIBPCI_PROGRAMMERS=no i also tried combotool , unfortunately it doesn't support w25qxx series, and much more slower than flashrom, take about 1 hour to flash a 16mb rom

I have tried a combo tool application to flash my acer aspire 4752 laptop with w25q32bvsig chip and had success. I just need a dc power supply to provide 2.3v power to the bios chip. Maybe a dc power supply is not needed if the chip is removed from the motherboard first. The time it takes is about 10 minutes but there is no indicator of the process, only a description of success or failure. If notification appear just tap wait. The thing to pay attention to when using the combo tool is the detect chip menu, if it says ffffff it means the chip has not been detected, while written a combination of numbers means the chip is detected. Also make sure to detect the chip a few times and see if the result is the same number. After write success, don't forget to verify and if it says equal it means the flash is successful. if it is not equal, it means that the files written into the chip are not the same because the chip has not been detected properly or something else.

rhjdvsgsgks commented 3 years ago

I have tried a combo tool application to flash my acer aspire 4752 laptop with w25q32bvsig chip and had success. I just need a dc power supply to provide 2.3v power to the bios chip. Maybe a dc power supply is not needed if the chip is removed from the motherboard first. The time it takes is about 10 minutes but there is no indicator of the process, only a description of success or failure. If notification appear just tap wait. The thing to pay attention to when using the combo tool is the detect chip menu, if it says ffffff it means the chip has not been detected, while written a combination of numbers means the chip is detected. Also make sure to detect the chip a few times and see if the result is the same number. After write success, don't forget to verify and if it says equal it means the flash is successful. if it is not equal, it means that the files written into the chip are not the same because the chip has not been detected properly or something else.

which model did you chose for your chip? my chip is w25q128 and it doesn't in the chip model list, so I chose 25m128 (which seems nearest to it) for the alternative. before flash i also tried "detect chip" and result is not ffffff (it confirmed that connection is succeeded) and wipe it . after flashing, result page says successful, cause of read/write too slow, i didn't verify it, but my device which be flashed still not working

Ikhsanm03 commented 3 years ago

I have tried a combo tool application to flash my acer aspire 4752 laptop with w25q32bvsig chip and had success. I just need a dc power supply to provide 2.3v power to the bios chip. Maybe a dc power supply is not needed if the chip is removed from the motherboard first. The time it takes is about 10 minutes but there is no indicator of the process, only a description of success or failure. If notification appear just tap wait. The thing to pay attention to when using the combo tool is the detect chip menu, if it says ffffff it means the chip has not been detected, while written a combination of numbers means the chip is detected. Also make sure to detect the chip a few times and see if the result is the same number. After write success, don't forget to verify and if it says equal it means the flash is successful. if it is not equal, it means that the files written into the chip are not the same because the chip has not been detected properly or something else.

which model did you chose for your chip? my chip is w25q128 and it doesn't in the chip model list, so I chose 25m128 (which seems nearest to it) for the alternative. before flash i also tried "detect chip" and result is not ffffff (it confirmed that connection is succeeded) and wipe it . after flashing, result page says successful, cause of read/write too slow, i didn't verify it, but my device which be flashed still not working

I am using 25m32 model. Number 25 means the type of chip and 32 is the size of the file in megabit. The larger the file size the longer the process will take. You have to verify to make sure whether the file written on the chip is the same as the file.

chengnan049 commented 11 months ago

I don’t understand it very well. In other words, if we want to use flashrom on mobile phones, it’s not possible yet, right?

000exploit commented 8 months ago

So, what's the problem rn? We're already have termux root repo and libusb in it.