RK3328 boot from SPI NOR Flash | U-Boot Building

Hi,

I have Orange Pi R1 Plus (clone of nanopi r2s) board with rk3328 and 16MB SPI NOR Flash (MX25L12835F)

I am trying to boot OpenWRT linux from SPI NOR, I compiled OpenWRT with able to fit on SPI flash. Full image size 5.9MB
Then,
I have cloned this uboot repo > GitHub - u-boot/u-boot: "Das U-Boot" Source Tree
and added spi booting options to nanopi-r2s-rk3328_defconfig shown below and compiled uboot

CONFIG_SPL=y
CONFIG_CMD_SF=y
CONFIG_CMD_SPI=y
CONFIG_DM_SPI=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_SPI=y
CONFIG_SPI_MEM=y
########### rk3328 uboot building with spi support

sudo apt-get install gcc-aarch64-linux-gnu
export CROSS_COMPILE=aarch64-linux-gnu-
make nanopi-r2s-rk3328_defconfig
make -j $(nproc) V=s

result images are :u-boot.bin u-boot.cfg u-boot.cfg.configs u-boot.dtb u-boot-dtb.bin u-boot-dtb.img u-boot.img u-boot.itb u-boot.its u-boot.lds

I wanna ask you masters how can i create mtd parts . What is correct spi parts organization.

Here is my original topic from openwrt forum:

I’ve finally made some progress. Check it out:

https://github.com/Marcin666/RK3328_Uboot_SPI/