All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] image_types.bbclass: fix btrfs, ubifs and elf
@ 2016-04-08  7:15 Robert Yang
  2016-04-08  7:15 ` [PATCH 1/4] image_types.bbclass: set nodesize for btrfs Robert Yang
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Robert Yang @ 2016-04-08  7:15 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 5ebea1114d54120d5ff5d8a6cd148110d0fda23f:

  build-appliance-image: Update to master head revision (2016-04-06 23:54:57 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/img
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/img

Robert Yang (4):
  image_types.bbclass: set nodesize for btrfs
  image_types.bbclass: fix ubi ubifs and multiubi
  image_types.bbclass: fix elf
  image-vm.bbclass/image_types.bbclass: IMAGE_NAME -> IMAGE_LINK_NAME

 meta/classes/image-vm.bbclass    |  2 +-
 meta/classes/image_types.bbclass | 10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

-- 
2.7.4



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

* [PATCH 1/4] image_types.bbclass: set nodesize for btrfs
  2016-04-08  7:15 [PATCH 0/4] image_types.bbclass: fix btrfs, ubifs and elf Robert Yang
@ 2016-04-08  7:15 ` Robert Yang
  2016-04-08  7:15 ` [PATCH 2/4] image_types.bbclass: fix ubi ubifs and multiubi Robert Yang
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Robert Yang @ 2016-04-08  7:15 UTC (permalink / raw)
  To: openembedded-core

The default value is 16K which is too big to create image for
core-image-minimal:
rootfs.btrfs is too small to make a usable filesystem
Minimum size for each btrfs device is 41943040.

Use 4K as ext2/3/4 to fix the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/image_types.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 3e98024..3f97ddd 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -218,7 +218,7 @@ EXTRA_IMAGECMD_jffs2 ?= "--pad ${JFFS2_ENDIANNESS} --eraseblock=${JFFS2_ERASEBLO
 EXTRA_IMAGECMD_ext2 ?= "-i 4096"
 EXTRA_IMAGECMD_ext3 ?= "-i 4096"
 EXTRA_IMAGECMD_ext4 ?= "-i 4096"
-EXTRA_IMAGECMD_btrfs ?= ""
+EXTRA_IMAGECMD_btrfs ?= "-n 4096"
 EXTRA_IMAGECMD_elf ?= ""
 
 IMAGE_DEPENDS = ""
-- 
2.7.4



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

* [PATCH 2/4] image_types.bbclass: fix ubi ubifs and multiubi
  2016-04-08  7:15 [PATCH 0/4] image_types.bbclass: fix btrfs, ubifs and elf Robert Yang
  2016-04-08  7:15 ` [PATCH 1/4] image_types.bbclass: set nodesize for btrfs Robert Yang
@ 2016-04-08  7:15 ` Robert Yang
  2016-04-08  9:09   ` Stefano Babic
  2016-04-08  7:15 ` [PATCH 3/4] image_types.bbclass: fix elf Robert Yang
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Robert Yang @ 2016-04-08  7:15 UTC (permalink / raw)
  To: openembedded-core

Fixed when do_image_ubi:
| DEBUG: Executing shell function do_image_ubifs
| Error: min. I/O unit was not specified (use -h for help)
| WARNING: exit code 255 from a shell command.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/image_types.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 3f97ddd..caa4dbb 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -120,6 +120,9 @@ IMAGE_CMD_elf () {
 }
 IMAGE_TYPEDEP_elf = "cpio.gz"
 
+MKUBIFS_ARGS ?= "-m 1KiB -e 128KiB -c $ROOTFS_SIZE"
+UBINIZE_ARGS ?= "-m 1KiB -p 128KiB"
+
 UBI_VOLNAME ?= "${MACHINE}-rootfs"
 
 multiubi_mkfs() {
-- 
2.7.4



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

* [PATCH 3/4] image_types.bbclass: fix elf
  2016-04-08  7:15 [PATCH 0/4] image_types.bbclass: fix btrfs, ubifs and elf Robert Yang
  2016-04-08  7:15 ` [PATCH 1/4] image_types.bbclass: set nodesize for btrfs Robert Yang
  2016-04-08  7:15 ` [PATCH 2/4] image_types.bbclass: fix ubi ubifs and multiubi Robert Yang
@ 2016-04-08  7:15 ` Robert Yang
  2016-04-08  7:15 ` [PATCH 4/4] image-vm.bbclass/image_types.bbclass: IMAGE_NAME -> IMAGE_LINK_NAME Robert Yang
  2016-04-08 10:11 ` [PATCH 0/4] image_types.bbclass: fix btrfs, ubifs and elf Robert Yang
  4 siblings, 0 replies; 9+ messages in thread
