termux-packages icon indicating copy to clipboard operation
termux-packages copied to clipboard

Package request: flashrom

Open S-trace opened this issue 4 years ago • 8 comments

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.

S-trace avatar May 12 '20 18:05 S-trace

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.

Droid-MAX avatar Jul 25 '20 08:07 Droid-MAX

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

Ikhsanm03 avatar Nov 03 '20 11:11 Ikhsanm03

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

rhjdvsgsgks avatar Dec 29 '20 16:12 rhjdvsgsgks

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.

Ikhsanm03 avatar Jan 03 '21 08:01 Ikhsanm03

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

rhjdvsgsgks avatar Jan 03 '21 12:01 rhjdvsgsgks

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.

Ikhsanm03 avatar Jan 05 '21 10:01 Ikhsanm03

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?

chengnan049 avatar Sep 28 '23 11:09 chengnan049

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

000exploit avatar Jan 16 '24 23:01 000exploit