* [PATCH] populate_sdk_base.bbclass: check installation machine before installing SDK @ 2012-11-01 13:23 Laurentiu Palcu 2012-11-05 1:58 ` Robert Yang 0 siblings, 1 reply; 4+ messages in thread From: Laurentiu Palcu @ 2012-11-01 13:23 UTC (permalink / raw) To: openembedded-core Do not allow installer to continue if the installation machine architecture does not match the intended SDK machine architecture. [YOCTO: #3269] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> --- meta/classes/populate_sdk_base.bbclass | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index a3ac757..dc715c4 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass @@ -118,6 +118,14 @@ fakeroot create_shar() { cat << "EOF" > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh #!/bin/bash +INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") +SDKMACHINE=$(echo ${SDKMACHINE} | sed -e "s/i[5-6]86/ix86/") + +if [ "$INST_ARCH" != "$SDKMACHINE" ]; then + echo "Error: Installation machine not supported!" + exit -1 +fi + DEFAULT_INSTALL_DIR="${SDKPATH}" COMPONENTS_LEN=$(echo ".${SDKPATH}" | sed "s/\// /g" | wc -w) -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] populate_sdk_base.bbclass: check installation machine before installing SDK 2012-11-01 13:23 [PATCH] populate_sdk_base.bbclass: check installation machine before installing SDK Laurentiu Palcu @ 2012-11-05 1:58 ` Robert Yang 2012-11-05 7:54 ` Robert Yang 0 siblings, 1 reply; 4+ messages in thread From: Robert Yang @ 2012-11-05 1:58 UTC (permalink / raw) To: Laurentiu Palcu; +Cc: openembedded-core On 11/01/2012 09:23 PM, Laurentiu Palcu wrote: > Do not allow installer to continue if the installation machine architecture > does not match the intended SDK machine architecture. > > [YOCTO: #3269] > > Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> > --- > meta/classes/populate_sdk_base.bbclass | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass > index a3ac757..dc715c4 100644 > --- a/meta/classes/populate_sdk_base.bbclass > +++ b/meta/classes/populate_sdk_base.bbclass > @@ -118,6 +118,14 @@ fakeroot create_shar() { > cat << "EOF" > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh > #!/bin/bash > > +INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") > +SDKMACHINE=$(echo ${SDKMACHINE} | sed -e "s/i[5-6]86/ix86/") > + I'm afraid this doesn't work, how does the script know the SDKMACHINE ? The SDKMACHINE would always be null in poky-eglibc-x86_64-i586-toolchain-gmae-1.3+snapshot-20121104.sh // Robert > +if [ "$INST_ARCH" != "$SDKMACHINE" ]; then > + echo "Error: Installation machine not supported!" > + exit -1 > +fi > + > DEFAULT_INSTALL_DIR="${SDKPATH}" > COMPONENTS_LEN=$(echo ".${SDKPATH}" | sed "s/\// /g" | wc -w) > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] populate_sdk_base.bbclass: check installation machine before installing SDK 2012-11-05 1:58 ` Robert Yang @ 2012-11-05 7:54 ` Robert Yang 2012-11-05 11:51 ` Laurentiu Palcu 0 siblings, 1 reply; 4+ messages in thread From: Robert Yang @ 2012-11-05 7:54 UTC (permalink / raw) To: Laurentiu Palcu; +Cc: openembedded-core On 11/05/2012 09:58 AM, Robert Yang wrote: > > > On 11/01/2012 09:23 PM, Laurentiu Palcu wrote: >> Do not allow installer to continue if the installation machine architecture >> does not match the intended SDK machine architecture. >> >> [YOCTO: #3269] >> >> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> >> --- >> meta/classes/populate_sdk_base.bbclass | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/meta/classes/populate_sdk_base.bbclass >> b/meta/classes/populate_sdk_base.bbclass >> index a3ac757..dc715c4 100644 >> --- a/meta/classes/populate_sdk_base.bbclass >> +++ b/meta/classes/populate_sdk_base.bbclass >> @@ -118,6 +118,14 @@ fakeroot create_shar() { >> cat << "EOF" > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh >> #!/bin/bash >> >> +INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") >> +SDKMACHINE=$(echo ${SDKMACHINE} | sed -e "s/i[5-6]86/ix86/") >> + > > I'm afraid this doesn't work, how does the script know the SDKMACHINE ? > The SDKMACHINE would always be null in > poky-eglibc-x86_64-i586-toolchain-gmae-1.3+snapshot-20121104.sh > This was because i didn't set the SDKMACHINE, I seldom set it when build the sdk, but it seems that we should set it since it needs include conf/machine-sdk/${SDKMACHINE}.conf Can we check whether the SDKMACHINE is null before build the SDK or use SDK_ARCH rather than the SDKMACHINE here ? Otherwise, if we don't set the SDKMACHINE, the SDK would be built, but it can't be installed, we would always get this error: Error: Installation machine not supported! // Robert > // Robert > > >> +if [ "$INST_ARCH" != "$SDKMACHINE" ]; then >> + echo "Error: Installation machine not supported!" >> + exit -1 >> +fi >> + >> DEFAULT_INSTALL_DIR="${SDKPATH}" >> COMPONENTS_LEN=$(echo ".${SDKPATH}" | sed "s/\// /g" | wc -w) >> >> > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] populate_sdk_base.bbclass: check installation machine before installing SDK 2012-11-05 7:54 ` Robert Yang @ 2012-11-05 11:51 ` Laurentiu Palcu 0 siblings, 0 replies; 4+ messages in thread From: Laurentiu Palcu @ 2012-11-05 11:51 UTC (permalink / raw) To: Robert Yang; +Cc: openembedded-core On 11/05/2012 09:54 AM, Robert Yang wrote: > > > On 11/05/2012 09:58 AM, Robert Yang wrote: >> >> >> On 11/01/2012 09:23 PM, Laurentiu Palcu wrote: >>> Do not allow installer to continue if the installation machine architecture >>> does not match the intended SDK machine architecture. >>> >>> [YOCTO: #3269] >>> >>> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> >>> --- >>> meta/classes/populate_sdk_base.bbclass | 8 ++++++++ >>> 1 file changed, 8 insertions(+) >>> >>> diff --git a/meta/classes/populate_sdk_base.bbclass >>> b/meta/classes/populate_sdk_base.bbclass >>> index a3ac757..dc715c4 100644 >>> --- a/meta/classes/populate_sdk_base.bbclass >>> +++ b/meta/classes/populate_sdk_base.bbclass >>> @@ -118,6 +118,14 @@ fakeroot create_shar() { >>> cat << "EOF" > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh >>> #!/bin/bash >>> >>> +INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") >>> +SDKMACHINE=$(echo ${SDKMACHINE} | sed -e "s/i[5-6]86/ix86/") >>> + >> >> I'm afraid this doesn't work, how does the script know the SDKMACHINE ? >> The SDKMACHINE would always be null in >> poky-eglibc-x86_64-i586-toolchain-gmae-1.3+snapshot-20121104.sh >> > > This was because i didn't set the SDKMACHINE, I seldom set it when build > the sdk, but it seems that we should set it since it needs > > include conf/machine-sdk/${SDKMACHINE}.conf Hmm, I had it set in my local.conf... I missed the fact that, by default, the local.conf had it commented out. > > Can we check whether the SDKMACHINE is null before build the SDK or use > SDK_ARCH rather than the SDKMACHINE here ? Otherwise, if we don't set the > SDKMACHINE, the SDK would be built, but it can't be installed, we would > always get this error: I suppose we can safely use SDK_ARCH here, instead of SDKMACHINE. I'll prepare a patch asap. > > Error: Installation machine not supported! > > // Robert > >> // Robert >> >> >>> +if [ "$INST_ARCH" != "$SDKMACHINE" ]; then >>> + echo "Error: Installation machine not supported!" >>> + exit -1 >>> +fi >>> + >>> DEFAULT_INSTALL_DIR="${SDKPATH}" >>> COMPONENTS_LEN=$(echo ".${SDKPATH}" | sed "s/\// /g" | wc -w) >>> >>> >> >> _______________________________________________ >> Openembedded-core mailing list >> Openembedded-core@lists.openembedded.org >> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core >> >> ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-05 12:05 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-11-01 13:23 [PATCH] populate_sdk_base.bbclass: check installation machine before installing SDK Laurentiu Palcu 2012-11-05 1:58 ` Robert Yang 2012-11-05 7:54 ` Robert Yang 2012-11-05 11:51 ` Laurentiu Palcu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox