Add an option to linaro-android-media-create to pass in additional bootargs

Reported by Zach Pfeffer on 2012-01-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Android
Medium
Zach Pfeffer
Linaro Image Tools
High
Mattias Backman

Bug Description

We need an option to linaro-android-media-create to pass in additional boot args. The option should take a file name or a string (could be two different options).

Related branches

lp:~mabac/linaro-image-tools/bug-913819-additional-bootargs
Merged into lp:linaro-image-tools/11.11 at revision 483
James Tunnicliffe: Approve on 2012-01-18
Linaro Android Team: Pending (functional) requested 2012-01-18
Zach Pfeffer: Pending requested 2012-01-17
Changed in linaro-image-tools:
importance: Undecided → High
status: New → Triaged
milestone: none → 12.01
Zach Pfeffer (pfefferz) on 2012-01-09
Changed in linaro-android:
milestone: none → 12.01
importance: Undecided → Medium
Mattias Backman (mabac) wrote :

What about passing a hwpack as we've discussed earlier? Then l-a-m-c could just extract the metadata file and use the boot args that are already maintained for that board.

Would we need to handle android specific boot args?

Zach Pfeffer (pfefferz) wrote :

We don't use hwpacks in Android so I don't want to start. I'd like 2 different args, one arg that will let me pass a string to use as the bootline and one that will let me pass a file name.

Mattias Backman (mabac) wrote :

We should add this generically so that it benefits both l-m-c and l-a-m-c as this should be no extra work.

Should the config file be structured in some way or should we just read the contents and add it to the boot args as is?

Changed in linaro-image-tools:
assignee: nobody → Mattias Backman (mabac)
Mattias Backman (mabac) on 2012-01-16
Changed in linaro-image-tools:
status: Triaged → In Progress
Mattias Backman (mabac) on 2012-01-19
Changed in linaro-image-tools:
status: In Progress → Fix Committed
Mattias Backman (mabac) on 2012-01-19
Changed in linaro-image-tools:
status: Fix Committed → Fix Released
Zach Pfeffer (pfefferz) on 2012-01-24
Changed in linaro-android:
assignee: nobody → Zach Pfeffer (pfefferz)
Zach Pfeffer (pfefferz) wrote :

$./linaro-image-tools/linaro-android-media-create --mmc /dev/sdc --dev origen --system system.tar.bz2 --userdata userdata.tar.bz2 --boot boot.tar.bz2 --extra-boot-args "bootmem_debug"
Traceback (most recent call last):
  File "./linaro-image-tools/linaro-android-media-create", line 108, in <module>
    board_config.add_boot_args(args.extra_boot_args)
  File "/workspace/tmp2/0_staging-origen-12.01-release_2/linaro-image-tools/linaro_image_tools/media_create/boards.py", line 580, in add_boot_args
    cls.extra_boot_args_options += ' %s' % extra_args
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
[sudo] password for zpfeffer:

$bzr log | more
------------------------------------------------------------
revno: 485
committer: Mattias Backman <email address hidden>
branch nick: linaro-image-tools
timestamp: Thu 2012-01-19 14:44:02 +0100
message:
  Post-release version bump to 2012.01.1

Changed in linaro-android:
milestone: 12.01 → 12.02
Changed in linaro-image-tools:
status: Fix Released → In Progress
Amit Pundir (pundiramit) wrote :

Not sure if it is the correct way to handle this but the following change in linaro-image-tools (rev 485) worked for me.

$ bzr diff
=== modified file 'linaro_image_tools/media_create/boards.py'
--- linaro_image_tools/media_create/boards.py 2012-01-18 15:27:35 +0000
+++ linaro_image_tools/media_create/boards.py 2012-01-25 10:01:31 +0000
@@ -577,7 +577,7 @@
     @classmethod
     def add_boot_args(cls, extra_args):
         if extra_args is not None:
- cls.extra_boot_args_options += ' %s' % extra_args
+ cls.extra_boot_args_options = ' %s' % extra_args

     @classmethod
     def add_boot_args_from_file(cls, path):

On Wed, Jan 25, 2012 at 11:42 AM, Amit Pundir <email address hidden> wrote:
> Not sure if it is the correct way to handle this but the following
> change in linaro-image-tools (rev 485) worked for me.
>
> $ bzr diff
> === modified file 'linaro_image_tools/media_create/boards.py'
> --- linaro_image_tools/media_create/boards.py   2012-01-18 15:27:35 +0000
> +++ linaro_image_tools/media_create/boards.py   2012-01-25 10:01:31 +0000
> @@ -577,7 +577,7 @@
>     @classmethod
>     def add_boot_args(cls, extra_args):
>         if extra_args is not None:
> -            cls.extra_boot_args_options += ' %s' % extra_args
> +            cls.extra_boot_args_options = ' %s' % extra_args

Obviously you'd loose the extra args set in the hwpack or defaults in
l-m-c. Guileherme's fix handles the extra args being None for some
boards correctly.

>
>     @classmethod
>     def add_boot_args_from_file(cls, path):
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/913819
>
> Title:
>  Add an option to linaro-android-media-create to pass in additional
>  bootargs
>
> Status in Linaro Android:
>  New
> Status in Linaro Image Tools:
>  In Progress
>
> Bug description:
>  We need an option to linaro-android-media-create to pass in additional
>  boot args. The option should take a file name or a string (could be
>  two different options).
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/linaro-android/+bug/913819/+subscriptions

Mattias Backman (mabac) on 2012-01-30
Changed in linaro-image-tools:
status: In Progress → Fix Committed
Changed in linaro-image-tools:
milestone: 2012.01 → 2012.02
Fathi Boudra (fboudra) on 2012-02-21
Changed in linaro-image-tools:
status: Fix Committed → Fix Released
Zach Pfeffer (pfefferz) wrote :

Verified on rev 496.

Changed in linaro-android:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers