Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Tom Zanussi <tom.zanussi@linux.intel.com>
To: "João Henrique Ferreira de Freitas" <joaohf@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH v2 0/7] wic: Add --rootfs option to --source param
Date: Thu, 27 Mar 2014 15:15:00 -0500	[thread overview]
Message-ID: <1395951300.10059.69.camel@empanada> (raw)
In-Reply-To: <1395801769-13042-1-git-send-email-joaohf@gmail.com>

On Tue, 2014-03-25 at 23:42 -0300, João Henrique Ferreira de Freitas
wrote:
> Hi, 
> 
> These patchs allows the user create the following directdisk-multi-rootfs.wks file:
> 
>   part /boot --source bootimg-pcbios --ondisk sda --fstype=msdos \
>     --label boot --active --align 1024
>   part / --source rootfs --ondisk sda --fstype=ext3 --label primary --align 1024
> 
>   part /standby --source rootfs --rootfs-dir=<special rootfs directory> \
>     --ondisk sda --fstype=ext3 --label secondary --align 1024
> 
>   bootloader  --timeout=0  --append="rootwait rootfstype=ext3 video=vesafb vga=0x318 console=tty0"
> 
> The special thing is the /standby partition. Which using rootfs with
> a extra '--rootfs' argument instruct the RootfsPlugin what should be
> the rootfs directory to be used to create the partition.
> 
> Besides that, the user can specify a more generic connection
> between wic command-line --rootfs-dir and what is describing in .wks file. Like this:
> 
> wic create ... --rootfs-dir rootfs1=/some/rootfs/dir --rootfs-dir rootfs2=/some/other/rootfs/dir
> 
>   part / --source rootfs --rootfs-dir="rootfs1" --ondisk sda --fstype=ext3 --label primary --align 1024
> 
>   part /standby --source rootfs --rootfs-dir="rootfs2" \
>     --ondisk sda --fstype=ext3 --label secondary --align 1024
> 
> So no hard-coded path is used in .wks. The connection string could be any string that 
> makes a link between the '--rootfs-dir'
> 
> It is a very simple features that let users to customize your partition
> setup. I thought in the case where we have two rootfs (like active and
> standby, e.g used to software update). Or the odd cases when a special
> partition need to be create to hold whatever files.
> 
> The workflow of wic use remains the same. All the config needs to be done
> in .wks file.
> 
> To test I used <special rootfs directory> as a rootfs created by 'bitbkae core-image-minimal-dev'
> (e.g: /srv/build/yocto/master/tmp/work/genericx86-poky-linux/core-image-minimal-dev/1.0-r0/rootfs).
> 

Hi João,

I'm having some trouble creating an image, looks like the assignment to
krootfs_dir['ROOTFS_DIR'] is bogus?:

[trz@empanada build]$ wic create directdisk-multi -e core-image-minimal
Checking basic build environment...
Done.

Creating image(s)...

Traceback (most recent call last):
  File "/home/trz/yocto/master-cur/scripts/wic", line 252, in <module>
    ret = main()
  File "/home/trz/yocto/master-cur/scripts/wic", line 247, in main
    invoke_subcommand(args, parser, wic_help_usage, subcommands)
  File "/home/trz/yocto/master-cur/scripts/lib/image/help.py", line 73, in invoke_subcommand
    subcommands.get(args[0], subcommand_error)[0](args[1:], usage)
  File "/home/trz/yocto/master-cur/scripts/wic", line 191, in wic_create_subcommand
    krootfs_dir['ROOTFS_DIR'] = rootfs_dir
TypeError: 'NoneType' object does not support item assignment


My directdisk-multi.wks contains this:

part /boot --source bootimg-pcbios --ondisk sda --fstype=msdos --label boot --active --align 1024
part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024

part /standby --source rootfs --rootfs-dir=/home/trz/yocto/master-cur/build/tmp/work/crownbay-poky-linux/core-image-minimal/1.0-r0/rootfs/ --ondisk sda --fstype=ext3 --label secondary --align 1024

bootloader  --timeout=0  --append="rootwait rootfstype=ext3 video=vesafb vga=0x318 console=tty0"

Tom

