Jump to content

Recommended Posts

Posted

Hi all
i'm trying to boot my Orange Pi bord over the network.
For this purpose i'm going to use SPI Flash memory to load bootloader (Uboot).
I found a tool named nand-sata-install introduced by Igor.
I have read all the script and i'm wondering how much capacity my SPI NAND flash should have.
SunXi recommends 2MB (16Mbit) but my bootloader is about 5MB.

Posted

Booting from SPI-NOR doesn't need other things than the u-boot-sunxi-with-spl.bin in the flash, which a bit less than 500K.

The kernel itself along uinitrd and dtb should be located elsewhere.

I've never try to boot in NFS or TFTP yet, but booting from USB drive just works fine.

(BTW, pushing u-boot-sunxi-with-spl.bin into flash isn't done by nand-sata-install, nand-sata-install is used to copy sdcard into other storage such USB drive or eMMC)

Posted

Thanks for the quick reply. Can you tell me step by step guide and tool how to flash my spi flash memory and also how to tell uboot to boot over lan or usb ?

best regards.

Posted

For flashing the SPI-NOR, you need to get "mtd-utils", either from apt-get or from sources.

You need to add in the /boot/armbianEnv.txt the following overlay :

overlays=spi-jedec-nor

Then, reboot, and check if SPI-NOR appears by doing "cat /proc/mtd". If you have mtd partitions, then install u-boot-spl using this command (check previous partitions to make sure u-boot is mtd0) :

flashcp /usr/lib/linux-u-boot-dev-orangepipc_5.27_armhf/u-boot-sunxi-with-spl.bin /dev/mtd0

Next steps are for copying your sdcard into you already inserted usb drive by using nand-sata-install. After copy finished, edit the boot.cmd from your usb drive, this means probably /mnt/boot/boot.cmd if drive mounted in /mnt.

Change all "mmc" words by "usb" and add on top of boot.cmd the line "setenv devtype usb", save it and recompile it with "mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr".

Then, shutdown the board, remove the sdcard, and re-power the board. Check the boot log using USB-TTL adaptor. If everything fine, you should get into the login prompt. Bingo !

 

 

Posted

I followed all of your instruction but was unable to make SPI-Flash to work.

after adding overlays=spi-jedec-nor and installing mtd-utils still there is no /proc/mtd file and that flashcp command does not recognize /dev/mtd0.

Is there any additional process I have to do ? I'm using am untouched Armbian opi zero image.

Regards.

Posted

Check the back of your OPiZero to make sure you have a SPI_NOR already soldered.

If your PCB has blank SOIC8 pads, you will need to purchase a flash chip and solder it there.

 

Posted

I've already soldered spi flash "Macronix MX25L1606E" which  xunlong currently use for zero and pc2 but spi flash does not show up .

Posted

My "dmesg" output if it helps :

  Reveal hidden contents

 

Posted
  On 4/22/2017 at 2:18 PM, A-P said:

[    0.000000] Linux version 3.4.113-sun8i (root@devel) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #28 SMP PREEMPT Thu Feb 2 02:01:28 CET 2017

Expand  

This is the legacy kernel. You need to enable spidev in script.bin (if it's not enabled already) and use flashrom (from flashrom package) on /dev/spidev0.0 to write the u-boot

Posted

I'm currently using raspberry pi hat type lcd with the board. Does that mean spidev is already activated ? If not please tell me how to enable that.

also flashing uboot means issue the command :

flashcp /usr/lib/linux-u-boot-dev-orangepipc_5.27_armhf/u-boot-sunxi-with-spl.bin /dev/spidev0.0

?

 

thanks.

Posted

What do you mean exactly ? How to flash SPI-NOR or How to make LCD work on RaspberryPi ? this is completely 2 different subjects.

For the SPI-NOR, as Zador said, it is not enabled by default. I personally suggest to use Mainline kernel anyway, it is much more easy to enable the overlay.

Posted

Hi again @martinayotte

Using your guide I could successfully program the spi flash and see /dev/mtd0.

Today I tried to to the same with a NEXT image and I added spi-jedec-nor to overlays together with other overlays like analog-audio and param_spidev_spi_bus=1 and <other overlays> spi-spidev and also spi-add-cs1 as user-overlays for getting a hat lcd with touch screen to work. But I can not see /dev/mtd0

Anything wrong with my setup ?

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines