All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-rockchip][PATCH v4 0/1] classes: rockchip-gpt-img: add
@ 2017-02-27 19:20 Trevor Woerner
  2017-02-27 19:20 ` [meta-rockchip][PATCH v4] " Trevor Woerner
  0 siblings, 1 reply; 5+ messages in thread
From: Trevor Woerner @ 2017-02-27 19:20 UTC (permalink / raw)
  To: yocto

Here is my v4 of this patch, based on feedback from earlier reviews.

Changes since v3:
	- I sent the wrong file when emailing v3

Changes since v2:
	- change commit message and call the "old" layout "legacy parameter"
	  format instead of "rk-boot" format
	- rename generate_rk3288_image() to generate_rk3288_loader1_image()
	- leave any older gpt image files (with datestamp) in the deploy
	  directory but just move the symlink so it always points to the most
	  recent

	- leave size variable as GPTIMG_SIZE
	- leave the boot image name as BOOT_IMG since trying to add ${MACHINE}
	  and ${DATETIME} causes the build to fail with "the basehash value
	  changed... metadata is not deterministic...". I think what was
	  wanted was that older gpt image files be left around, and this new
	  logic does that in a different way and maintains a symlink to the
	  latest

Changes since v1:
	- break large commits into smaller ones
	- rename the class and improve the commit message

Trevor Woerner (1):
  classes: rockchip-gpt-img: add

 classes/rockchip-gpt-img.bbclass | 132 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 132 insertions(+)
 create mode 100644 classes/rockchip-gpt-img.bbclass

-- 
2.12.0.rc1.48.g076c053



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

* [meta-rockchip][PATCH v4] classes: rockchip-gpt-img: add
  2017-02-27 19:20 [meta-rockchip][PATCH v4 0/1] classes: rockchip-gpt-img: add Trevor Woerner
@ 2017-02-27 19:20 ` Trevor Woerner
  2017-02-28  0:48   ` Eddie Cai
  0 siblings, 1 reply; 5+ messages in thread
From: Trevor Woerner @ 2017-02-27 19:20 UTC (permalink / raw)
  To: yocto; +Cc: Jacob Chen

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 "legacy parameter" 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).

Reviewd-by: Eddie Cai <eddie.cai.linux@gmail.com>
Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com>
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 classes/rockchip-gpt-img.bbclass | 133 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 133 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..ba83c8a
--- /dev/null
+++ b/classes/rockchip-gpt-img.bbclass
@@ -0,0 +1,133 @@
+# 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_SYMLK   = "${IMAGE_BASENAME}-${MACHINE}.${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_loader1_image"
+
+IMAGE_CMD_rockchip-gpt-img () {
+	# Change to image directory
+	cd ${DEPLOY_DIR_IMAGE}
+
+	# Remove the existing image symlink
+	rm -f "${GPTIMG_SYMLK}"
+
+	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_loader1_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] 5+ messages in thread

* Re: [meta-rockchip][PATCH v4] classes: rockchip-gpt-img: add
  2017-02-27 19:20 ` [meta-rockchip][PATCH v4] " Trevor Woerner
@ 2017-02-28  0:48   ` Eddie Cai
  2017-02-28  3:08     ` Trevor Woerner
  0 siblings, 1 reply; 5+ messages in thread
From: Eddie Cai @ 2017-02-28  0:48 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: yocto, Jacob Chen

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

Hi Trevor