From: Robert Yang @ 2016-04-08  7:15 UTC (permalink / raw)
  To: openembedded-core

Fixed:
| DEBUG: Executing shell function do_image_elf
| Cannot open `/path/to/tmp/sysroots/qemux86-64/usr/src/kernel/bzImage': (null)
| WARNING: exit code 1 from a shell command.

The bzImage is in DEPLOY_DIR_IMAGE

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/image_types.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index caa4dbb..0683c47 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -111,13 +111,14 @@ IMAGE_CMD_cpio () {
 	fi
 }
 
-ELF_KERNEL ?= "${STAGING_DIR_HOST}/usr/src/kernel/${KERNEL_IMAGETYPE}"
+ELF_KERNEL ?= "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}"
 ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console="
 
 IMAGE_CMD_elf () {
 	test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf && rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf
 	mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD}
 }
+
 IMAGE_TYPEDEP_elf = "cpio.gz"
 
 MKUBIFS_ARGS ?= "-m 1KiB -e 128KiB -c $ROOTFS_SIZE"
-- 
2.7.4



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

* [PATCH 4/4] image-vm.bbclass/image_types.bbclass: IMAGE_NAME -> IMAGE_LINK_NAME
  2016-04-08  7:15 [PATCH 0/4] image_types.bbclass: fix btrfs, ubifs and elf Robert Yang
                   ` (2 preceding siblings ...)
  2016-04-08  7:15 ` [PATCH 3/4] image_types.bbclass: fix elf Robert Yang
@ 2016-04-08  7:15 ` Robert Yang
  2016-04-08 10:11 ` [PATCH 0/4] image_types.bbclass: fix btrfs, ubifs and elf Robert Yang
  4 siblings, 0 replies; 9+ messages in thread
From: Robert Yang @ 2016-04-08  7:15 UTC (permalink / raw)
  To: openembedded-core

If we create hdddirect in the first time, and run bitbake to create
vmimg in the second time, then the previouse created
${IMAGE_LINK_NAME}.hdddirect may can not be found since it contains the
data string which are different. Use IMAGE_LINK_NAME to fix the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/image-vm.bbclass    | 2 +-
 meta/classes/image_types.bbclass | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/image-vm.bbclass b/meta/classes/image-vm.bbclass
index 2cd2640..47f7326 100644
--- a/meta/classes/image-vm.bbclass
+++ b/meta/classes/image-vm.bbclass
@@ -146,7 +146,7 @@ DISK_SIGNATURE_GENERATED := "${@generate_disk_signature()}"
 
 run_qemu_img (){
     type="$1"
-    qemu-img convert -O $type ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.$type
+    qemu-img convert -O $type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.$type
     ln -sf ${IMAGE_NAME}.$type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type
 }
 create_vmdk_image () {
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 0683c47..b702bc1 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -116,7 +116,7 @@ ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console="
 
 IMAGE_CMD_elf () {
 	test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf && rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf
-	mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD}
+	mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD}
 }
 
 IMAGE_TYPEDEP_elf = "cpio.gz"
-- 
2.7.4



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

* Re: [PATCH 2/4] image_types.bbclass: fix ubi ubifs and multiubi
  2016-04-08  7:15 ` [PATCH 2/4] image_types.bbclass: fix ubi ubifs and multiubi Robert Yang
