All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-rockchip][PATCH v2 0/5] various updates
@ 2017-02-19  2:43 Trevor Woerner
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 1/5] machine: rk3288: enable SoC-specific assignments Trevor Woerner
                   ` (4 more replies)
  0 siblings, 5 replies; 32+ messages in thread
From: Trevor Woerner @ 2017-02-19  2:43 UTC (permalink / raw)
  To: yocto

Here are a couple v2's of some patches that were submitted to the mailing list
earlier.

Changes since v1:
	- break commits to separate files into separate patches
	- rename the rk3288 image bbclass
	- make improvements to the rk3288 image bbclass
	- improve the commit message for the image bbclass

Trevor Woerner (5):
  machine: rk3288: enable SoC-specific assignments
  u-boot-rockchip: add
  machine: firefly-rk3288: specify bootloader
  classes: rockchip-gpt-img: add
  machine: rk3288: GPT image support

 classes/rockchip-gpt-img.bbclass          | 132 ++++++++++++++++++++++++++++++
 conf/machine/firefly-rk3288.conf          |   1 +
 conf/machine/include/rk3288.inc           |   9 ++
 recipes-bsp/u-boot/u-boot-rockchip_git.bb |  19 +++++
 4 files changed, 161 insertions(+)
 create mode 100644 classes/rockchip-gpt-img.bbclass
 create mode 100644 recipes-bsp/u-boot/u-boot-rockchip_git.bb

-- 
2.12.0.rc1.48.g076c053



^ permalink raw reply	[flat|nested] 32+ messages in thread

* [meta-rockchip][PATCH v2 1/5] machine: rk3288: enable SoC-specific assignments
  2017-02-19  2:43 [meta-rockchip][PATCH v2 0/5] various updates Trevor Woerner
@ 2017-02-19  2:43 ` Trevor Woerner
  2017-02-19  3:40   ` Eddie Cai
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add Trevor Woerner
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 32+ messages in thread
From: Trevor Woerner @ 2017-02-19  2:43 UTC (permalink / raw)
  To: yocto

Enable machine overrides for RK3288.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 conf/machine/include/rk3288.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
index 86fc567..769e5c1 100644
--- a/conf/machine/include/rk3288.inc
+++ b/conf/machine/include/rk3288.inc
@@ -1,7 +1,10 @@
 # Copyright (C) 2015 Romain Perier
 # Released under the MIT license (see COPYING.MIT for the terms)
 
+SOC_FAMILY = "rk3288"
+
 require conf/machine/include/tune-cortexa17.inc
+require conf/machine/include/soc-family.inc
 
 PREFERRED_PROVIDER_virtual/kernel = "linux"
 SERIAL_CONSOLES = "115200;ttyS2"
-- 
2.12.0.rc1.48.g076c053



^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add
  2017-02-19  2:43 [meta-rockchip][PATCH v2 0/5] various updates Trevor Woerner
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 1/5] machine: rk3288: enable SoC-specific assignments Trevor Woerner
@ 2017-02-19  2:43 ` Trevor Woerner
  2017-02-19  3:26   ` Eddie Cai
  2017-02-19 14:22   ` Jacob Chen
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 3/5] machine: firefly-rk3288: specify bootloader Trevor Woerner
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 32+ messages in thread
From: Trevor Woerner @ 2017-02-19  2:43 UTC (permalink / raw)
  To: yocto

This recipe was taken from the Rockchip team's recipe at
https://github.com/rockchip-linux/meta-rockchip/commit/6a139d5b7510c7ba36aace82c239b894d5741cac

It was mostly written by Jacob Chen <jacob-chen@iotwrt.com> and I've made a
couple small modifications.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 recipes-bsp/u-boot/u-boot-rockchip_git.bb | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 recipes-bsp/u-boot/u-boot-rockchip_git.bb

diff --git a/recipes-bsp/u-boot/u-boot-rockchip_git.bb b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
new file mode 100644
index 0000000..3b4f109
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
@@ -0,0 +1,19 @@
+# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
+# Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require recipes-bsp/u-boot/u-boot.inc
+
+DESCRIPTION = "Rockchip next-dev U-Boot"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
+COMPATIBLE_MACHINE = "(firefly-rk3288)"
+
+SRC_URI = "git://github.com/rockchip-linux/u-boot.git;branch=release;"
+SRCREV = "${AUTOREV}"
+S = "${WORKDIR}/git"
+
+do_deploy_prepend () {
+	# copy to default search path
+	cp ${B}/spl/${SPL_BINARY} ${B}/
+}
-- 
2.12.0.rc1.48.g076c053



^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [meta-rockchip][PATCH v2 3/5] machine: firefly-rk3288: specify bootloader
  2017-02-19  2:43 [meta-rockchip][PATCH v2 0/5] various updates Trevor Woerner
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 1/5] machine: rk3288: enable SoC-specific assignments Trevor Woerner
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add Trevor Woerner
@ 2017-02-19  2:43 ` Trevor Woerner
  2017-02-19  5:03   ` Eddie Cai
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 4/5] classes: rockchip-gpt-img: add Trevor Woerner
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 5/5] machine: rk3288: GPT image support Trevor Woerner
  4 siblings, 1 reply; 32+ messages in thread
From: Trevor Woerner @ 2017-02-19  2:43 UTC (permalink / raw)
  To: yocto

Set the default preferred bootloader for firefly-rk3288 to be u-boot-rockchip
and set the default name of the SPL binary.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 conf/machine/firefly-rk3288.conf | 1 +
 conf/machine/include/rk3288.inc  | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/conf/machine/firefly-rk3288.conf b/conf/machine/firefly-rk3288.conf
index 8fa005d..58d752b 100644
--- a/conf/machine/firefly-rk3288.conf
+++ b/conf/machine/firefly-rk3288.conf
@@ -8,3 +8,4 @@
 
 include conf/machine/include/rk3288.inc
 KERNEL_DEVICETREE = "rk3288-firefly.dtb"
+UBOOT_MACHINE = "firefly-rk3288_defconfig"
diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
index 769e5c1..4a4201f 100644
--- a/conf/machine/include/rk3288.inc
+++ b/conf/machine/include/rk3288.inc
@@ -10,3 +10,6 @@ PREFERRED_PROVIDER_virtual/kernel = "linux"
 SERIAL_CONSOLES = "115200;ttyS2"
 KERNEL_IMAGETYPE = "zImage"
 KBUILD_DEFCONFIG = "multi_v7_defconfig"
+
+PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-rockchip"
+SPL_BINARY ?= "u-boot-spl-dtb.bin"
-- 
2.12.0.rc1.48.g076c053



^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [meta-rockchip][PATCH v2 4/5] classes: rockchip-gpt-img: add
  2017-02-19  2:43 [meta-rockchip][PATCH v2 0/5] various updates Trevor Woerner
                   ` (2 preceding siblings ...)
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 3/5] machine: firefly-rk3288: specify bootloader Trevor Woerner
@ 2017-02-19  2:43 ` Trevor Woerner
  2017-02-19  6:32   ` Eddie Cai
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 5/5] machine: rk3288: GPT image support Trevor Woerner
  4 siblings, 1 reply; 32+ messages in thread
From: Trevor Woerner @ 2017-02-19  2:43 UTC (permalink / raw)
  To: yocto

This bbclass was taken from the Rockchip team's work at
https://github.com/rockchip-linux/meta-rockchip/commit/53d2e2e474a3014e3013d0059fd1da773fb0e2b7
It was mostly written by Jacob Chen <jacob-chen@iotwrt.com>. I've made some
small modifications and added it.

Older images used (what Rockchip calls) the "rk-boot" format. Newer images use
u-boot and a GPT partitioning scheme. This class allows the build to generate
a gpt-img file that can either be flashed to eMMC or written to an SDcard (the
same image is used for both).

This is the new image format used for rk3288 SoCs (e.g. the Firefly board).

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 classes/rockchip-gpt-img.bbclass | 132 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 132 insertions(+)
 create mode 100644 classes/rockchip-gpt-img.bbclass

diff --git a/classes/rockchip-gpt-img.bbclass b/classes/rockchip-gpt-img.bbclass
new file mode 100644
index 0000000..fd80625
--- /dev/null
+++ b/classes/rockchip-gpt-img.bbclass
@@ -0,0 +1,132 @@
+# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
+# Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+inherit image_types
+
+# Use an uncompressed ext4 by default as rootfs
+IMG_ROOTFS_TYPE = "ext4"
+IMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.${IMG_ROOTFS_TYPE}"
+
+# This image depends on the rootfs image
+IMAGE_TYPEDEP_rockchip-gpt-img = "${IMG_ROOTFS_TYPE}"
+
+GPTIMG_SUFFIX  = "gpt-img"
+GPTIMG         = "${IMAGE_NAME}.${GPTIMG_SUFFIX}"
+GPTIMG_SIZE   ?= "4096"
+BOOT_IMG       = "boot.img"
+MINILOADER     = "loader.bin"
+UBOOT          = "u-boot.out"
+TRUST          = "trust.out"
+GPTIMG_APPEND ?= "console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk2p7 rootfstype=ext4 init=/sbin/init"
+
+# default partitions [in Sectors]
+# More info at http://rockchip.wikidot.com/partitions
+LOADER1_SIZE = "8000"
+RESERVED1_SIZE = "128"
+RESERVED2_SIZE = "8192"
+LOADER2_SIZE = "8192"
+ATF_SIZE = "8192"
+BOOT_SIZE = "229376"
+
+IMAGE_DEPENDS_rockchip-gpt-img = "parted-native \
+	u-boot-mkimage-native \
+	mtools-native \
+	dosfstools-native \
+	virtual/kernel:do_deploy \
+	virtual/bootloader:do_deploy"
+
+PER_CHIP_IMG_GENERATION_COMMAND_rk3288 = "generate_rk3288_image"
+
+IMAGE_CMD_rockchip-gpt-img () {
+	# Change to image directory
+	cd ${DEPLOY_DIR_IMAGE}
+
+	# Remove the exist image
+	rm -rf *${GPTIMG_SUFFIX}
+
+	create_rk_image
+
+	${PER_CHIP_IMG_GENERATION_COMMAND}
+
+	cd ${DEPLOY_DIR_IMAGE}
+	ln -s ${GPTIMG} "${IMAGE_BASENAME}-${MACHINE}.${GPTIMG_SUFFIX}"
+}
+
+create_rk_image () {
+
+	# Initialize sdcard image file
+	dd if=/dev/zero of=${GPTIMG} bs=1M count=0 seek=${GPTIMG_SIZE}
+
+	# Create partition table
+	parted -s ${GPTIMG} mklabel gpt
+
+	# Create vendor defined partitions
+	LOADER1_START=64
+	RESERVED1_START=`expr ${LOADER1_START}  + ${LOADER1_SIZE}`
+	RESERVED2_START=`expr ${RESERVED1_START}  + ${RESERVED1_SIZE}`
+	LOADER2_START=`expr ${RESERVED2_START}  + ${RESERVED2_SIZE}`
+	ATF_START=`expr ${LOADER2_START}  + ${LOADER2_SIZE}`
+	BOOT_START=`expr ${ATF_START}  + ${ATF_SIZE}`
+	ROOTFS_START=`expr ${BOOT_START}  + ${BOOT_SIZE}`
+
+	parted -s ${GPTIMG} unit s mkpart loader1 ${LOADER1_START} `expr ${RESERVED1_START} - 1`
+	parted -s ${GPTIMG} unit s mkpart reserved1 ${RESERVED1_START} `expr ${RESERVED2_START} - 1`
+	parted -s ${GPTIMG} unit s mkpart reserved2 ${RESERVED2_START} `expr ${LOADER2_START} - 1`
+	parted -s ${GPTIMG} unit s mkpart loader2 ${LOADER2_START} `expr ${ATF_START} - 1`
+	parted -s ${GPTIMG} unit s mkpart atf ${ATF_START} `expr ${BOOT_START} - 1`
+
+	# Create boot partition and mark it as bootable
+	parted -s ${GPTIMG} unit s mkpart boot ${BOOT_START} `expr ${ROOTFS_START} - 1`
+	parted -s ${GPTIMG} set 6 boot on
+
+	# Create rootfs partition
+	parted -s ${GPTIMG} unit s mkpart root ${ROOTFS_START} 100%
+
+	parted ${GPTIMG} print
+
+	# Delete the boot image to avoid trouble with the build cache
+	rm -f ${WORKDIR}/${BOOT_IMG}
+
+	# Create boot partition image
+	BOOT_BLOCKS=$(LC_ALL=C parted -s ${GPTIMG} unit b print | awk '/ 6 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
+	BOOT_BLOCKS=`expr $BOOT_BLOCKS / 63 \* 63`
+
+	mkfs.vfat -n "boot" -S 512 -C ${WORKDIR}/${BOOT_IMG} $BOOT_BLOCKS
+	mcopy -i ${WORKDIR}/${BOOT_IMG} -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::${KERNEL_IMAGETYPE}
+
+	DEVICETREE_DEFAULT=""
+	for DTS_FILE in ${KERNEL_DEVICETREE}; do
+		[ -n "${DEVICETREE_DEFAULT}"] && DEVICETREE_DEFAULT="${DTS_FILE}"
+		mcopy -i ${WORKDIR}/${BOOT_IMG} -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_FILE} ::${DTS_FILE}
+	done
+
+	# Create extlinux config file
+	cat > ${WORKDIR}/extlinux.conf <<EOF
+default yocto
+
+label yocto
+	kernel /${KERNEL_IMAGETYPE}
+	devicetree /${DEVICETREE_DEFAULT}
+	append ${GPTIMG_APPEND}
+EOF
+
+	mmd -i ${WORKDIR}/${BOOT_IMG} ::/extlinux
+	mcopy -i ${WORKDIR}/${BOOT_IMG} -s ${WORKDIR}/extlinux.conf ::/extlinux/
+
+	# Burn Boot Partition
+	dd if=${WORKDIR}/${BOOT_IMG} of=${GPTIMG} conv=notrunc,fsync seek=${BOOT_START}
+
+	# Burn Rootfs Partition
+	dd if=${IMG_ROOTFS} of=${GPTIMG} seek=${ROOTFS_START}
+
+}
+
+generate_rk3288_image () {
+
+	# Burn bootloader
+	mkimage -n rk3288 -T rksd -d ${DEPLOY_DIR_IMAGE}/${SPL_BINARY} ${WORKDIR}/${UBOOT}
+	cat ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.bin >>  ${WORKDIR}/${UBOOT}
+	dd if=${WORKDIR}/${UBOOT} of=${GPTIMG} conv=notrunc,fsync seek=64
+
+}
-- 
2.12.0.rc1.48.g076c053



^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [meta-rockchip][PATCH v2 5/5] machine: rk3288: GPT image support
  2017-02-19  2:43 [meta-rockchip][PATCH v2 0/5] various updates Trevor Woerner
                   ` (3 preceding siblings ...)
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 4/5] classes: rockchip-gpt-img: add Trevor Woerner
@ 2017-02-19  2:43 ` Trevor Woerner
  2017-02-19  6:33   ` Eddie Cai
  4 siblings, 1 reply; 32+ messages in thread
