Vladimir Petrovic Posted May 14, 2018 Posted May 14, 2018 Hi, Have a problem with Orange Pi Zero on Armbian Mainline kernel . It's based on Debian 9. It's Linux orangepizero 4.14.14-sunxi .
Vladimir Petrovic Posted May 14, 2018 Author Posted May 14, 2018 10 minutes ago, Igor said: You need to update u-boot as well. Can not find spi flash in /dev/ where can I find it on Debian 9?
Igor Posted May 14, 2018 Posted May 14, 2018 Perhaps here: https://docs.armbian.com/User-Guide_Allwinner_overlays/
Vladimir Petrovic Posted May 14, 2018 Author Posted May 14, 2018 Ok, I've activated spi-add-cs1 spi-jedec-nor spi-spidev and still no luck to find spi flash. sunxi-fel spiflash-info return : ERROR: Allwinner USB FEL device not found! also can not find /dev/spidev0.0 as on legacy kernel. Any clue? Do I need some params for spi-spidev and spi-jedec-nor?
Vladimir Petrovic Posted May 15, 2018 Author Posted May 15, 2018 Do I need to boot with Debian 9 image with mainline kernel from sdcard to see spi flash and then udgrade u-boot on it because it's old u-boot on SPI flash right now. That look's like only solution to se SPI flash to update with new u-boot for mainline kernel.
Vladimir Petrovic Posted May 27, 2018 Author Posted May 27, 2018 Still no luck to update u-boot on SPI flash. If I'm not in wrong spi device is in mainline kernel /dev/mtd0. cat /proc/mtd dev: size erasesize name mtd0: 00200000 00001000 "spi0.0" When I try to write : dd if=/dev/zero count=4096 bs=1K | tr '\000' '\377' > spi.img dd if=/usr/lib/ linux-u-boot-dev-orangepizero_5.38_armhf /u-boot-sunxi-with-spl.bin of=spi.img bs=1k conv=notrunc everything goes fine but when I execute write to chip flashrom -p linux_spi:dev=/dev/mtd0 -w spi.img I get this error: Calibrating delay loop... OK. linux_spi_init: failed to set SPI mode to 0x00: Inappropriate ioctl for device Error: Programmer initialization failed. What I'm doing wrong?
martinayotte Posted May 27, 2018 Posted May 27, 2018 3 minutes ago, Vladimir Petrovic said: flashrom -p linux_spi:dev=/dev/mtd0 -w spi.img /dev/mtd0 is not an SPI device ... You need to add SPIDEV overlay to access it with flashrom. Otherwise, use "flashcp" to push binary to /dev/mtd0 Some reading here :
Vladimir Petrovic Posted May 27, 2018 Author Posted May 27, 2018 I've added spidev overlay: Found mainline kernel configuration 31935 bytes read in 1273 ms (24.4 KiB/s) 504 bytes read in 795 ms (0 Bytes/s) Applying kernel provided DT overlay sun8i-h3-usbhost2.dtbo 504 bytes read in 891 ms (0 Bytes/s) Applying kernel provided DT overlay sun8i-h3-usbhost3.dtbo 780 bytes read in 878 ms (0 Bytes/s) Applying kernel provided DT overlay sun8i-h3-spi-spidev.dtbo 804 bytes read in 834 ms (0 Bytes/s) Applying kernel provided DT overlay sun8i-h3-spi-jedec-nor.dtbo 382 bytes read in 373 ms (1000 Bytes/s) Applying kernel provided DT overlay sun8i-h3-cir.dtbo U-Boot SPL 2017.11-armbian (Jan 25 2018 - 08:04:30) DRAM: 512 MiB Trying to boot from MMC1 But no /dev/spidev0.0 . What I'm doing wrong? kernel is : Linux orangepizero 4.14.18-sunxi #24 SMP Fri Feb 9 16:24:32 CET 2018 armv7l GNU/Linux
Vladimir Petrovic Posted May 27, 2018 Author Posted May 27, 2018 so I can push bin like this to spi flash: flashcp /usr/lib/linux-u-boot-next-orangepizero_5.38_armhf/u-boot-sunxi-with-spl.bin /dev/mtd0 ?
martinayotte Posted May 27, 2018 Posted May 27, 2018 Right ! "flashcp" is part of the mtd-utils, http://www.linux-mtd.infradead.org/ , but can be installed using "apt-get install mtd-utils"
Recommended Posts