@ 2016-04-08  9:09   ` Stefano Babic
  2016-04-08  9:54     ` Anders Darander
  0 siblings, 1 reply; 9+ messages in thread
From: Stefano Babic @ 2016-04-08  9:09 UTC (permalink / raw)
  To: Robert Yang, openembedded-core

Hi Robert,

On 08/04/2016 09:15, Robert Yang wrote:
> Fixed when do_image_ubi:
> | DEBUG: Executing shell function do_image_ubifs
> | Error: min. I/O unit was not specified (use -h for help)
> | WARNING: exit code 255 from a shell command.
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  meta/classes/image_types.bbclass | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
> index 3f97ddd..caa4dbb 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -120,6 +120,9 @@ IMAGE_CMD_elf () {
>  }
>  IMAGE_TYPEDEP_elf = "cpio.gz"
>  
> +MKUBIFS_ARGS ?= "-m 1KiB -e 128KiB -c $ROOTFS_SIZE"
> +UBINIZE_ARGS ?= "-m 1KiB -p 128KiB"
> +

These are machine specific and are generally set in the machine
configuration file. Default values you set here could be wrong in most
cases, depending on the NAND chip.

Is it not better to get the error ? Then I know that I forget to set the
two variables and I can easy fix it. If no error is raised, we get a
ubifs that never run on the machine and as rootfs is not mounted - and
finding the reason is much more difficult.

Best regards,
Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================


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

* Re: [PATCH 2/4] image_types.bbclass: fix ubi ubifs and multiubi
  2016-04-08  9:09   ` Stefano Babic
@ 2016-04-08  9:54     ` Anders Darander
  2016-04-08 10:08       ` Robert Yang
  0 siblings, 1 reply; 9+ messages in thread
From: Anders Darander @ 2016-04-08  9:54 UTC (permalink / raw)
  To: openembedded-core

* Stefano Babic <sbabic@denx.de> [160408 11:19]:
> On 08/04/2016 09:15, Robert Yang wrote:
> > Fixed when do_image_ubi:
> > | DEBUG: Executing shell function do_image_ubifs
> > | Error: min. I/O unit was not specified (use -h for help)
> > | WARNING: exit code 255 from a shell command.

NAK

> > +MKUBIFS_ARGS ?= "-m 1KiB -e 128KiB -c $ROOTFS_SIZE"
> > +UBINIZE_ARGS ?= "-m 1KiB -p 128KiB"
> > +

> These are machine specific and are generally set in the machine
> configuration file. Default values you set here could be wrong in most
> cases, depending on the NAND chip.

> Is it not better to get the error ? Then I know that I forget to set the
> two variables and I can easy fix it. If no error is raised, we get a
> ubifs that never run on the machine and as rootfs is not mounted - and
> finding the reason is much more difficult.

I agree with Stefano here; I'd also prefer a build failure instead of a
non-working image.

Cheers,
Anders

-- 
Anders Darander, Senior System Architect
ChargeStorm AB / eStorm AB


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

* Re: [PATCH 2/4] image_types.bbclass: fix ubi ubifs and multiubi
  2016-04-08  9:54     ` Anders Darander