From: Trevor Woerner @ 2017-02-19  2:43 UTC (permalink / raw)
  To: yocto

Configure any rk3288 build to generate the new GPT image which is then either
flashed to eMMC or dd'ed to an SDcard.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 conf/machine/include/rk3288.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
index 4a4201f..964d8b0 100644
--- a/conf/machine/include/rk3288.inc
+++ b/conf/machine/include/rk3288.inc
@@ -13,3 +13,6 @@ KBUILD_DEFCONFIG = "multi_v7_defconfig"
 
 PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-rockchip"
 SPL_BINARY ?= "u-boot-spl-dtb.bin"
+
+IMAGE_FSTYPES = "ext4 rockchip-gpt-img"
+IMAGE_CLASSES += "rockchip-gpt-img"
-- 
2.12.0.rc1.48.g076c053



^ permalink raw reply related	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add Trevor Woerner
@ 2017-02-19  3:26   ` Eddie Cai
  2017-02-19 14:22   ` Jacob Chen
  1 sibling, 0 replies; 32+ messages in thread
From: Eddie Cai @ 2017-02-19  3:26 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: yocto

Hi Trevor


2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
> This recipe was taken from the Rockchip team's recipe at
> https://github.com/rockchip-linux/meta-rockchip/commit/6a139d5b7510c7ba36aace82c239b894d5741cac
>
> It was mostly written by Jacob Chen <jacob-chen@iotwrt.com> and I've made a
> couple small modifications.
>
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> ---
>  recipes-bsp/u-boot/u-boot-rockchip_git.bb | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>  create mode 100644 recipes-bsp/u-boot/u-boot-rockchip_git.bb
>
> diff --git a/recipes-bsp/u-boot/u-boot-rockchip_git.bb b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
> new file mode 100644
> index 0000000..3b4f109
> --- /dev/null
> +++ b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
> @@ -0,0 +1,19 @@
> +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
> +# Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com>
> +# Released under the MIT license (see COPYING.MIT for the terms)
> +
> +require recipes-bsp/u-boot/u-boot.inc
> +
> +DESCRIPTION = "Rockchip next-dev U-Boot"
I don't like the next-dev. It is internal branch name. It is
meaningless to people outside Rockchip.  Why not call it "Rockchip
U-Boot"
> +LICENSE = "GPLv2+"
> +LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
> +COMPATIBLE_MACHINE = "(firefly-rk3288)"
> +
> +SRC_URI = "git://github.com/rockchip-linux/u-boot.git;branch=release;"
> +SRCREV = "${AUTOREV}"
> +S = "${WORKDIR}/git"
> +
> +do_deploy_prepend () {
> +       # copy to default search path
> +       cp ${B}/spl/${SPL_BINARY} ${B}/
> +}
> --
> 2.12.0.rc1.48.g076c053
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 1/5] machine: rk3288: enable SoC-specific assignments
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 1/5] machine: rk3288: enable SoC-specific assignments Trevor Woerner
@ 2017-02-19  3:40   ` Eddie Cai
  2017-02-21 22:25     ` Trevor Woerner
  0 siblings, 1 reply; 32+ messages in thread
From: Eddie Cai @ 2017-02-19  3:40 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: yocto

Hi Trevor

Is this the same one i submit before?
https://www.mail-archive.com/yocto@yoctoproject.org/msg33572.html

2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
> Enable machine overrides for RK3288.
>
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> ---
>  conf/machine/include/rk3288.inc | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
> index 86fc567..769e5c1 100644
> --- a/conf/machine/include/rk3288.inc
> +++ b/conf/machine/include/rk3288.inc
> @@ -1,7 +1,10 @@
>  # Copyright (C) 2015 Romain Perier
>  # Released under the MIT license (see COPYING.MIT for the terms)
>
> +SOC_FAMILY = "rk3288"
> +
>  require conf/machine/include/tune-cortexa17.inc
> +require conf/machine/include/soc-family.inc
>
>  PREFERRED_PROVIDER_virtual/kernel = "linux"
>  SERIAL_CONSOLES = "115200;ttyS2"
> --
> 2.12.0.rc1.48.g076c053
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 3/5] machine: firefly-rk3288: specify bootloader
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 3/5] machine: firefly-rk3288: specify bootloader Trevor Woerner
@ 2017-02-19  5:03   ` Eddie Cai
  2017-02-19  8:17     ` Jacob Chen
  0 siblings, 1 reply; 32+ messages in thread
From: Eddie Cai @ 2017-02-19  5:03 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: yocto

Hi Trevor

2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
> Set the default preferred bootloader for firefly-rk3288 to be u-boot-rockchip
> and set the default name of the SPL binary.
>
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> ---
>  conf/machine/firefly-rk3288.conf | 1 +
>  conf/machine/include/rk3288.inc  | 3 +++
>  2 files changed, 4 insertions(+)
Reviewed-by Eddie Cai <eddie.cai.linux@gmail.com>
>
> diff --git a/conf/machine/firefly-rk3288.conf b/conf/machine/firefly-rk3288.conf
> index 8fa005d..58d752b 100644
> --- a/conf/machine/firefly-rk3288.conf
> +++ b/conf/machine/firefly-rk3288.conf
> @@ -8,3 +8,4 @@
>
>  include conf/machine/include/rk3288.inc
>  KERNEL_DEVICETREE = "rk3288-firefly.dtb"
> +UBOOT_MACHINE = "firefly-rk3288_defconfig"
> diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
> index 769e5c1..4a4201f 100644
> --- a/conf/machine/include/rk3288.inc
> +++ b/conf/machine/include/rk3288.inc
> @@ -10,3 +10,6 @@ PREFERRED_PROVIDER_virtual/kernel = "linux"
>  SERIAL_CONSOLES = "115200;ttyS2"
>  KERNEL_IMAGETYPE = "zImage"
>  KBUILD_DEFCONFIG = "multi_v7_defconfig"
> +
> +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-rockchip"
> +SPL_BINARY ?= "u-boot-spl-dtb.bin"
> --
> 2.12.0.rc1.48.g076c053
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 4/5] classes: rockchip-gpt-img: add
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 4/5] classes: rockchip-gpt-img: add Trevor Woerner
@ 2017-02-19  6:32   ` Eddie Cai
  2017-02-19  8:31     ` Jacob Chen
  0 siblings, 1 reply; 32+ messages in thread
From: Eddie Cai @ 2017-02-19  6:32 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: yocto, Jacob Chen

