All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-fsl-arm][PATCH] linux-mfgtool: Prevent overwriting linux-imx deployments
@ 2014-11-11  9:56 Sven Ebenfeld
  2014-11-19 15:07 ` Daiane Angolini
  0 siblings, 1 reply; 8+ messages in thread
From: Sven Ebenfeld @ 2014-11-11  9:56 UTC (permalink / raw)
  To: meta-freescale

When I try building fsl-image-mfgtool-initramfs it builds both,
linux-imx and linux-mfgtool. Both recipes are trying to write
the README... file and KERNEL_IMAGETYPE-file into deploy dir.
This leads to an error, that one recipe wants to write files that
already exist. This patch prevents linux-mfgtool from overwriting
linux-imx's results.

Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
---
 recipes-kernel/linux/linux-mfgtool.inc | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/recipes-kernel/linux/linux-mfgtool.inc b/recipes-kernel/linux/linux-mfgtool.inc
index 106a7d9..eaccb44 100644
--- a/recipes-kernel/linux/linux-mfgtool.inc
+++ b/recipes-kernel/linux/linux-mfgtool.inc
@@ -79,3 +79,29 @@ do_install_append() {
 sysroot_stage_all() {
     :
 }
+
+# FIXME: Overwrite kernel_do_deploy as it tries to overwrite (u/z)Image symlink
+#        and DO_NOT...DELETE.txt file. This leads to an error that this recipe
+#        is trying to install files into an area where those files already exist.
+kernel_do_deploy() {
+	install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
+	if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
+		mkdir -p ${D}/lib
+		tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib
+		ln -sf ${MODULE_TARBALL_BASE_NAME} ${DEPLOYDIR}/${MODULE_TARBALL_SYMLINK_NAME}
+	fi
+
+	ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${DEPLOYDIR}/${KERNEL_IMAGE_SYMLINK_NAME}.bin
+	ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${DEPLOYDIR}/mfgtool-${KERNEL_IMAGETYPE}
+
+	cd ${B}
+	# Update deploy directory
+	if [ -e "${KERNEL_OUTPUT}.initramfs" ]; then
+		echo "Copying deploy kernel-initramfs image and setting up links..."
+		initramfs_base_name=${INITRAMFS_BASE_NAME}
+		initramfs_symlink_name=mfgtool-${KERNEL_IMAGETYPE}-initramfs-${MACHINE}
+		install -m 0644 ${KERNEL_OUTPUT}.initramfs ${DEPLOYDIR}/${initramfs_base_name}.bin
+		cd ${DEPLOYDIR}
+		ln -sf ${initramfs_base_name}.bin ${initramfs_symlink_name}.bin
+	fi
+}
-- 
1.8.1.rc3



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [meta-fsl-arm][PATCH] linux-mfgtool: Prevent overwriting linux-imx deployments
  2014-11-11  9:56 [meta-fsl-arm][PATCH] linux-mfgtool: Prevent overwriting linux-imx deployments Sven Ebenfeld
@ 2014-11-19 15:07 ` Daiane Angolini
  2014-11-21  6:06   ` Sven Ebenfeld
  0 siblings, 1 reply; 8+ messages in thread
From: Daiane Angolini @ 2014-11-19 15:07 UTC (permalink / raw)
  To: Sven Ebenfeld; +Cc: meta-freescale@yoctoproject.org

Hi Sven Ebenfeld, sorry for delay.

On Tue, Nov 11, 2014 at 7:56 AM, Sven Ebenfeld <sven.ebenfeld@gmail.com> wrote:
> When I try building fsl-image-mfgtool-initramfs it builds both,

Could you, please, use "When building blablabla" instead of using
"When I try building blablabla"?

Who is the "person" behind "I" in a commit log?

> linux-imx and linux-mfgtool. Both recipes are trying to write
> the README... file and KERNEL_IMAGETYPE-file into deploy dir.

I don´t understand why you add the ... after the README file name.
Would it be possibly avoided?

> This leads to an error, that one recipe wants to write files that
> already exist. This patch prevents linux-mfgtool from overwriting
> linux-imx's results.
>
> Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
> ---
>  recipes-kernel/linux/linux-mfgtool.inc | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>
> diff --git a/recipes-kernel/linux/linux-mfgtool.inc b/recipes-kernel/linux/linux-mfgtool.inc
> index 106a7d9..eaccb44 100644
> --- a/recipes-kernel/linux/linux-mfgtool.inc
> +++ b/recipes-kernel/linux/linux-mfgtool.inc
> @@ -79,3 +79,29 @@ do_install_append() {
>  sysroot_stage_all() {
>      :
>  }
> +
> +# FIXME: Overwrite kernel_do_deploy as it tries to overwrite (u/z)Image symlink
> +#        and DO_NOT...DELETE.txt file. This leads to an error that this recipe

Here again you use ...
Would you be trying to replace a long file name?

I understand this is only a workaround for the problem, am I right?


Daiane

> +#        is trying to install files into an area where those files already exist.
> +kernel_do_deploy() {
> +       install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
> +       if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
> +               mkdir -p ${D}/lib
> +               tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib
> +               ln -sf ${MODULE_TARBALL_BASE_NAME} ${DEPLOYDIR}/${MODULE_TARBALL_SYMLINK_NAME}
> +       fi
> +
> +       ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${DEPLOYDIR}/${KERNEL_IMAGE_SYMLINK_NAME}.bin
> +       ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${DEPLOYDIR}/mfgtool-${KERNEL_IMAGETYPE}
> +
> +       cd ${B}
> +       # Update deploy directory
> +       if [ -e "${KERNEL_OUTPUT}.initramfs" ]; then
> +               echo "Copying deploy kernel-initramfs image and setting up links..."
> +               initramfs_base_name=${INITRAMFS_BASE_NAME}
> +               initramfs_symlink_name=mfgtool-${KERNEL_IMAGETYPE}-initramfs-${MACHINE}
> +               install -m 0644 ${KERNEL_OUTPUT}.initramfs ${DEPLOYDIR}/${initramfs_base_name}.bin
> +               cd ${DEPLOYDIR}
> +               ln -sf ${initramfs_base_name}.bin ${initramfs_symlink_name}.bin
> +       fi
> +}
> --
> 1.8.1.rc3
>
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-fsl-arm][PATCH] linux-mfgtool: Prevent overwriting linux-imx deployments
  2014-11-19 15:07 ` Daiane Angolini
