Jumat, 02 November 2018

pi duino flashroom

install paket
sudo apt install git libpci-dev libusb-1.0 libusb-dev
git clone https://github.com/flashrom/flashrom.git
cd flashrom
make && sudo make install

Flashing the chip

pi@raspberrypi:~ $ flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=512
flashrom p1.0-76-g291764a on Linux 4.14.34-v7+ (armv7l)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Found Winbond flash chip "W25X80" (1024 kB, SPI) on linux_spi.
No operations were specified.
Winbond W25X80 
pi@raspberrypi:~ $ flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=512 -r flash.dat
flashrom p1.0-76-g291764a on Linux 4.14.34-v7+ (armv7l)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Found Winbond flash chip "W25X80" (1024 kB, SPI) on linux_spi.
Reading flash... done.
After backing up the old BIOS we can safely write the new BIOS back to the chip.
pi@raspberrypi:~ $ flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=512 -w flash.dat 
flashrom p1.0-76-g291764a on Linux 4.14.34-v7+ (armv7l)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Found Winbond flash chip "W25X80" (1024 kB, SPI) on linux_spi.
Reading old flash chip contents... done.
Erasing and writing flash chip... 
Warning: Chip content is identical to the requested image.
Erase/write done.
RPi pinSPI flash
25GND
24CS
23SCK
21DO
19DI
17VCC 3.3V and /HOLD and /WP
duino
sudo apt install git libpci-dev libusb-dev libusb-1.0 gcc-avr binutils-avr avr-libc avrdude

Preparing the Arduino Duemilanove

git clone --recursive git://github.com/urjaman/frser-duino
cd frser-duino
make ftdi <--- depends on your Arduino
make flash-ftdi <--- same

Flashing the SPI chip

~$ sudo flashrom -p serprog:dev=/dev/ttyUSB0:2000000
flashrom v0.9.9-91-g0bfa819 on Linux 4.10.0-28-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
serprog: Programmer name is "frser-duino"
Found Macronix flash chip "MX25L8005" (1024 kB, SPI) on serprog.
No operations were specified.
tom@ubuntu-vm:~$ sudo flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -w <NEWBIOS>

flashrom v0.9.9-91-g0bfa819 on Linux 4.10.0-28-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
serprog: Programmer name is "frser-duino"
Found Macronix flash chip "MX25L8005" (1024 kB, SPI) on serprog.
Reading old flash chip contents... done.
Erasing and writing flash chip... Erase/write done.
Verifying flash... VERIFIED.

Tidak ada komentar:

Posting Komentar