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
84
Issues
84
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
2a746f7b
Commit
2a746f7b
authored
Apr 12, 2011
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: scripts/wrs_build_kernel: new file
parent
0d7e0557
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
wrs_build_kernel
build/scripts/wrs_build_kernel
+49
-0
No files found.
build/scripts/wrs_build_kernel
0 → 100755
View file @
2a746f7b
#!/bin/bash
# check variables, like all scripts herein do
WRS_SCRIPT_NAME
=
$(
basename
$0
)
if
[
-z
"
$WRS_BASE_DIR
"
]
;
then
echo
"
$0
: Plesae set WRS_BASE_DIR"
>
& 2
exit
1
fi
.
${
WRS_BASE_DIR
}
/scripts/wrs_functions
wrs_check_vars WRS_OUTPUT_DIR WRS_DOWNLOAD_DIR WRS_WR_REPOSITORY CROSS_COMPILE
wrs_echo
"--- Linux kernel for switch"
zipname
=
"buildroot-pkg/linux-2.6.35.tar.bz2"
wrs_download
$zipname
mkdir
-p
$WRS_OUTPUT_DIR
/build
||
wrs_die
"mkdir build"
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-2.6.35"
rm
-rf
$dirname
tar
xjf
${
WRS_DOWNLOAD_DIR
}
/
$zipname
||
wrs_die
"untar
$zipname
"
# apply patches
cd
$dirname
for
n
in
${
WRS_BASE_DIR
}
/patches/kernel/v2.6.35/00
*
;
do
patch
-p1
<
$n
||
wrs_die
"patch kernel"
done
# copy the config and replace "-j" level. First remove it in case it's left in
CFG
=
$WRS_BASE_DIR
/patches/kernel/v2.6.35/linux-config-wrswitch
if
[
"x
$WRS_KERNEL_CONFIG
"
!=
"x"
]
;
then
if
[
-f
$WRS_KERNEL_CONFIG
]
;
then
CFG
=
$WRS_KERNEL_CONFIG
else
wrs_warn
"WRS_KERNEL_CONFIG is not a regularname: ignoring it"
sleep
3
fi
fi
cp
$CFG
.config
export
ARCH
=
arm
make oldconfig
||
wrs_die
"kernel config"
make
$WRS_MAKE_J
uImage modules
||
wrs_die
"kernel compilation"
cp arch
/
$ARCH
/boot/uImage
$(
find
.
-name
'*.ko'
)
$WRS_OUTPUT_DIR
/images
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