v3 hwpacks lack support for special samsung settings

Bug #1054422 reported by John Rigby on 2012-09-22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Fix Released
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) on 2012-09-22
description: updated
John Rigby (jcrigby) wrote :
John Rigby (jcrigby) wrote :

I later changed the env_dd to
    env_dd: 'no'

to get around the nearly infinite dd problem.

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) on 2012-09-24
Changed in linaro-image-tools:
importance: Undecided → High
milestone: none → 2012.09
importance: High → Critical

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 @@

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

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

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

Milo Casagrande (milo) on 2012-09-24
Changed in linaro-image-tools:
status: Triaged → In Progress

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.

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:

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

John Rigby (jcrigby) wrote :

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

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

Other bug subscribers