[-- Attachment #1: Type: text/plain, Size: 7360 bytes --]

Hi Trevor

2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
> This bbclass was taken from the Rockchip team's work at
>
https://github.com/rockchip-linux/meta-rockchip/commit/53d2e2e474a3014e3013d0059fd1da773fb0e2b7
> It was mostly written by Jacob Chen <jacob-chen@iotwrt.com>. I've made
some
> small modifications and added it.
>
> Older images used (what Rockchip calls) the "rk-boot" format. Newer
images use
We call it legacy parameter format
> u-boot and a GPT partitioning scheme. This class allows the build to
generate
> a gpt-img file that can either be flashed to eMMC or written to an SDcard
(the
> same image is used for both).
gpt-img is much better than previous one. I like this name.
>
> This is the new image format used for rk3288 SoCs (e.g. the Firefly
board).
>
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> ---
>  classes/rockchip-gpt-img.bbclass | 132
+++++++++++++++++++++++++++++++++++++++
>  1 file changed, 132 insertions(+)
>  create mode 100644 classes/rockchip-gpt-img.bbclass
>
> diff --git a/classes/rockchip-gpt-img.bbclass
b/classes/rockchip-gpt-img.bbclass
> new file mode 100644
> index 0000000..fd80625
> --- /dev/null
> +++ b/classes/rockchip-gpt-img.bbclass
> @@ -0,0 +1,132 @@
> +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
> +# Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com>
> +# Released under the MIT license (see COPYING.MIT for the terms)
> +
> +inherit image_types
> +
> +# Use an uncompressed ext4 by default as rootfs
> +IMG_ROOTFS_TYPE = "ext4"
> +IMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.${IMG_ROOTFS_TYPE}"
> +
> +# This image depends on the rootfs image
> +IMAGE_TYPEDEP_rockchip-gpt-img = "${IMG_ROOTFS_TYPE}"
> +
> +GPTIMG_SUFFIX  = "gpt-img"
> +GPTIMG         = "${IMAGE_NAME}.${GPTIMG_SUFFIX}"
> +GPTIMG_SIZE   ?= "4096"
This should be GPT size in sectors which is 64 sectors. The name
GPTIMG_SIZE is not clear enough. People may think it is whole gpt image.
What about call it GPT_SIZE?
> +BOOT_IMG       = "boot.img"
> +MINILOADER     = "loader.bin"
> +UBOOT          = "u-boot.out"
> +TRUST          = "trust.out"
> +GPTIMG_APPEND ?= "console=tty1 console=ttyS2,115200n8 rw
root=/dev/mmcblk2p7 rootfstype=ext4 init=/sbin/init"
> +
> +# default partitions [in Sectors]
> +# More info at http://rockchip.wikidot.com/partitions
> +LOADER1_SIZE = "8000"
> +RESERVED1_SIZE = "128"
> +RESERVED2_SIZE = "8192"
> +LOADER2_SIZE = "8192"
> +ATF_SIZE = "8192"
> +BOOT_SIZE = "229376"
> +
> +IMAGE_DEPENDS_rockchip-gpt-img = "parted-native \
> +       u-boot-mkimage-native \
> +       mtools-native \
> +       dosfstools-native \
> +       virtual/kernel:do_deploy \
> +       virtual/bootloader:do_deploy"
> +
> +PER_CHIP_IMG_GENERATION_COMMAND_rk3288 = "generate_rk3288_image"
This is not just for rk3288. in fact, it can be used for all the Rockchip
SoC.
> +
> +IMAGE_CMD_rockchip-gpt-img () {
> +       # Change to image directory
> +       cd ${DEPLOY_DIR_IMAGE}
> +
> +       # Remove the exist image
> +       rm -rf *${GPTIMG_SUFFIX}
${IMAGE_NAME}  is derived using the IMAGE_BASENAME, MACHINE, and DATETIME
variables. So we don't need to delete previous one to avoid mistake.
> +
> +       create_rk_image
> +
> +       ${PER_CHIP_IMG_GENERATION_COMMAND}
> +
> +       cd ${DEPLOY_DIR_IMAGE}
> +       ln -s ${GPTIMG} "${IMAGE_BASENAME}-${MACHINE}.${GPTIMG_SUFFIX}"
> +}
> +
> +create_rk_image () {
> +
> +       # Initialize sdcard image file
> +       dd if=/dev/zero of=${GPTIMG} bs=1M count=0 seek=${GPTIMG_SIZE}
> +
> +       # Create partition table
> +       parted -s ${GPTIMG} mklabel gpt
> +
> +       # Create vendor defined partitions
> +       LOADER1_START=64
> +       RESERVED1_START=`expr ${LOADER1_START}  + ${LOADER1_SIZE}`
> +       RESERVED2_START=`expr ${RESERVED1_START}  + ${RESERVED1_SIZE}`
> +       LOADER2_START=`expr ${RESERVED2_START}  + ${RESERVED2_SIZE}`
> +       ATF_START=`expr ${LOADER2_START}  + ${LOADER2_SIZE}`
> +       BOOT_START=`expr ${ATF_START}  + ${ATF_SIZE}`
> +       ROOTFS_START=`expr ${BOOT_START}  + ${BOOT_SIZE}`
> +
> +       parted -s ${GPTIMG} unit s mkpart loader1 ${LOADER1_START} `expr
${RESERVED1_START} - 1`
> +       parted -s ${GPTIMG} unit s mkpart reserved1 ${RESERVED1_START}
`expr ${RESERVED2_START} - 1`
> +       parted -s ${GPTIMG} unit s mkpart reserved2 ${RESERVED2_START}
`expr ${LOADER2_START} - 1`
> +       parted -s ${GPTIMG} unit s mkpart loader2 ${LOADER2_START} `expr
${ATF_START} - 1`
> +       parted -s ${GPTIMG} unit s mkpart atf ${ATF_START} `expr
${BOOT_START} - 1`
> +
> +       # Create boot partition and mark it as bootable
> +       parted -s ${GPTIMG} unit s mkpart boot ${BOOT_START} `expr
${ROOTFS_START} - 1`
> +       parted -s ${GPTIMG} set 6 boot on
> +
> +       # Create rootfs partition
> +       parted -s ${GPTIMG} unit s mkpart root ${ROOTFS_START} 100%
> +
> +       parted ${GPTIMG} print
> +
> +       # Delete the boot image to avoid trouble with the build cache
> +       rm -f ${WORKDIR}/${BOOT_IMG}
what about use BOOT_IMG = "boot-${MACHINE}-${DATETIME}.img" instead? That
will leave the previous build for debug and avoid trouble.
> +
> +       # Create boot partition image
> +       BOOT_BLOCKS=$(LC_ALL=C parted -s ${GPTIMG} unit b print | awk '/
6 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
> +       BOOT_BLOCKS=`expr $BOOT_BLOCKS / 63 \* 63`
> +
> +       mkfs.vfat -n "boot" -S 512 -C ${WORKDIR}/${BOOT_IMG} $BOOT_BLOCKS
> +       mcopy -i ${WORKDIR}/${BOOT_IMG} -s
${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::${KERNEL_IMAGETYPE}
> +
> +       DEVICETREE_DEFAULT=""
> +       for DTS_FILE in ${KERNEL_DEVICETREE}; do
> +               [ -n "${DEVICETREE_DEFAULT}"] &&
DEVICETREE_DEFAULT="${DTS_FILE}"
> +               mcopy -i ${WORKDIR}/${BOOT_IMG} -s
${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_FILE} ::${DTS_FILE}
> +       done
> +
> +       # Create extlinux config file
> +       cat > ${WORKDIR}/extlinux.conf <<EOF
> +default yocto
> +
> +label yocto
> +       kernel /${KERNEL_IMAGETYPE}
> +       devicetree /${DEVICETREE_DEFAULT}
> +       append ${GPTIMG_APPEND}
> +EOF
> +
> +       mmd -i ${WORKDIR}/${BOOT_IMG} ::/extlinux
> +       mcopy -i ${WORKDIR}/${BOOT_IMG} -s ${WORKDIR}/extlinux.conf
::/extlinux/
> +
> +       # Burn Boot Partition
> +       dd if=${WORKDIR}/${BOOT_IMG} of=${GPTIMG} conv=notrunc,fsync
seek=${BOOT_START}
> +
> +       # Burn Rootfs Partition
> +       dd if=${IMG_ROOTFS} of=${GPTIMG} seek=${ROOTFS_START}
> +
> +}
> +
> +generate_rk3288_image () {
It is not only for rk3288. In fact, This function is for create load1
partition. So what about using generate_load1 or create_loader1 ?
> +
> +       # Burn bootloader
> +       mkimage -n rk3288 -T rksd -d ${DEPLOY_DIR_IMAGE}/${SPL_BINARY}
${WORKDIR}/${UBOOT}
> +       cat ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.bin >>
 ${WORKDIR}/${UBOOT}
> +       dd if=${WORKDIR}/${UBOOT} of=${GPTIMG} conv=notrunc,fsync seek=64
> +
> +}
> --
> 2.12.0.rc1.48.g076c053
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

[-- Attachment #2: Type: text/html, Size: 9292 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 5/5] machine: rk3288: GPT image support
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 5/5] machine: rk3288: GPT image support Trevor Woerner
@ 2017-02-19  6:33   ` Eddie Cai
  2017-02-26  6:28     ` Trevor Woerner
  0 siblings, 1 reply; 32+ messages in thread
From: Eddie Cai @ 2017-02-19  6:33 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]

Hi Trevor


2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:

> Configure any rk3288 build to generate the new GPT image which is then
> either
> flashed to eMMC or dd'ed to an SDcard.
>
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> ---
>  conf/machine/include/rk3288.inc | 3 +++
>  1 file changed, 3 insertions(+)
>
Reviewed-by Eddie Cai <eddie.cai.linux@gmail.com>

>
> diff --git a/conf/machine/include/rk3288.inc
> b/conf/machine/include/rk3288.inc
> index 4a4201f..964d8b0 100644
> --- a/conf/machine/include/rk3288.inc
> +++ b/conf/machine/include/rk3288.inc
> @@ -13,3 +13,6 @@ KBUILD_DEFCONFIG = "multi_v7_defconfig"
>
>  PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-rockchip"
>  SPL_BINARY ?= "u-boot-spl-dtb.bin"
> +
> +IMAGE_FSTYPES = "ext4 rockchip-gpt-img"
> +IMAGE_CLASSES += "rockchip-gpt-img"
> --
> 2.12.0.rc1.48.g076c053
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>

[-- Attachment #2: Type: text/html, Size: 1921 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 3/5] machine: firefly-rk3288: specify bootloader
  2017-02-19  5:03   ` Eddie Cai
@ 2017-02-19  8:17     ` Jacob Chen
  2017-02-21 22:22       ` Trevor Woerner
  0 siblings, 1 reply; 32+ messages in thread
From: Jacob Chen @ 2017-02-19  8:17 UTC (permalink / raw)
  To: Eddie Cai; +Cc: yocto

Hi Trevor,

2017-02-19 13:03 GMT+08:00 Eddie Cai <eddie.cai.linux@gmail.com>:
> Hi Trevor
>
> 2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
>> Set the default preferred bootloader for firefly-rk3288 to be u-boot-rockchip
>> and set the default name of the SPL binary.
>>
>> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
>> ---
>>  conf/machine/firefly-rk3288.conf | 1 +
>>  conf/machine/include/rk3288.inc  | 3 +++
>>  2 files changed, 4 insertions(+)
> Reviewed-by Eddie Cai <eddie.cai.linux@gmail.com>
>>
>> diff --git a/conf/machine/firefly-rk3288.conf b/conf/machine/firefly-rk3288.conf
>> index 8fa005d..58d752b 100644
>> --- a/conf/machine/firefly-rk3288.conf
>> +++ b/conf/machine/firefly-rk3288.conf
>> @@ -8,3 +8,4 @@
>>
>>  include conf/machine/include/rk3288.inc
>>  KERNEL_DEVICETREE = "rk3288-firefly.dtb"
>> +UBOOT_MACHINE = "firefly-rk3288_defconfig"
>> diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
>> index 769e5c1..4a4201f 100644
>> --- a/conf/machine/include/rk3288.inc
>> +++ b/conf/machine/include/rk3288.inc
>> @@ -10,3 +10,6 @@ PREFERRED_PROVIDER_virtual/kernel = "linux"
>>  SERIAL_CONSOLES = "115200;ttyS2"
>>  KERNEL_IMAGETYPE = "zImage"
>>  KBUILD_DEFCONFIG = "multi_v7_defconfig"
>> +
>> +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-rockchip"
>> +SPL_BINARY ?= "u-boot-spl-dtb.bin"
>> --
>> 2.12.0.rc1.48.g076c053
>>
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


It looks good, Reviewed-by: Jacob Chen <jacob-chen@iotwrt.com>


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 4/5] classes: rockchip-gpt-img: add
  2017-02-19  6:32   ` Eddie Cai
@ 2017-02-19  8:31     ` Jacob Chen
  2017-02-19 12:18       ` Eddie Cai
  0 siblings, 1 reply; 32+ messages in thread
From: Jacob Chen @ 2017-02-19  8:31 UTC (permalink / raw)
  To: Eddie Cai, Trevor Woerner; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 8586 bytes --]

Hi all,


Eddie Cai wrote on 2017年02月19日 14:32:
> Hi Trevor
>
> 2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com 
> <mailto:twoerner@gmail.com>>:
> > This bbclass was taken from the Rockchip team's work at
> > 
> https://github.com/rockchip-linux/meta-rockchip/commit/53d2e2e474a3014e3013d0059fd1da773fb0e2b7
> > It was mostly written by Jacob Chen <jacob-chen@iotwrt.com 
> <mailto:jacob-chen@iotwrt.com>>. I've made some
> > small modifications and added it.
> >
> > Older images used (what Rockchip calls) the "rk-boot" format. Newer 
> images use
> We call it legacy parameter format
> > u-boot and a GPT partitioning scheme. This class allows the build to 
> generate
> > a gpt-img file that can either be flashed to eMMC or written to an 
> SDcard (the
> > same image is used for both).
> gpt-img is much better than previous one. I like this name.
> >
> > This is the new image format used for rk3288 SoCs (e.g. the Firefly 
> board).
> >
> > Signed-off-by: Trevor Woerner <twoerner@gmail.com 
> <mailto:twoerner@gmail.com>>
> > ---
> >  classes/rockchip-gpt-img.bbclass | 132 
> +++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 132 insertions(+)
> >  create mode 100644 classes/rockchip-gpt-img.bbclass
> >
> > diff --git a/classes/rockchip-gpt-img.bbclass 
> b/classes/rockchip-gpt-img.bbclass
> > new file mode 100644
> > index 0000000..fd80625
> > --- /dev/null
> > +++ b/classes/rockchip-gpt-img.bbclass
> > @@ -0,0 +1,132 @@
> > +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
> > +# Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com 
> <mailto:twoerner@gmail.com>>
> > +# Released under the MIT license (see COPYING.MIT for the terms)
> > +
> > +inherit image_types
> > +
> > +# Use an uncompressed ext4 by default as rootfs
> > +IMG_ROOTFS_TYPE = "ext4"
> > +IMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.${IMG_ROOTFS_TYPE}"
> > +
> > +# This image depends on the rootfs image
> > +IMAGE_TYPEDEP_rockchip-gpt-img = "${IMG_ROOTFS_TYPE}"
> > +
> > +GPTIMG_SUFFIX  = "gpt-img"
> > +GPTIMG         = "${IMAGE_NAME}.${GPTIMG_SUFFIX}"
> > +GPTIMG_SIZE   ?= "4096"
> This should be GPT size in sectors which is 64 sectors. The name 
> GPTIMG_SIZE is not clear enough. People may think it is whole gpt 
> image. What about call it GPT_SIZE?

It's whole gpt image.

> > +BOOT_IMG       = "boot.img"
> > +MINILOADER     = "loader.bin"
> > +UBOOT          = "u-boot.out"
> > +TRUST          = "trust.out"
> > +GPTIMG_APPEND ?= "console=tty1 console=ttyS2,115200n8 rw 
> root=/dev/mmcblk2p7 rootfstype=ext4 init=/sbin/init"
> > +
> > +# default partitions [in Sectors]
> > +# More info at http://rockchip.wikidot.com/partitions
> > +LOADER1_SIZE = "8000"
> > +RESERVED1_SIZE = "128"
> > +RESERVED2_SIZE = "8192"
> > +LOADER2_SIZE = "8192"
> > +ATF_SIZE = "8192"
> > +BOOT_SIZE = "229376"
> > +
> > +IMAGE_DEPENDS_rockchip-gpt-img = "parted-native \
> > +       u-boot-mkimage-native \
> > +       mtools-native \
> > +       dosfstools-native \
> > +       virtual/kernel:do_deploy \
> > +       virtual/bootloader:do_deploy"
> > +
> > +PER_CHIP_IMG_GENERATION_COMMAND_rk3288 = "generate_rk3288_image"
> This is not just for rk3288. in fact, it can be used for all the 
> Rockchip SoC.

There're many differences between Chips.
Some chips didn't implement SPL support and have to use rk-miniloader to 
create u-boot blob. (e.g. previous rk3399, rk3229)
Some chips didn't use "spl_back_to_brom" so their tpl have a different 
offset.(e.g. previous rk3288)

The name "generate_load1" can't express it clearly.

> > +
> > +IMAGE_CMD_rockchip-gpt-img () {
> > +       # Change to image directory
> > +       cd ${DEPLOY_DIR_IMAGE}
> > +
> > +       # Remove the exist image
> > +       rm -rf *${GPTIMG_SUFFIX}
> ${IMAGE_NAME}  is derived using the IMAGE_BASENAME, MACHINE, and 
> DATETIME variables. So we don't need to delete previous one to avoid 
> mistake.
> > +
> > +       create_rk_image
> > +
> > +       ${PER_CHIP_IMG_GENERATION_COMMAND}
> > +
> > +       cd ${DEPLOY_DIR_IMAGE}
> > +       ln -s ${GPTIMG} "${IMAGE_BASENAME}-${MACHINE}.${GPTIMG_SUFFIX}"
> > +}
> > +
> > +create_rk_image () {
> > +
> > +       # Initialize sdcard image file
> > +       dd if=/dev/zero of=${GPTIMG} bs=1M count=0 seek=${GPTIMG_SIZE}
> > +
> > +       # Create partition table
> > +       parted -s ${GPTIMG} mklabel gpt
> > +
> > +       # Create vendor defined partitions
> > +       LOADER1_START=64
> > +       RESERVED1_START=`expr ${LOADER1_START}  + ${LOADER1_SIZE}`
> > +       RESERVED2_START=`expr ${RESERVED1_START}  + ${RESERVED1_SIZE}`
> > +       LOADER2_START=`expr ${RESERVED2_START}  + ${RESERVED2_SIZE}`
> > +       ATF_START=`expr ${LOADER2_START}  + ${LOADER2_SIZE}`
> > +       BOOT_START=`expr ${ATF_START}  + ${ATF_SIZE}`
> > +       ROOTFS_START=`expr ${BOOT_START}  + ${BOOT_SIZE}`
> > +
> > +       parted -s ${GPTIMG} unit s mkpart loader1 ${LOADER1_START} 
> `expr ${RESERVED1_START} - 1`
> > +       parted -s ${GPTIMG} unit s mkpart reserved1 
> ${RESERVED1_START} `expr ${RESERVED2_START} - 1`
> > +       parted -s ${GPTIMG} unit s mkpart reserved2 
> ${RESERVED2_START} `expr ${LOADER2_START} - 1`
> > +       parted -s ${GPTIMG} unit s mkpart loader2 ${LOADER2_START} 
> `expr ${ATF_START} - 1`
> > +       parted -s ${GPTIMG} unit s mkpart atf ${ATF_START} `expr 
> ${BOOT_START} - 1`
> > +
> > +       # Create boot partition and mark it as bootable
> > +       parted -s ${GPTIMG} unit s mkpart boot ${BOOT_START} `expr 
> ${ROOTFS_START} - 1`
> > +       parted -s ${GPTIMG} set 6 boot on
> > +
> > +       # Create rootfs partition
> > +       parted -s ${GPTIMG} unit s mkpart root ${ROOTFS_START} 100%
> > +
> > +       parted ${GPTIMG} print
> > +
> > +       # Delete the boot image to avoid trouble with the build cache
> > +       rm -f ${WORKDIR}/${BOOT_IMG}
> what about use BOOT_IMG = "boot-${MACHINE}-${DATETIME}.img" instead? 
> That will leave the previous build for debug and avoid trouble.

BOOT_IMG seems will not be deleted automatically so i delete it in here.
If we leave the previous build, it will make a mess.


> > +
> > +       # Create boot partition image
> > +       BOOT_BLOCKS=$(LC_ALL=C parted -s ${GPTIMG} unit b print | 
> awk '/ 6 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
> > +       BOOT_BLOCKS=`expr $BOOT_BLOCKS / 63 \* 63`
> > +
> > +       mkfs.vfat -n "boot" -S 512 -C ${WORKDIR}/${BOOT_IMG} 
> $BOOT_BLOCKS
> > +       mcopy -i ${WORKDIR}/${BOOT_IMG} -s 
> ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin 
> ::${KERNEL_IMAGETYPE}
> > +
> > +       DEVICETREE_DEFAULT=""
> > +       for DTS_FILE in ${KERNEL_DEVICETREE}; do
> > +               [ -n "${DEVICETREE_DEFAULT}"] && 
> DEVICETREE_DEFAULT="${DTS_FILE}"
> > +               mcopy -i ${WORKDIR}/${BOOT_IMG} -s 
> ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_FILE} ::${DTS_FILE}
> > +       done
> > +
> > +       # Create extlinux config file
> > +       cat > ${WORKDIR}/extlinux.conf <<EOF
> > +default yocto
> > +
> > +label yocto
> > +       kernel /${KERNEL_IMAGETYPE}
> > +       devicetree /${DEVICETREE_DEFAULT}
> > +       append ${GPTIMG_APPEND}
> > +EOF
> > +
> > +       mmd -i ${WORKDIR}/${BOOT_IMG} ::/extlinux
> > +       mcopy -i ${WORKDIR}/${BOOT_IMG} -s ${WORKDIR}/extlinux.conf 
> ::/extlinux/
> > +
> > +       # Burn Boot Partition
> > +       dd if=${WORKDIR}/${BOOT_IMG} of=${GPTIMG} conv=notrunc,fsync 
> seek=${BOOT_START}
> > +
> > +       # Burn Rootfs Partition
> > +       dd if=${IMG_ROOTFS} of=${GPTIMG} seek=${ROOTFS_START}
> > +
> > +}
> > +
> > +generate_rk3288_image () {
> It is not only for rk3288. In fact, This function is for create load1 
> partition. So what about using generate_load1 or create_loader1 ?
> > +
> > +       # Burn bootloader
> > +       mkimage -n rk3288 -T rksd -d 
> ${DEPLOY_DIR_IMAGE}/${SPL_BINARY} ${WORKDIR}/${UBOOT}
> > +       cat ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.bin >> 
>  ${WORKDIR}/${UBOOT}
> > +       dd if=${WORKDIR}/${UBOOT} of=${GPTIMG} conv=notrunc,fsync 
> seek=64
> > +
> > +}
> > --
> > 2.12.0.rc1.48.g076c053
> >
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org <mailto:yocto@yoctoproject.org>
> > https://lists.yoctoproject.org/listinfo/yocto

It looks good, Reviewed-by: Jacob Chen <jacob-chen@iotwrt.com>

[-- Attachment #2: Type: text/html, Size: 13595 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 4/5] classes: rockchip-gpt-img: add
  2017-02-19  8:31     ` Jacob Chen
@ 2017-02-19 12:18       ` Eddie Cai
  2017-02-21 22:21         ` Trevor Woerner
  0 siblings, 1 reply; 32+ messages in thread
From: Eddie Cai @ 2017-02-19 12:18 UTC (permalink / raw)
  To: Jacob Chen; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 9110 bytes --]

Hi

2017-02-19 16:31 GMT+08:00 Jacob Chen <jacob2.chen@rock-chips.com>:

> Hi all,
>
> Eddie Cai wrote on 2017年02月19日 14:32:
>
> Hi Trevor
>
> 2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
> > This bbclass was taken from the Rockchip team's work at
> > https://github.com/rockchip-linux/meta-rockchip/commit/
> 53d2e2e474a3014e3013d0059fd1da773fb0e2b7
> > It was mostly written by Jacob Chen <jacob-chen@iotwrt.com>. I've made
> some
> > small modifications and added it.
> >
> > Older images used (what Rockchip calls) the "rk-boot" format. Newer
> images use
> We call it legacy parameter format
> > u-boot and a GPT partitioning scheme. This class allows the build to
> generate
> > a gpt-img file that can either be flashed to eMMC or written to an
> SDcard (the
> > same image is used for both).
> gpt-img is much better than previous one. I like this name.
> >
> > This is the new image format used for rk3288 SoCs (e.g. the Firefly
> board).
> >
> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> > ---
> >  classes/rockchip-gpt-img.bbclass | 132 ++++++++++++++++++++++++++++++
> +++++++++
> >  1 file changed, 132 insertions(+)
> >  create mode 100644 classes/rockchip-gpt-img.bbclass
> >
> > diff --git a/classes/rockchip-gpt-img.bbclass
> b/classes/rockchip-gpt-img.bbclass
> > new file mode 100644
> > index 0000000..fd80625
> > --- /dev/null
> > +++ b/classes/rockchip-gpt-img.bbclass
> > @@ -0,0 +1,132 @@
> > +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
> > +# Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com>
> > +# Released under the MIT license (see COPYING.MIT for the terms)
> > +
> > +inherit image_types
> > +
> > +# Use an uncompressed ext4 by default as rootfs
> > +IMG_ROOTFS_TYPE = "ext4"
> > +IMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.${IMG_ROOTFS_TYPE}"
> > +
> > +# This image depends on the rootfs image
> > +IMAGE_TYPEDEP_rockchip-gpt-img = "${IMG_ROOTFS_TYPE}"
> > +
> > +GPTIMG_SUFFIX  = "gpt-img"
> > +GPTIMG         = "${IMAGE_NAME}.${GPTIMG_SUFFIX}"
> > +GPTIMG_SIZE   ?= "4096"
> This should be GPT size in sectors which is 64 sectors. The name
> GPTIMG_SIZE is not clear enough. People may think it is whole gpt image.
> What about call it GPT_SIZE?
>
>
> It's whole gpt image.
>
OK, my mistake. So that look good to me.

>
>
> > +BOOT_IMG       = "boot.img"
> > +MINILOADER     = "loader.bin"
> > +UBOOT          = "u-boot.out"
> > +TRUST          = "trust.out"
> > +GPTIMG_APPEND ?= "console=tty1 console=ttyS2,115200n8 rw
> root=/dev/mmcblk2p7 rootfstype=ext4 init=/sbin/init"
> > +
> > +# default partitions [in Sectors]
> > +# More info at http://rockchip.wikidot.com/partitions
> > +LOADER1_SIZE = "8000"
> > +RESERVED1_SIZE = "128"
> > +RESERVED2_SIZE = "8192"
> > +LOADER2_SIZE = "8192"
> > +ATF_SIZE = "8192"
> > +BOOT_SIZE = "229376"
> > +
> > +IMAGE_DEPENDS_rockchip-gpt-img = "parted-native \
> > +       u-boot-mkimage-native \
> > +       mtools-native \
> > +       dosfstools-native \
> > +       virtual/kernel:do_deploy \
> > +       virtual/bootloader:do_deploy"
> > +
> > +PER_CHIP_IMG_GENERATION_COMMAND_rk3288 = "generate_rk3288_image"
> This is not just for rk3288. in fact, it can be used for all the Rockchip
> SoC.
>
>
> There're many differences between Chips.
> Some chips didn't implement SPL support and have to use rk-miniloader to
> create u-boot blob. (e.g. previous rk3399, rk3229)
>
all the chips supported by uboot-rockchip and upstream u-boot have SPL
support . The legacy should go to use legacy update image intead.

> Some chips didn't use "spl_back_to_brom" so their tpl have a different
> offset.(e.g. previous rk3288)
>
 The back_to_brom is not chip configuration. It is board configuration.
Actually all the rk3288 board in uboot-rockchip and upstream u-boot support
it now.

>
> The name "generate_load1" can't express it clearly.
>
Sorry, should be  generate_loader1 which is the partition name shows in
http://rockchip.wikidot.com/partitions

>
>
> > +
> > +IMAGE_CMD_rockchip-gpt-img () {
> > +       # Change to image directory
> > +       cd ${DEPLOY_DIR_IMAGE}
> > +
> > +       # Remove the exist image
> > +       rm -rf *${GPTIMG_SUFFIX}
> ${IMAGE_NAME}  is derived using the IMAGE_BASENAME, MACHINE, and DATETIME
> variables. So we don't need to delete previous one to avoid mistake.
> > +
> > +       create_rk_image
> > +
> > +       ${PER_CHIP_IMG_GENERATION_COMMAND}
> > +
> > +       cd ${DEPLOY_DIR_IMAGE}
> > +       ln -s ${GPTIMG} "${IMAGE_BASENAME}-${MACHINE}.${GPTIMG_SUFFIX}"
> > +}
> > +
> > +create_rk_image () {
> > +
> > +       # Initialize sdcard image file
> > +       dd if=/dev/zero of=${GPTIMG} bs=1M count=0 seek=${GPTIMG_SIZE}
> > +
> > +       # Create partition table
> > +       parted -s ${GPTIMG} mklabel gpt
> > +
> > +       # Create vendor defined partitions
> > +       LOADER1_START=64
> > +       RESERVED1_START=`expr ${LOADER1_START}  + ${LOADER1_SIZE}`
> > +       RESERVED2_START=`expr ${RESERVED1_START}  + ${RESERVED1_SIZE}`
> > +       LOADER2_START=`expr ${RESERVED2_START}  + ${RESERVED2_SIZE}`
> > +       ATF_START=`expr ${LOADER2_START}  + ${LOADER2_SIZE}`
> > +       BOOT_START=`expr ${ATF_START}  + ${ATF_SIZE}`
> > +       ROOTFS_START=`expr ${BOOT_START}  + ${BOOT_SIZE}`
> > +
> > +       parted -s ${GPTIMG} unit s mkpart loader1 ${LOADER1_START} `expr
> ${RESERVED1_START} - 1`
> > +       parted -s ${GPTIMG} unit s mkpart reserved1 ${RESERVED1_START}
> `expr ${RESERVED2_START} - 1`
> > +       parted -s ${GPTIMG} unit s mkpart reserved2 ${RESERVED2_START}
> `expr ${LOADER2_START} - 1`
> > +       parted -s ${GPTIMG} unit s mkpart loader2 ${LOADER2_START} `expr
> ${ATF_START} - 1`
> > +       parted -s ${GPTIMG} unit s mkpart atf ${ATF_START} `expr
> ${BOOT_START} - 1`
> > +
> > +       # Create boot partition and mark it as bootable
> > +       parted -s ${GPTIMG} unit s mkpart boot ${BOOT_START} `expr
> ${ROOTFS_START} - 1`
> > +       parted -s ${GPTIMG} set 6 boot on
> > +
> > +       # Create rootfs partition
> > +       parted -s ${GPTIMG} unit s mkpart root ${ROOTFS_START} 100%
> > +
> > +       parted ${GPTIMG} print
> > +
> > +       # Delete the boot image to avoid trouble with the build cache
> > +       rm -f ${WORKDIR}/${BOOT_IMG}
> what about use BOOT_IMG = "boot-${MACHINE}-${DATETIME}.img" instead? That
> will leave the previous build for debug and avoid trouble.
>
>
> BOOT_IMG seems will not be deleted automatically so i delete it in here.
> If we leave the previous build, it will make a mess.
>
Can you try to fix it instead of just delete it? I believe add a timestamp
can help.

>
>
>
> > +
> > +       # Create boot partition image
> > +       BOOT_BLOCKS=$(LC_ALL=C parted -s ${GPTIMG} unit b print | awk '/
> 6 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
> > +       BOOT_BLOCKS=`expr $BOOT_BLOCKS / 63 \* 63`
> > +
> > +       mkfs.vfat -n "boot" -S 512 -C ${WORKDIR}/${BOOT_IMG} $BOOT_BLOCKS
> > +       mcopy -i ${WORKDIR}/${BOOT_IMG} -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin
> ::${KERNEL_IMAGETYPE}
> > +
> > +       DEVICETREE_DEFAULT=""
> > +       for DTS_FILE in ${KERNEL_DEVICETREE}; do
> > +               [ -n "${DEVICETREE_DEFAULT}"] &&
> DEVICETREE_DEFAULT="${DTS_FILE}"
> > +               mcopy -i ${WORKDIR}/${BOOT_IMG} -s
> ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_FILE} ::${DTS_FILE}
> > +       done
> > +
> > +       # Create extlinux config file
> > +       cat > ${WORKDIR}/extlinux.conf <<EOF
> > +default yocto
> > +
> > +label yocto
> > +       kernel /${KERNEL_IMAGETYPE}
> > +       devicetree /${DEVICETREE_DEFAULT}
> > +       append ${GPTIMG_APPEND}
> > +EOF
> > +
> > +       mmd -i ${WORKDIR}/${BOOT_IMG} ::/extlinux
> > +       mcopy -i ${WORKDIR}/${BOOT_IMG} -s ${WORKDIR}/extlinux.conf
> ::/extlinux/
> > +
> > +       # Burn Boot Partition
> > +       dd if=${WORKDIR}/${BOOT_IMG} of=${GPTIMG} conv=notrunc,fsync
> seek=${BOOT_START}
> > +
> > +       # Burn Rootfs Partition
> > +       dd if=${IMG_ROOTFS} of=${GPTIMG} seek=${ROOTFS_START}
> > +
> > +}
> > +
> > +generate_rk3288_image () {
> It is not only for rk3288. In fact, This function is for create load1
> partition. So what about using generate_load1 or create_loader1 ?
> > +
> > +       # Burn bootloader
> > +       mkimage -n rk3288 -T rksd -d ${DEPLOY_DIR_IMAGE}/${SPL_BINARY}
> ${WORKDIR}/${UBOOT}
> > +       cat ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.bin >>
>  ${WORKDIR}/${UBOOT}
> > +       dd if=${WORKDIR}/${UBOOT} of=${GPTIMG} conv=notrunc,fsync seek=64
> > +
> > +}
> > --
> > 2.12.0.rc1.48.g076c053
> >
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
>
>
> It looks good, Reviewed-by: Jacob Chen <jacob-chen@iotwrt.com>
> <jacob-chen@iotwrt.com>
>

[-- Attachment #2: Type: text/html, Size: 15377 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add
  2017-02-19  2:43 ` [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add Trevor Woerner
  2017-02-19  3:26   ` Eddie Cai
@ 2017-02-19 14:22   ` Jacob Chen
  2017-02-19 14:33     ` Eddie Cai
  1 sibling, 1 reply; 32+ messages in thread
From: Jacob Chen @ 2017-02-19 14:22 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: yocto

Hi,

2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
> This recipe was taken from the Rockchip team's recipe at
> https://github.com/rockchip-linux/meta-rockchip/commit/6a139d5b7510c7ba36aace82c239b894d5741cac
>
> It was mostly written by Jacob Chen <jacob-chen@iotwrt.com> and I've made a
> couple small modifications.
>
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> ---
>  recipes-bsp/u-boot/u-boot-rockchip_git.bb | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>  create mode 100644 recipes-bsp/u-boot/u-boot-rockchip_git.bb
>
> diff --git a/recipes-bsp/u-boot/u-boot-rockchip_git.bb b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
> new file mode 100644
> index 0000000..3b4f109
> --- /dev/null
> +++ b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
> @@ -0,0 +1,19 @@
> +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
> +# Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com>
> +# Released under the MIT license (see COPYING.MIT for the terms)
> +
> +require recipes-bsp/u-boot/u-boot.inc
> +
> +DESCRIPTION = "Rockchip next-dev U-Boot"
> +LICENSE = "GPLv2+"
> +LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
> +COMPATIBLE_MACHINE = "(firefly-rk3288)"
> +
> +SRC_URI = "git://github.com/rockchip-linux/u-boot.git;branch=release;"
> +SRCREV = "${AUTOREV}"
> +S = "${WORKDIR}/git"
> +
> +do_deploy_prepend () {
> +       # copy to default search path
> +       cp ${B}/spl/${SPL_BINARY} ${B}/
> +}

I can't pass build if use do_deploy_prepend instead of do_install_prepend.

> --
> 2.12.0.rc1.48.g076c053
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add
  2017-02-19 14:22   ` Jacob Chen
@ 2017-02-19 14:33     ` Eddie Cai
  2017-02-20 11:14       ` Eddie Cai
  0 siblings, 1 reply; 32+ messages in thread
From: Eddie Cai @ 2017-02-19 14:33 UTC (permalink / raw)
  To: Jacob Chen; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 2173 bytes --]

2017-02-19 22:22 GMT+08:00 Jacob Chen <jacobchen110@gmail.com>:

> Hi,
>
> 2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
> > This recipe was taken from the Rockchip team's recipe at
> > https://github.com/rockchip-linux/meta-rockchip/commit/
> 6a139d5b7510c7ba36aace82c239b894d5741cac
> >
> > It was mostly written by Jacob Chen <jacob-chen@iotwrt.com> and I've
> made a
> > couple small modifications.
> >
> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> > ---
> >  recipes-bsp/u-boot/u-boot-rockchip_git.bb | 19 +++++++++++++++++++
> >  1 file changed, 19 insertions(+)
> >  create mode 100644 recipes-bsp/u-boot/u-boot-rockchip_git.bb
> >
> > diff --git a/recipes-bsp/u-boot/u-boot-rockchip_git.bb
> b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
> > new file mode 100644
> > index 0000000..3b4f109
> > --- /dev/null
> > +++ b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
> > @@ -0,0 +1,19 @@
> > +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
> > +# Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com>
> > +# Released under the MIT license (see COPYING.MIT for the terms)
> > +
> > +require recipes-bsp/u-boot/u-boot.inc
> > +
> > +DESCRIPTION = "Rockchip next-dev U-Boot"
> > +LICENSE = "GPLv2+"
> > +LIC_FILES_CHKSUM = "file://Licenses/README;md5=
> a2c678cfd4a4d97135585cad908541c6"
> > +COMPATIBLE_MACHINE = "(firefly-rk3288)"
> > +
> > +SRC_URI = "git://github.com/rockchip-linux/u-boot.git;branch=release;"
> > +SRCREV = "${AUTOREV}"
> > +S = "${WORKDIR}/git"
> > +
> > +do_deploy_prepend () {
> > +       # copy to default search path
> > +       cp ${B}/spl/${SPL_BINARY} ${B}/
> > +}
>
> I can't pass build if use do_deploy_prepend instead of do_install_prepend.
>
It works for me. Did you delete build/tmp?

>
> > --
> > 2.12.0.rc1.48.g076c053
> >
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>

[-- Attachment #2: Type: text/html, Size: 4197 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add
  2017-02-19 14:33     ` Eddie Cai
@ 2017-02-20 11:14       ` Eddie Cai
  2017-02-21 16:01         ` Trevor Woerner
  0 siblings, 1 reply; 32+ messages in thread
From: Eddie Cai @ 2017-02-20 11:14 UTC (permalink / raw)
  To: Jacob Chen; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 2530 bytes --]

2017-02-19 22:33 GMT+08:00 Eddie Cai <eddie.cai.linux@gmail.com>:

>
>
> 2017-02-19 22:22 GMT+08:00 Jacob Chen <jacobchen110@gmail.com>:
>
>> Hi,
>>
>> 2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
>> > This recipe was taken from the Rockchip team's recipe at
>> > https://github.com/rockchip-linux/meta-rockchip/commit/6a139
>> d5b7510c7ba36aace82c239b894d5741cac
>> >
>> > It was mostly written by Jacob Chen <jacob-chen@iotwrt.com> and I've
>> made a
>> > couple small modifications.
>> >
>> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
>> > ---
>> >  recipes-bsp/u-boot/u-boot-rockchip_git.bb | 19 +++++++++++++++++++
>> >  1 file changed, 19 insertions(+)
>> >  create mode 100644 recipes-bsp/u-boot/u-boot-rockchip_git.bb
>> >
>> > diff --git a/recipes-bsp/u-boot/u-boot-rockchip_git.bb
>> b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
>> > new file mode 100644
>> > index 0000000..3b4f109
>> > --- /dev/null
>> > +++ b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
>> > @@ -0,0 +1,19 @@
>> > +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
>> > +# Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com>
>> > +# Released under the MIT license (see COPYING.MIT for the terms)
>> > +
>> > +require recipes-bsp/u-boot/u-boot.inc
>> > +
>> > +DESCRIPTION = "Rockchip next-dev U-Boot"
>> > +LICENSE = "GPLv2+"
>> > +LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2
>> c678cfd4a4d97135585cad908541c6"
>> > +COMPATIBLE_MACHINE = "(firefly-rk3288)"
>> > +
>> > +SRC_URI = "git://github.com/rockchip-linux/u-boot.git;branch=release;"
>> > +SRCREV = "${AUTOREV}"
>> > +S = "${WORKDIR}/git"
>> > +
>> > +do_deploy_prepend () {
>> > +       # copy to default search path
>> > +       cp ${B}/spl/${SPL_BINARY} ${B}/
>> > +}
>>
>> I can't pass build if use do_deploy_prepend instead of do_install_prepend.
>>
> It works for me. Did you delete build/tmp?
>
I failed when i did a clean build(delete build dir). I modify
do_deploy_prepend to do_install_prepend. Everything is fine.   I guess i
can build before because sstate-cache cache the previous build data.

>
>> > --
>> > 2.12.0.rc1.48.g076c053
>> >
>> > --
>> > _______________________________________________
>> > yocto mailing list
>> > yocto@yoctoproject.org
>> > https://lists.yoctoproject.org/listinfo/yocto
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>
>

[-- Attachment #2: Type: text/html, Size: 5294 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add
  2017-02-20 11:14       ` Eddie Cai
@ 2017-02-21 16:01         ` Trevor Woerner
  2017-02-21 22:18           ` Trevor Woerner
  0 siblings, 1 reply; 32+ messages in thread
From: Trevor Woerner @ 2017-02-21 16:01 UTC (permalink / raw)
  To: Eddie Cai; +Cc: yocto

I'll have to investigate this further. From a completely clean build
do_install_prepend always fails the first time, but simply restarting
the build again causes it to succeed. With do_deploy_prepend it always
succeeds without issue whether its the first or subsequent tries.

On Mon, Feb 20, 2017 at 6:14 AM, Eddie Cai <eddie.cai.linux@gmail.com> wrote:
>
>
> 2017-02-19 22:33 GMT+08:00 Eddie Cai <eddie.cai.linux@gmail.com>:
>>
>>
>>
>> 2017-02-19 22:22 GMT+08:00 Jacob Chen <jacobchen110@gmail.com>:
>>>
>>> Hi,
>>>
>>> 2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
>>> > This recipe was taken from the Rockchip team's recipe at
>>> >
>>> > https://github.com/rockchip-linux/meta-rockchip/commit/6a139d5b7510c7ba36aace82c239b894d5741cac
>>> >
>>> > It was mostly written by Jacob Chen <jacob-chen@iotwrt.com> and I've
>>> > made a
>>> > couple small modifications.
>>> >
>>> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
>>> > ---
>>> >  recipes-bsp/u-boot/u-boot-rockchip_git.bb | 19 +++++++++++++++++++
>>> >  1 file changed, 19 insertions(+)
>>> >  create mode 100644 recipes-bsp/u-boot/u-boot-rockchip_git.bb
>>> >
>>> > diff --git a/recipes-bsp/u-boot/u-boot-rockchip_git.bb
>>> > b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
>>> > new file mode 100644
>>> > index 0000000..3b4f109
>>> > --- /dev/null
>>> > +++ b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
>>> > @@ -0,0 +1,19 @@
>>> > +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
>>> > +# Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com>
>>> > +# Released under the MIT license (see COPYING.MIT for the terms)
>>> > +
>>> > +require recipes-bsp/u-boot/u-boot.inc
>>> > +
>>> > +DESCRIPTION = "Rockchip next-dev U-Boot"
>>> > +LICENSE = "GPLv2+"
>>> > +LIC_FILES_CHKSUM =
>>> > "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
>>> > +COMPATIBLE_MACHINE = "(firefly-rk3288)"
>>> > +
>>> > +SRC_URI = "git://github.com/rockchip-linux/u-boot.git;branch=release;"
>>> > +SRCREV = "${AUTOREV}"
>>> > +S = "${WORKDIR}/git"
>>> > +
>>> > +do_deploy_prepend () {
>>> > +       # copy to default search path
>>> > +       cp ${B}/spl/${SPL_BINARY} ${B}/
>>> > +}
>>>
>>> I can't pass build if use do_deploy_prepend instead of
>>> do_install_prepend.
>>
>> It works for me. Did you delete build/tmp?
>
> I failed when i did a clean build(delete build dir). I modify
> do_deploy_prepend to do_install_prepend. Everything is fine.   I guess i can
> build before because sstate-cache cache the previous build data.
>>>
>>>
>>> > --
>>> > 2.12.0.rc1.48.g076c053
>>> >
>>> > --
>>> > _______________________________________________
>>> > yocto mailing list
>>> > yocto@yoctoproject.org
>>> > https://lists.yoctoproject.org/listinfo/yocto
>>> --
>>> _______________________________________________
>>> yocto mailing list
>>> yocto@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/yocto
>>
>>
>


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add
  2017-02-21 16:01         ` Trevor Woerner
@ 2017-02-21 22:18           ` Trevor Woerner
  2017-02-22 14:06             ` Eddie Cai
  0 siblings, 1 reply; 32+ messages in thread
From: Trevor Woerner @ 2017-02-21 22:18 UTC (permalink / raw)
  To: Eddie Cai; +Cc: yocto

I can't reproduce the problem you're seeing and I'm interested in
knowing more about how you're building to see if I can reproduce it.

I've done 4 builds: 2 on master, 2 on morty; one of which (for each
master and morty) is poky and one on OE's nodistro. All of them are
able to build this recipe (as I've contributed it) whether or not it's
the first time, or it's in sstate, after a clean, on a fresh build...
That's why I "fixed" this line, because with the previous line it
always failed once and then work the second time the build was run.

Maybe you could post the build configuration from your build? That way
I could see what layers you're enabling and at what revisions? Mine
is:

meta-rockchip     =
devs/twoerner/feb-updates-2:c252843cf2bf8326ccf2b552b59209f7a2ac3f16
meta              = master:def3800c7e58d9d1b54ea1df27b190a0f6d1d544

On Tue, Feb 21, 2017 at 11:01 AM, Trevor Woerner <twoerner@gmail.com> wrote:
> I'll have to investigate this further. From a completely clean build
> do_install_prepend always fails the first time, but simply restarting
> the build again causes it to succeed. With do_deploy_prepend it always
> succeeds without issue whether its the first or subsequent tries.
>
> On Mon, Feb 20, 2017 at 6:14 AM, Eddie Cai <eddie.cai.linux@gmail.com> wrote:
>>
>>
>> 2017-02-19 22:33 GMT+08:00 Eddie Cai <eddie.cai.linux@gmail.com>:
>>>
>>>
>>>
>>> 2017-02-19 22:22 GMT+08:00 Jacob Chen <jacobchen110@gmail.com>:
>>>>
>>>> Hi,
>>>>
>>>> 2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
>>>> > This recipe was taken from the Rockchip team's recipe at
>>>> >
>>>> > https://github.com/rockchip-linux/meta-rockchip/commit/6a139d5b7510c7ba36aace82c239b894d5741cac
>>>> >
>>>> > It was mostly written by Jacob Chen <jacob-chen@iotwrt.com> and I've
>>>> > made a
>>>> > couple small modifications.
>>>> >
>>>> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
>>>> > ---
>>>> >  recipes-bsp/u-boot/u-boot-rockchip_git.bb | 19 +++++++++++++++++++
>>>> >  1 file changed, 19 insertions(+)
>>>> >  create mode 100644 recipes-bsp/u-boot/u-boot-rockchip_git.bb
>>>> >
>>>> > diff --git a/recipes-bsp/u-boot/u-boot-rockchip_git.bb
>>>> > b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
>>>> > new file mode 100644
>>>> > index 0000000..3b4f109
>>>> > --- /dev/null
>>>> > +++ b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
>>>> > @@ -0,0 +1,19 @@
>>>> > +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
>>>> > +# Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com>
>>>> > +# Released under the MIT license (see COPYING.MIT for the terms)
>>>> > +
>>>> > +require recipes-bsp/u-boot/u-boot.inc
>>>> > +
>>>> > +DESCRIPTION = "Rockchip next-dev U-Boot"
>>>> > +LICENSE = "GPLv2+"
>>>> > +LIC_FILES_CHKSUM =
>>>> > "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
>>>> > +COMPATIBLE_MACHINE = "(firefly-rk3288)"
>>>> > +
>>>> > +SRC_URI = "git://github.com/rockchip-linux/u-boot.git;branch=release;"
>>>> > +SRCREV = "${AUTOREV}"
>>>> > +S = "${WORKDIR}/git"
>>>> > +
>>>> > +do_deploy_prepend () {
>>>> > +       # copy to default search path
>>>> > +       cp ${B}/spl/${SPL_BINARY} ${B}/
>>>> > +}
>>>>
>>>> I can't pass build if use do_deploy_prepend instead of
>>>> do_install_prepend.
>>>
>>> It works for me. Did you delete build/tmp?
>>
>> I failed when i did a clean build(delete build dir). I modify
>> do_deploy_prepend to do_install_prepend. Everything is fine.   I guess i can
>> build before because sstate-cache cache the previous build data.
>>>>
>>>>
>>>> > --
>>>> > 2.12.0.rc1.48.g076c053
>>>> >
>>>> > --
>>>> > _______________________________________________
>>>> > yocto mailing list
>>>> > yocto@yoctoproject.org
>>>> > https://lists.yoctoproject.org/listinfo/yocto
>>>> --
>>>> _______________________________________________
>>>> yocto mailing list
>>>> yocto@yoctoproject.org
>>>> https://lists.yoctoproject.org/listinfo/yocto
>>>
>>>
>>


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 4/5] classes: rockchip-gpt-img: add
  2017-02-19 12:18       ` Eddie Cai
@ 2017-02-21 22:21         ` Trevor Woerner
  2017-02-27  7:29           ` Trevor Woerner
  0 siblings, 1 reply; 32+ messages in thread
From: Trevor Woerner @ 2017-02-21 22:21 UTC (permalink / raw)
  To: Eddie Cai; +Cc: Jacob Chen, yocto

Okay, thanks for the review!! I'll create a v3 and post it next week.
I'm away and don't have a board with me to test.

On Sun, Feb 19, 2017 at 7:18 AM, Eddie Cai <eddie.cai.linux@gmail.com> wrote:
> Hi
>
> 2017-02-19 16:31 GMT+08:00 Jacob Chen <jacob2.chen@rock-chips.com>:
>>
>> Hi all,
>>
>>
>> Eddie Cai wrote on 2017年02月19日 14:32:
>>
>> Hi Trevor
>>
>> 2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
>> > This bbclass was taken from the Rockchip team's work at
>> >
>> > https://github.com/rockchip-linux/meta-rockchip/commit/53d2e2e474a3014e3013d0059fd1da773fb0e2b7
>> > It was mostly written by Jacob Chen <jacob-chen@iotwrt.com>. I've made
>> > some
>> > small modifications and added it.
>> >
>> > Older images used (what Rockchip calls) the "rk-boot" format. Newer
>> > images use
>> We call it legacy parameter format
>> > u-boot and a GPT partitioning scheme. This class allows the build to
>> > generate
>> > a gpt-img file that can either be flashed to eMMC or written to an
>> > SDcard (the
>> > same image is used for both).
>> gpt-img is much better than previous one. I like this name.
>> >
>> > This is the new image format used for rk3288 SoCs (e.g. the Firefly
>> > board).
>> >
>> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
>> > ---
>> >  classes/rockchip-gpt-img.bbclass | 132
>> > +++++++++++++++++++++++++++++++++++++++
>> >  1 file changed, 132 insertions(+)
>> >  create mode 100644 classes/rockchip-gpt-img.bbclass
>> >
>> > diff --git a/classes/rockchip-gpt-img.bbclass
>> > b/classes/rockchip-gpt-img.bbclass
>> > new file mode 100644
>> > index 0000000..fd80625
>> > --- /dev/null
>> > +++ b/classes/rockchip-gpt-img.bbclass
>> > @@ -0,0 +1,132 @@
>> > +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
>> > +# Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com>
>> > +# Released under the MIT license (see COPYING.MIT for the terms)
>> > +
>> > +inherit image_types
>> > +
>> > +# Use an uncompressed ext4 by default as rootfs
>> > +IMG_ROOTFS_TYPE = "ext4"
>> > +IMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.${IMG_ROOTFS_TYPE}"
>> > +
>> > +# This image depends on the rootfs image
>> > +IMAGE_TYPEDEP_rockchip-gpt-img = "${IMG_ROOTFS_TYPE}"
>> > +
>> > +GPTIMG_SUFFIX  = "gpt-img"
>> > +GPTIMG         = "${IMAGE_NAME}.${GPTIMG_SUFFIX}"
>> > +GPTIMG_SIZE   ?= "4096"
>> This should be GPT size in sectors which is 64 sectors. The name
>> GPTIMG_SIZE is not clear enough. People may think it is whole gpt image.
>> What about call it GPT_SIZE?
>>
>>
>> It's whole gpt image.
>
> OK, my mistake. So that look good to me.
>>
>>
>>
>> > +BOOT_IMG       = "boot.img"
>> > +MINILOADER     = "loader.bin"
>> > +UBOOT          = "u-boot.out"
>> > +TRUST          = "trust.out"
>> > +GPTIMG_APPEND ?= "console=tty1 console=ttyS2,115200n8 rw
>> > root=/dev/mmcblk2p7 rootfstype=ext4 init=/sbin/init"
>> > +
>> > +# default partitions [in Sectors]
>> > +# More info at http://rockchip.wikidot.com/partitions
>> > +LOADER1_SIZE = "8000"
>> > +RESERVED1_SIZE = "128"
>> > +RESERVED2_SIZE = "8192"
>> > +LOADER2_SIZE = "8192"
>> > +ATF_SIZE = "8192"
>> > +BOOT_SIZE = "229376"
>> > +
>> > +IMAGE_DEPENDS_rockchip-gpt-img = "parted-native \
>> > +       u-boot-mkimage-native \
>> > +       mtools-native \
>> > +       dosfstools-native \
>> > +       virtual/kernel:do_deploy \
>> > +       virtual/bootloader:do_deploy"
>> > +
>> > +PER_CHIP_IMG_GENERATION_COMMAND_rk3288 = "generate_rk3288_image"
>> This is not just for rk3288. in fact, it can be used for all the Rockchip
>> SoC.
>>
>>
>> There're many differences between Chips.
>> Some chips didn't implement SPL support and have to use rk-miniloader to
>> create u-boot blob. (e.g. previous rk3399, rk3229)
>
> all the chips supported by uboot-rockchip and upstream u-boot have SPL
> support . The legacy should go to use legacy update image intead.
>>
>> Some chips didn't use "spl_back_to_brom" so their tpl have a different
>> offset.(e.g. previous rk3288)
>
>  The back_to_brom is not chip configuration. It is board configuration.
> Actually all the rk3288 board in uboot-rockchip and upstream u-boot support
> it now.
>>
>>
>> The name "generate_load1" can't express it clearly.
>
> Sorry, should be  generate_loader1 which is the partition name shows in
> http://rockchip.wikidot.com/partitions
>>
>>
>>
>> > +
>> > +IMAGE_CMD_rockchip-gpt-img () {
>> > +       # Change to image directory
>> > +       cd ${DEPLOY_DIR_IMAGE}
>> > +
>> > +       # Remove the exist image
>> > +       rm -rf *${GPTIMG_SUFFIX}
>> ${IMAGE_NAME}  is derived using the IMAGE_BASENAME, MACHINE, and DATETIME
>> variables. So we don't need to delete previous one to avoid mistake.
>> > +
>> > +       create_rk_image
>> > +
>> > +       ${PER_CHIP_IMG_GENERATION_COMMAND}
>> > +
>> > +       cd ${DEPLOY_DIR_IMAGE}
>> > +       ln -s ${GPTIMG} "${IMAGE_BASENAME}-${MACHINE}.${GPTIMG_SUFFIX}"
>> > +}
>> > +
>> > +create_rk_image () {
>> > +
>> > +       # Initialize sdcard image file
>> > +       dd if=/dev/zero of=${GPTIMG} bs=1M count=0 seek=${GPTIMG_SIZE}
>> > +
>> > +       # Create partition table
>> > +       parted -s ${GPTIMG} mklabel gpt
>> > +
>> > +       # Create vendor defined partitions
>> > +       LOADER1_START=64
>> > +       RESERVED1_START=`expr ${LOADER1_START}  + ${LOADER1_SIZE}`
>> > +       RESERVED2_START=`expr ${RESERVED1_START}  + ${RESERVED1_SIZE}`
>> > +       LOADER2_START=`expr ${RESERVED2_START}  + ${RESERVED2_SIZE}`
>> > +       ATF_START=`expr ${LOADER2_START}  + ${LOADER2_SIZE}`
>> > +       BOOT_START=`expr ${ATF_START}  + ${ATF_SIZE}`
>> > +       ROOTFS_START=`expr ${BOOT_START}  + ${BOOT_SIZE}`
>> > +
>> > +       parted -s ${GPTIMG} unit s mkpart loader1 ${LOADER1_START} `expr
>> > ${RESERVED1_START} - 1`
>> > +       parted -s ${GPTIMG} unit s mkpart reserved1 ${RESERVED1_START}
>> > `expr ${RESERVED2_START} - 1`
>> > +       parted -s ${GPTIMG} unit s mkpart reserved2 ${RESERVED2_START}
>> > `expr ${LOADER2_START} - 1`
>> > +       parted -s ${GPTIMG} unit s mkpart loader2 ${LOADER2_START} `expr
>> > ${ATF_START} - 1`
>> > +       parted -s ${GPTIMG} unit s mkpart atf ${ATF_START} `expr
>> > ${BOOT_START} - 1`
>> > +
>> > +       # Create boot partition and mark it as bootable
>> > +       parted -s ${GPTIMG} unit s mkpart boot ${BOOT_START} `expr
>> > ${ROOTFS_START} - 1`
>> > +       parted -s ${GPTIMG} set 6 boot on
>> > +
>> > +       # Create rootfs partition
>> > +       parted -s ${GPTIMG} unit s mkpart root ${ROOTFS_START} 100%
>> > +
>> > +       parted ${GPTIMG} print
>> > +
>> > +       # Delete the boot image to avoid trouble with the build cache
>> > +       rm -f ${WORKDIR}/${BOOT_IMG}
>> what about use BOOT_IMG = "boot-${MACHINE}-${DATETIME}.img" instead? That
>> will leave the previous build for debug and avoid trouble.
>>
>>
>> BOOT_IMG seems will not be deleted automatically so i delete it in here.
>> If we leave the previous build, it will make a mess.
>
> Can you try to fix it instead of just delete it? I believe add a timestamp
> can help.
>>
>>
>>
>>
>> > +
>> > +       # Create boot partition image
>> > +       BOOT_BLOCKS=$(LC_ALL=C parted -s ${GPTIMG} unit b print | awk '/
>> > 6 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
>> > +       BOOT_BLOCKS=`expr $BOOT_BLOCKS / 63 \* 63`
>> > +
>> > +       mkfs.vfat -n "boot" -S 512 -C ${WORKDIR}/${BOOT_IMG}
>> > $BOOT_BLOCKS
>> > +       mcopy -i ${WORKDIR}/${BOOT_IMG} -s
>> > ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::${KERNEL_IMAGETYPE}
>> > +
>> > +       DEVICETREE_DEFAULT=""
>> > +       for DTS_FILE in ${KERNEL_DEVICETREE}; do
>> > +               [ -n "${DEVICETREE_DEFAULT}"] &&
>> > DEVICETREE_DEFAULT="${DTS_FILE}"
>> > +               mcopy -i ${WORKDIR}/${BOOT_IMG} -s
>> > ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_FILE} ::${DTS_FILE}
>> > +       done
>> > +
>> > +       # Create extlinux config file
>> > +       cat > ${WORKDIR}/extlinux.conf <<EOF
>> > +default yocto
>> > +
>> > +label yocto
>> > +       kernel /${KERNEL_IMAGETYPE}
>> > +       devicetree /${DEVICETREE_DEFAULT}
>> > +       append ${GPTIMG_APPEND}
>> > +EOF
>> > +
>> > +       mmd -i ${WORKDIR}/${BOOT_IMG} ::/extlinux
>> > +       mcopy -i ${WORKDIR}/${BOOT_IMG} -s ${WORKDIR}/extlinux.conf
>> > ::/extlinux/
>> > +
>> > +       # Burn Boot Partition
>> > +       dd if=${WORKDIR}/${BOOT_IMG} of=${GPTIMG} conv=notrunc,fsync
>> > seek=${BOOT_START}
>> > +
>> > +       # Burn Rootfs Partition
>> > +       dd if=${IMG_ROOTFS} of=${GPTIMG} seek=${ROOTFS_START}
>> > +
>> > +}
>> > +
>> > +generate_rk3288_image () {
>> It is not only for rk3288. In fact, This function is for create load1
>> partition. So what about using generate_load1 or create_loader1 ?
>> > +
>> > +       # Burn bootloader
>> > +       mkimage -n rk3288 -T rksd -d ${DEPLOY_DIR_IMAGE}/${SPL_BINARY}
>> > ${WORKDIR}/${UBOOT}
>> > +       cat ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.bin >>
>> > ${WORKDIR}/${UBOOT}
>> > +       dd if=${WORKDIR}/${UBOOT} of=${GPTIMG} conv=notrunc,fsync
>> > seek=64
>> > +
>> > +}
>> > --
>> > 2.12.0.rc1.48.g076c053
>> >
>> > --
>> > _______________________________________________
>> > yocto mailing list
>> > yocto@yoctoproject.org
>> > https://lists.yoctoproject.org/listinfo/yocto
>>
>>
>> It looks good, Reviewed-by: Jacob Chen <jacob-chen@iotwrt.com>
>
>


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 3/5] machine: firefly-rk3288: specify bootloader
  2017-02-19  8:17     ` Jacob Chen
@ 2017-02-21 22:22       ` Trevor Woerner
  2017-02-26  6:24         ` Trevor Woerner
  0 siblings, 1 reply; 32+ messages in thread
From: Trevor Woerner @ 2017-02-21 22:22 UTC (permalink / raw)
  To: Jacob Chen; +Cc: yocto

Great, thanks for the review!

On Sun, Feb 19, 2017 at 3:17 AM, Jacob Chen <jacobchen110@gmail.com> wrote:
> Hi Trevor,
>
> 2017-02-19 13:03 GMT+08:00 Eddie Cai <eddie.cai.linux@gmail.com>:
>> Hi Trevor
>>
>> 2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
>>> Set the default preferred bootloader for firefly-rk3288 to be u-boot-rockchip
>>> and set the default name of the SPL binary.
>>>
>>> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
>>> ---
>>>  conf/machine/firefly-rk3288.conf | 1 +
>>>  conf/machine/include/rk3288.inc  | 3 +++
>>>  2 files changed, 4 insertions(+)
>> Reviewed-by Eddie Cai <eddie.cai.linux@gmail.com>
>>>
>>> diff --git a/conf/machine/firefly-rk3288.conf b/conf/machine/firefly-rk3288.conf
>>> index 8fa005d..58d752b 100644
>>> --- a/conf/machine/firefly-rk3288.conf
>>> +++ b/conf/machine/firefly-rk3288.conf
>>> @@ -8,3 +8,4 @@
>>>
>>>  include conf/machine/include/rk3288.inc
>>>  KERNEL_DEVICETREE = "rk3288-firefly.dtb"
>>> +UBOOT_MACHINE = "firefly-rk3288_defconfig"
>>> diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
>>> index 769e5c1..4a4201f 100644
>>> --- a/conf/machine/include/rk3288.inc
>>> +++ b/conf/machine/include/rk3288.inc
>>> @@ -10,3 +10,6 @@ PREFERRED_PROVIDER_virtual/kernel = "linux"
>>>  SERIAL_CONSOLES = "115200;ttyS2"
>>>  KERNEL_IMAGETYPE = "zImage"
>>>  KBUILD_DEFCONFIG = "multi_v7_defconfig"
>>> +
>>> +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-rockchip"
>>> +SPL_BINARY ?= "u-boot-spl-dtb.bin"
>>> --
>>> 2.12.0.rc1.48.g076c053
>>>
>>> --
>>> _______________________________________________
>>> yocto mailing list
>>> yocto@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/yocto
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>
>
> It looks good, Reviewed-by: Jacob Chen <jacob-chen@iotwrt.com>


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 1/5] machine: rk3288: enable SoC-specific assignments
  2017-02-19  3:40   ` Eddie Cai
@ 2017-02-21 22:25     ` Trevor Woerner
  2017-02-22  2:20       ` Eddie Cai
  0 siblings, 1 reply; 32+ messages in thread
From: Trevor Woerner @ 2017-02-21 22:25 UTC (permalink / raw)
  To: Eddie Cai; +Cc: yocto

Almost. The file you created a patch against had  DEFAULTTUNE which
has been removed so I had to create a new patch that would apply.  If
you're happy with this patch (which is very similar to yours) I'll add
your signed-off-by line to it when I commit?

On Sat, Feb 18, 2017 at 10:40 PM, Eddie Cai <eddie.cai.linux@gmail.com> wrote:
> Hi Trevor
>
> Is this the same one i submit before?
> https://www.mail-archive.com/yocto@yoctoproject.org/msg33572.html
>
> 2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
>> Enable machine overrides for RK3288.
>>
>> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
>> ---
>>  conf/machine/include/rk3288.inc | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
>> index 86fc567..769e5c1 100644
>> --- a/conf/machine/include/rk3288.inc
>> +++ b/conf/machine/include/rk3288.inc
>> @@ -1,7 +1,10 @@
>>  # Copyright (C) 2015 Romain Perier
>>  # Released under the MIT license (see COPYING.MIT for the terms)
>>
>> +SOC_FAMILY = "rk3288"
>> +
>>  require conf/machine/include/tune-cortexa17.inc
>> +require conf/machine/include/soc-family.inc
>>
>>  PREFERRED_PROVIDER_virtual/kernel = "linux"
>>  SERIAL_CONSOLES = "115200;ttyS2"
>> --
>> 2.12.0.rc1.48.g076c053
>>
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 1/5] machine: rk3288: enable SoC-specific assignments
  2017-02-21 22:25     ` Trevor Woerner
@ 2017-02-22  2:20       ` Eddie Cai
  2017-02-26  6:15         ` Trevor Woerner
  0 siblings, 1 reply; 32+ messages in thread
From: Eddie Cai @ 2017-02-22  2:20 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1685 bytes --]

Hi Trevor

2017-02-22 6:25 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:

> Almost. The file you created a patch against had  DEFAULTTUNE which
> has been removed so I had to create a new patch that would apply.  If
> you're happy with this patch (which is very similar to yours) I'll add
> your signed-off-by line to it when I commit?
>
Sure, My pleasure.

>
> On Sat, Feb 18, 2017 at 10:40 PM, Eddie Cai <eddie.cai.linux@gmail.com>
> wrote:
> > Hi Trevor
> >
> > Is this the same one i submit before?
> > https://www.mail-archive.com/yocto@yoctoproject.org/msg33572.html
> >
> > 2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
> >> Enable machine overrides for RK3288.
> >>
> >> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> >> ---
> >>  conf/machine/include/rk3288.inc | 3 +++
> >>  1 file changed, 3 insertions(+)
> >>
> >> diff --git a/conf/machine/include/rk3288.inc
> b/conf/machine/include/rk3288.inc
> >> index 86fc567..769e5c1 100644
> >> --- a/conf/machine/include/rk3288.inc
> >> +++ b/conf/machine/include/rk3288.inc
> >> @@ -1,7 +1,10 @@
> >>  # Copyright (C) 2015 Romain Perier
> >>  # Released under the MIT license (see COPYING.MIT for the terms)
> >>
> >> +SOC_FAMILY = "rk3288"
> >> +
> >>  require conf/machine/include/tune-cortexa17.inc
> >> +require conf/machine/include/soc-family.inc
> >>
> >>  PREFERRED_PROVIDER_virtual/kernel = "linux"
> >>  SERIAL_CONSOLES = "115200;ttyS2"
> >> --
> >> 2.12.0.rc1.48.g076c053
> >>
> >> --
> >> _______________________________________________
> >> yocto mailing list
> >> yocto@yoctoproject.org
> >> https://lists.yoctoproject.org/listinfo/yocto
>

[-- Attachment #2: Type: text/html, Size: 2931 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add
  2017-02-21 22:18           ` Trevor Woerner
@ 2017-02-22 14:06             ` Eddie Cai
  2017-02-27  9:07               ` Trevor Woerner
  0 siblings, 1 reply; 32+ messages in thread
From: Eddie Cai @ 2017-02-22 14:06 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 5056 bytes --]

Hi Trevor

Here is mine

Build Configuration:
BB_VERSION        = "1.32.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "firefly-rk3288"
DISTRO            = "poky"
DISTRO_VERSION    = "2.2.1"
TUNE_FEATURES     = "arm armv7ve vfp  neon  vfpv4  callconvention-hard
 cortexa17"
TARGET_FPU        = "hard"
meta
meta-poky
meta-yocto-bsp    = "HEAD:6a1f33cc40bfac33cf030fe41e1a8efd1e5fad6f"
meta-rockchip     =
"review-uboot-gtpimg-v2:5e181d4e74c50e290b507b1a990b1517eaffcea6"

BBLAYERS ?= " \
  ${BSPDIR}/src/poky/meta \
  ${BSPDIR}/src/poky/meta-poky \
  ${BSPDIR}/src/poky/meta-yocto-bsp \
  ${BSPDIR}/src/meta-rockchip \



2017-02-22 6:18 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:

> I can't reproduce the problem you're seeing and I'm interested in
> knowing more about how you're building to see if I can reproduce it.
>
> I've done 4 builds: 2 on master, 2 on morty; one of which (for each
> master and morty) is poky and one on OE's nodistro. All of them are
> able to build this recipe (as I've contributed it) whether or not it's
> the first time, or it's in sstate, after a clean, on a fresh build...
> That's why I "fixed" this line, because with the previous line it
> always failed once and then work the second time the build was run.
>
> Maybe you could post the build configuration from your build? That way
> I could see what layers you're enabling and at what revisions? Mine
> is:
>
> meta-rockchip     =
> devs/twoerner/feb-updates-2:c252843cf2bf8326ccf2b552b59209f7a2ac3f16
> meta              = master:def3800c7e58d9d1b54ea1df27b190a0f6d1d544
>
> On Tue, Feb 21, 2017 at 11:01 AM, Trevor Woerner <twoerner@gmail.com>
> wrote:
> > I'll have to investigate this further. From a completely clean build
> > do_install_prepend always fails the first time, but simply restarting
> > the build again causes it to succeed. With do_deploy_prepend it always
> > succeeds without issue whether its the first or subsequent tries.
> >
> > On Mon, Feb 20, 2017 at 6:14 AM, Eddie Cai <eddie.cai.linux@gmail.com>
> wrote:
> >>
> >>
> >> 2017-02-19 22:33 GMT+08:00 Eddie Cai <eddie.cai.linux@gmail.com>:
> >>>
> >>>
> >>>
> >>> 2017-02-19 22:22 GMT+08:00 Jacob Chen <jacobchen110@gmail.com>:
> >>>>
> >>>> Hi,
> >>>>
> >>>> 2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
> >>>> > This recipe was taken from the Rockchip team's recipe at
> >>>> >
> >>>> > https://github.com/rockchip-linux/meta-rockchip/commit/
> 6a139d5b7510c7ba36aace82c239b894d5741cac
> >>>> >
> >>>> > It was mostly written by Jacob Chen <jacob-chen@iotwrt.com> and
> I've
> >>>> > made a
> >>>> > couple small modifications.
> >>>> >
> >>>> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> >>>> > ---
> >>>> >  recipes-bsp/u-boot/u-boot-rockchip_git.bb | 19 +++++++++++++++++++
> >>>> >  1 file changed, 19 insertions(+)
> >>>> >  create mode 100644 recipes-bsp/u-boot/u-boot-rockchip_git.bb
> >>>> >
> >>>> > diff --git a/recipes-bsp/u-boot/u-boot-rockchip_git.bb
> >>>> > b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
> >>>> > new file mode 100644
> >>>> > index 0000000..3b4f109
> >>>> > --- /dev/null
> >>>> > +++ b/recipes-bsp/u-boot/u-boot-rockchip_git.bb
> >>>> > @@ -0,0 +1,19 @@
> >>>> > +# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
> >>>> > +# Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com>
> >>>> > +# Released under the MIT license (see COPYING.MIT for the terms)
> >>>> > +
> >>>> > +require recipes-bsp/u-boot/u-boot.inc
> >>>> > +
> >>>> > +DESCRIPTION = "Rockchip next-dev U-Boot"
> >>>> > +LICENSE = "GPLv2+"
> >>>> > +LIC_FILES_CHKSUM =
> >>>> > "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
> >>>> > +COMPATIBLE_MACHINE = "(firefly-rk3288)"
> >>>> > +
> >>>> > +SRC_URI = "git://github.com/rockchip-linux/u-boot.git;branch=
> release;"
> >>>> > +SRCREV = "${AUTOREV}"
> >>>> > +S = "${WORKDIR}/git"
> >>>> > +
> >>>> > +do_deploy_prepend () {
> >>>> > +       # copy to default search path
> >>>> > +       cp ${B}/spl/${SPL_BINARY} ${B}/
> >>>> > +}
> >>>>
> >>>> I can't pass build if use do_deploy_prepend instead of
> >>>> do_install_prepend.
> >>>
> >>> It works for me. Did you delete build/tmp?
> >>
> >> I failed when i did a clean build(delete build dir). I modify
> >> do_deploy_prepend to do_install_prepend. Everything is fine.   I guess
> i can
> >> build before because sstate-cache cache the previous build data.
> >>>>
> >>>>
> >>>> > --
> >>>> > 2.12.0.rc1.48.g076c053
> >>>> >
> >>>> > --
> >>>> > _______________________________________________
> >>>> > yocto mailing list
> >>>> > yocto@yoctoproject.org
> >>>> > https://lists.yoctoproject.org/listinfo/yocto
> >>>> --
> >>>> _______________________________________________
> >>>> yocto mailing list
> >>>> yocto@yoctoproject.org
> >>>> https://lists.yoctoproject.org/listinfo/yocto
> >>>
> >>>
> >>
>

[-- Attachment #2: Type: text/html, Size: 8642 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 1/5] machine: rk3288: enable SoC-specific assignments
  2017-02-22  2:20       ` Eddie Cai
@ 2017-02-26  6:15         ` Trevor Woerner
  0 siblings, 0 replies; 32+ messages in thread
From: Trevor Woerner @ 2017-02-26  6:15 UTC (permalink / raw)
  To: Eddie Cai; +Cc: yocto

pushed, thanks!

On Tue, Feb 21, 2017 at 9:20 PM, Eddie Cai <eddie.cai.linux@gmail.com> wrote:
> Hi Trevor
>
> 2017-02-22 6:25 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
>>
>> Almost. The file you created a patch against had  DEFAULTTUNE which
>> has been removed so I had to create a new patch that would apply.  If
>> you're happy with this patch (which is very similar to yours) I'll add
>> your signed-off-by line to it when I commit?
>
> Sure, My pleasure.
>>
>>
>> On Sat, Feb 18, 2017 at 10:40 PM, Eddie Cai <eddie.cai.linux@gmail.com>
>> wrote:
>> > Hi Trevor
>> >
>> > Is this the same one i submit before?
>> > https://www.mail-archive.com/yocto@yoctoproject.org/msg33572.html
>> >
>> > 2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
>> >> Enable machine overrides for RK3288.
>> >>
>> >> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
>> >> ---
>> >>  conf/machine/include/rk3288.inc | 3 +++
>> >>  1 file changed, 3 insertions(+)
>> >>
>> >> diff --git a/conf/machine/include/rk3288.inc
>> >> b/conf/machine/include/rk3288.inc
>> >> index 86fc567..769e5c1 100644
>> >> --- a/conf/machine/include/rk3288.inc
>> >> +++ b/conf/machine/include/rk3288.inc
>> >> @@ -1,7 +1,10 @@
>> >>  # Copyright (C) 2015 Romain Perier
>> >>  # Released under the MIT license (see COPYING.MIT for the terms)
>> >>
>> >> +SOC_FAMILY = "rk3288"
>> >> +
>> >>  require conf/machine/include/tune-cortexa17.inc
>> >> +require conf/machine/include/soc-family.inc
>> >>
>> >>  PREFERRED_PROVIDER_virtual/kernel = "linux"
>> >>  SERIAL_CONSOLES = "115200;ttyS2"
>> >> --
>> >> 2.12.0.rc1.48.g076c053
>> >>
>> >> --
>> >> _______________________________________________
>> >> yocto mailing list
>> >> yocto@yoctoproject.org
>> >> https://lists.yoctoproject.org/listinfo/yocto
>
>


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 3/5] machine: firefly-rk3288: specify bootloader
  2017-02-21 22:22       ` Trevor Woerner
@ 2017-02-26  6:24         ` Trevor Woerner
  0 siblings, 0 replies; 32+ messages in thread
From: Trevor Woerner @ 2017-02-26  6:24 UTC (permalink / raw)
  To: Jacob Chen; +Cc: yocto

applied, thanks!

On Tue, Feb 21, 2017 at 5:22 PM, Trevor Woerner <twoerner@gmail.com> wrote:
> Great, thanks for the review!
>
> On Sun, Feb 19, 2017 at 3:17 AM, Jacob Chen <jacobchen110@gmail.com> wrote:
>> Hi Trevor,
>>
>> 2017-02-19 13:03 GMT+08:00 Eddie Cai <eddie.cai.linux@gmail.com>:
>>> Hi Trevor
>>>
>>> 2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
>>>> Set the default preferred bootloader for firefly-rk3288 to be u-boot-rockchip
>>>> and set the default name of the SPL binary.
>>>>
>>>> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
>>>> ---
>>>>  conf/machine/firefly-rk3288.conf | 1 +
>>>>  conf/machine/include/rk3288.inc  | 3 +++
>>>>  2 files changed, 4 insertions(+)
>>> Reviewed-by Eddie Cai <eddie.cai.linux@gmail.com>
>>>>
>>>> diff --git a/conf/machine/firefly-rk3288.conf b/conf/machine/firefly-rk3288.conf
>>>> index 8fa005d..58d752b 100644
>>>> --- a/conf/machine/firefly-rk3288.conf
>>>> +++ b/conf/machine/firefly-rk3288.conf
>>>> @@ -8,3 +8,4 @@
>>>>
>>>>  include conf/machine/include/rk3288.inc
>>>>  KERNEL_DEVICETREE = "rk3288-firefly.dtb"
>>>> +UBOOT_MACHINE = "firefly-rk3288_defconfig"
>>>> diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
>>>> index 769e5c1..4a4201f 100644
>>>> --- a/conf/machine/include/rk3288.inc
>>>> +++ b/conf/machine/include/rk3288.inc
>>>> @@ -10,3 +10,6 @@ PREFERRED_PROVIDER_virtual/kernel = "linux"
>>>>  SERIAL_CONSOLES = "115200;ttyS2"
>>>>  KERNEL_IMAGETYPE = "zImage"
>>>>  KBUILD_DEFCONFIG = "multi_v7_defconfig"
>>>> +
>>>> +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-rockchip"
>>>> +SPL_BINARY ?= "u-boot-spl-dtb.bin"
>>>> --
>>>> 2.12.0.rc1.48.g076c053
>>>>
>>>> --
>>>> _______________________________________________
>>>> yocto mailing list
>>>> yocto@yoctoproject.org
>>>> https://lists.yoctoproject.org/listinfo/yocto
>>> --
>>> _______________________________________________
>>> yocto mailing list
>>> yocto@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/yocto
>>
>>
>> It looks good, Reviewed-by: Jacob Chen <jacob-chen@iotwrt.com>


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 5/5] machine: rk3288: GPT image support
  2017-02-19  6:33   ` Eddie Cai
@ 2017-02-26  6:28     ` Trevor Woerner
  0 siblings, 0 replies; 32+ messages in thread
