Download source code from https://www.nxp.com/design/software/embedded-software/linux-software-and-development-tools/layerscape-software-development-kit-v21-08:LAYERSCAPE-SDK
choose
components folder have all the source downloaded
build folder has all output images rcw, atf, u-boot, linux, ubuntu, yocto, buildroot (desktop|lite|tiny) , firmwares. Including different type of boot media.
packages folder has .mk files
configs folder has board-manifest files, buildroot-defconfig, linux-.config, ubuntu-.cfg and packages_list, yocto-.config.
Connect sdcard via card reader to developement machine and find it's name under lsblk. For example /dev/sdc
Make sure you don't mention parition number of block device like sdc1 , just mention sdc
cd build/images/ Execute command …don't foget
flex-installer -r rootfs_lsdk2108_ubuntu_desktop_arm64_202206150917.tgz -b boot_LS_arm64_lts_5.10_202206150847.tgz -f firmware_ls1028ardb_sdboot.img -d /dev/sdc
Here i am considering ubuntu desktop as rootfs and bootimage for arm64 built on 15th june 2022 and firmware images for ls1028 board as we don't have option of ls1023a in build option now.
To know more about flex-installer refer to docs/build_and_deploy_distro.md
How to update only one of the image tfa/u-boot/rcw/ https://community.nxp.com/t5/Layerscape-Knowledge-Base/Reference-Design-Boards-How-tos/ta-p/1109286
device tree patch of pps
https://community.toradex.com/t/pps-gpio-adding-to-device-tree-syntax-error/10834/10
Writing uboot to nor boot
copy firmware_ls1043ardb_norboot.img sdcard(/dev/sdd2)
refer docs/lsdk_build_install.md->For IFC-NOR flash
load mmc 0:2 a0000000 firmware_<machine>_uboot_norboot.img , where machine is ls1043ardb
Those example step using LS1046ARDB for your reference (QSPI booting and rootfs in emmc)
The LS1043ARDB without emmc device, you can using SDCard to practice
create
firmware_ls1046ardb_qspiboot.img - bootloader
boot_LS_arm64_lts_5.10.tgz - kernel rootfs_lsdk2108_ubuntu_main_arm64.tgz - rootfs
Using tftp download firmware_ls1046ardb_qspiboot.img and programing QSPI flash(writing bootloader to spi flash)
=> tftp filesize && sf write $load_addr 0 $filesize
Using QSPI Boot setting Booting in TinyLinux and using root login
NXP LSDK tiny 2108 (based on Yocto)
TinyLinux login: root
Put those two file in USB disk connect to LS1046ARDB
boot_LS_arm64_lts_5.10.tgz
rootfs_lsdk2108_ubuntu_main_arm64.tgz
Mount USB disk in /mnt
root@TinyLinux:~# mount /dev/sda1 /mnt
Using flex-install create boot partition and rootfs
root@TinyLinux:~# cd /mnt/
root@TinyLinux:/mnt# flex-installer -b boot_LS_arm64_lts_5.10.tgz -r rootfs_lsdk2108_ubuntu_main_arm64.tgz -d /dev/mmcblk0
Modify RCW, compile and prepare firmware for sd card
cd flexbuild_lsdk2108
source setup.env
vi components/firmware/rcw/ls1043ardb/RR_FQPP_1455/rcw_1600_sdboot.rcw
flex-builder clean-firmware //clean build is mandatory to take changes into effect
flex-builder -i mkfw -m ls1043ardb -b sd
cd build/images/
flex-installer -f firmware_ls1043ardb_sdboot.img -d /dev/sdc //check sd card node by lsblk command
flex-builder -m ls1043ardb
prepare sd card after confirming the timestamp of individual images using command
cd build/images
flex-installer -r rootfs_lsdk2108_ubuntu_desktop_arm64.tgz -b boot_LS_arm64_lts_5.10.tgz -f firmware_ls1043ardb_sdboot.img -d /dev/sdq
flex-builder -i mkfw -m ls1043ardb
to compile only for sd boot media
flex-builder -i mkfw -m ls1043ardb -b sd
flex-builder -c linux
machine type and boot media is optional
flex-builder -c linux -m ls1043ardb -b sd
flex-builder -i mkboot # generate boot partition tarball (contains kernel, dtb, modules, distro boot script, etc) for deployment
flex-builder -i mkrfs -r ubuntu:desktop # generate Ubuntu desktop arm64 userland
flex-builder -i mkrfs -r ubuntu:lite # generate Ubuntu lite arm64 userland
flex-builder -i mkrfs -r yocto:tiny # generate Yocto-based arm64 tiny userland
flex-builder -i mkrfs -r buildroot:tiny # generate Buildroot-based arm64 tiny userland
flex-builder -i mkrfs -r centos # generate CentOS arm64 userland
flex-builder -i mkitb -r yocto:tiny # generate lsdk_yocto_tiny_LS_arm64.itb
flex-builder i packrfs <os>:<variant>
for eg: flex-builder -i packrfs ubuntu:lite
flex-builder -m ls1043ardb # automatically build all firmware, linux, apps components and distro userland for ls1046ardb
flex-builder clean # clean all obsolete firmware/linux/apps image except distro rootfs
flex-builder clean-rfs # clean distro rootfs, '-r ubuntu:main -a arm64' by default
flex-builder clean-firmware # clean obsolete firmware image
flex-builder clean-linux # clean obsolete linux image
wget http://ports.ubuntu.com/pool/universe/l/linuxptp/linuxptp_1.9.2-1_arm64.deb
dpkg -i linuxptp_1.9.2-1_arm64.deb