Skip to content

Commit 06b53a9

Browse files
committed
Add linux-mainline-perf and linux-stracciatella-perf as split packages
1 parent 94c486b commit 06b53a9

File tree

3 files changed

+90
-85
lines changed

3 files changed

+90
-85
lines changed

package/linux-mainline/package

Lines changed: 45 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
# SPDX-License-Identifier: MIT
44

55
archs=(rm2)
6-
pkgnames=(linux-mainline)
7-
pkgdesc="reMarkable 2 kernel based on the mainline kernel"
8-
url=https://www.kernel.org
6+
pkgnames=(linux-mainline linux-mainline-perf)
97
pkgver=6.0.0-1
10-
timestamp=2022-05-22T21:50:09Z
11-
section=kernel
8+
timestamp=2022-10-02T21:43:31Z
129
maintainer="Alistair Francis <[email protected]>"
1310
makedepends=(build:flex build:bison build:libssl-dev build:bc build:lzop build:libgmp-dev build:libmpc-dev)
1411
license=GPL-2.0-only
@@ -21,35 +18,54 @@ sha256sums=(1583d553380a656ecaac8dab89558051e9165983381adc9c3d52fb8ac0ce19fd)
2118
build() {
2219
ARCH=arm make imx_v6_v7_defconfig
2320
ARCH=arm make -j8
21+
ARCH=arm make -j8 tools/perf
2422
}
2523

