imagebuilder@today~idle-w-triple-default-passive-heatsink
compiler: aarch64-openwrt-linux-musl-gcc -fPIC -pthread -Wa,--noexecstack -Wall -O3 -Os -pipe -fno-caller-saves -fno-plt -fhonour-coptsT
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
aes-128-cbc 37823.40k 40704.68k 41817.86k 42117.80k 42207.91k 42216.11k
trendy
May 20, 2020, 10:53am
106
Have you overclocked the RPi4? Or have you added some software crypto? I also don't understand the difference among my results, yours, and jeff1's.
yet to try... i'm guessing it's just thermal /power scaling variance... ( edit: ramp up from idle vs just ran the command 6 seconds ago... so already at full speed ) takes it a few seconds to kick from 600000 > 1500000
i.e. the better the cooler , the less scaling, the higher the numbers...
so...
trendy:
15173.81k
this is no cooler at all?
trendy
May 20, 2020, 11:00am
108
I have a passive cooler casing. I was monitoring the temperature during the tests and it never deviated from 44-45°.
2 Likes
krazeh
May 20, 2020, 11:16am
109
Have just got these results from my RPi4. Running a build compiled from master 3 days ago. Temperature between 47-50°.
root@RPi4:~# openssl speed -evp aes-128-cbc -elapsed
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-128-cbc for 3s on 16 size blocks: 7077208 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 64 size blocks: 1891628 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 256 size blocks: 485248 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 1024 size blocks: 122912 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 8192 size blocks: 15324 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 16384 size blocks: 7669 aes-128-cbc's in 3.00s
OpenSSL 1.1.1g 21 Apr 2020
built on: Sun Apr 26 12:19:33 2020 UTC
options:bn(64,64) rc4(char) des(int) aes(partial) blowfish(ptr)
compiler: aarch64-openwrt-linux-musl-gcc -fPIC -pthread -Wa,--noexecstack -Wall -O3 -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -fpic -ffunction-sections -fdata-sections -znow -zrelro -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DNDEBUG -DOPENSSL_SMALL_FOOTPRINT
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
aes-128-cbc 37745.11k 40354.73k 41407.83k 41953.96k 41844.74k 41882.97k
root@RPi4:~# openssl speed aes-128-cbc
Doing aes-128 cbc for 3s on 16 size blocks: 13301874 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 64 size blocks: 3529666 aes-128 cbc's in 2.99s
Doing aes-128 cbc for 3s on 256 size blocks: 913143 aes-128 cbc's in 2.99s
Doing aes-128 cbc for 3s on 1024 size blocks: 228576 aes-128 cbc's in 2.99s
Doing aes-128 cbc for 3s on 8192 size blocks: 28826 aes-128 cbc's in 2.99s
Doing aes-128 cbc for 3s on 16384 size blocks: 14402 aes-128 cbc's in 2.99s
OpenSSL 1.1.1g 21 Apr 2020
built on: Sun Apr 26 12:19:33 2020 UTC
options:bn(64,64) rc4(char) des(int) aes(partial) blowfish(ptr)
compiler: aarch64-openwrt-linux-musl-gcc -fPIC -pthread -Wa,--noexecstack -Wall -O3 -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -fpic -ffunction-sections -fdata-sections -znow -zrelro -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DNDEBUG -DOPENSSL_SMALL_FOOTPRINT
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
aes-128 cbc 70943.33k 75551.38k 78182.14k 78281.55k 78977.46k 78917.18k
looking like ramp-up factor
echo 45 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
trendy
May 20, 2020, 12:39pm
111
No significant difference. Maybe there were some updates since the 14/Feb image I am running.
1 Like
this may be of use to someone... really hackorific ...wip;
imagebuilderscr
#!/bin/bash
D="`date +%Y%m%d-%H%M`" #ecmd D="$(date +%Y%m%d-%H%M)" #D="`date +%Y%m%d-%H%M%S`"
sepL="||||||||||||||||||||||||||||||||||||||||||||||||"
sepS="||||<>||||"
sepI="||>"
owrt="https://downloads.openwrt.org"
IBMOD=1
RPI4uart2=1
allparams="${*}"
H="${HOSTNAME}"
dbgthresh=${dbgthresh:-3}
##########################
s="1"
slpA=1; slpB=2; slpC=3
dolog="${dolog:-n}"
logall="${logall:-n}"
logthresh="3"
dbglvld="1"
dbglvl=1
logynd="n"
logfiled="./$0.`date +%y%m%d-%H%M`.log"
dodebug="n"
debugALL="y"
silenceECMD="n"
logD="$PWD/logs"; mkdir -p $logD
ecmd() {
dE="`date +%Y%m%d-%H%M%S`"
if [ -z "$logD" ]; then
logD="$PWD/logs"; mkdir -p $logD
echo "logD no default -> using $logD"; sleep 1
fi
if [ "$silenceECMD" == "y" ]; then set +x; fi
if [ "$1" == "-n" ]; then
echo "ECMD-with-n: ${*}"
echdo="echo -n " && shift 1
else
echdo="echo "
fi
if [ ! "$#" -eq 3 ]; then echo ""; echo "ecmd with non-3-params: ${*}"; echo ""; sleep 5; fi
ecmdstat=
if [ -z "$2" ]; then
logF "no:$# full:$*" "${logD}/log-ecmd-withnoparam2.log"
eslp=$s;
ecmdstat="$ecmdstat Seslp:${eslp}"
else
if [ "$2" -eq 0 ] || [ "$2" -lt 10 ]; then
eslp=$2
else
logF "no:$# full:$* params:$2" "${logD}/log-ecmd-param2-not0-10.log"
eslp=$s;
ecmdstat="$ecmdstat Ss:${eslp}"
fi
fi
if [ -z "$3" ]; then
dbglvl=$dbglvld #No param 3 so set dbvlvl-aka-msglvl to topvar $dbglvld
ecmdstat="$ecmdstat Dzvlvd:${dbglvld}"
logF "no:$# full:$*" "${logD}/log-ecmd-param3-z.log"
else
if [ "$3" -eq 0 ] || [ "$3" -lt 23 ]; then
dbglvl=$3;
logF "no:$# full:$* params:$2" "${logD}/log-ecmd-allmsgs-0-10.log"
else
dbglvl=$dbglvld; #wasnt a number 0-23 also set to topvar dbglvld
ecmdstat="$ecmdstat Dn0-23:${3}"
logF "no:$# full:$* params:$2" "${logD}/log-ecmd-param3-not0-10.log"
fi
fi
if [ "$dbglvl" -lt "$dbgthresh" ] || [ "$dbglvl" -eq "$dbgthresh" ]; then
$echdo "${1}"
if [ "$logyn" == "y" ]; then
$echdo "232-6:::D$dbglvl:${1}" >> $logfiled
fi
sleep $eslp
fi
if [ "$logall" == "y" ]; then
$echdo "D$dbglvl:L`wc -l ${logD}/ecmd.all 2>/dev/null`:M${1}" >> ${logD}/ecmd.all
logF "$ecmdstat ${*}" "${logD}/ecmd.log-allmessages-with-verbosestat.log"
fi
if [ "$silenceECMD" == "y" ]; then set -x; fi
}
logF() {
if [ "$logall" = "n" ]; then
return 0
fi
echo "${*}" >> "${2}"
}
usage() {
cat <<EOF
$0 <profile> <release>
########################################################
$0 rpi-4 snapshot
EOF
}
case "$1" in
rpi-4)
PROFILE="rpi-4"
case "$2" in
snapshot) VERSION="snapshot"
iburl="$owrt/snapshots/targets/bcm27xx/bcm2711/openwrt-imagebuilder-bcm27xx-bcm2711.Linux-x86_64.tar.xz"
;;
*) echo Unknown release; usage; exit; ;;
esac
;;
*) echo Unknown model; usage; exit; ;;
esac
PROFILEn="$1" # script name # case above semi handles if -z 1 or 2...
#PROFILE set above is ibname
#BOARD is on board name
ib_archive_name="$(basename $iburl)"
iburlD=$(echo $iburl | sed "s|/${ib_archive_name}||g")
UibFsig="$iburlD/sha256sums"
ib_cache="$PWD/cache"; mkdir -p $ib_cache
ibarchiveC="$ib_cache/$ib_archive_name"
sigstore="$ib_cache/sigstore"
ib_dir="$PWD/$PROFILEn/imagebuilder-$VERSION";
ib_root="$PWD"
PACKAGESdefault="luci bash lsof strace wget curl unzip"
if [ "$3" = "regen" ]; then
echo "force regenerate ib_dir (regen)"; sleep 2
IBREGENERATE=1
fi
showsummary() {
ecmd "" 0 2
#echo " $sepL $D"
ecmd " ib_cache: $ib_cache" 0 3
ecmd " ib_dir: $ib_dir" 0 3
ecmd " $sepL" 0 2
ecmd " PROFILEn: $PROFILEn (scriptname)" 0 2
ecmd " PROFILE: $PROFILE (ibname)" 0 2
ecmd " BOARD: $BOARD (onboard-fullname: $MODEL)" 0 2
ecmd " VERSION: $VERSION" 0 2
ecmd " iburl: $(echo $iburl | sed "s|${owrt}/||g")" 0 3
ecmd " iburlD: $(echo $iburlD | sed "s|${owrt}/||g")" 0 5
ecmd " UibFsig: $(echo $UibFsig | sed "s|${owrt}/||g")" 0 5
ecmd " ib_archive_name: $ib_archive_name" 0 2
ecmd " $sepL" 0 2
ecmd " pkgtxtD: $(echo $ib_packagetxt | sed "s|${ib_root}/||g")" 0 2
ecmd " output: $(echo $BIN_DIR | sed "s|${ib_root}/||g")" 0 2
ecmd "" 2 2
}
downloadibarchive() {
FN="downloadibarchive"; ecmd "$FN> ${*}" 2 6
ecmd "$sepL download" 0 5
ecmd " get: $1" 0 5
ecmd " to: $2" 0 5
ecmd " cache: $3" 0 5
ecmd "$sepL" 2 5
#wget -nv --show-progress $1 -O $2 2&>1 >/dev/null || (echo "download failed" && return 1)
wget -nv --show-progress $1 -O $2 2>&1 >/dev/null || (echo "download failed" && return 1)
return 0
}
checksig() {
FN="checksig"; #echo "$FN> ${*}"; sleep 2
ecmd "$sepL checksig" 0 6
ecmd " filename: $1" 0 6
ecmd " cache: $2" 0 6
ecmd " sigurl: $3" 0 6
ecmd " sigstore: $4" 0 6
ecmd "$sepL" 0 6
onlinesigF=$(curl $3 2>/dev/null | grep $1)
if [ -z "$onlinesigF" ]; then
echo "Unable get online signature: $3" && exit 1
fi
onlinesig=$(echo $onlinesigF | cut -d' ' -f1)
if ! grep -q "$1" $sigstore; then
echo "sigcheck: this signature is brand new"
echo "$onlinesigF" >> $4
POPULATEIBDIR=1
return 0
fi
offlinesigF=$(cat $4 | grep $1)
if [ ! -z "$offlinesigF" ]; then
offlinesig=$(echo $offlinesigF | cut -d' ' -f1)
fi
ecmd " online signature: $onlinesig" 0 3
ecmd "offline signature: $offlinesig" 0 3
if [ -z "$offlinesigF" ]; then
echo "$onlinesigF" >> $4
fi
if [ "$offlinesig" = "$onlinesig" ]; then
ecmd "$1 is current" 0 3
return 0
fi
if [ "$offlinesig" != "$onlinesig" ]; then
echo "$1 is notcurrent"
sed -i -e "s|${offlinesig}|${onlinesig}|g" $4
return 1
fi
echo "hitbase"; exit 1
}
getibrpi() { FN="getibrpi"; ecmd "$FN> ${*}" 2 5
ibarchiveCS=$(echo $ibarchiveC | sed "s|${ib_root}/||g")
ecmd "$sepS Checking for ib archive in cache" 2 2
if [ ! -f "$ibarchiveC" ]; then
echo "ibarchiveC: $ibarchiveCS [new]"
downloadibarchive "$iburl" "$ibarchiveC" "$ib_cache" #need $?
POPULATEIBDIR=1
else
echo "ibarchiveC: $ibarchiveCS [exist]"
fi
if ! checksig "$ib_archive_name" "$ib_cache" "$UibFsig" "$sigstore"; then
echo "$sepS Signature is changed"
downloadibarchive "$iburl" "$ibarchiveC" "$ib_cache" #need $?
POPULATEIBDIR=1
else
echo "$sepS Signature is ok"
fi
}
populateibdir() { FN="populateibdir"; ecmd "$FN> ${*}" 2 5
if [ ! -z "$POPULATEIBDIR" ]; then
rm -rf $ib_dir 2>/dev/null ; mkdir -p $ib_dir
echo "Extracting $ib_archive_name [populate-set]"; sleep 2
(cd $ib_dir; tar Jxf "$ib_cache/$ib_archive_name" --strip=1 --overwrite)
elif [ "$(ls -l $ib_dir | wc -l)" -lt 2 ]; then #echo "WHATISTHIS: $(ls -l $ib_dir | wc -l)"; sleep 5
echo "POPULATEIPDIR its EMPTY FORCE EXTRACT"; sleep 2
rm -rf $ib_dir 2>/dev/null ; mkdir -p $ib_dir
echo "Extracting $ib_archive_name [dir-is-empty]"; sleep 2
(cd $ib_dir; tar Jxf "$ib_cache/$ib_archive_name" --strip=1 --overwrite)
else
echo "Extracting $ib_archive_name [default-handle]"; sleep 2
ecmd "$FN> rm -rf $ib_dir" 1 5
rm -rf $ib_dir 2>/dev/null; mkdir -p $ib_dir
(cd $ib_dir; tar Jxf "$ib_cache/$ib_archive_name" --strip=1 --overwrite)
fi
}
pkglisttovarsourceV2() {
if [ -z "$1" ]; then
psearchdir="$PWD"
else
psearchdir="$1"
fi
pkgsTL="/tmp/$DEVICEUNIQ.oneline.txt"
rm $pkgsTL 2>/dev/null
gotpackages=0
if [ -d "$psearchdir" ]; then
echo " searchdir: $psearchdir [ok]"
else
echo " searchdir: $psearchdir [nodir]" && sleep 2 && return 2
fi
echo -n "export PACKAGES=\"" > $pkgsTL
if [ ! -f "$psearchdir/packages.txt" ]; then
ecmd "No custom package list found $psearchdir/packages.txt" 1 1 #return 0
else
pkgADDnum=`cat $psearchdir/packages.txt | grep -v '^#' | wc -w`
echo "Found: $psearchdir/packages.txt ($pkgADDnum)"; sleep 1
if [ "$pkgADDnum" -gt 0 ]; then
gotpackages=$((gotpackages+$pkgADDnum));
fi
cat $psearchdir/packages.txt | while read PKG THEREST; do
if [ "$(echo "$PKG" | wc -c)" -lt 2 ]; then continue; fi
echo $PKG | grep -q '^#' && continue
echo -n "$PKG " >> $pkgsTL
#echo "$PKG "; sleep 1
done
fi
if [ ! -f "$psearchdir/packagesrem.txt" ]; then
ecmd "No custom package rem list found: $psearchdir/packagesrem.txt" 1 1
else
pkgREMnum=`cat $psearchdir/packagesrem.txt | grep -v '^#' | wc -w`
echo "Found: $psearchdir/packagesrem.txt ($pkgREMnum)"; sleep 1
if [ "$pkgREMnum" -gt 0 ]; then
gotpackages=$((gotpackages+$pkgREMnum))
fi
cat $psearchdir/packagesrem.txt | while read PKG THEREST; do
if [ "$(echo "$PKG" | wc -c)" -lt 2 ]; then continue; fi
echo $PKG | grep -q '^#' && continue
echo -n "-$PKG " >> $pkgsTL
#echo "-$PKG "; sleep 1
done
fi
echo "\"" >> $pkgsTL
if [ "$gotpackages" -eq 0 ]; then echo "no packages in files"; return 0; fi
. $pkgsTL; ecmd "sourcing $gotpackages packages: $PACKAGES" 0 3; ecmd "" 2 3; rm $pkgsTL 2>/dev/null
}
writesamplepackages() {
FN="writesamplepackages"
cat <<EOF
wget
######################################
kmod-leds-gpio ###+++
kmod-ledtrig-transient
######################################
dtc
######################################
setserial
coreutils-stty
kmod-usb-serial-ftdi
######################################
iptables-mod-geoip
xz
######################################
atftpd
######################################
collectd-mod-thermal
collectd-mod-irq
collectd-mod-conntrack
conntrack
######################################
file
blkid
######################################
-wpad-basic
#wpad
wpad-openssl
zoneinfo-australia-nz
#######################################
kmod-usb-net-rtl8152 #UE300 usb3 gigabit nic
kmod-usb-net-asix-ax88179
#######################################
kmod-usb-net-pegasus #usb2 100M ethernet
#######################################
#kmod-usb-net-ipheth #AppleiPhoneUSBEthernetdriver
#usbmuxd
#libimobiledevice
#####################usbutils
#######################################
kmod-usb-net
kmod-usb-net-cdc-ether # for android tethering
kmod-usb-net-rndis #RNDIS connections
#######################################
-dnsmasq
dnsmasq-full
#######################################
block-mount
#######################################
ipset
#######################################
at
#######################################
bash
lsof
htop
diffutils
vim-fuller
#######################################
unzip
unrar
rsync
#######################################
#bind-dig
nmap
strace
tcpdump
usbutils
pciutils #lspci
openssl-util
#openssl-util
inotifywatch
#######################################
luci
luci-app-commands
luci-app-uhttpd
luci-app-sqm
luci-app-travelmate
luci-app-adblock
adblock
#######################################
banip
luci-app-banip
#######################################
sqm-scripts
sqm-scripts-extra
luci-app-sqm
#######################################
nlbwmon
luci-app-nlbwmon
#######################################
p910nd
luci-app-p910nd
#######################################
-ppp
-ppp-mod-pppoe
######################################
kmod-wireguard
luci-app-wireguard
######################################
openvpn-openssl
kmod-tun
luci-app-openvpn
openvpn-easy-rsa
vpn-policy-routing
luci-app-vpn-policy-routing
######################################
kmod-veth
######################################
iperf3
iptraf-ng
block-mount
fdisk
losetup
ntfs-3g
ntfs-3g-utils
######################################
irqbalance
minicom
#######################################
samba4-server
samba4-utils
luci-app-samba4
openssh-client #for cisco access
#######################################
#kmod-fs-vfat
EOF
case "$PROFILEn" in
rpi-4)
cat <<EOF
################################################################################
#Target: "brcm2708/bcm2711"
#Device: rpi-4
#######################################
-ip-tiny
ip-full
luci-app-nft-qos
#######################################
file
#######################################
atftpd
#######################################
collectd-mod-thermal
collectd-mod-irq
collectd-mod-conntrack
conntrack
#######################################
kmod-leds-gpio
kmod-ledtrig-default-on
kmod-ledtrig-gpio
kmod-ledtrig-heartbeat
kmod-ledtrig-netdev
kmod-ledtrig-oneshot
kmod-ledtrig-timer
kmod-ledtrig-transient
#######################################
luci-app-statistics
collectd-mod-network
collectd-mod-exec
collectd-mod-sqm
######################################
python3
######################################## OTG - pi as an ethernet device
kmod-usb-dwc2
kmod-usb-gadget-eth
#add dtoverlay=dwc2 to /boot/config.txt
######################################
#opkg install ntp-utils $ntpq[] peer
#kmod-fs-vfat
#python3-light
######## note: pppd already there #kmod-ppp rp-pppoe-server ppp
######################################
#kmod-bluetooth
#bluez-utils
#bluez-utils-extra
####################bluez-daemon
################################################################################## 4b-device-only
###############################################################
#kmod-tulip - 5.4.38-1 - Kernel modules for the Tulip family of network cards
#kmod-usb-net-pegasus - 5.4.38-1 - Kernel module for USB-to-Ethernet Pegasus convertors
#usb-wlan-EDIMAX EW-7811UN rtl8192cu
################################################# USB-to-Ethernet ASIX AX88179 based USB 3.0/2.0 to Gigabit Ethernet
#kmod-usb-net-asix-ax88179
#kmod-rtl8812au-ct - 5.4.38+2020-01-12-e0d586aa-2 - Driver for Realtek 8812 AU devices comfast 912-ac, etc
#kmod-usb-net-rtl8150 - 5.4.38-1 - Kernel module for USB-to-Ethernet Realtek 8150 convertors
#kmod-usb-net-rtl8152 - 5.4.38-1 - Kernel module for USB-to-Ethernet Realtek 8152 USB2.0/3.0 convertors
#kmod-usb-net-smsc95xx - 5.4.38-1 - Kernel module for SMSC LAN95XX based devices
EOF
;;
esac
}
sourcepackagelists() {
FN="sourcepackagelists"
if [ ! -f "$ib_packagetxt/packages.txt" ]; then
echo "Writing sample $ib_packagetxt/packages.txt"; sleep 2;
writesamplepackages > "$ib_packagetxt/packages.txt"
fi
if [ -z "$PACKAGES" ]; then pkglisttovarsourceV2 "$ib_packagetxt"; fi
if [ -z "$PACKAGES" ]; then #optional1searchdir no 1 means ib_root/packages.txt
pkglisttovarsourceV2
else
ecmd "skipping ib_dir/packages.txt as PACKAGES has been set" 1 3
fi
if [ -z "$PACKAGES" ]; then
echo "sourcing packages.txt unsuccessful using PACKAGESdefault"; sleep 2
PACKAGES="$PACKAGESdefault";
fi
}
setupibdir() {
FN="setupibdir"
ib_dir_short=$(echo $ib_dir | sed "s|${ib_root}/||g")
if [ ! -z "$IBREGENERATE" ]; then
ecmd "$FN> ib_dir: $ib_dir_short [regenerate]" 1 2
rm -rf $ib_dir
else
ecmd "$FN> IBREGENERATE is Z" 1 5
fi
if [ ! -d "$ib_dir" ]; then
POPULATEIBDIR=1; ecmd "$FN> set POPULATEIBDIR=1" 1 5
ecmd "Creating ib_dir: $ib_dir_short [new]" 1 3; mkdir -p $ib_dir; return 0
else
ecmd "$FN> leave POPULATEIBDIR Z... $ib_dir_short [present]" 1 5
fi
return 0
}
filesassigndir() {
FN="filesassigndir"
ecmd "$sepL Searching for custom files" 2 2
if [ ! -z "$FILES" ]; then
ecmd "$FN> FILES [static]" 1 0; return 0
fi
for filesposs in $1; do
if [ ! -z "$FILES" ]; then
ecmd "$FN DBG> set to: $FILES" 2
return 0
fi
if [ -d "$filesposs" ]; then
FILES="$filesposs"; ecmd "files: $filesposs [ok]" 2 0
return 0
else
ecmd "files: $filesposs [nope]" 1 2
fi
done
if [ -z "$FILES" ]; then
ecmd "No files dir anywhere" 1 0
fi
}
modibpartsize() {
#1 new kernel partsize
#2 new rootfs partsize
echo ">>> Modding PARTSIZE"
IBCONFIGpsB=$(cat $IBCONFIG | grep '^CONFIG_TARGET_KERNEL_PARTSIZE' | cut -d'=' -f2)
IBCONFIGpsR=$(cat $IBCONFIG | grep '^CONFIG_TARGET_ROOTFS_PARTSIZE' | cut -d'=' -f2)
ecmd "kernelsize default: $IBCONFIGpsB > $1" 0 3
ecmd "rootfssize default: $IBCONFIGpsR > $2" 0 3
ecmd "" 2 3
echo "Modding PARTSIZE"
cat $IBCONFIG | grep PARTSIZE; sleep 2 #echo "cat $IBCONFIG | grep PARTSIZE";
sed -i s/CONFIG_TARGET_KERNEL_PARTSIZE=${IBCONFIGpsB}/CONFIG_TARGET_KERNEL_PARTSIZE=$1/ $IBCONFIG
sed -i s/CONFIG_TARGET_ROOTFS_PARTSIZE=${IBCONFIGpsR}/CONFIG_TARGET_ROOTFS_PARTSIZE=$2/ $IBCONFIG
cat $IBCONFIG | grep PARTSIZE; sleep 2 #echo "cat $IBCONFIG | grep PARTSIZE";
}
modimagebuilder() { FN="modimagebuilder"
if [ -z "$IBMOD" ]; then
ecmd "$sepL Modding imagebuilder [off]" 2 2; return 0
else
ecmd "$sepL Modding imagebuilder [on]" 2 2
fi
IBCONFIG="$ib_dir/.config"
if [ ! -f "$IBCONFIG" ]; then ecmd "no ib_dir/.config [no-mod]" 2 2; return 1; fi
case "$PROFILEn" in
*"rpi"*) ecmd "||| aarch64 / $PROFILEn mods" 1 0
modibpartsize "128" "384"
echo ">>> Modding ROOTFS_TARGZ"
cat $IBCONFIG | grep ROOTFS_TARGZ; sleep 1
sed -i s/'# CONFIG_TARGET_ROOTFS_TARGZ is not set'/CONFIG_TARGET_ROOTFS_TARGZ=y/ $IBCONFIG
cat $IBCONFIG | grep ROOTFS_TARGZ; sleep 1
IBrpiCONFIGtxt="$(find $ib_dir | grep 'config.txt$')" #target/linux/brcm2708/image/config.txt
IBrpiDISTROCONFIGtxt="$(find $ib_dir | grep 'distroconfig.txt$')" #target/linux/brcm2708/image/distroconfig.txt
IBrpiCMDLINEtxt="$(find $ib_dir | grep 'cmdline.txt$')" #target/linux/brcm2708/image/cmdline.txt
echo ">>> cmdline.txt"; #sleep 1
cat $IBrpiCMDLINEtxt 2>/dev/null
if [ ! -z "$IBrpiCMDLINEnew" ]; then
echo "$IBrpiCMDLINEnew" > $IBrpiCMDLINEtxt
cat $IBrpiCMDLINEtxt 2>/dev/null
fi
sleep 1
if [ ! -z "$RPI4uart2" ]; then
ecmd "Adding uart2 to cmdline at console=ttyAMA1,115200" 2 1
oldcmdline=$(cat $IBrpiCMDLINEtxt 2>/dev/null)
echo "console=ttyAMA1,115200 ${oldcmdline}" > $IBrpiCMDLINEtxt
cat $IBrpiCMDLINEtxt 2>/dev/null
fi
sleep 2
IBrpiCONFIGtxt="$(find $ib_dir | grep '/config.txt$')" #target/linux/brcm2708/image/cmdline.txt
ecmd "$(echo $IBrpiCONFIGtxt | sed "s|${ib_root}/||g")" 0 2
if [ ! -z "$RPI4uart2" ]; then
ecmd "Adding uart2 dtbo in config.txt" 2 1
echo "boot_delay=3" >> $IBrpiCONFIGtxt
echo "dtoverlay=uart2" >> $IBrpiCONFIGtxt
echo "#dtoverlay=led5" >> $IBrpiCONFIGtxt
cat $IBrpiCONFIGtxt
fi
sleep 2
if [ ! -z "$RPI4uart2" ]; then
ecmd "Adding uart 2: ttyAMA1::askfirst:/usr/libexec/login.sh to inittab" 2 1
mkdir -p $ib_dir/files/etc
cat <<'EOF' > $ib_dir/files/etc/inittab
::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K shutdown
::askconsole:/usr/libexec/login.sh
tty1::askfirst:/usr/libexec/login.sh
ttyAMA0::askfirst:/usr/libexec/login.sh
ttyAMA1::askfirst:/usr/libexec/login.sh
EOF
fi
sleep 2
IBrpiDISTROCONFIGtxt="$(find $ib_dir | grep 'distroconfig.txt$')" #target/linux/brcm2708/image/cmdline.txt
ecmd "$(echo $IBrpiDISTROCONFIGtxt | sed "s|${ib_root}/||g")" 0 2
sleep 2
;;
*)
echo "||> No mods for this IB_ARCH: $IB_ARCH or PROFILEn: $PROFILEn"; sleep 2
;;
esac
}
ib_packagetxt="$ib_root/$PROFILEn/$VERSION"; mkdir -p $ib_packagetxt
BIN_DIR="$PWD/$PROFILEn/binout/${PROFILEn}_${VERSION}_${D}"; mkdir -p $BIN_DIR
showsummary
getibrpi "$iburl"
setupibdir
populateibdir
ecmd "$sepL Sourcing package lists" 2 2
sourcepackagelists
FILESchkdirs="$PWD/$PROFILEn/$VERSION/files $PWD/$PROFILEn/files $PWD/files"
filesassigndir "$FILESchkdirs"
modimagebuilder
cd $ib_dir
echo ""
echo "$sepL running build"; sleep 2
echo "make image PROFILE=\"${PROFILE}\" PACKAGES=\"${PACKAGES}\" FILES=\"$FILES\" BIN_DIR=\"$BIN_DIR\""; sleep 2
echo "make image PROFILE=\"${PROFILE}\" PACKAGES=\"${PACKAGES}\" FILES=\"$FILES\" BIN_DIR=\"$BIN_DIR\"" > $ib_dir/rebuild.sh
chmod +x $ib_dir/rebuild.sh
echo "make image PROFILE=\"${PROFILE}\" PACKAGES=\"${PACKAGES}\" FILES=\"$FILES\" BIN_DIR=\"$BIN_DIR\"" > $ib_root/$PROFILEn/buildcommand.last
echo ""
make image PROFILE="${PROFILE}" PACKAGES="${PACKAGES}" FILES="$FILES" BIN_DIR="$BIN_DIR"; retval="$?"
if [ "$retval" -ne 0 ]; then
ecmd ">>>>>>>>>>>>>>> build fail <<<<<<<<<<<<<<<" 2 1
make info
echo "https://downloads.openwrt.org/snapshots/targets/"
exit 1
else
ecmd ">>>>>>>>>>>>>>> build success <<<<<<<<<<<<<<<" 2 1
fi
ecmd "$sepL how to flash" 2 1
case "$PROFILEn" in
rpi-4)
echo "cp $BIN_DIR/openwrt-bcm27xx-bcm2711-rpi-4-ext4-sysupgrade.img.gz $HOME/Desktop/"
cp $BIN_DIR/openwrt-bcm27xx-bcm2711-rpi-4-ext4-sysupgrade.img.gz $HOME/Desktop/
echo ""
echo "cd $BIN_DIR"
echo "gunzip openwrt-brcm27xx-bcm2711-rpi-4-ext4-factory.img.gz"
echo "sudo dd if=./openwrt-brcm27xx-bcm2711-rpi-4-ext4-factory.img of=/dev/sdX bs=2M"
(cd $BIN_DIR; gunzip openwrt-brcm27xx-bcm2711-rpi-4-ext4-factory.img.gz 2>/dev/null)
ls -1 $BIN_DIR | grep factory | grep ext4
;;
esac
echo ""; sleep 2
exit 0
jeff1
May 20, 2020, 4:36pm
113
Using Raspberry Pi 4 32 bits images makes the big differences,contrary to the expectations 64bits images performance is about ±10% less than 32 bits images in some benchmarks.
-----------------------------------------------------
OpenWrt SNAPSHOT, r11829-e3e939d8e6
-----------------------------------------------------
root@OpenWrt:/# uname -m
armv7l
root@OpenWrt:/# cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq
1500000
1500000
1500000
1500000
root@OpenWrt:/# openssl speed -evp aes-128-cbc -elapsed
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-128-cbc for 3s on 16 size blocks: 12804767 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 64 size blocks: 4055496 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 256 size blocks: 1078526 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 1024 size blocks: 275363 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 8192 size blocks: 34680 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 16384 size blocks: 17347 aes-128-cbc's in 3.00s
OpenSSL 1.1.1d 10 Sep 2019
built on: Sat Dec 28 20:28:09 2019 UTC
options:bn(64,32) rc4(char) des(long) aes(partial) blowfish(ptr)
compiler: arm-openwrt-linux-muslgnueabi-gcc -fPIC -pthread -Wa,--noexecstack -Wall -O3 -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -O3 -fpic -ffunction-sections -fdata-sections -znow -zrelro -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DNDEBUG -DOPENSSL_PREFER_CHACHA_OVER_GCM
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
aes-128-cbc 68292.09k 86517.25k 92034.22k 93990.57k 94699.52k 94737.75k
root@OpenWrt:/# openssl speed aes-128-cbc
Doing aes-128 cbc for 3s on 16 size blocks: 15279656 aes-128 cbc's in 2.99s
Doing aes-128 cbc for 3s on 64 size blocks: 4260671 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 256 size blocks: 1089709 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 1024 size blocks: 275318 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 8192 size blocks: 34559 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 16384 size blocks: 17286 aes-128 cbc's in 3.00s
OpenSSL 1.1.1d 10 Sep 2019
built on: Sat Dec 28 20:28:09 2019 UTC
options:bn(64,32) rc4(char) des(long) aes(partial) blowfish(ptr)
compiler: arm-openwrt-linux-muslgnueabi-gcc -fPIC -pthread -Wa,--noexecstack -Wall -O3 -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -O3 -fpic -ffunction-sections -fdata-sections -znow -zrelro -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DNDEBUG -DOPENSSL_PREFER_CHACHA_OVER_GCM
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
aes-128 cbc 81764.05k 90894.31k 92988.50k 93975.21k 94369.11k 94404.61k
root@OpenWrt:/#
trendy
May 20, 2020, 4:42pm
114
Thank you for the confirmation! Did you use the RPi2 image as you mentioned here ?
jeff1
May 20, 2020, 5:10pm
115
I use a compiled image with CONFIG_OPENSSL_OPTIMIZE_SPEED=y
Raspi4-32bits
1 Like
temp on prompt
#!/bin/sh
PS1='[\u@\h \W]\$ '
bash_prompt_command() {
local pwdmaxlen=20
local trunc_symbol=".."
local dir=${PWD##*/}
pwdmaxlen=$(( ( pwdmaxlen < ${#dir} ) ? ${#dir} : pwdmaxlen ))
NEW_PWD=${PWD/#$HOME/\~}
local pwdoffset=$(( ${#NEW_PWD} - pwdmaxlen ))
if [ ${pwdoffset} -gt "0" ]
then
NEW_PWD=${NEW_PWD:$pwdoffset:$pwdmaxlen}
NEW_PWD=${trunc_symbol}/${NEW_PWD#*/}
fi
local NONE="\[\033[0m\]" # unsets color to term's fg color
local K="\[\033[0;30m\]" # black
local R="\[\033[0;31m\]" # red
local G="\[\033[0;32m\]" # green
local Y="\[\033[0;33m\]" # yellow
local B="\[\033[0;34m\]" # blue
local M="\[\033[0;35m\]" # magenta
local C="\[\033[0;36m\]" # cyan
local W="\[\033[0;37m\]" # white
local EMK="\[\033[1;30m\]"
local DGREY="\[\033[1;30m\]"
local EMR="\[\033[1;31m\]"
local EMG="\[\033[1;32m\]"
local EMY="\[\033[1;33m\]" #BRIGHTYELLOW TCOL="\[\033[1;33m\]"
local EMB="\[\033[1;34m\]"
local EMM="\[\033[1;35m\]"
local EMC="\[\033[1;36m\]"
local EMW="\[\033[1;37m\]"
local BGK="\[\033[40m\]"
local BGR="\[\033[41m\]"
local BGG="\[\033[42m\]"
local BGY="\[\033[43m\]"
local BGB="\[\033[44m\]"
local BGM="\[\033[45m\]"
local BGC="\[\033[46m\]"
local BGW="\[\033[47m\]"
local UC=$G
local UC=$EMR
local VC=$Y
local DEG="`echo $'\xc2\xb0'`"
if [ -z "$sysTMP" ]; then
if [ -f /sys/devices/virtual/thermal/thermal_zone2/temp ]; then
sysTMP="/sys/devices/virtual/thermal/thermal_zone2/temp"
else
sysTMP="`find /sys | grep '/temp$' | head -n1`"
fi
export sysTMP
fi
if [ -f "$sysTMP" ]; then
TEMP="`cat $sysTMP 2>/dev/null | cut -c 1,2`"
if [ -z "$TEMP" ]; then #@@@ or not between 1 - 99?
TEMP=0
else
if [ "$TEMP" -gt 71 ]; then
TCOL="${R}"
elif [ "$TEMP" -gt 65 ]; then
TCOL="${EMR}"
elif [ "$TEMP" -gt 61 ]; then
TCOL="${EMY}"
elif [ "$TEMP" -gt 57 ]; then
TCOL="${Y}"
elif [ "$TEMP" -gt 52 ]; then
TCOL="${C}"
else
TCOL="${DGREY}"
fi
fi
else
TEMP="0"
fi
NEW_PWD="${NEW_PWD}"
[ $UID -eq "0" ] && VC=$R
local UC=$M
PS1="${DGREY}[${UC}\u${VC}@${NONE}${EMM}\h ${M}\${NEW_PWD}"
PS1="$PS1 ${DGREY}\${TEMP}${TCOL}${DEG}${DGREY}]${UC}\\$ ${NONE}"
}
bash_prompt() {
case $TERM in
xterm*|rxvt*)
local TITLEBAR='\[\033]0;\u:${NEW_PWD}\007\]'
;;
*)
local TITLEBAR=""
;;
esac
[ $UID -eq "0" ] && VC=$R
}
PROMPT_COMMAND=bash_prompt_command
bash_prompt
unset bash_prompt
handy when running benchs' ( source in .bashrc )... upper levels seem not as accurate as on IPQ... ( non linear )... whoops supposed to divide by 1000 and noticed i'm cutting the first two characters... lol.
Menion
May 28, 2020, 8:03pm
119
Hi all
The latest snapshot are running stable for you?
I have loaded a snapshot from last Monday, loaded with LUCI and some tools plus ralink and ath9k_htc drivers for the two USB WiFi I use.
Unfortunately my pi 4b reboot every a couple of hour.
I have tried two pretty decent power supply, a 3A and a 2A
The sd card is a SanDisk and I use squashfs image.
Bye
trendy
May 29, 2020, 12:13pm
120
Do you mean these ones here ?
They were actually built on 14th of February and is the one I am running without issues.
1 Like
Menion
May 29, 2020, 12:28pm
121
Yes that ones
Mine reboot every 2-4 hours.
Are you using any USB WiFi or USB device?
trendy
May 29, 2020, 1:21pm
122
Only a USB3 to Ethernet and a USB LTE.
Menion
May 29, 2020, 3:56pm
123
What do you suggest? Try to leave it running with OpenWRT and or Raspbian to make sure that there is no HW issue?
trendy
May 29, 2020, 4:10pm
124
It is easy to plug in another SD card with Raspbian and test its stability.
I would ran some stress tests for CPU/RAM/DISK on a default Raspbian installation.
momo54
May 30, 2020, 12:53am
125
some USB LTE modems have high power draw especially on transmit, so if you have a powered USB hub (even USB2) and you try using that for a long test that could rule that out USB current draw as a the|part of the problem.
trendy
May 30, 2020, 11:37am
126
Thank you for the advice, but I don't have any issues.