Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
6b6075a0
Commit
6b6075a0
authored
Oct 28, 2016
by
Federico Vaga
Committed by
Adam Wujek
Dec 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: use a single source for the kernel version
Signed-off-by:
Federico Vaga
<
federico.vaga@gmail.com
>
parent
c820bd3b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
10 deletions
+11
-10
wrs_build_kernel
build/scripts/wrs_build_kernel
+5
-7
wrs_build_modules
build/scripts/wrs_build_modules
+1
-1
wrs_build_ptp
build/scripts/wrs_build_ptp
+1
-1
wrs_build_userspace
build/scripts/wrs_build_userspace
+1
-1
wrs_build-all
build/wrs_build-all
+3
-0
No files found.
build/scripts/wrs_build_kernel
View file @
6b6075a0
#!/bin/bash
KERVER
=
3.16.37
# check variables, like all scripts herein do
WRS_SCRIPT_NAME
=
$(
basename
$0
)
if
[
-z
"
$WRS_BASE_DIR
"
]
;
then
...
...
@@ -14,8 +12,8 @@ wrs_check_vars WRS_OUTPUT_DIR WRS_DOWNLOAD_DIR CROSS_COMPILE
wrs_echo
"--- Linux kernel for switch"
tarname
=
"linux-
${
K
ER
VER
}
.tar.gz"
patchdir
=
"
${
WRS_BASE_DIR
}
/../patches/kernel/v
${
K
ER
VER
}
"
tarname
=
"linux-
${
KVER
}
.tar.gz"
patchdir
=
"
${
WRS_BASE_DIR
}
/../patches/kernel/v
${
KVER
}
"
wrs_download
$tarname
mkdir
-p
$WRS_OUTPUT_DIR
/build
||
wrs_die
"mkdir build"
...
...
@@ -23,7 +21,7 @@ mkdir -p $WRS_OUTPUT_DIR/images || wrs_die "mkdir images"
# go to the build dir and compile it, using our configuration
cd
$WRS_OUTPUT_DIR
/build
dirname
=
"linux-
${
K
ER
VER
}
"
dirname
=
"linux-
${
KVER
}
"
rm
-rf
$dirname
tar
xzf
${
WRS_DOWNLOAD_DIR
}
/
$tarname
||
wrs_die
"untar
$tarname
"
...
...
@@ -51,7 +49,7 @@ make oldconfig || wrs_die "kernel config"
make
$WRS_MAKE_J
zImage modules
||
wrs_die
"kernel compilation"
mkdir
-p
$WRS_OUTPUT_DIR
/images/lib/modules/
$K
ER
VER
/kernel
mkdir
-p
$WRS_OUTPUT_DIR
/images/lib/modules/
$KVER
/kernel
cp
$(
find
.
-name
'*.ko'
)
$WRS_OUTPUT_DIR
/images/lib/modules/
$K
ER
VER
/kernel
cp
$(
find
.
-name
'*.ko'
)
$WRS_OUTPUT_DIR
/images/lib/modules/
$KVER
/kernel
cp arch
/
$ARCH
/boot/zImage
$WRS_OUTPUT_DIR
/images
build/scripts/wrs_build_modules
View file @
6b6075a0
...
...
@@ -16,7 +16,7 @@ mkdir -p $WRS_OUTPUT_DIR/build || wrs_die "mkdir build"
mkdir
-p
$WRS_OUTPUT_DIR
/images
||
wrs_die
"mkdir images"
# check that the kernel has been compiled (or at least configured)
export
LINUX
=
"
$WRS_OUTPUT_DIR
/build/linux-
2.6.39
"
export
LINUX
=
"
$WRS_OUTPUT_DIR
/build/linux-
$KVER
"
test
-f
$LINUX
/.config
||
wrs_die
"no kernel in
$LINUX
"
cd
$WRS_BASE_DIR
/../kernel
make
$WRS_MAKE_J
||
wrs_die
"white rabbit kernel modules"
...
...
build/scripts/wrs_build_ptp
View file @
6b6075a0
...
...
@@ -21,7 +21,7 @@ make clean
# we need LINUX and CROSS_COMPILE. The latter is there for sure
if
[
"x
$LINUX
"
==
"x"
]
;
then
export
LINUX
=
"
$WRS_OUTPUT_DIR
/build/linux-
2.6.39
"
export
LINUX
=
"
$WRS_OUTPUT_DIR
/build/linux-
$KVER
"
fi
...
...
build/scripts/wrs_build_userspace
View file @
6b6075a0
...
...
@@ -17,7 +17,7 @@ installdir="$WRS_OUTPUT_DIR/images/wr"
# This time build is done in-place, but the output is a tree in images/wr.
# Some of the makefiles inside use
export
LINUX
=
"
$WRS_OUTPUT_DIR
/build/linux-
2.6.39
"
export
LINUX
=
"
$WRS_OUTPUT_DIR
/build/linux-
$KVER
"
cd
$sourcedir
make clean
||
wrs_die
"Error cleaning user space"
...
...
build/wrs_build-all
View file @
6b6075a0
...
...
@@ -48,6 +48,9 @@ fi
export
WRS_SCRIPTS_DIR
=
${
WRS_BASE_DIR
}
/scripts
# Export Linux kernel version in use
export
KVER
=
"3.16.37"
# Export Buildroot version in use
export
BRVER
=
"2016.02"
...
...
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