Patchwork [meta-fsl-arm-extra,1/8] linux-cfa: always use cfa10036 as MACHINE for the kernel link

login
register
mail settings
Submitter Alexandre Belloni
Date Sept. 5, 2013, 9:21 p.m.
Message ID <1378416122-16832-2-git-send-email-alexandre.belloni@free-electrons.com>
Download mbox | patch
Permalink /patch/57511/
State Changes Requested
Delegated to: Otavio Salvador
Headers show

Comments

Alexandre Belloni - Sept. 5, 2013, 9:21 p.m.
Barebox is configured to always look for a kernel image named
zImage-cfa10036.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 recipes-kernel/linux/linux-cfa_3.10.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Daiane Angolini - Sept. 6, 2013, 11:55 a.m.
On 09/05/2013 06:21 PM, Alexandre Belloni wrote:
> Barebox is configured to always look for a kernel image named
> zImage-cfa10036.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>   recipes-kernel/linux/linux-cfa_3.10.bb | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/recipes-kernel/linux/linux-cfa_3.10.bb b/recipes-kernel/linux/linux-cfa_3.10.bb
> index 2c2a723..bccca1c 100644
> --- a/recipes-kernel/linux/linux-cfa_3.10.bb
> +++ b/recipes-kernel/linux/linux-cfa_3.10.bb
> @@ -26,7 +26,7 @@ pkg_postinst_kernel-devicetree_append () {
>   }
>
>   pkg_postinst_kernel-image_append () {
> -	update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${MACHINE} ${KERNEL_IMAGETYPE}-${MACHINE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
> +	update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-cfa10036 ${KERNEL_IMAGETYPE}-cfa10036 ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true

why do you need to explicitly use cfa10036 if your bbappend is 
COMPATIBLE_MACHINE on "cfa10036"?

will you use zImage-cfa10036 for other boards with a different name? And 
when you include a that new machine will increase the COMPATIBLE_MACHINE 
string?

>   }
>
>   COMPATIBLE_MACHINE = "cfa10036"
>
Alexandre Belloni - Sept. 6, 2013, 12:39 p.m.
On 06/09/2013 13:55, Daiane Angolini wrote:
> On 09/05/2013 06:21 PM, Alexandre Belloni wrote:
>> Barebox is configured to always look for a kernel image named
>> zImage-cfa10036.
>>
>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
>> ---
>>   recipes-kernel/linux/linux-cfa_3.10.bb | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/recipes-kernel/linux/linux-cfa_3.10.bb
>> b/recipes-kernel/linux/linux-cfa_3.10.bb
>> index 2c2a723..bccca1c 100644
>> --- a/recipes-kernel/linux/linux-cfa_3.10.bb
>> +++ b/recipes-kernel/linux/linux-cfa_3.10.bb
>> @@ -26,7 +26,7 @@ pkg_postinst_kernel-devicetree_append () {
>>   }
>>
>>   pkg_postinst_kernel-image_append () {
>> -    update-alternatives --install
>> /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${MACHINE}
>> ${KERNEL_IMAGETYPE}-${MACHINE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
>> ${KERNEL_PRIORITY} || true
>> +    update-alternatives --install
>> /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-cfa10036
>> ${KERNEL_IMAGETYPE}-cfa10036 ${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
>> ${KERNEL_PRIORITY} || true
>
> why do you need to explicitly use cfa10036 if your bbappend is
> COMPATIBLE_MACHINE on "cfa10036"?
>
> will you use zImage-cfa10036 for other boards with a different name?
> And when you include a that new machine will increase the
> COMPATIBLE_MACHINE string?

Actually, barebox is looking for a kernel named zImage-cfa10036 for all
the cfa-10036 based boards (that means all the crystalfontz boards for
now). Then, it is reading an eeprom to know what exactly is the board
and will load the DT accordingly. I don't have to change
COMPATIBLE_MACHINE because I'm adding cfa10036 to the MACHINEOVERRIDES
for those cfa-10036 based boards.

>
>>   }
>>
>>   COMPATIBLE_MACHINE = "cfa10036"
>>
>
>

Patch

diff --git a/recipes-kernel/linux/linux-cfa_3.10.bb b/recipes-kernel/linux/linux-cfa_3.10.bb
index 2c2a723..bccca1c 100644
--- a/recipes-kernel/linux/linux-cfa_3.10.bb
+++ b/recipes-kernel/linux/linux-cfa_3.10.bb
@@ -26,7 +26,7 @@  pkg_postinst_kernel-devicetree_append () {
 }
 
 pkg_postinst_kernel-image_append () {
-	update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${MACHINE} ${KERNEL_IMAGETYPE}-${MACHINE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
+	update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-cfa10036 ${KERNEL_IMAGETYPE}-cfa10036 ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
 }
 
 COMPATIBLE_MACHINE = "cfa10036"