From: Trevor Woerner @ 2017-02-26  6:28 UTC (permalink / raw)
  To: Eddie Cai; +Cc: yocto

applied, thanks!

On Sun, Feb 19, 2017 at 1:33 AM, Eddie Cai <eddie.cai.linux@gmail.com> wrote:
> Hi Trevor
>
>
> 2017-02-19 10:43 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
>>
>> Configure any rk3288 build to generate the new GPT image which is then
>> either
>> flashed to eMMC or dd'ed to an SDcard.
>>
>> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
>> ---
>>  conf/machine/include/rk3288.inc | 3 +++
>>  1 file changed, 3 insertions(+)
>
> Reviewed-by Eddie Cai <eddie.cai.linux@gmail.com>
>>
>>
>> diff --git a/conf/machine/include/rk3288.inc
>> b/conf/machine/include/rk3288.inc
>> index 4a4201f..964d8b0 100644
>> --- a/conf/machine/include/rk3288.inc
>> +++ b/conf/machine/include/rk3288.inc
>> @@ -13,3 +13,6 @@ KBUILD_DEFCONFIG = "multi_v7_defconfig"
>>
>>  PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-rockchip"
>>  SPL_BINARY ?= "u-boot-spl-dtb.bin"
>> +
>> +IMAGE_FSTYPES = "ext4 rockchip-gpt-img"
>> +IMAGE_CLASSES += "rockchip-gpt-img"
>> --
>> 2.12.0.rc1.48.g076c053
>>
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>
>


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 4/5] classes: rockchip-gpt-img: add
  2017-02-21 22:21         ` Trevor Woerner
@ 2017-02-27  7:29           ` Trevor Woerner
  0 siblings, 0 replies; 32+ messages in thread
