]> code.ossystems Code Review - meta-freescale.git/commitdiff
ls1043/ls1046: support WIC image generation
authorTing Liu <ting.liu@nxp.com>
Tue, 20 Apr 2021 09:24:31 +0000 (17:24 +0800)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 20 Apr 2021 13:07:33 +0000 (10:07 -0300)
Signed-off-by: Ting Liu <ting.liu@nxp.com>
conf/machine/include/qoriq-base.inc
conf/machine/ls1043ardb.conf
conf/machine/ls1046afrwy.conf
conf/machine/ls1046ardb.conf
wic/ls104x-uboot-bootpart.wks.in [new file with mode: 0644]

index e482b8575c685227d863a6c0497823b4689fb491..92baae748a1719d9187032dde6fd9fddd6286068 100644 (file)
@@ -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"
 
index 369abdcf6ce988c8c93c39d1466d8c4483c159cf..3dd572f485478b5bd7b258bd1f582c252f049ab1 100644 (file)
@@ -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"
index f6854a0ce0f547deaa66936addf4d688f1c865a9..6e42ef3746a6c71a092cad3de9b1e2d339d36417 100644 (file)
@@ -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"
index 64f2679236fa3c9a5e37fdb9aa0740d65506dc6d..cbea2432f53f0f2dbac19e3bb061c3fa8e14bf85 100644 (file)
@@ -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 (file)
index 0000000..8ca231c
--- /dev/null
@@ -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