Get & unpack the toolchain:
cd /opt wget http://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/arm-linux-gnueabi/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz tar xvJf gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz export PATH="$PATH:/opt/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin"
Get U-Boot:
git clone https://github.com/Lichee-Pi/u-boot.git cd u-boot git checkout nano-v2018.01 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- licheepi_nano_spiflash_defconfig
Configure it:
make ARCH=arm menuconfig
Enable ARM architecture → Enable graphical uboot console on HDMI, LCD or VGA, set LCD panel timing details to:
x:800,y:480,depth:18,pclk_khz:33000,le:87,ri:40,up:31,lo:13,hs:1,vs:1,sync:3,vmode:0
Set LCD panel backlight pwm pin to PE6.
And compile it:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
Clone the linux kernel repository
git clone --depth=1 -b f1c100s-480272lcd-test https://github.com/Icenowy/linux.git
Enable JFFS2 filesytem in the menu config
make ARCH = arm menuconfig
And build the kernel zImage
make ARCH = arm CROSS_COMPILE = arm-linux-gnueabi- -j4
Write compiled binaries to the SPI flash:
sunxi-fel -p spiflash-write 0 u-boot-sunxi-with-spl.bin sunxi-fel -p spiflash-write 0x110000 suniv-f1c100s-licheepi-nano-with-lcd.dtb sunxi-fel -p spiflash-write 0x110000 zImage sunxi-fel -p spiflash-write 0x510000 rootfs.jffs2
SPI partitions (dtsi):
partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "u-boot"; reg = <0x000000 0x100000>; read-only; }; partition@100000 { label = "dtb"; reg = <0x100000 0x10000>; read-only; }; partition@110000 { label = "kernel"; reg = <0x110000 0x400000>; read-only; }; partition@510000 { label = "rootfs"; reg = <0x510000 0xAF0000>; }; };