2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

FreeBSDAdvent Calendar 2021

Day 21

FreeBSDでもflashrom

Last updated at Posted at 2021-12-22

いつもはMacOS Xの雪豹かEl Capitanで使っているflashromですが、今は手元にMacがないのでFreeBSDで使ってみました。

flashromはpkgであります。

% sudo pkg install flashrom

試してみます。

% flashrom 
flashrom v1.2 on FreeBSD 13.0-RELEASE-p4 (amd64)
flashrom is free software, get the source code at https://flashrom.org

Please select a programmer with the --programmer parameter.
To choose the mainboard of this computer use 'internal'. Valid choices are:
internal, dummy, nic3com, nicrealtek, gfxnvidia, drkaiser, satasii, atavia,
it8212, serprog, buspirate_spi, dediprog, developerbox, rayer_spi, pony_spi,
nicintel, nicintel_spi, nicintel_eeprom, ogp_spi, satamv, pickit2_spi,
ch341a_spi, digilent_spi, stlinkv3_spi.
% sudo flashrom -p serprog:dev=/dev/cuaU0:57600
flashrom v1.2 on FreeBSD 13.0-RELEASE-p4 (amd64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 4, resolution: 1ns).
serprog: Programmer name is "ATMegaXX8 SFR"
Found Eon flash chip "EN29F002(A)(N)T" (256 kB, Parallel) on serprog.
No operations were specified.

昔秋月にあったPLCC32 5VなFlashですが、もうなくなってしまったようですね。

FTDIのサポートはオプションになっていたので、FT232HなどでSPI Flashを焼きたい場合はportsでオプションを設定してビルドしてください。

% ./flashrom 
flashrom v1.2 on FreeBSD 13.0-RELEASE-p4 (amd64)
flashrom is free software, get the source code at https://flashrom.org

Please select a programmer with the --programmer parameter.
To choose the mainboard of this computer use 'internal'. Valid choices are:
internal, dummy, nic3com, nicrealtek, gfxnvidia, drkaiser, satasii, atavia,
it8212, ft2232_spi, serprog, buspirate_spi, dediprog, developerbox, rayer_spi,
pony_spi, nicintel, nicintel_spi, nicintel_eeprom, ogp_spi, satamv,
usbblaster_spi, pickit2_spi, ch341a_spi, digilent_spi, stlinkv3_spi.

デフォルトではFTDIのモジュールはシリアルデバイスして認識されてしまうので、これを解除しないとflashromでは使えません。

新しいパッケージではftdiのサポートが入っていません。

 % flashrom
flashrom v1.3.0 on FreeBSD 13.1-RELEASE (amd64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 4, resolution: 70ns).
Please select a programmer with the --programmer parameter.
To choose the mainboard of this computer use 'internal'. Valid choices are:
internal, dummy, nic3com, nicrealtek, gfxnvidia, raiden_debug_spi, drkaiser,
satasii, atavia, it8212, serprog, buspirate_spi, dediprog, developerbox,
rayer_spi, pony_spi, nicintel, nicintel_spi, nicintel_eeprom, ogp_spi, satamv,
pickit2_spi, ch341a_spi, digilent_spi, stlinkv3_spi, dirtyjtag_spi.

USBも相性が悪いみたいで、FreeBSDでは使えないと思ったほうが良いようです。どうもプロジェクトの中にFreeBSDで使っている人がいなくなった感じがします。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?