@ 2014-11-21  6:06   ` Sven Ebenfeld
  2014-11-21 10:48     ` Daiane Angolini
  0 siblings, 1 reply; 8+ messages in thread
From: Sven Ebenfeld @ 2014-11-21  6:06 UTC (permalink / raw)
  To: Daiane Angolini; +Cc: meta-freescale@yoctoproject.org

Hi Daiane, Thanks for your comments.

Am 19.11.2014 um 16:07 schrieb Daiane Angolini:
> Hi Sven Ebenfeld, sorry for delay.
> 
> On Tue, Nov 11, 2014 at 7:56 AM, Sven Ebenfeld <sven.ebenfeld@gmail.com> wrote:
>> When I try building fsl-image-mfgtool-initramfs it builds both,
> 
> Could you, please, use "When building blablabla" instead of using
> "When I try building blablabla"?
> 
> Who is the "person" behind "I" in a commit log?

Okay, I will not use this wording in my next commit logs.

> 
>> linux-imx and linux-mfgtool. Both recipes are trying to write
>> the README... file and KERNEL_IMAGETYPE-file into deploy dir.
> 
> I don´t understand why you add the ... after the README file name.
> Would it be possibly avoided?

The README file name is quite a long name I tried to avoid mentioning
the whole name.
But if it's better to mention the whole name for better understanding, I
will mention it. Or even leave the whole name away.