2017-02-28 3:20 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 "legacy parameter" 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).
>
> Reviewd-by: Eddie Cai <eddie.cai.linux@gmail.com>
> Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com>
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> ---
>  classes/rockchip-gpt-img.bbclass | 133 ++++++++++++++++++++++++++++++
> +++++++++
>  1 file changed, 133 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..ba83c8a
> --- /dev/null
> +++ b/classes/rockchip-gpt-img.bbclass
> @@ -0,0 +1,133 @@
> +# 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_SYMLK   = "${IMAGE_BASENAME}-${MACHINE}.${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_loader1_image"
> +
> +IMAGE_CMD_rockchip-gpt-img () {
> +       # Change to image directory
> +       cd ${DEPLOY_DIR_IMAGE}
> +
> +       # Remove the existing image symlink
> +       rm -f "${GPTIMG_SYMLK}"
> +
> +       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/
> +
>
Could you also copy ${BOOT_IMG} to ${DEPLOY_DIR_IMAGE} . That is much
earier for people find boot image. In case they want to flash boot
partition alone.

> +       # 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_loader1_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
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>

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

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

* Re: [meta-rockchip][PATCH v4] classes: rockchip-gpt-img: add
  2017-02-28  0:48   ` Eddie Cai
@ 2017-02-28  3:08     ` Trevor Woerner
  2017-02-28  4:42       ` Eddie Cai
  0 siblings, 1 reply; 5+ messages in thread
From: Trevor Woerner @ 2017-02-28  3:08 UTC (permalink / raw)
  To: Eddie Cai; +Cc: yocto, Jacob Chen

Hi Eddie,

On Tue 2017-02-28 @ 08:48:16 AM, Eddie Cai wrote:
> Could you also copy ${BOOT_IMG} to ${DEPLOY_DIR_IMAGE} . That is much
> earier for people find boot image. In case they want to flash boot
> partition alone.

All of this work is always done in DEPLOY_DIR_IMAGE.

	$ bitbake core-image-minimal -e | grep "^DEPLOY_DIR_IMAGE="
	DEPLOY_DIR_IMAGE="/z/rockchip/master/build/tmp-glibc/deploy/images/firefly-rk3288"

	$ bitbake core-image-minimal -e | grep "^BOOT_IMG="
	BOOT_IMG="boot.img"

With this class file as submitted in v4, if I build my first image I get:
	$ ls -lh tmp-glibc/deploy/images/firefly-rk3288/
	-rw-r--r-- 1 trevor users 137M Feb 27 14:05 core-image-minimal-firefly-rk3288-20170227190504.gpt-img
	lrwxrwxrwx 1 trevor users   56 Feb 27 14:06 core-image-minimal-firefly-rk3288.gpt-img -> core-image-minimal-firefly-rk3288-20170227190504.gpt-img

If I adjust the image then build it again I get:
	$ ls -lh tmp-glibc/deploy/images/firefly-rk3288/
	-rw-r--r-- 1 trevor users 137M Feb 27 14:05 core-image-minimal-firefly-rk3288-20170227190504.gpt-img
	-rw-r--r-- 1 trevor users 137M Feb 27 14:06 core-image-minimal-firefly-rk3288-20170227190628.gpt-img
	lrwxrwxrwx 1 trevor users   56 Feb 27 14:06 core-image-minimal-firefly-rk3288.gpt-img -> core-image-minimal-firefly-rk3288-20170227190628.gpt-img

As you can see:
- the images appear in DEPLOY_DIR_IMAGE
- the first gpt-img is still there
- after each build the "core-image-minimal-firefly-rk3288.gpt-img" symlink
  always points to the latest gpt-img file

Is this what you were hoping for?


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

* Re: [meta-rockchip][PATCH v4] classes: rockchip-gpt-img: add
  2017-02-28  3:08     ` Trevor Woerner
@ 2017-02-28  4:42       ` Eddie Cai
  0 siblings, 0 replies; 5+ messages in thread
From: Eddie Cai @ 2017-02-28  4:42 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: yocto, Jacob Chen

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

Hi Trevor

2017-02-28 11:08 GMT+08:00 Trevor Woerner <twoerner@gmail.com>:

> Hi Eddie,
>
> On Tue 2017-02-28 @ 08:48:16 AM, Eddie Cai wrote:
> > Could you also copy ${BOOT_IMG} to ${DEPLOY_DIR_IMAGE} . That is much
> > earier for people find boot image. In case they want to flash boot
> > partition alone.
>
> All of this work is always done in DEPLOY_DIR_IMAGE.
>
>         $ bitbake core-image-minimal -e | grep "^DEPLOY_DIR_IMAGE="
>         DEPLOY_DIR_IMAGE="/z/rockchip/master/build/tmp-glibc/deploy/
> images/firefly-rk3288"
>
>         $ bitbake core-image-minimal -e | grep "^BOOT_IMG="
>         BOOT_IMG="boot.img"
>
> With this class file as submitted in v4, if I build my first image I get:
>         $ ls -lh tmp-glibc/deploy/images/firefly-rk3288/
>         -rw-r--r-- 1 trevor users 137M Feb 27 14:05
> core-image-minimal-firefly-rk3288-20170227190504.gpt-img
>         lrwxrwxrwx 1 trevor users   56 Feb 27 14:06
> core-image-minimal-firefly-rk3288.gpt-img -> core-image-minimal-firefly-
> rk3288-20170227190504.gpt-img
>
> If I adjust the image then build it again I get:
>         $ ls -lh tmp-glibc/deploy/images/firefly-rk3288/
>         -rw-r--r-- 1 trevor users 137M Feb 27 14:05
> core-image-minimal-firefly-rk3288-20170227190504.gpt-img
>         -rw-r--r-- 1 trevor users 137M Feb 27 14:06
> core-image-minimal-firefly-rk3288-20170227190628.gpt-img
>         lrwxrwxrwx 1 trevor users   56 Feb 27 14:06
> core-image-minimal-firefly-rk3288.gpt-img -> core-image-minimal-firefly-
> rk3288-20170227190628.gpt-img
>
> As you can see:
> - the images appear in DEPLOY_DIR_IMAGE
> - the first gpt-img is still there
> - after each build the "core-image-minimal-firefly-rk3288.gpt-img" symlink
>   always points to the latest gpt-img file
>
> Is this what you were hoping for?
>
I am not saying gpt image. What i mean is the single boot.img which contain
kernel zimage, device tree and extlinux file. with this file, i can use
below command update kernel and device tree. There are many people prefer
this way.
upgrade_tool db RK3288UbootLoader_V2.30.06.bin
upgrade_tool wl 32768 deploy/images/firefly-rk3288/boot.img

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

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

end of thread, other threads:[~2017-02-28  4:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-27 19:20 [meta-rockchip][PATCH v4 0/1] classes: rockchip-gpt-img: add Trevor Woerner
2017-02-27 19:20 ` [meta-rockchip][PATCH v4] " Trevor Woerner
2017-02-28  0:48   ` Eddie Cai
2017-02-28  3:08     ` Trevor Woerner
2017-02-28  4:42       ` Eddie Cai

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.