v2020.02.23
Simple and standard example:
This example assumes you have 12f version of FPGA and ESP32 with uftpd enabled. That means you connect with FTP to the ESP32 IP and issue following FTP commands:
put [email protected] flash@0x300000
put [email protected] flash@0x310000
put saxonsoc-sdimage.raw sd@0
put saxonsoc-ulx3s-linux-12f.bit fpga
85F version with 64 MB SDRAM
You can use standard procedure above, but if you boot the Linux - you will have 32 MB of RAM. If you want to take advantage of 64 MB SDRAM, you have to go through the similar procedure as standard one (thanks to @dpavlin), but you need use saxonsoc-ulx3s-linux-85-64mem.bit bitstream and to interrupt u-boot autoload and issue following command (0:1 is for first partition, 0:2 is for second partition, etc):
load mmc 0:1 0x80000000 /boot/uImage;load mmc 0:1 0x81EF0000 /boot/dtb;fdt add 0x81EF0000;fdt memory 0x80000000 0x04000000;bootm 0x80000000 - 0x81EF0000
If 64 MB commands you entered results with correct boot and works for you, you can always saveenv:
setenv bootcmd "load mmc 0:1 0x80000000 /boot/uImage;load mmc 0:1 0x81EF0000 /boot/dtb;fdt add 0x81EF0000;fdt memory 0x80000000 0x04000000;bootm 0x80000000 - 0x81EF0000"
saveenv
ULX3S without ESP32
without ESP32, you need to prepare sd card manually (dd if=saxonsoc-sdimage.raw) and upload it with ujprog. Once you have image copied to the card and card in slot, here's the ujprog example for 45f:
ujprog -j FLASH -f 0x300000 [email protected]
ujprog -j FLASH -f 0x310000 [email protected]
ujprog saxonsoc-ulx3s-linux-45f.bit
Different partition (root partition is not first one)
If you prefer or have root partition on different partition number (second, third, etc), you have to change uboot environment and save environment:
setenv bootcmd "load mmc 0:2 0x80000000 /boot/uImage;load mmc 0:2 0x81EF0000 /boot/dtb;bootm 0x80000000 - 0x81EF0000"
setenv bootargs "rootwait console=hvc0 root=/dev/mmcblk0p2 init=/sbin/init mmc_core.use_spi_crc=0"
saveenv
or if you have 64 MB SDRAM;
setenv bootcmd "load mmc 0:2 0x80000000 /boot/uImage;load mmc 0:2 0x81EF0000 /boot/dtb;fdt add 0x81EF0000;fdt memory 0x80000000 0x04000000;bootm 0x80000000 - 0x81EF0000"
setenv bootargs "rootwait console=hvc0 root=/dev/mmcblk0p2 init=/sbin/init mmc_core.use_spi_crc=0"
saveenv
Of course, you have to change all instances of "0:2" and "/dev/mmcblk0p2" to partition where your root partition is located. In above example, it is second partition.