@ 2016-04-08 10:08       ` Robert Yang
  0 siblings, 0 replies; 9+ messages in thread
From: Robert Yang @ 2016-04-08 10:08 UTC (permalink / raw)
  To: openembedded-core



On 04/08/2016 05:54 PM, Anders Darander wrote:
> * Stefano Babic <sbabic@denx.de> [160408 11:19]:
>> On 08/04/2016 09:15, Robert Yang wrote:
>>> Fixed when do_image_ubi:
>>> | DEBUG: Executing shell function do_image_ubifs
>>> | Error: min. I/O unit was not specified (use -h for help)
>>> | WARNING: exit code 255 from a shell command.
>
> NAK
>
>>> +MKUBIFS_ARGS ?= "-m 1KiB -e 128KiB -c $ROOTFS_SIZE"
>>> +UBINIZE_ARGS ?= "-m 1KiB -p 128KiB"
>>> +
>
>> These are machine specific and are generally set in the machine
>> configuration file. Default values you set here could be wrong in most
>> cases, depending on the NAND chip.
>
>> Is it not better to get the error ? Then I know that I forget to set the
>> two variables and I can easy fix it. If no error is raised, we get a
>> ubifs that never run on the machine and as rootfs is not mounted - and
>> finding the reason is much more difficult.
>
> I agree with Stefano here; I'd also prefer a build failure instead of a
> non-working image.

My concerns was that if they can't be built out by default, then we have no
idea about whether they work or not. But as you said ubifs is a little
special, so I removed the patch from the repo. In YP 2.2, maybe we can
make it work a with a qemu machine ?

// Robert

>
> Cheers,
> Anders
>


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

* Re: [PATCH 0/4] image_types.bbclass: fix btrfs, ubifs and elf
  2016-04-08  7:15 [PATCH 0/4] image_types.bbclass: fix btrfs, ubifs and elf Robert Yang
                   ` (3 preceding siblings ...)
  2016-04-08  7:15 ` [PATCH 4/4] image-vm.bbclass/image_types.bbclass: IMAGE_NAME -> IMAGE_LINK_NAME Robert Yang
@ 2016-04-08 10:11 ` Robert Yang
  4 siblings, 0 replies; 9+ messages in thread
From: Robert Yang @ 2016-04-08 10:11 UTC (permalink / raw)
  To: openembedded-core


Removed patch 2/4 and updated in the repo:

git://git.openembedded.org/openembedded-core-contrib rbt/img


Robert Yang (3):
   image_types.bbclass: set nodesize for btrfs
   image_types.bbclass: fix elf
   image-vm.bbclass/image_types.bbclass: IMAGE_NAME -> IMAGE_LINK_NAME

So there are only 3 patches in the repo.

// Robert

On 04/08/2016 03:15 PM, Robert Yang wrote:
> The following changes since commit 5ebea1114d54120d5ff5d8a6cd148110d0fda23f:
>
>    build-appliance-image: Update to master head revision (2016-04-06 23:54:57 +0100)
>
> are available in the git repository at:
>
>    git://git.openembedded.org/openembedded-core-contrib rbt/img
>    http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/img
>
> Robert Yang (4):
>    image_types.bbclass: set nodesize for btrfs
>    image_types.bbclass: fix ubi ubifs and multiubi
>    image_types.bbclass: fix elf
>    image-vm.bbclass/image_types.bbclass: IMAGE_NAME -> IMAGE_LINK_NAME
>
>   meta/classes/image-vm.bbclass    |  2 +-
>   meta/classes/image_types.bbclass | 10 +++++++---
>   2 files changed, 8 insertions(+), 4 deletions(-)
>


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

end of thread, other threads:[~2016-04-08 10:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-08  7:15 [PATCH 0/4] image_types.bbclass: fix btrfs, ubifs and elf Robert Yang
2016-04-08  7:15 ` [PATCH 1/4] image_types.bbclass: set nodesize for btrfs Robert Yang
2016-04-08  7:15 ` [PATCH 2/4] image_types.bbclass: fix ubi ubifs and multiubi Robert Yang
2016-04-08  9:09   ` Stefano Babic
2016-04-08  9:54     ` Anders Darander
2016-04-08 10:08       ` Robert Yang
2016-04-08  7:15 ` [PATCH 3/4] image_types.bbclass: fix elf Robert Yang
2016-04-08  7:15 ` [PATCH 4/4] image-vm.bbclass/image_types.bbclass: IMAGE_NAME -> IMAGE_LINK_NAME Robert Yang
2016-04-08 10:11 ` [PATCH 0/4] image_types.bbclass: fix btrfs, ubifs and elf Robert Yang

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.