> 
>> This leads to an error, that one recipe wants to write files that
>> already exist. This patch prevents linux-mfgtool from overwriting
>> linux-imx's results.
>>
>> Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
>> ---
>>  recipes-kernel/linux/linux-mfgtool.inc | 26 ++++++++++++++++++++++++++
>>  1 file changed, 26 insertions(+)
>>
>> diff --git a/recipes-kernel/linux/linux-mfgtool.inc b/recipes-kernel/linux/linux-mfgtool.inc
>> index 106a7d9..eaccb44 100644
>> --- a/recipes-kernel/linux/linux-mfgtool.inc
>> +++ b/recipes-kernel/linux/linux-mfgtool.inc
>> @@ -79,3 +79,29 @@ do_install_append() {
>>  sysroot_stage_all() {
>>      :
>>  }
>> +
>> +# FIXME: Overwrite kernel_do_deploy as it tries to overwrite (u/z)Image symlink
>> +#        and DO_NOT...DELETE.txt file. This leads to an error that this recipe
> 
> Here again you use ...
> Would you be trying to replace a long file name?
> 
> I understand this is only a workaround for the problem, am I right?

Yes, it's only a workaround. Unfortunately I don't know a better way for
fixing this, yet.
The same problem exists with u-boot.

Do you think it's possible to get it merged with a better commit log or
do you have a proposal where I should look for a better fix?

> 
> 
> Daiane
> 
>> +#        is trying to install files into an area where those files already exist.
>> +kernel_do_deploy() {
>> +       install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
>> +       if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
>> +               mkdir -p ${D}/lib
>> +               tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib
>> +               ln -sf ${MODULE_TARBALL_BASE_NAME} ${DEPLOYDIR}/${MODULE_TARBALL_SYMLINK_NAME}
>> +       fi
>> +
>> +       ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${DEPLOYDIR}/${KERNEL_IMAGE_SYMLINK_NAME}.bin
>> +       ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${DEPLOYDIR}/mfgtool-${KERNEL_IMAGETYPE}
>> +
>> +       cd ${B}
>> +       # Update deploy directory
>> +       if [ -e "${KERNEL_OUTPUT}.initramfs" ]; then
>> +               echo "Copying deploy kernel-initramfs image and setting up links..."
>> +               initramfs_base_name=${INITRAMFS_BASE_NAME}
>> +               initramfs_symlink_name=mfgtool-${KERNEL_IMAGETYPE}-initramfs-${MACHINE}
>> +               install -m 0644 ${KERNEL_OUTPUT}.initramfs ${DEPLOYDIR}/${initramfs_base_name}.bin
>> +               cd ${DEPLOYDIR}
>> +               ln -sf ${initramfs_base_name}.bin ${initramfs_symlink_name}.bin
>> +       fi
>> +}
>> --
>> 1.8.1.rc3
>>
>> --
>> _______________________________________________
>> meta-freescale mailing list
>> meta-freescale@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-freescale


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-fsl-arm][PATCH] linux-mfgtool: Prevent overwriting linux-imx deployments
  2014-11-21  6:06   ` Sven Ebenfeld
@ 2014-11-21 10:48     ` Daiane Angolini
  2014-11-21 11:11       ` Otavio Salvador
  0 siblings, 1 reply; 8+ messages in thread
From: Daiane Angolini @ 2014-11-21 10:48 UTC (permalink / raw)
  To: Sven Ebenfeld; +Cc: meta-freescale@yoctoproject.org

On Fri, Nov 21, 2014 at 4:06 AM, Sven Ebenfeld <sven.ebenfeld@gmail.com> wrote:

>
> Do you think it's possible to get it merged with a better commit log or
> do you have a proposal where I should look for a better fix?

I don´t have a better patch either, but _to merge or not to merge_ is
up to Otavio.

I can help with testing next week, if applicable.

Daiane


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-fsl-arm][PATCH] linux-mfgtool: Prevent overwriting linux-imx deployments
  2014-11-21 10:48     ` Daiane Angolini
@ 2014-11-21 11:11       ` Otavio Salvador
  2014-12-12 12:50         ` Otavio Salvador
  0 siblings, 1 reply; 8+ messages in thread
From: Otavio Salvador @ 2014-11-21 11:11 UTC (permalink / raw)
  To: Daiane Angolini; +Cc: meta-freescale@yoctoproject.org

On Fri, Nov 21, 2014 at 8:48 AM, Daiane Angolini <daiane.list@gmail.com> wrote:
> On Fri, Nov 21, 2014 at 4:06 AM, Sven Ebenfeld <sven.ebenfeld@gmail.com> wrote:
>
>>
>> Do you think it's possible to get it merged with a better commit log or
>> do you have a proposal where I should look for a better fix?
>
> I don´t have a better patch either, but _to merge or not to merge_ is
> up to Otavio.
>
> I can help with testing next week, if applicable.

I want to debug this and see if I can come up with something...

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-fsl-arm][PATCH] linux-mfgtool: Prevent overwriting linux-imx deployments
  2014-11-21 11:11       ` Otavio Salvador
@ 2014-12-12 12:50         ` Otavio Salvador
  2014-12-16 19:51           ` Sven Ebenfeld
  0 siblings, 1 reply; 8+ messages in thread
From: Otavio Salvador @ 2014-12-12 12:50 UTC (permalink / raw)
  To: Daiane Angolini; +Cc: meta-freescale@yoctoproject.org

On Fri, Nov 21, 2014 at 9:11 AM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> On Fri, Nov 21, 2014 at 8:48 AM, Daiane Angolini <daiane.list@gmail.com> wrote:
>> On Fri, Nov 21, 2014 at 4:06 AM, Sven Ebenfeld <sven.ebenfeld@gmail.com> wrote:
>>
>>>
>>> Do you think it's possible to get it merged with a better commit log or
>>> do you have a proposal where I should look for a better fix?
>>
>> I don´t have a better patch either, but _to merge or not to merge_ is
>> up to Otavio.
>>
>> I can help with testing next week, if applicable.
>
> I want to debug this and see if I can come up with something...

I really failed to reproduce the warnings; I built it using master for
SabreSD and I built both the initramfs and runtime images and kernels
without a issue.

Is it possible, Sven, for you to try to come up with a way for me to
reproduce the issue?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-fsl-arm][PATCH] linux-mfgtool: Prevent overwriting linux-imx deployments
  2014-12-12 12:50         ` Otavio Salvador