From: Trevor Woerner @ 2017-02-27  7:29 UTC (permalink / raw)
  To: Eddie Cai; +Cc: Jacob Chen, yocto

> what about use BOOT_IMG = "boot-${MACHINE}-${DATETIME}.img" instead? That
> will leave the previous build for debug and avoid trouble.

Using boot-${MACHINE}-${DATETIME}.img doesn't work, it leads to the following
errors:

	ERROR: When reparsing /z/rockchip/master/layers/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_image_rockchip_gpt_img, the basehash value changed from 7150ddd4bffcc76eed6ec85216596f3b to 2c30fda706826e991aaf953180edc3b2. The metadata is not deterministic and this needs to be fixed.


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add
  2017-02-22 14:06             ` Eddie Cai
@ 2017-02-27  9:07               ` Trevor Woerner
  2017-03-06  5:06                 ` Trevor Woerner
  0 siblings, 1 reply; 32+ messages in thread
From: Trevor Woerner @ 2017-02-27  9:07 UTC (permalink / raw)
  To: Eddie Cai; +Cc: yocto

On Wed 2017-02-22 @ 10:06:23 PM, Eddie Cai wrote:
> Build Configuration:
> BB_VERSION        = "1.32.0"
> BUILD_SYS         = "x86_64-linux"
> NATIVELSBSTRING   = "universal"
> TARGET_SYS        = "arm-poky-linux-gnueabi"
> MACHINE           = "firefly-rk3288"
> DISTRO            = "poky"
> DISTRO_VERSION    = "2.2.1"
> TUNE_FEATURES     = "arm armv7ve vfp  neon  vfpv4  callconvention-hard
>  cortexa17"
> TARGET_FPU        = "hard"
> meta
> meta-poky
> meta-yocto-bsp    = "HEAD:6a1f33cc40bfac33cf030fe41e1a8efd1e5fad6f"
> meta-rockchip     =
> "review-uboot-gtpimg-v2:5e181d4e74c50e290b507b1a990b1517eaffcea6"
> 
> BBLAYERS ?= " \
>   ${BSPDIR}/src/poky/meta \
>   ${BSPDIR}/src/poky/meta-poky \
>   ${BSPDIR}/src/poky/meta-yocto-bsp \
>   ${BSPDIR}/src/meta-rockchip \

I can't reproduce the issue you're seeing, and your meta-rockchip branch
sounds suspicious. In a completely fresh location with a fresh shell could you
please try the following?

	$ mkdir -p ~/tmp/rockchip/layers
	$ cd ~/tmp/rockchip/layers
	$ git clone git://git.openembedded.org/openembedded-core
	$ git clone git://git.openembedded.org/bitbake
	$ git clone git://git.yoctoproject.org/meta-rockchip
	$ cd meta-rockchip
	$ git checkout devs/twoerner/feb-updates-2
	$ cd ~/tmp/rockchip
	$ . layers/openembedded-core/oe-init-build-env build layers/bitbake
	$ echo "BBLAYERS += \"$HOME/tmp/rockchip/layers/meta-rockchip\"" >> conf/bblayers.conf
	set conf/local.conf to:
		MACHINE ?= "firefly-rk3288"
		DISTRO ?= "nodistro"
		DL_DIR = "/opt/Downloads"
		DEFAULTTUNE_rk3288 = "cortexa17hf-neon-vfpv4"
		PACKAGE_CLASSES ?= "package_ipk"
		EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
		USER_CLASSES ?= "buildstats image-mklibs image-prelink"
		PATCHRESOLVE = "noop"
		BB_DISKMON_DIRS = "\
		    STOPTASKS,${TMPDIR},1G,100K \
		    STOPTASKS,${DL_DIR},1G,100K \
		    STOPTASKS,${SSTATE_DIR},1G,100K \
		    STOPTASKS,/tmp,100M,100K \
		    ABORT,${TMPDIR},100M,1K \
		    ABORT,${DL_DIR},100M,1K \
		    ABORT,${SSTATE_DIR},100M,1K \
		    ABORT,/tmp,10M,1K"
		PACKAGECONFIG_append_pn-qemu-native = " sdl"
		PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
		ASSUME_PROVIDED += "libsdl-native"
		CONF_VERSION = "1" 
	$ bitbake virtual/bootloader

The build configuration should look like:
	Build Configuration:
	BB_VERSION        = "1.33.1"
	BUILD_SYS         = "x86_64-linux"
	NATIVELSBSTRING   = "opensuse-42.2"
	TARGET_SYS        = "arm-oe-linux-gnueabi"
	MACHINE           = "firefly-rk3288"
	DISTRO            = "nodistro"
	DISTRO_VERSION    = "nodistro.0"
	TUNE_FEATURES     = "arm armv7ve vfp neon vfpv4 callconvention-hard cortexa17"
	TARGET_FPU        = "hard"
	meta              = "master:65cfc8aca3ff7e39453977a0215a350d13cb85ef"
	meta-rockchip     = "devs/twoerner/feb-updates-2:c252843cf2bf8326ccf2b552b59209f7a2ac3f16"


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add
  2017-02-27  9:07               ` Trevor Woerner
