如果聽聞
RPI does not boot if HAT EEPROM is corrupted #33
……
,恐怕不敢嘗試了!假使知道
You can disable the EEPROM reading using the config.txt setting force_eeprom_read=0
. I’ll take a look at the reading code to see why it doesn’t boot. If you can read the EEPROM contents and upload it somewhere (or email it to me) I can use it as a test case.
,玩玩又有何妨耶?
且讓我們仔細看看 eepflash.sh 怎麼讀寫 ID EEPROM 的呢?
# eepflash.sh line 90 modprobe i2c_dev dtoverlay i2c-gpio i2c_gpio_sda=0 i2c_gpio_scl=1 rc=rc != 0 ]; then echo "Loading of i2c-gpio dtoverlay failed. Do an rpi-update (and maybe aprc fi modprobe at24 rc=rc != 0 ]; then echo "Modprobe of at24 failed. Do an rpi-update." exit TYPE 0x50" > /sys/class/i2c-adapter/i2c-3/new_device fi if [ "FILE of=/sys/class/i2c-adapter/i2c-3/3-0050/eeprom rc=MODE" = "read" ] then echo "Reading..." dd if=/sys/class/i2c-adapter/i2c-3/3-0050/eeprom of=? fi
,原來是用 dd !如是可以假設是以 kernel at24 驅動程式來作的了 !!??由於 HiFiBerry DAC+ 的『寫入』 WR 太過麻煩,
《 Flash your DAC+ for automatic configuration 》
Do you need to flash your card?
No. If you have your system configured already, you can just keep it as it is.
What do you need to do to flash your HiFiBerry DAC+?
- Download the flash image from here and extract the ZIP file.
- Write the file flash-dacplus.img to an empty SD card
- Connect a display to your Raspberry Pi and boot from SD card you just wrote to
- When the flasher says “Press WRITE button”, press the white button (named “WR”) on your HiFiBerry DAC+. You need to press the button for about 40-60 seconds.
- When the data is written to the EEPROM the Raspberry Pi will reboot and play a (loud) test tone.
Is this only available for the DAC+?
We want to test this first with one card. At this time, only the DAC+ Standard and DAC+ Pro are supported. If everything works fine, we will provide a flash tool for the Digi+ in the near future.
───
所以作者選擇
Adafruit Perma-Proto HAT for Pi Mini Kit – With EEPROM
作測試也。相信讀者自可解讀測試結果的吧??!!
pi@raspberrypi:~
pi@raspberrypi:~ sudo dtoverlay i2c-gpio i2c_gpio_sda=0 i2c_gpio_scl=1 pi@raspberrypi:~ dmesg | tail [ 11.362701] Bluetooth: BNEP filters: protocol multicast [ 11.362718] Bluetooth: BNEP socket layer initialized [ 26.324406] pcm512x 1-004c: No SCLK, using BCLK: -2 [ 26.328952] pcm512x 1-004c: No SCLK, using BCLK: -2 [ 26.330990] pcm512x 1-004c: No SCLK, using BCLK: -2 [ 26.335874] pcm512x 1-004c: No SCLK, using BCLK: -2 [ 26.340147] pcm512x 1-004c: No SCLK, using BCLK: -2 [ 26.753253] pcm512x 1-004c: No SCLK, using BCLK: -2 [ 28.322041] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) [ 5362.460586] i2c-gpio i2c@0: using pins 0 (SDA) and 1 (SCL) pi@raspberrypi:~ cd hats/eepromutils/ pi@raspberrypi:~/hats/eepromutils sudo ./eepflash.sh -w -f=zero.eep -t=24c32 This will attempt to talk to an eeprom at i2c address 0x50. Make sure there is an eeprom at this address. This script comes with ABSOLUTELY no warranty. Continue only if you know what you are doing. Do you wish to continue? (yes/no): yes Writing... 8+0 records in 8+0 records out 4096 bytes (4.1 kB) copied, 81.909 s, 0.1 kB/s Done. pi@raspberrypi:~/hats/eepromutils
pi@raspberrypi:~/hats/eepromutils hexdump invalid.eep 0000000 0000 0000 0000 0000 0000 0000 0000 0000 * 0001000 pi@raspberrypi:~/hats/eepromutils $
I’ve seen a problem with a board where the EEPROM content wasn’t written correctly. With older 3.x kernels the board boots, but not with the latest kernel/firmware. Is there any kernel parameter to ignore the ID PROM contents? This needs to be only temporary to write the correct EEPROM contents.