From 481fafd6e7bbb0db616fe095cfa5fa9950229214 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 20 Apr 2021 17:24:31 +0800 Subject: ls1043/ls1046: support WIC image generation Signed-off-by: Ting Liu --- conf/machine/include/qoriq-base.inc | 23 +++++++++++++++++++++++ conf/machine/ls1043ardb.conf | 2 ++ conf/machine/ls1046afrwy.conf | 2 ++ conf/machine/ls1046ardb.conf | 2 ++ wic/ls104x-uboot-bootpart.wks.in | 21 +++++++++++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 wic/ls104x-uboot-bootpart.wks.in diff --git a/conf/machine/include/qoriq-base.inc b/conf/machine/include/qoriq-base.inc index e482b857..92baae74 100644 --- a/conf/machine/include/qoriq-base.inc +++ b/conf/machine/include/qoriq-base.inc @@ -11,6 +11,29 @@ PREFERRED_VERSION_testfloat = "2a" SOC_DEFAULT_IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot ext2.gz" IMAGE_FSTYPES ?= "${SOC_DEFAULT_IMAGE_FSTYPES}" +# Composite Image Layout (in KBytes) +IMAGE_OFFSET_PBL ?= "4" +IMAGE_OFFSET_FIP ?= "1024" +IMAGE_OFFSET_FMAN_UCODE ?= "9216" + +# Composite Image Filenames +IMAGE_FILE_PBL_SD ?= "atf/bl2_sd.pbl" +IMAGE_FILE_FIP_UBOOT ?= "atf/fip_uboot.bin" + +# Do not update fstab file when using wic images +WIC_CREATE_EXTRA_ARGS ?= "--no-fstab-update" + +IMAGE_BOOT_FILES ?= " \ + ${KERNEL_IMAGETYPE} \ + *.dtb \ +" + +SOC_DEFAULT_WKS_FILE ?= "" +SOC_DEFAULT_WKS_FILE_ls1043a ?= "ls104x-uboot-bootpart.wks.in" +SOC_DEFAULT_WKS_FILE_ls1046a ?= "ls104x-uboot-bootpart.wks.in" + +WKS_FILE ?= "${SOC_DEFAULT_WKS_FILE}" + MACHINE_FEATURES ?= "pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS += "udev-extraconf udev-rules-qoriq kernel-modules" diff --git a/conf/machine/ls1043ardb.conf b/conf/machine/ls1043ardb.conf index 369abdcf..3dd572f4 100644 --- a/conf/machine/ls1043ardb.conf +++ b/conf/machine/ls1043ardb.conf @@ -40,5 +40,7 @@ RCWSD ?= "RR_FQPP_1455/rcw_1600_sdboot" RCWNAND ?= "RR_FQPP_1455/rcw_1600_nandboot" QE_UCODE = "iram_Type_A_LS1021a_r1.0.bin" +FMAN_UCODE ?= "fsl_fman_ucode_ls1043_r1.1_106_4_18.bin" + EXTRA_IMAGEDEPENDS += "fm-ucode rcw qe-ucode uefi qoriq-atf ls2-phy" USE_VT = "0" diff --git a/conf/machine/ls1046afrwy.conf b/conf/machine/ls1046afrwy.conf index f6854a0c..6e42ef37 100644 --- a/conf/machine/ls1046afrwy.conf +++ b/conf/machine/ls1046afrwy.conf @@ -37,5 +37,7 @@ SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" RCWQSPI ?= "NN_NNQNNPNP_3040_0506/rcw_1600_qspiboot" RCWSD ?= "NN_NNQNNPNP_3040_0506/rcw_1600_sdboot" +FMAN_UCODE ?= "fsl_fman_ucode_ls1046_r1.0_106_4_18.bin" + EXTRA_IMAGEDEPENDS += "fm-ucode rcw qoriq-atf ls2-phy qe-ucode" USE_VT = "0" diff --git a/conf/machine/ls1046ardb.conf b/conf/machine/ls1046ardb.conf index 64f26792..cbea2432 100644 --- a/conf/machine/ls1046ardb.conf +++ b/conf/machine/ls1046ardb.conf @@ -40,5 +40,7 @@ UEFI_QSPIBOOT ?= "LS1046ARDB_EFI_QSPIBOOT.fd" RCWQSPI ?= "RR_FFSSPPPH_1133_5559/rcw_1800_qspiboot" RCWSD ?= "RR_FFSSPPPH_1133_5559/rcw_1800_sdboot" +FMAN_UCODE ?= "fsl_fman_ucode_ls1046_r1.0_106_4_18.bin" + EXTRA_IMAGEDEPENDS += "fm-ucode rcw uefi qoriq-atf qe-ucode ls2-phy" USE_VT = "0" diff --git a/wic/ls104x-uboot-bootpart.wks.in b/wic/ls104x-uboot-bootpart.wks.in new file mode 100644 index 00000000..8ca231c6 --- /dev/null +++ b/wic/ls104x-uboot-bootpart.wks.in @@ -0,0 +1,21 @@ +# short-description: Create SD card image with a boot partition +# long-description: +# Create an image that can be written onto a SD card using dd for use +# with Layerscape lx1043a/ls1046a family. +# It uses u-boot. +# +# The disk layout used is: +# - ----- --------- -------------- -------------------- +# | | PBL | FIP | FMAN-UCODE | boot + rootfs | +# - ----- --------- -------------- -------------------- +# ^ ^ ^ ^ ^ +# | | | | | +# 0 4kiB 1MiB 9MiB 16MiB +# +part PBL --source rawcopy --sourceparams="file=${IMAGE_FILE_PBL_SD}" --ondisk mmcblk --no-table --align ${IMAGE_OFFSET_PBL} +part FIP --source rawcopy --sourceparams="file=${IMAGE_FILE_FIP_UBOOT}" --ondisk mmcblk --no-table --align ${IMAGE_OFFSET_FIP} +part FMAN-UCODE --source rawcopy --sourceparams="file=${FMAN_UCODE}" --ondisk mmcblk --no-table --align ${IMAGE_OFFSET_FMAN_UCODE} +part /boot --source bootimg-partition --ondisk mmcblk --fstype=ext4 --label boot --active --align 16384 --extra-space 0 +part / --source rootfs --ondisk mmcblk --fstype=ext4 --label rootfs --align 16384 + +bootloader --ptable msdos -- cgit v1.2.3-54-g00ecf