26-
package() {
27-
# Prepare files for the kernel archive
28-
local staging="$srcdir"/staging
29-
mkdir -p "$staging/boot"
24+
linux-mainline() {
25+
pkgdesc="reMarkable 2 kernel based on the mainline kernel"
26+
url=https://www.kernel.org
27+
section=kernel
28+
installdepends=(kernelctl)
3029

31-
cp --no-dereference {"$srcdir"/arch/arm,"$staging"}/boot/zImage
32-
cp --no-dereference "$srcdir"/arch/arm/boot/dts/imx7d-remarkable2.dtb \
33-
"$staging"/boot/zero-sugar.dtb
30+
package() {
31+
# Prepare files for the kernel archive
32+
local staging="$srcdir"/staging
33+
mkdir -p "$staging/boot"
3434

35-
ARCH=arm make -C "$srcdir" modules_install INSTALL_MOD_PATH="$staging"
36-
rm "$staging"/lib/modules/*/{source,build}
35+
cp --no-dereference {"$srcdir"/arch/arm,"$staging"}/boot/zImage
36+
cp --no-dereference "$srcdir"/arch/arm/boot/dts/imx7d-remarkable2.dtb \
37+
"$staging"/boot/zero-sugar.dtb
3738

38-
# Create the kernel archive
39-
local archive="mainline-${pkgver%-*}.tar.bz2"
40-
install -d "$pkgdir"/opt/usr/share/kernelctl
41-
(cd "$staging" && tar --owner root:0 --group root:0 --mtime=$timestamp \
42-
-cjf "$pkgdir"/opt/usr/share/kernelctl/"$archive" boot/* lib/modules/*)
39+
ARCH=arm make -C "$srcdir" modules_install INSTALL_MOD_PATH="$staging"
40+
rm "$staging"/lib/modules/*/{source,build}
41+
42+
# Create the kernel archive
43+
local archive="mainline-${pkgver%-*}.tar.bz2"
44+
install -d "$pkgdir"/opt/usr/share/kernelctl
45+
(cd "$staging" && tar --owner root:0 --group root:0 --mtime=$timestamp \
46+
-cjf "$pkgdir"/opt/usr/share/kernelctl/"$archive" boot/* lib/modules/*)
47+
}
48+
49+
configure() {
50+
echo "The new kernel files have been copied, but not installed."
51+
echo "Please use kernelctl to select the kernel to boot."
52+
echo
53+
echo "Known issues with the mainline kernel:"
54+
echo " - No support for low power mode (suspend uses more power then it should)"
55+
echo " - WiFi sometimes is off on boot (can be turned on again though)"
56+
echo " - GUI shutdown in Oxide doesn't work"
57+
echo " - Wacom stylus doesn't work in Xochitl (works everywhere else though)"
58+
echo " - No OTG control support"
59+
}
4360
}
4461

45-
configure() {
46-
echo "The new kernel files have been copied, but not installed."
47-
echo "Please use kernelctl to select the kernel to boot."
48-
echo
49-
echo "Known issues with the mainline kernel:"
50-
echo " - No support for low power mode (suspend uses more power then it should)"
51-
echo " - WiFi sometimes is off on boot (can be turned on again though)"
52-
echo " - GUI shutdown in Oxide doesn't work"
53-
echo " - Wacom stylus doesn't work in Xochitl (works everywhere else though)"
54-
echo " - No OTG control support"
62+
linux-mainline-perf() {
63+
pkgdesc="Linux profiling with performance counters"
64+
url=https://perf.wiki.kernel.org
65+
section=devel
66+
67+
package() {
68+
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/tools/perf/perf
69+
ln -s /opt/bin/perf "$pkgdir"/opt/bin/trace
70+
}
5571
}

package/linux-stracciatella/package

Lines changed: 45 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,14 @@
33
# SPDX-License-Identifier: MIT
44

55
archs=(rm1 rm2)
6-
pkgnames=(linux-stracciatella)
7-
pkgdesc="RemarkableAS's vanilla kernel with a few extra flakes"
8-
url=https://github.com/Etn40ff/linux-remarkable
6+
pkgnames=(linux-stracciatella linux-stracciatella-perf)
97
pkgver=5.4.70-2
108
timestamp=2022-09-26T21:23:39Z
11-
section="kernel"
129
maintainer="Salvatore Stella <[email protected]>"
1310
makedepends=(build:flex build:bison build:libssl-dev build:bc build:lzop build:libgmp-dev build:libmpc-dev build:kmod)
1411
license=GPL-2.0-only
1512
flags=(nostrip)
16-
installdepends=(kernelctl)
13+
1714
image=base:v2.3
1815
source=(https://github.com/Etn40ff/linux-remarkable/archive/41121ea10ed2235c441cfe717461988859d7f5b6.tar.gz)
1916
sha256sums=(ade87a10bfa7069222cbf8eb1d00ca460d38aab9685223d2fa3ee4f363a75cfa)
@@ -25,35 +22,54 @@ build() {
2522
ARCH=arm make zero-sugar_defconfig
2623
fi
2724
ARCH=arm make -j8
25+
ARCH=arm make -j8 tools/perf
2826
}
2927

30-
package() {
31-
# Prepare files for the kernel archive
32-
local staging="$srcdir"/staging
33-
mkdir -p "$staging/boot"
28+
linux-stracciatella() {
29+
pkgdesc="RemarkableAS's vanilla kernel with a few extra flakes"
30+
url=https://github.com/Etn40ff/linux-remarkable
31+
section="kernel"
32+
installdepends=(kernelctl)
3433

35-
cp --no-dereference {"$srcdir"/arch/arm,"$staging"}/boot/zImage
36-
if [[ $arch = rm1 ]]; then
37-
cp --no-dereference "$srcdir"/arch/arm/boot/dts/zero-gravitas.dtb "$staging"/boot/zero-gravitas.dtb
38-
elif [[ $arch = rm2 ]]; then
39-
cp --no-dereference "$srcdir"/arch/arm/boot/dts/zero-sugar.dtb "$staging"/boot/zero-sugar.dtb
40-
fi
34+
package() {
35+
# Prepare files for the kernel archive
36+
local staging="$srcdir"/staging
37+
mkdir -p "$staging/boot"
4138

42-
ARCH=arm make -C "$srcdir" modules_install INSTALL_MOD_PATH="$staging"
43-
rm "$staging"/lib/modules/*/{source,build}
39+
cp --no-dereference {"$srcdir"/arch/arm,"$staging"}/boot/zImage
40+
if [[ $arch = rm1 ]]; then
41+
cp --no-dereference "$srcdir"/arch/arm/boot/dts/zero-gravitas.dtb "$staging"/boot/zero-gravitas.dtb
42+
elif [[ $arch = rm2 ]]; then
43+
cp --no-dereference "$srcdir"/arch/arm/boot/dts/zero-sugar.dtb "$staging"/boot/zero-sugar.dtb
44+
fi
4445

45-
# Create the kernel archive
46-
local archive="stracciatella-${pkgver%-*}.tar.bz2"
47-
install -d "$pkgdir"/opt/usr/share/kernelctl
48-
(cd "$staging" && tar --owner root:0 --group root:0 --mtime=$timestamp \
49-
-cjf "$pkgdir"/opt/usr/share/kernelctl/"$archive" boot/* lib/modules/*)
46+
ARCH=arm make -C "$srcdir" modules_install INSTALL_MOD_PATH="$staging"
47+
rm "$staging"/lib/modules/*/{source,build}
48+
49+
# Create the kernel archive
50+
local archive="stracciatella-${pkgver%-*}.tar.bz2"
51+
install -d "$pkgdir"/opt/usr/share/kernelctl
52+
(cd "$staging" && tar --owner root:0 --group root:0 --mtime=$timestamp \
53+
-cjf "$pkgdir"/opt/usr/share/kernelctl/"$archive" boot/* lib/modules/*)
54+
}
55+
56+
configure() {
57+
if [[ $(< /etc/version) -le 20210709090000 ]]; then
58+
echo "WARNING: Your system is too old; this kernel will most likely not work unless you add the appropriate firmware blobs to /lib/firmware."
59+
echo "Please consider updating your system instead."
60+
fi
61+
echo "The new kernel files have been copied, but not installed."
62+
echo "Please use kernelctl to select the kernel to boot."
63+
}
5064
}
5165

52-
configure() {
53-
if [[ $(< /etc/version) -le 20210709090000 ]]; then
54-
echo "WARNING: Your system is too old; this kernel will most likely not work unless you add the appropriate firmware blobs to /lib/firmware."
55-
echo "Please consider updating your system instead."
56-
fi
57-
echo "The new kernel files have been copied, but not installed."
58-
echo "Please use kernelctl to select the kernel to boot."
66+
linux-stracciatella-perf() {
67+
pkgdesc="Linux profiling with performance counters"
68+
url=https://perf.wiki.kernel.org
69+
section=devel
70+
71+
package() {
72+
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/tools/perf/perf
73+
ln -s /opt/bin/perf "$pkgdir"/opt/bin/trace
74+
}
5975
}

package/perf/package

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)