@ 2014-12-16 19:51           ` Sven Ebenfeld
  2014-12-16 19:52             ` Otavio Salvador
  0 siblings, 1 reply; 8+ messages in thread
From: Sven Ebenfeld @ 2014-12-16 19:51 UTC (permalink / raw)
  To: Otavio Salvador, Daiane Angolini; +Cc: meta-freescale@yoctoproject.org

Am 12.12.2014 um 13:50 schrieb Otavio Salvador:
> On Fri, Nov 21, 2014 at 9:11 AM, Otavio Salvador
> <otavio@ossystems.com.br> wrote:
>> On Fri, Nov 21, 2014 at 8:48 AM, Daiane Angolini <daiane.list@gmail.com> wrote:
>>> On Fri, Nov 21, 2014 at 4:06 AM, Sven Ebenfeld <sven.ebenfeld@gmail.com> wrote:
>>>
>>>>
>>>> Do you think it's possible to get it merged with a better commit log or
>>>> do you have a proposal where I should look for a better fix?
>>>
>>> I don´t have a better patch either, but _to merge or not to merge_ is
>>> up to Otavio.
>>>
>>> I can help with testing next week, if applicable.
>>
>> I want to debug this and see if I can come up with something...
> 
> I really failed to reproduce the warnings; I built it using master for
> SabreSD and I built both the initramfs and runtime images and kernels
> without a issue.
> 
> Is it possible, Sven, for you to try to come up with a way for me to
> reproduce the issue?

At the moment, I am unable to reproduce this problem as well.
This must have been a problem in my configuration. At least that is what
I think at the moment.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-fsl-arm][PATCH] linux-mfgtool: Prevent overwriting linux-imx deployments
  2014-12-16 19:51           ` Sven Ebenfeld
@ 2014-12-16 19:52             ` Otavio Salvador
  0 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2014-12-16 19:52 UTC (permalink / raw)
  To: Sven Ebenfeld; +Cc: meta-freescale@yoctoproject.org

On Tue, Dec 16, 2014 at 5:51 PM, Sven Ebenfeld <sven.ebenfeld@gmail.com> wrote:
> Am 12.12.2014 um 13:50 schrieb Otavio Salvador:
>> On Fri, Nov 21, 2014 at 9:11 AM, Otavio Salvador
>> <otavio@ossystems.com.br> wrote:
>>> On Fri, Nov 21, 2014 at 8:48 AM, Daiane Angolini <daiane.list@gmail.com> wrote:
>>>> On Fri, Nov 21, 2014 at 4:06 AM, Sven Ebenfeld <sven.ebenfeld@gmail.com> wrote:
>>>>
>>>>>
>>>>> Do you think it's possible to get it merged with a better commit log or
>>>>> do you have a proposal where I should look for a better fix?
>>>>
>>>> I don´t have a better patch either, but _to merge or not to merge_ is
>>>> up to Otavio.
>>>>
>>>> I can help with testing next week, if applicable.
>>>
>>> I want to debug this and see if I can come up with something...
>>
>> I really failed to reproduce the warnings; I built it using master for
>> SabreSD and I built both the initramfs and runtime images and kernels
>> without a issue.
>>
>> Is it possible, Sven, for you to try to come up with a way for me to
>> reproduce the issue?
>
> At the moment, I am unable to reproduce this problem as well.
> This must have been a problem in my configuration. At least that is what
> I think at the moment.

It might be. In case you reproduce it please let me know.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-12-16 19:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-11  9:56 [meta-fsl-arm][PATCH] linux-mfgtool: Prevent overwriting linux-imx deployments Sven Ebenfeld
2014-11-19 15:07 ` Daiane Angolini
2014-11-21  6:06   ` Sven Ebenfeld
2014-11-21 10:48     ` Daiane Angolini
2014-11-21 11:11       ` Otavio Salvador
2014-12-12 12:50         ` Otavio Salvador
2014-12-16 19:51           ` Sven Ebenfeld
2014-12-16 19:52             ` Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.