Skip to content

Instantly share code, notes, and snippets.

@LuKePicci
LuKePicci / bcmspu-testing.txt
Last active May 23, 2020 01:14
bcmspu.ko spudd impl3 for BCM63138 on Homeware 18.3 Linux 4.1.38: testing strongswan 5.6.3 IPsec IKEv2
root@OpenWrt:/tmp# insmod bcmspu.ko && dmesg
[ 301.979565] Creating CPU ring for queue number 2 with 256 packets descriptor=0xbef459f4, size_of_entry 16
[ 301.979638] Done initializing Ring 2 Base=0xe0843000 End=0xe0844000 calculated entries= 256 RDD Base=c3f000K descriptor=0xbef459f4
root@OpenWrt:~# lsmod | grep bcmspu
bcmspu 19529 2
bdmf 1231462 11 bcmspu,dhd,wfd,bcm_enet,pktrunner,bcmxtmrtdrv,bcm_spdsvc,rdpa_cmd,rdpa_mw,rdpa,rdpa_gpl
rdpa_gpl 15152 11 bcmspu,dhd,wfd,bcm_enet,pktrunner,bcm_ingqos,bcmxtmrtdrv,bcm_spdsvc,rdpa_cmd,rdpa_mw,rdpa
root@OpenWrt:/tmp# ls /dev/spu*
#!/bin/sh
CANAME="My Own Trusted Members CA"
CAORG="MyNetwork"
CACOUNTRY="IT"
SERVERNAME=yourserver.domain.net
# Build CA Keys + Cert
ipsec pki --gen --outform pem > caKey.pem
ipsec pki --self --in caKey.pem --dn "C=${CACOUNTRY}, O=${CAORG}, CN=${CANAME}" --ca --outform pem > caCert.pem
echo "> Exporting CA keys"
#!/bin/sh
. /rom/usr/sbin/random_seed
mount_root() {
if [ -x /sbin/mount_root-mod ]; then
/sbin/mount_root-mod
else
echo "****************************************************"
echo "* NO mount_root-mod program found *"
echo "* can not mount the modroot filesystem *"
mount_root() {
if [ -x /sbin/mount_root-mod ]; then
/sbin/mount_root-mod
else
echo "****************************************************"
echo "* NO mount_root-mod program found *"
echo "* can not mount the modroot filesystem *"
echo "****************************************************"
fi
}
#!/bin/sh
ubi_num=
find_mtd_part() {
local PART=$(awk -F: "/$1/{print \$1}" /proc/mtd)
if [ ! -z "$PART" ]; then
PART="${PART##mtd}"
if [ ! -z "$PART" ]; then