Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wr-switch-sw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
white-rabbit
wr-switch-sw
Commits
db041b2e
Commit
db041b2e
authored
Jul 11, 2012
by
Benoit Rat
Committed by
Alessandro Rubini
Jul 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: buildroot: correct bug when CROSS_COMPILER was wrongly set
parent
ffa02b11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
13 deletions
+21
-13
wrs_build_buildroot
build/scripts/wrs_build_buildroot
+17
-13
wrs_build-all
build/wrs_build-all
+4
-0
No files found.
build/scripts/wrs_build_buildroot
View file @
db041b2e
...
...
@@ -25,7 +25,7 @@ rm -rf $dirname
tar
xjf
${
WRS_DOWNLOAD_DIR
}
/
$zipname
||
wrs_die
"untar
$zipname
"
# copy the config and replace "-j" level. First remove it in case it's left in
cd
$
dirname
cd
$
WRS_OUTPUT_DIR
/build/
${
dirname
}
CFG
=
"
$WRS_BASE_DIR
/../patches/buildroot/buildroot-config-wrswitch"
if
[
"x
$WRS_BUILDROOT_CONFIG
"
!=
"x"
]
;
then
if
[
-f
$WRS_BUILDROOT_CONFIG
]
;
then
...
...
@@ -49,7 +49,7 @@ fi
# apply any pending patches
wrs_echo
"Patching buildroot"
cd
$
dirname
cd
$
WRS_OUTPUT_DIR
/build/
${
dirname
}
for
n
in
$WRS_BASE_DIR
/../patches/buildroot/
*
patch
;
do
# the shell passes the "*" over if no matches are there, so check
if
test
-f
"
$n
"
;
then
...
...
@@ -59,17 +59,21 @@ done
# now, if CROSS_COMPILE is already set and is not ours, change the config
if
[
"x
$CROSS_COMPILE
"
!=
"x"
]
;
then
wrs_echo
"Changing config for external compiler"
wrs_unset_config BR2_TOOLCHAIN_BUILDROOT
wrs_unset_config BR2_TOOLCHAIN_SOURCE
wrs_set_config BR2_TOOLCHAIN_EXTERNAL
echo
BR2_TOOLCHAIN_EXTERNAL_PATH
=
\"
$(
dirname
$(
dirname
$CROSS_COMPILE
))
\"
\
>>
.config
echo
BR2_TOOLCHAIN_EXTERNAL_PREFIX
=
"
\"\$
(ARCH)-linux
\"
"
>>
.config
echo
'# BR2_TOOLCHAIN_EXTERNAL_UCLIBC is not set'
>>
.config
echo
BR2_TOOLCHAIN_EXTERNAL_GLIBC
=
y
>>
.config
echo
BR2_TOOLCHAIN_EXTERNAL_STRIP
=
y
>>
.config
wrs_echo
"Checking CROSS_COMPILE"
${
CROSS_COMPILE
}
gcc
-v
2>&1 |
grep
arm &> /dev/null
if
[
$?
-eq
"0"
]
;
then
wrs_echo
"Changing config for external compiler (
$CROSS_COMPILE
)"
wrs_unset_config BR2_TOOLCHAIN_BUILDROOT
wrs_unset_config BR2_TOOLCHAIN_SOURCE
wrs_set_config BR2_TOOLCHAIN_EXTERNAL
echo
BR2_TOOLCHAIN_EXTERNAL_PATH
=
\"
$(
dirname
$(
dirname
$CROSS_COMPILE
))
\"
\
>>
.config
echo
BR2_TOOLCHAIN_EXTERNAL_PREFIX
=
"
\"\$
(ARCH)-linux
\"
"
>>
.config
echo
'# BR2_TOOLCHAIN_EXTERNAL_UCLIBC is not set'
>>
.config
echo
BR2_TOOLCHAIN_EXTERNAL_GLIBC
=
y
>>
.config
echo
BR2_TOOLCHAIN_EXTERNAL_STRIP
=
y
>>
.config
fi
fi
# re-digest the config we built
...
...
build/wrs_build-all
View file @
db041b2e
...
...
@@ -58,6 +58,8 @@ showhelp() {
pack
()
{
olddir
=
$(
/bin/pwd
)
cd
${
WRS_BASE_DIR
}
/../
#Check if the current git repo correspond to a tag
name
=
$(
git describe
--exact-match
--tags
HEAD &> /dev/null
)
...
...
@@ -69,6 +71,7 @@ pack()
name
=
"
$name
+"
;
fi
;
fi
cd
${
olddir
}
echo
"Packing into wrs-firmware-
$name
.tar.gz"
;
tar
-czvf
"wrs-firmware-
$name
.tar.gz"
-C
${
WRS_OUTPUT_DIR
}
/images/ at91bootstrap.bin barebox.bin zImage wrs-image.jffs2.img
exit
0
...
...
@@ -80,6 +83,7 @@ clean()
rm
-Rf
${
WRS_OUTPUT_DIR
}
/build/
rm
-Rf
${
WRS_OUTPUT_DIR
}
/images/
rm
-Rf
${
WRS_OUTPUT_DIR
}
/doc/
exit
0
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment