Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Librem5
kernel-builder
Commits
c9360035
Commit
c9360035
authored
Sep 23, 2019
by
Guido Gunther
Browse files
Merge branch 'redpine-firmware' into 'master'
Redpine firmware See merge request
!3
parents
95ce917b
81555dac
Pipeline
#35061
passed with stage
in 17 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Jenkinsfile
View file @
c9360035
...
...
@@ -16,6 +16,7 @@ node {
string
(
name:
'dot_config'
,
defaultValue:
"librem5-evk_defconfig"
,
description:
'Which kernel config should get built?'
)
string
(
name:
'build_type'
,
defaultValue:
"latest"
,
description:
'What type of build is this?'
)
string
(
name:
'publish'
,
defaultValue:
"false"
,
description:
'Should the image get published?'
)
string
(
name:
'flash_pkg'
,
defaultValue:
"false"
,
description:
'Build the firmware packages?'
)
string
(
name:
'MAKE_OPTS'
,
defaultValue:
""
,
description:
'extra make options'
)
}
...
...
@@ -23,7 +24,11 @@ node {
git
poll:
true
,
url:
gitUrl
,
branch:
branch
}
stage
(
'Build kernel'
)
{
sh
"KERNEL_REPO=${kernel_url} KERNEL_BRANCH=${kernel_branch} MAKE_OPTS=${MAKE_OPTS} DOT_CONFIG=${dot_config} ./build_kernel_deb.sh -b ${board}"
extra_args
=
""
if
(
"${params.flash_pkg}"
==
"true"
)
{
extra_args
=
"-r"
}
sh
"KERNEL_REPO=${kernel_url} KERNEL_BRANCH=${kernel_branch} MAKE_OPTS=${MAKE_OPTS} DOT_CONFIG=${dot_config} ./build_kernel_deb.sh -b ${board} ${extra_args}"
}
stage
(
'Publish'
)
{
if
(
"${params.publish}"
==
"true"
)
{
...
...
build_kernel_deb.sh
View file @
c9360035
...
...
@@ -22,7 +22,7 @@ COMPILER_ARCH=arm64
GIT_OPTS
=(
--depth
1
)
DTS_FILE
=
""
RSI_VER
=
RS9116.NB0.NL.LNX.PURISM_FW_UPGRADE.1.0.5
KERNEL_VER
=
""
build_redpine
()
{
tar
-xf
"files/
${
RSI_VER
}
.tgz"
...
...
@@ -32,10 +32,16 @@ build_redpine () {
sed
"s/KERNELDIR=.*/KERNELDIR=
${
ESCAPED_KERNEL_DIR
}
/"
-i
"
${
RSI_BUILD_PATH
}
/Makefile"
mv
"
${
CWD
}
/
${
RSI_VER
}
/Firmware/RS9116_NLINK_WLAN_BT_IMAGE.rps"
"
${
CWD
}
/
${
RSI_VER
}
/Firmware/RS9116_NLINK_WLAN_BT_IMA
GE.HW1_1.rps"
cp
files/RS9116_NLINK_WLAN_BT_IMAGE.rps
"
${
CWD
}
/
${
RSI_VER
}
/Firmware/RS9116_NLINK_WLAN_BT_IMAGE.HW1_2.rps"
ln
-s
"RS9116_NLINK_WLAN_BT_IMAGE.HW1_2.rps"
"
${
CWD
}
/
${
RSI_VER
}
/Firmware/RS9116_NLINK_WLAN_BT_IMAGE.rps"
cp
files/update_redpine.sh
"
${
CWD
}
/
${
RSI_VER
}
/Firmware/"
cd
${
RSI_BUILD_PATH
}
make
-j
"
${
NPROC
}
"
"
${
MAKE_OPTS
[@]
}
"
ARCH
=
"
${
ARCH
}
"
CROSS_COMPILE
=
"
${
CROSS_COMPILER
}
"
-C
"
${
CWD
}
/
${
LINUX_DIR
}
"
M
=
"
$PWD
"
modules
cd
"
${
CWD
}
/
${
RSI_BUILD_PATH
}
"
&&
tar
-cf
"
${
OUTPUT_DIR
}
/rsi_upgrade.tar"
./
*
.ko
cd
"
${
CWD
}
/
${
RSI_VER
}
/Firmware"
&&
tar
-cf
"
${
OUTPUT_DIR
}
/rsi_firmware.tar"
./
*
cd
"
${
CWD
}
/
${
RSI_BUILD_PATH
}
"
&&
tar
-cf
"
${
OUTPUT_DIR
}
/rsi_upgrade
_
${
KERNEL_VER
}
.tar"
./
*
.ko
cd
"
${
CWD
}
/
${
RSI_VER
}
/Firmware"
&&
tar
-cf
"
${
OUTPUT_DIR
}
/rsi_firmware
_
${
KERNEL_VER
}
.tar"
./
*
cd
"
${
CWD
}
"
}
...
...
@@ -89,9 +95,9 @@ case ${pureos_board} in
DOT_CONFIG
=
"
${
DOT_CONFIG
:-
emcraft
-som-imx8_defconfig
}
"
;;
devkit
)
KERNEL_BRANCH
=
"
${
KERNEL_BRANCH
:-
imx8
-
4.18-wip
}
"
KERNEL_REPO
=
"
${
KERNEL_REPO
:-
https
://source.puri.sm/Librem5/linux-
emcraf
t.git
}
"
DOT_CONFIG
=
"
${
DOT_CONFIG
:-
librem5
-evk_defconfig
}
"
KERNEL_BRANCH
=
"
${
KERNEL_BRANCH
:-
imx8
-
5.2-devkit
}
"
KERNEL_REPO
=
"
${
KERNEL_REPO
:-
https
://source.puri.sm/Librem5/linux-
nex
t.git
}
"
DOT_CONFIG
=
"
${
DOT_CONFIG
:-
librem5
-
d
evk
it
_defconfig
}
"
;;
\?
)
echo
"unrecognized board type
${
pureos_board
}
"
...
...
@@ -133,7 +139,8 @@ mkdir -p "${OUTPUT_DIR}"
mv
"
${
CWD
}
"
/
*
"
${
COMPILER_ARCH
}
"
.deb
"
${
CWD
}
"
/
*
.buildinfo
"
${
CWD
}
"
/
*
.changes
"
${
OUTPUT_DIR
}
"
echo
"
${
KERNEL_REPO
}
"
>
"
${
OUTPUT_DIR
}
/kernel-git-
${
ARCH
}
.txt"
git log |
head
-n
1 |
awk
'{ print $2 };'
>>
"
${
OUTPUT_DIR
}
/kernel-git-
${
ARCH
}
.txt"
KERNEL_VER
=
$(
git log |
head
-n
1 |
awk
'{ print $2 };'
)
echo
"
${
KERNEL_VER
}
"
>>
"
${
OUTPUT_DIR
}
/kernel-git-
${
ARCH
}
.txt"
cd
"
${
CWD
}
"
...
...
files/RS9116_NLINK_WLAN_BT_IMAGE.rps
0 → 100644
View file @
c9360035
File added
files/update_redpine.sh
0 → 100755
View file @
c9360035
#!/bin/bash
show_warning
()
{
echo
"Redpine SDIO module
$1
already loaded the upgrade will probably not work."
echo
"If it does not please blacklist
$1
in /etc/modprobe/librem5-devkit.conf"
echo
"then reboot and try the upgrade again."
}
MODULES
=
$(
lsmod |
grep
rsi_sdio
)
if
[
-z
"
${
MODULES
}
"
]
;
then
show_warning
$1
fi
MODULES
=
$(
lsmod |
grep
redpine_sdio
)
if
[
-z
"
${
MODULES
}
"
]
;
then
show_warning
$1
fi
set
-e
tar
-xf
rsi_firmware.tar
tar
-xf
rsi_upgrade.tar
mkdir
-p
/lib/firmware
cp
RS9116_NLINK_WLAN_BT_IMAGE.HW1_2.rps /lib/firmware/RS9116_NLINK_WLAN_BT_IMAGE.rps
modprobe bluetooth
modprobe cfg80211
modprobe mac80211
modprobe rfkill
insmod ./rsi_91x.ko
dev_oper_mode
=
13
rsi_zone_enabled
=
1
insmod ./rsi_sdio.ko
sleep
5
rm
/lib/firmware/RS9116_NLINK_WLAN_BT_IMAGE.rps
echo
"Please remove the blacklist and reboot now."
Write
Preview
Supports
Markdown
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