Skip to content

Commit

Permalink
[no ci] Add new WiFi profile, update quirc Readme (#1125)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZigFisher authored Nov 8, 2023
1 parent 73fe4e6 commit d844676
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 4 deletions.
11 changes: 9 additions & 2 deletions general/overlay/etc/wireless/usb
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,22 @@ if [ "$1" = "ssw101b-ssc333-tapo-c110" ]; then
exit 0
fi

# SSC337DE BroadbandService
if [ "$1" = "rtl8188fu-ssc337de-broadband" ]; then
set_gpio 2 0
modprobe 8188fu
exit 0
fi

# SSC337DE Foscam
if [ "$1" = "rtl8188fu-ssc337de-foscam" ]; then
set_gpio 15 0
modprobe 8188fu
exit 0
fi

# SSC337DE Vendor
if [ "$1" = "aic8800-ssc337de-vendor" ]; then
# SSC337DE BroadbandService
if [ "$1" = "aic8800-ssc337de-broadband" ]; then
modprobe aic8800_fdrv
exit 0
fi
Expand Down
10 changes: 8 additions & 2 deletions general/package/quirc-openipc/readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@

sample use:
### Sample usage

curl -s -o /tmp/img.jpg http://127.0.0.1/image.jpg ; qrscan -p /tmp/img.jpg
```
#!/bin/sh
while true ; do
sleep 1
curl -s -o /tmp/img.jpg http://127.0.0.1/image.jpg ; qrscan -p /tmp/img.jpg
done
```
59 changes: 59 additions & 0 deletions general/scripts/compile4programmer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash
#
# Binary file compiler.
# Creates a file for programming onto a flash chip.
#
# Example:
# ./compile4programmer.sh stock-uboot.bin uImage.t31 rootfs.squashfs.t31 8
#
# Running this command will produce a new binary file
# full4programmer-8MB.bin or full4programmer-16MB.bin
# suitable for flashing with a programmer.
#
# Paul Philippov <[email protected]>
#

if [ $# -lt 4 ]; then
echo "Usage: $0 <uboot.bin> <kernel.bin> <rootfs.bin> <flash chip size in MB>"
exit 1
fi

case "$4" in
8)
flashsizemb="8MB"
flashsize=$((0x800000))
kerneloffset=$((0x50000))
rootfsoffset=$((0x250000))
;;
16)
flashsizemb="16MB"
flashsize=$((0x1000000))
kerneloffset=$((0x50000))
rootfsoffset=$((0x350000))
;;
*)
echo "Unknown flash size. Use 8 or 16."
exit 2
esac

check_file() {
if [ ! -f "$1" ]; then
echo "File $1 not found."
exit 3
fi
}

uboot=$1; check_file $uboot
kernel=$2; check_file $kernel
rootfs=$3; check_file $rootfs

tmpfile=$(mktemp)

dd if=/dev/zero bs="${flashsize}" skip=0 count=1 | tr '\000' '\377' > $tmpfile
dd if=$uboot bs=1 seek=0 count=$(wc -c $uboot | awk '{print $1}') of=$tmpfile conv=notrunc status=none
dd if=$kernel bs=1 seek="${kerneloffset}" count=$(wc -c $kernel | awk '{print $1}') of=$tmpfile conv=notrunc status=none
dd if=$rootfs bs=1 seek="${rootfsoffset}" count=$(wc -c $rootfs | awk '{print $1}') of=$tmpfile conv=notrunc status=none
mv $tmpfile "full4programmer-${flashsizemb}.bin"

echo "Done"
exit 0

0 comments on commit d844676

Please sign in to comment.