Initial: BESser umbrella for BES2600 driver mainlining
Sets up the BES2600 mainlining work tree with: - README: project overview, hardware target, driver lineage (CW1200 -> Bestechnic -> arjan-vlek -> Mobian/danctnix), patch series status, repo map, build/deploy workflow. - patches/: c1 patch generated by git format-patch from marfrit/bes2600-dkms branch bes2600/factory-request-firmware (checkpatch.pl --no-tree --strict: 0 errors / 0 warnings / 0 checks). - scripts/: build-bes2600-on-ohm.sh, deploy-c1-to-ohm.sh, backup-ohm-kernel.sh - reproducible build + deploy + backup. - fw-analysis/: per-blob strings.txt + fnnames.txt extracted from the 4 firmware blobs pulled from ohm 2026-04-21. Source binaries NOT committed (Bestechnic-proprietary). - notes/: observed-bugs.md (4 known bug surfaces with file:line + patch-series cross-reference), source-map.md (every public driver source variant + their canonical role). Companion work tree: marfrit/bes2600-dkms (Mobian DKMS fork) at git.reauktion.de. Signed-off-by: Markus Fritsche <fritsche.markus@gmail.com>
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
# Snapshot kernel + modules + bes2600 firmware from ohm into ~/backup/.
|
||||
#
|
||||
# Per feedback_backup_before_replace.md: always backup before replacing
|
||||
# kernel/modules/configs, with versioned labels.
|
||||
|
||||
set -e
|
||||
|
||||
TS=$(date +%Y%m%d-%H%M%S)
|
||||
KVER=$(uname -r)
|
||||
DEST=/home/mfritsche/backup
|
||||
mkdir -p ${DEST}
|
||||
|
||||
OUT=${DEST}/ohm-kernel-${KVER}-${TS}.tar.zst
|
||||
|
||||
echo "=== Sizes ==="
|
||||
sudo du -sh /boot /lib/modules/${KVER} /lib/firmware/bes2600
|
||||
|
||||
echo "=== Tar ==="
|
||||
sudo tar --use-compress-program='zstd -3' \
|
||||
-cf "${OUT}" \
|
||||
-C / boot lib/modules/${KVER} lib/firmware/bes2600
|
||||
sudo chown $(id -un):$(id -gn) "${OUT}"
|
||||
|
||||
echo "=== Result ==="
|
||||
ls -lah "${OUT}"
|
||||
zstd -t "${OUT}" 2>&1 | tail -1
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
# Native aarch64 build of bes2600 driver on ohm.
|
||||
#
|
||||
# Requires linux-pinetab2-headers package installed:
|
||||
# sudo pacman -S --noconfirm linux-pinetab2-headers
|
||||
#
|
||||
# Source tree expected at /home/mfritsche/bes2600-build/ — populate via:
|
||||
# tar -C ~/src/besser/linux-pinetab2/drivers/staging/bes2600 -cf - . | \
|
||||
# ssh mfritsche@ohm.vpn 'mkdir -p ~/bes2600-build && tar -C ~/bes2600-build -xf -'
|
||||
#
|
||||
# (Mobian DKMS layout works too if you point at the bes2600/ subdir.)
|
||||
|
||||
set -e
|
||||
|
||||
cd /home/mfritsche/bes2600-build || { echo "no source tree at /home/mfritsche/bes2600-build"; exit 1; }
|
||||
[ -f Makefile ] || { echo "no Makefile in source tree"; exit 1; }
|
||||
|
||||
# Clean stale root-owned files (in case sudo-make left some)
|
||||
sudo -n chown -R mfritsche:mfritsche . 2>/dev/null || true
|
||||
make clean
|
||||
|
||||
# Native parallel build (4 cores on ohm)
|
||||
make -j4
|
||||
|
||||
# Strip to manageable size + report
|
||||
strip --strip-debug bes2600.ko -o bes2600.stripped.ko
|
||||
ls -lh *.ko
|
||||
modinfo bes2600.stripped.ko | grep -E 'srcversion|vermagic'
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
# Deploy a built bes2600 module to /lib/modules/<ver>/extra/ on ohm.
|
||||
#
|
||||
# This is the SAFE deploy path: no live module reload (which can wedge
|
||||
# the chip per Pine64 known issues), just persistent install + reboot.
|
||||
#
|
||||
# Run on ohm. Modules expected built at /home/mfritsche/bes2600-build/.
|
||||
|
||||
set -e
|
||||
|
||||
KVER=$(uname -r)
|
||||
EXTRA=/lib/modules/${KVER}/extra
|
||||
STAGING=/lib/modules/${KVER}/kernel/drivers/staging/bes2600
|
||||
|
||||
cd /home/mfritsche/bes2600-build
|
||||
[ -f bes2600.stripped.ko ] || [ -f bes2600.ko ] || { echo "no bes2600.ko built"; exit 1; }
|
||||
|
||||
NEW=$( [ -f bes2600.stripped.ko ] && echo bes2600.stripped.ko || echo bes2600.ko )
|
||||
|
||||
echo "=== Backup originals (idempotent) ==="
|
||||
sudo cp -np ${STAGING}/bes2600.ko.zst ${STAGING}/bes2600.ko.zst.pre-deploy.bak 2>&1 || true
|
||||
sudo cp -np ${STAGING}/bes2600_btuart.ko.zst ${STAGING}/bes2600_btuart.ko.zst.pre-deploy.bak 2>&1 || true
|
||||
ls -la ${STAGING}/
|
||||
|
||||
echo "=== Install patched modules to /extra/ ==="
|
||||
sudo install -D -m644 ${NEW} ${EXTRA}/bes2600.ko
|
||||
[ -f bes2600_btuart.ko ] && sudo install -D -m644 bes2600_btuart.ko ${EXTRA}/bes2600_btuart.ko
|
||||
sudo depmod -a
|
||||
ls -la ${EXTRA}/
|
||||
|
||||
echo "=== Verify modprobe will pick our build ==="
|
||||
modinfo bes2600 | grep -E 'filename|srcversion'
|
||||
modinfo bes2600_btuart | grep -E 'filename|srcversion'
|
||||
|
||||
echo
|
||||
echo "Deploy complete. Reboot to load the new module:"
|
||||
echo " sudo reboot"
|
||||
echo
|
||||
echo "Rollback if anything breaks:"
|
||||
echo " sudo rm ${EXTRA}/bes2600*.ko && sudo depmod -a && sudo reboot"
|
||||
Reference in New Issue
Block a user