v3 hwpacks lack support for special samsung settings

Bug #1054422 reported by John Rigby
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Fix Released
Critical
Milo Casagrande

Bug Description

origen hwpack config files have some specific offset and length settings when I translate these to the v3 format and put them into a config file linaro-hwpack-create complains about them

samsung_bl1_start: '1'
samsung_bl1_len: 32
samsung_env_len: 32
samsung_bl2_len: 1024

I commented them out hoping that defaults would be right but I ran into two problems

First: linaro-media-create issues a nearly endless dd of /dev/zero for zeroing the env area. I worked around that by setting env_dd to 'no'

Second: after l-m-c created a boot disk the resulting image does not boot. It fails to mount the rootfs and drops into the initramfs shell.

Related branches

John Rigby (jcrigby)
description: updated
Revision history for this message
John Rigby (jcrigby) wrote :
Revision history for this message
John Rigby (jcrigby) wrote :

I later changed the env_dd to
    env_dd: 'no'

to get around the nearly infinite dd problem.

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Note that without such specifics we're not able to use V3 for Origen (which also blocks UEFI).

Changed in linaro-image-tools:
status: New → Confirmed
Fathi Boudra (fboudra)
Changed in linaro-image-tools:
importance: Undecided → High
milestone: none → 2012.09
importance: High → Critical
Revision history for this message
Данило Шеган (danilo) wrote :

Indeed, there's an error in v3 definition which disallows samsung_bl1_start field.

Fix should be simple:

$ bzr diff
=== modified file 'linaro_image_tools/hwpack/hwpack_fields.py'
--- linaro_image_tools/hwpack/hwpack_fields.py 2012-08-28 06:02:43 +0000
+++ linaro_image_tools/hwpack/hwpack_fields.py 2012-09-24 08:02:09 +0000
@@ -128,7 +128,7 @@
     BOOT_MIN_SIZE_FIELD: None,
     ROOT_MIN_SIZE_FIELD: None,
     LOADER_MIN_SIZE_FIELD: None,
- SAMSUNG_BL1_LEN_FIELD: None,
+ SAMSUNG_BL1_START_FIELD: None,
     SAMSUNG_BL1_LEN_FIELD: None,
     SAMSUNG_ENV_LEN_FIELD: None,
     SAMSUNG_BL2_LEN_FIELD: None,

Can you please try with that and let us know if it works? If so, we'll re-roll 2012.09.1 with the fix included.

Milo, can you please ensure we've got a test that covers samsung fields as well?

Changed in linaro-image-tools:
assignee: nobody → Milo Casagrande (milo)
status: Confirmed → Triaged
Revision history for this message
Данило Шеган (danilo) wrote :

Pastebin for easier copy-pasting of the diff: https://pastebin.linaro.org/962/

Revision history for this message
Данило Шеган (danilo) wrote :

FWIW, the produced "metadata" file still doesn't contain samsung_bl1_start field, so something else might be missing as well.

Milo Casagrande (milo)
Changed in linaro-image-tools:
status: Triaged → In Progress
Revision history for this message
Данило Шеган (danilo) wrote :

So, if I unquote the value (making it simply "samsung_bl1_start: 1" and not "samsung_bl1_start: '1'"), it works properly. However, end result is a metadata file that still quotes all of the int values, eg:

...
samsung_bl1_start: '1'
samsung_bl1_len: '32'
samsung_env_len: '32'
samsung_bl2_len: '1024'

That seems to be a separate issue, but might be an issue nevertheless.

Revision history for this message
Milo Casagrande (milo) wrote :

The linked branch is, at the moment, the typo fix in the v3 Samsung fields definition (looking into writing tests).
For the quoting of values, that is YAML way of dumping "numbers": the "problem" is that we read strings and dump them as such. Am looking into that as well if it is a problem or where we are just dumping strings instead of realy Python object. We can add some mapping in the metadata creation between variable and its type though, but we would have to maintain that as well.

FWIW, I created a hwpack and ran linaro-media-create with that hwpack and with a binary taken from here:
http://snapshots.linaro.org/precise/images/developer/latest

I had no issue with the creation stage. I cannot test it on any board though.

Revision history for this message
John Rigby (jcrigby) wrote :

successfully created image with https://code.launchpad.net/~milo/linaro-image-tools/bug1054422
and it boots

Milo Casagrande (milo)
Changed in linaro-image-tools:
status: In Progress → Fix Committed
Milo Casagrande (milo)
Changed in linaro-image-tools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.