Hi abhilash,
I had the same concern when I started working with this board in OpenWRT, but all is ok. The u-boot configs are automatically created when you chose the FRDM-LS1012A platform. You could see them in the .config file in /home/administrador/lede/source/ directory.
If you compile it, in directory:
/home/administrador/lede/source/build_dir/target-aarch64_generic_musl/uboot-layerscape-ls1012afrdm/uboot-layerscape-2017.09
you could see the u-boot binary.
I've write a small guide for anyone that want to try this interesting board with openWRT.
In directory:
/home/administrador/lede/source/bin/targets/layerscape
you could see the whole binary image:
openwrt-layerscape-armv8_64b-ls1012afrdm-squashfs-firmware.bin
that includes the following map of binary code:
spi Lede 17.01 file system map:
000 0000 – 00F FFFF RCW 1MB
010 0000 – 03F FFFF uboot 3MB
040 0000 – 09F FFFF ppa 6MB
0A0 0000 – 0EF FFFF ppfe 5MB
0F0 0000 – 0FF FFFF dtb 1MB
100 0000 – 0FF FFFF kernel 16MB
200 0000 – 3FF FFFF rootfs 30MB
You could see how is created in:
/home/administrador/lede/source/target/linux/layerscape/image/Makefile
In directory:
/home/administrador/lede/source/build_dir/target-aarch64_generic_musl/linux-layerscape_armv8_64b
you could find the following files:
image-fsl-ls1012a-frdm.dtb Device tree binary file. Created from dts
ls1012afrdm-30M.root.ext4 Root file system, in ext4 format
ls1012afrdm-kernel.bin Linux kernel, in uImage format
Be careful when writing spi flash, because if you write a wrong RCW binary the only way to recover the board is Codewarrior TAP, an expensive tool ($500) that NXP forces us to buy, because the Layerscape processors has no usb boot code, and the only way to boot is spi rcw. USB CMSIS can't write RCW (why?). For new boards you should buy it, or include a mechanism to write spi flash externally.
I use to write only the rootfs or kernel directly.
u-boot ethernet driver in openwrt give errors in my board (in linux ethernet works very well). That's why I use usb pendrive to load the files.
The USB has to be powered with an external 5V power supply to work. I use a micro-usb to usb-a female adapter to connect the pendrive.
The pendrive has to be formated as fat.
Then, the commands to load a new kernel are:
usb start
fatload usb 0:1 96000000 ls1012afrdm-kernel.bin
sf probe 0:0
sf erase 1000000 +$filesize
sf write 96000000 1000000 $filesize
The commands to load a new root file system are:
usb start
fatload usb 0:1 96000000 ls1012afrdm-30M.root.ext4
sf probe 0:0
sf erase 2000000 +$filesize
sf write 96000000 2000000 $filesize
RCW file is in directory:
/home/administrador/lede/source/build_dir/target-aarch64_generic_musl/ls-rcw-2017.09-ls1012afrdm/ls-rcw-2017.09/ls1012afrdm/N_SSNP_3305/PBL_0x33_0x05_800_250_1000_default.bin
To change it for a new board, you should use Codewarrior Development Studio for Networked applications.
This tool is not free, like in almost all manufacturers nowadays (for example Texas Instruments CCS), It is not even cheap: it cost $3000. But you could use the evaluation version to change RCW.
But you should have in mind that if you want to make your own board and you want to use the ddr validation tool to
calibrate ram, you should buy the Specialist version of Codewarrior that cost $5000.
I think that semiconductor manufacturers has to get money from silicon chips, not from developer tools. Developer tools has to be free to atract developers to their platforms. And that is specially clear here, because under Codewarrior there is an open source tool: Eclipse, that NXP is using at no charge.
If you make your own board, you could need to change dts to reflect changes from FRDM-LS1012A board.
There is two kind of dts files: the u-boot dts files, and the kernel dts files.
The u-boot dts files get integrated in u-boot binarty and you could find them in:
/home/administrador/lede/source/build_dir/target-aarch64_generic_musl/uboot-layerscape-ls1012afrdm/uboot-layerscape-2017.09/arch/arm/dts/fsl-ls1012a-frdm.dts
/home/administrador/lede/source/build_dir/target-aarch64_generic_musl/uboot-layerscape-ls1012afrdm/uboot-layerscape-2017.09/arch/arm/dts/fsl-ls1012a-frdm.dtsi
The kernel dts files should be written in spi, and you could find them in:
/home/administrador/lede/source/build_dir/target-aarch64_generic_musl/linux-layerscape_armv8_64b/linux-4.9.67/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi
/home/administrador/lede/source/build_dir/target-aarch64_generic_musl/linux-layerscape_armv8_64b/linux-4.9.67/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts
The commands to load a new dtb are:
usb start
fatload usb 0:1 96000000 fsl-ls1012a-frdm.dtb
sf probe 0:0
sf erase F00000 +$filesize
sf write 96000000 F00000 $filesize