summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvert Pap <evert.pap@sintecs.nl>2016-05-04 07:12:43 (GMT)
committerEvert Pap <evert.pap@sintecs.nl>2016-05-04 07:12:43 (GMT)
commitb557314d53aca8b1a087f143db33f1f523e095e7 (patch)
tree31a46e125480ae989e6b899783c5e209c6750f3e
downloadmeta-scalys-ppc-b557314d53aca8b1a087f143db33f1f523e095e7.tar.xz
Initial commit of the scalys ppc OE layer
-rw-r--r--conf/layer.conf10
-rw-r--r--conf/machine/simc-t1022-tcb-02.conf36
-rw-r--r--recipes-bsp/u-boot/u-boot-qoriq_2015.01.bbappend2
-rw-r--r--recipes-fsl/images/fsl-image-core.bbappend6
-rw-r--r--recipes-kernel/linux/files/fit_image_template.its51
-rw-r--r--recipes-kernel/linux/linux-qoriq_3.12.bbappend46
6 files changed, 151 insertions, 0 deletions
diff --git a/conf/layer.conf b/conf/layer.conf
new file mode 100644
index 0000000..f65cbe4
--- /dev/null
+++ b/conf/layer.conf
@@ -0,0 +1,10 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have a packages directory, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
+ ${LAYERDIR}/recipes-*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "scalys-ppc"
+BBFILE_PATTERN_scalys-ppc := "^${LAYERDIR}/"
+BBFILE_PRIORITY_scalys-ppc = "4"
diff --git a/conf/machine/simc-t1022-tcb-02.conf b/conf/machine/simc-t1022-tcb-02.conf
new file mode 100644
index 0000000..0239999
--- /dev/null
+++ b/conf/machine/simc-t1022-tcb-02.conf
@@ -0,0 +1,36 @@
+#@TYPE: Machine
+#@NAME: Scalys simc-t1022 Module on a TCB-02 carrier board
+#@SOC: t1022
+#@DESCRIPTION: Machine configuration for Sintecs simc-t1022 module on a TCB-02
+#@MAINTAINER: Evert Pap <evert.pap@sintecs.nl>
+
+require conf/machine/include/e5500-64b.inc
+
+SOC_FAMILY = "t1:t1022"
+
+KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/simc-t10xx_defconfig"
+KERNEL_DEVICETREE ?= "simc-t1022.dtb"
+KERNEL_FIT_IMAGES ?= "simc-t1022"
+
+PREFERRED_PROVIDER_virtual/bootloader = "${PREFERRED_PROVIDER_u-boot}"
+UBOOT_CONFIG ??= "nand"
+UBOOT_CONFIG[nand] = "T1_simc-t10xx_nand_config"
+
+# Images types generated for this machine
+IMAGE_FSTYPES = "tar.bz2 ubifs ubi"
+
+# mkfs.ubi options:
+# Find parameter values on target with `ubinfo -a`
+# -m, --min-io-size=SIZE minimum I/O unit size
+# -e, --leb-size=SIZE logical erase block size
+# -c, --max-leb-cnt=COUNT maximum logical erase block count
+MKUBIFS_ARGS = "--space-fixup -m 2048 -e 124KiB -c 10000"
+
+# ubinize options:
+# Find parameter values on target with `mtdinfo -a`
+# -p, --peb-size=<bytes> size of the physical eraseblock of the flash
+# -m, --min-io-size=<bytes> minimum input/output unit size of the flash in bytes
+# -s, --sub-page-size=<bytes> minimum input/output unit used for UBI headers
+UBINIZE_ARGS = "-m 2048 -p 128KiB -s 2048"
+UBI_VOLNAME = "rootfs"
+
diff --git a/recipes-bsp/u-boot/u-boot-qoriq_2015.01.bbappend b/recipes-bsp/u-boot/u-boot-qoriq_2015.01.bbappend
new file mode 100644
index 0000000..6023979
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-qoriq_2015.01.bbappend
@@ -0,0 +1,2 @@
+SRC_URI = "git://git.scalys.com/u-boot-fsl-qoriq;branch=scalys"
+SRCREV = "4cea6219d66824dace92f6aefaf37d2d8643d5e9"
diff --git a/recipes-fsl/images/fsl-image-core.bbappend b/recipes-fsl/images/fsl-image-core.bbappend
new file mode 100644
index 0000000..2d5b489
--- /dev/null
+++ b/recipes-fsl/images/fsl-image-core.bbappend
@@ -0,0 +1,6 @@
+IMAGE_INSTALL_append += "\
+ kernel-image \
+ kernel-devicetree \
+ kernel-fitimage \
+ kernel-modules \
+"
diff --git a/recipes-kernel/linux/files/fit_image_template.its b/recipes-kernel/linux/files/fit_image_template.its
new file mode 100644
index 0000000..29f544b
--- /dev/null
+++ b/recipes-kernel/linux/files/fit_image_template.its
@@ -0,0 +1,51 @@
+/*
+ * Simple U-Boot uImage source file containing a single kernel and FDT blob
+ */
+
+/dts-v1/;
+
+/ {
+ description = "Simple image with single Linux kernel and FDT blob";
+ #address-cells = <1>;
+
+ images {
+ kernel@1 {
+ description = "Vanilla Linux kernel";
+ data = /incbin/("./vmlinux.bin.gz");
+ type = "kernel";
+ arch = "ppc";
+ os = "linux";
+ compression = "gzip";
+ load = <00000000>;
+ entry = <00000000>;
+ hash@1 {
+ algo = "crc32";
+ };
+ hash@2 {
+ algo = "sha1";
+ };
+ };
+ fdt@1 {
+ description = "Flattened Device Tree blob";
+ data = /incbin/("./arch/powerpc/boot/DTB_PLACEHOLDER.dtb");
+ type = "flat_dt";
+ arch = "ppc";
+ compression = "none";
+ hash@1 {
+ algo = "crc32";
+ };
+ hash@2 {
+ algo = "sha1";
+ };
+ };
+ };
+
+ configurations {
+ default = "conf@1";
+ conf@1 {
+ description = "Boot Linux kernel with FDT blob";
+ kernel = "kernel@1";
+ fdt = "fdt@1";
+ };
+ };
+};
diff --git a/recipes-kernel/linux/linux-qoriq_3.12.bbappend b/recipes-kernel/linux/linux-qoriq_3.12.bbappend
new file mode 100644
index 0000000..b972e24
--- /dev/null
+++ b/recipes-kernel/linux/linux-qoriq_3.12.bbappend
@@ -0,0 +1,46 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI = "\
+ git://git.scalys.com/linux-fsl-qoriq;branch=scalys \
+ file://fit_image_template.its \
+"
+SRCREV = "0247864d78189c1ca73dfba348eeddcfeb618a35"
+
+python __anonymous () {
+ d.appendVar("PACKAGES", " kernel-fitimage")
+}
+
+FILES_kernel-fitimage = "/boot/"
+
+do_kernel_fitimage() {
+ cd ${B}
+ for i in ${KERNEL_FIT_IMAGES}; do
+ cp ${WORKDIR}/fit_image_template.its ${i}.its
+ sed -i "s/DTB_PLACEHOLDER/${i}/g" ${i}.its
+ uboot-mkimage -f ${i}.its ${B}/arch/${ARCH}/boot/${i}.itb
+
+ # Assemble the name for the fitImage
+ ITB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${i}/g" | sed "s/uImage-/fitImage/g"`
+ ITB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${i}/g"`
+
+ install -d ${DEPLOYDIR}
+ install -m 0644 ${B}/arch/${ARCH}/boot/${i}.itb ${DEPLOYDIR}/${ITB_NAME}.itb
+
+ # create a symlink for the last generated fit image
+ cd ${DEPLOYDIR}
+ ln -sf ${ITB_NAME}.itb fitImage.itb
+ cd -
+
+ # Make the FIT image available on the target RFS
+ install -d ${D}/boot
+ install -m 0644 ${B}/arch/${ARCH}/boot/${i}.itb ${D}/boot/${ITB_NAME}.itb
+
+ # create a symlink for the last generated fit image
+ cd ${D}/boot/
+ ln -sf ${ITB_NAME}.itb fitImage.itb
+ cd -
+ done
+}
+
+# The install stage generates the DTB needed for the FIT image (linux-dtb.inc)
+addtask do_kernel_fitimage after do_install before do_deploy \ No newline at end of file