@ 2017-03-06  5:06                 ` Trevor Woerner
  2017-03-06  7:04                   ` Eddie Cai
  0 siblings, 1 reply; 32+ messages in thread
From: Trevor Woerner @ 2017-03-06  5:06 UTC (permalink / raw)
  To: Eddie Cai; +Cc: yocto

I can assume everyone can build/include u-boot successfully when using
unmodified repositories?


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add
  2017-03-06  5:06                 ` Trevor Woerner
@ 2017-03-06  7:04                   ` Eddie Cai
  2017-03-06 18:44                     ` Trevor Woerner
  0 siblings, 1 reply; 32+ messages in thread
From: Eddie Cai @ 2017-03-06  7:04 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 207 bytes --]

2017-03-06 13:06 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:

> I can assume everyone can build/include u-boot successfully when using
> unmodified repositories?
>
Yes, I can build it successfully.

[-- Attachment #2: Type: text/html, Size: 501 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add
  2017-03-06  7:04                   ` Eddie Cai
@ 2017-03-06 18:44                     ` Trevor Woerner
  0 siblings, 0 replies; 32+ messages in thread
From: Trevor Woerner @ 2017-03-06 18:44 UTC (permalink / raw)
  To: Eddie Cai; +Cc: yocto

On Mon, Mar 6, 2017 at 2:04 AM, Eddie Cai <eddie.cai.linux@gmail.com> wrote:
> 2017-03-06 13:06 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:
>>
>> I can assume everyone can build/include u-boot successfully when using
>> unmodified repositories?
>
> Yes, I can build it successfully.

Excellent, thank you for the update. I'll push the commit to master.


^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2017-03-06 18:44 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-19  2:43 [meta-rockchip][PATCH v2 0/5] various updates Trevor Woerner
2017-02-19  2:43 ` [meta-rockchip][PATCH v2 1/5] machine: rk3288: enable SoC-specific assignments Trevor Woerner
2017-02-19  3:40   ` Eddie Cai
2017-02-21 22:25     ` Trevor Woerner
2017-02-22  2:20       ` Eddie Cai
2017-02-26  6:15         ` Trevor Woerner
2017-02-19  2:43 ` [meta-rockchip][PATCH v2 2/5] u-boot-rockchip: add Trevor Woerner
2017-02-19  3:26   ` Eddie Cai
2017-02-19 14:22   ` Jacob Chen
2017-02-19 14:33     ` Eddie Cai
2017-02-20 11:14       ` Eddie Cai
2017-02-21 16:01         ` Trevor Woerner
2017-02-21 22:18           ` Trevor Woerner
2017-02-22 14:06             ` Eddie Cai
2017-02-27  9:07               ` Trevor Woerner
2017-03-06  5:06                 ` Trevor Woerner
2017-03-06  7:04                   ` Eddie Cai
2017-03-06 18:44                     ` Trevor Woerner
2017-02-19  2:43 ` [meta-rockchip][PATCH v2 3/5] machine: firefly-rk3288: specify bootloader Trevor Woerner
2017-02-19  5:03   ` Eddie Cai
2017-02-19  8:17     ` Jacob Chen
2017-02-21 22:22       ` Trevor Woerner
2017-02-26  6:24         ` Trevor Woerner
2017-02-19  2:43 ` [meta-rockchip][PATCH v2 4/5] classes: rockchip-gpt-img: add Trevor Woerner
2017-02-19  6:32   ` Eddie Cai
2017-02-19  8:31     ` Jacob Chen
2017-02-19 12:18       ` Eddie Cai
2017-02-21 22:21         ` Trevor Woerner
2017-02-27  7:29           ` Trevor Woerner
2017-02-19  2:43 ` [meta-rockchip][PATCH v2 5/5] machine: rk3288: GPT image support Trevor Woerner
2017-02-19  6:33   ` Eddie Cai
2017-02-26  6:28     ` Trevor Woerner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.