> changes since previous version:
>  v2: 
>   - in .wks syntax change --rootfs to --rootfs-dir
>   - reporting all extra partitions in the output
>   - use a connection string between --rootfs-dir from wic command-line and .wks
> 
> João Henrique Ferreira de Freitas (7):
>   wic: Add RootfsPlugin
>   wic: Hook up RootfsPlugin plugin
>   wic: Add rootfs_dir argument to do_prepare_partition() method
>   wic: Use partition label to be part of rootfs filename
>   wic: Add option --rootfs-dir to --source
>   wic: Report all ROOTFS_DIR artifacts
>   wic: Extend --rootfs-dir to connect rootfs-dirs
> 
>  scripts/lib/mic/imager/direct.py                   | 20 +++++--
>  .../lib/mic/kickstart/custom_commands/partition.py | 51 ++++++++++------
>  scripts/lib/mic/pluginbase.py                      |  2 +-
>  scripts/lib/mic/plugins/imager/direct_plugin.py    | 17 +++++-
>  scripts/lib/mic/plugins/source/bootimg-efi.py      |  2 +-
>  scripts/lib/mic/plugins/source/bootimg-pcbios.py   |  2 +-
>  scripts/lib/mic/plugins/source/rootfs.py           | 68 ++++++++++++++++++++++
>  scripts/wic                                        | 34 ++++++++++-
>  8 files changed, 167 insertions(+), 29 deletions(-)
>  create mode 100644 scripts/lib/mic/plugins/source/rootfs.py
> 
> -- 
> 1.8.3.2
> 




  parent reply	other threads:[~2014-03-27 20:15 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-15 21:17 [PATCH 0/5] wic: Add --rootfs option to --source param João Henrique Ferreira de Freitas
2014-03-15 21:17 ` [PATCH 1/5] wic: Add RootfsPlugin João Henrique Ferreira de Freitas
2014-03-15 21:17 ` [PATCH 2/5] wic: Hook up RootfsPlugin plugin João Henrique Ferreira de Freitas
2014-03-15 21:17 ` [PATCH 3/5] wic: Add rootfs_dir argument to do_prepare_partition() method João Henrique Ferreira de Freitas
2014-03-15 21:17 ` [PATCH 4/5] wic: Use partition label to be part of rootfs filename João Henrique Ferreira de Freitas
2014-03-15 21:17 ` [PATCH 5/5] wic: Add option --rootfs to --source João Henrique Ferreira de Freitas
2014-03-17 14:53 ` [PATCH 0/5] wic: Add --rootfs option to --source param Otavio Salvador
2014-03-17 15:47   ` João Henrique Freitas
2014-03-17 16:11     ` Otavio Salvador
2014-03-17 16:20       ` João Henrique Freitas
2014-03-31  1:52       ` João Henrique Ferreira de Freitas
2014-03-31 14:39         ` Tom Zanussi
2014-03-31 16:29           ` João Henrique Freitas
2014-03-21 15:54 ` Tom Zanussi
2014-03-23  2:25   ` João Henrique Ferreira de Freitas
2014-03-24 20:13     ` Tom Zanussi
2014-03-25  2:28       ` João Henrique Ferreira de Freitas
2014-03-26  2:42 ` [PATCH v2 0/7] " João Henrique Ferreira de Freitas
2014-03-26  2:42   ` [PATCH v2 1/7] wic: Add RootfsPlugin João Henrique Ferreira de Freitas
2014-03-26  2:42   ` [PATCH v2 2/7] wic: Hook up RootfsPlugin plugin João Henrique Ferreira de Freitas
2014-03-26  2:42   ` [PATCH v2 3/7] wic: Add rootfs_dir argument to do_prepare_partition() method João Henrique Ferreira de Freitas
2014-03-26  2:42   ` [PATCH v2 4/7] wic: Use partition label to be part of rootfs filename João Henrique Ferreira de Freitas
2014-03-26  2:42   ` [PATCH v2 5/7] wic: Add option --rootfs-dir to --source João Henrique Ferreira de Freitas
2014-03-26  2:42   ` [PATCH v2 6/7] wic: Report all ROOTFS_DIR artifacts João Henrique Ferreira de Freitas
2014-03-26  2:42   ` [PATCH v2 7/7] wic: Extend --rootfs-dir to connect rootfs-dirs João Henrique Ferreira de Freitas
2014-03-27 20:15   ` Tom Zanussi [this message]
2014-03-27 22:12     ` [PATCH v2 0/7] wic: Add --rootfs option to --source param João Henrique Ferreira de Freitas
2014-03-27 22:07 ` [PATCH v3 " João Henrique Ferreira de Freitas
2014-03-27 22:07   ` [PATCH v3 1/7] wic: Add RootfsPlugin João Henrique Ferreira de Freitas
2014-03-27 22:07   ` [PATCH v3 2/7] wic: Hook up RootfsPlugin plugin João Henrique Ferreira de Freitas
2014-03-27 22:07   ` [PATCH v3 3/7] wic: Add rootfs_dir argument to do_prepare_partition() method João Henrique Ferreira de Freitas
2014-03-27 22:07   ` [PATCH v3 4/7] wic: Use partition label to be part of rootfs filename João Henrique Ferreira de Freitas
2014-03-27 22:07   ` [PATCH v3 5/7] wic: Add option --rootfs-dir to --source João Henrique Ferreira de Freitas
2014-03-27 22:07   ` [PATCH v3 6/7] wic: Report all ROOTFS_DIR artifacts João Henrique Ferreira de Freitas
2014-03-27 22:07   ` [PATCH v3 7/7] wic: Extend --rootfs-dir to connect rootfs-dirs João Henrique Ferreira de Freitas
2014-03-28 21:38   ` [PATCH v3 0/7] wic: Add --rootfs option to --source param Tom Zanussi
2014-03-29  3:24     ` João Henrique Ferreira de Freitas
2014-03-29 19:04       ` Tom Zanussi
2014-03-29  3:12 ` [PATCH v4 " João Henrique Ferreira de Freitas
2014-03-29  3:12   ` [PATCH v4 1/7] wic: Add RootfsPlugin João Henrique Ferreira de Freitas
2014-03-29  3:12   ` [PATCH v4 2/7] wic: Hook up RootfsPlugin plugin João Henrique Ferreira de Freitas
2014-03-29  3:12   ` [PATCH v4 3/7] wic: Add rootfs_dir argument to do_prepare_partition() method João Henrique Ferreira de Freitas
2014-03-29  3:12   ` [PATCH v4 4/7] wic: Use partition label to be part of rootfs filename João Henrique Ferreira de Freitas
2014-03-29  3:12   ` [PATCH v4 5/7] wic: Add option --rootfs-dir to --source João Henrique Ferreira de Freitas
2014-03-29  3:12   ` [PATCH v4 6/7] wic: Report all ROOTFS_DIR artifacts João Henrique Ferreira de Freitas
2014-03-29  3:12   ` [PATCH v4 7/7] wic: Extend --rootfs-dir to connect rootfs-dirs João Henrique Ferreira de Freitas
2014-03-29 19:09   ` [PATCH v4 0/7] wic: Add --rootfs option to --source param Tom Zanussi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1395951300.10059.69.camel@empanada \
    --to=tom.zanussi@linux.intel.com \
    --cc=joaohf@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox