mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-24 11:46:30 +00:00
Merge branch 'dev'
This commit is contained in:
commit
65eabefbfd
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
UBOOT_HOST_DIR=$TARGET/../build/host-uboot-tools-*
|
||||
|
||||
cp $IMG_DIR/uImage $BOOT_DIR
|
||||
|
@ -191,7 +191,6 @@ rm -f $TARGET/usr/bin/v4l2-compliance
|
||||
rm -rf $TARGET/usr/lib/python2.7/site-packages/samba/
|
||||
rm -rf $TARGET/usr/lib/python2.7/ensurepip/
|
||||
rm -rf $TARGET/usr/lib/python2.7/config/
|
||||
rm -rf $TARGET/usr/lib/python2.7/distutils/
|
||||
rm -rf $TARGET/usr/lib/python2.7/unittest/
|
||||
|
||||
# buildroot default startup scripts
|
||||
|
@ -8,21 +8,9 @@ fi
|
||||
test "root" != "$USER" && exec sudo -E $0 "$@"
|
||||
|
||||
function msg() {
|
||||
echo ":: $1"
|
||||
echo " * $1"
|
||||
}
|
||||
|
||||
function cleanup {
|
||||
set +e
|
||||
|
||||
# unmount loop mounts
|
||||
mount | grep /dev/loop | cut -d ' ' -f 3 | xargs -r umount
|
||||
|
||||
# remove loop devices
|
||||
losetup -a | cut -d ':' -f 1 | xargs -r losetup -d
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
PART_START=${PART_START:-2048} # 2048 sectors = 1MB
|
||||
|
||||
BOOT_SRC=$IMG_DIR/boot
|
||||
@ -36,13 +24,14 @@ ROOT_IMG=$IMG_DIR/root.img
|
||||
ROOT_SIZE="180" # MB
|
||||
|
||||
DISK_SIZE="220" # MB
|
||||
OS_NAME=$(source $IMG_DIR/../../../board/common/overlay/etc/version && echo $os_short_name)
|
||||
|
||||
COMMON_DIR=$(cd $IMG_DIR/../../../board/common; pwd)
|
||||
OS_NAME=$(source $COMMON_DIR/overlay/etc/version && echo $os_short_name)
|
||||
|
||||
# boot filesystem
|
||||
msg "creating boot loop device"
|
||||
dd if=/dev/zero of=$BOOT_IMG bs=1M count=$BOOT_SIZE
|
||||
loop_dev=$(losetup -f)
|
||||
losetup -f $BOOT_IMG
|
||||
loop_dev=$(losetup -f --show $BOOT_IMG)
|
||||
|
||||
msg "creating boot filesystem"
|
||||
mkfs.vfat -F16 $loop_dev
|
||||
@ -58,15 +47,14 @@ sync
|
||||
msg "unmounting boot filesystem"
|
||||
umount $BOOT
|
||||
|
||||
msg "destroying boot loop device"
|
||||
msg "destroying boot loop device ($loop_dev)"
|
||||
losetup -d $loop_dev
|
||||
sync
|
||||
|
||||
# root filesystem
|
||||
msg "creating root loop device"
|
||||
dd if=/dev/zero of=$ROOT_IMG bs=1M count=$ROOT_SIZE
|
||||
loop_dev=$(losetup -f)
|
||||
losetup -f $ROOT_IMG
|
||||
loop_dev=$(losetup -f --show $ROOT_IMG)
|
||||
|
||||
msg "creating root filesystem"
|
||||
mkfs.ext4 $loop_dev
|
||||
@ -79,10 +67,30 @@ mount -o loop $loop_dev $ROOT
|
||||
msg "copying root filesystem contents"
|
||||
tar -xpsf $ROOT_SRC -C $ROOT
|
||||
|
||||
# set internal OS name, prefix and version according to env variables
|
||||
if [ -f $ROOT/etc/version ]; then
|
||||
if [ -n "$THINGOS_NAME" ]; then
|
||||
msg "setting OS name to $THINGOS_NAME"
|
||||
sed -ri "s/os_name=\".*\"/os_name=\"$THINGOS_NAME\"/" $ROOT/etc/version
|
||||
fi
|
||||
if [ -n "$THINGOS_SHORT_NAME" ]; then
|
||||
msg "setting OS short name to $THINGOS_SHORT_NAME"
|
||||
sed -ri "s/os_short_name=\".*\"/os_short_name=\"$THINGOS_SHORT_NAME\"/" $ROOT/etc/version
|
||||
fi
|
||||
if [ -n "$THINGOS_PREFIX" ]; then
|
||||
msg "setting OS prefix to $THINGOS_PREFIX"
|
||||
sed -ri "s/os_prefix=\".*\"/os_prefix=\"$THINGOS_PREFIX\"/" $ROOT/etc/version
|
||||
fi
|
||||
if [ -n "$THINGOS_VERSION" ]; then
|
||||
msg "setting OS version to $THINGOS_VERSION"
|
||||
sed -ri "s/os_version=\".*\"/os_version=\"$THINGOS_VERSION\"/" $ROOT/etc/version
|
||||
fi
|
||||
fi
|
||||
|
||||
msg "unmounting root filesystem"
|
||||
umount $ROOT
|
||||
|
||||
msg "destroying root loop device"
|
||||
msg "destroying root loop device ($loop_dev)"
|
||||
losetup -d $loop_dev
|
||||
sync
|
||||
|
||||
@ -107,8 +115,7 @@ if [ -n "$UBOOT_BIN" ] && [ -n "$UBOOT_SEEK" ]; then
|
||||
msg "copying u-boot image"
|
||||
dd conv=notrunc if=$UBOOT_BIN of=$DISK_IMG bs=512 seek=$UBOOT_SEEK
|
||||
fi
|
||||
loop_dev=$(losetup -f)
|
||||
losetup -f $DISK_IMG
|
||||
loop_dev=$(losetup -f --show $DISK_IMG)
|
||||
|
||||
msg "partitioning disk"
|
||||
root_part_start=$(($PART_START + $BOOT_SIZE * 2048))
|
||||
@ -137,33 +144,31 @@ set -e
|
||||
sync
|
||||
|
||||
msg "reading partition offsets"
|
||||
boot_offs=$(fdisk -u=sectors -l $loop_dev | grep -E 'loop[[:digit:]]p1' | tr -d '*' | tr -s ' ' | cut -d ' ' -f 2)
|
||||
root_offs=$(fdisk -u=sectors -l $loop_dev | grep -E 'loop[[:digit:]]p2' | tr -d '*' | tr -s ' ' | cut -d ' ' -f 2)
|
||||
boot_offs=$(fdisk -u=sectors -l $loop_dev | grep -E 'loop([[:digit:]])+p1' | tr -d '*' | tr -s ' ' | cut -d ' ' -f 2)
|
||||
root_offs=$(fdisk -u=sectors -l $loop_dev | grep -E 'loop([[:digit:]])+p2' | tr -d '*' | tr -s ' ' | cut -d ' ' -f 2)
|
||||
|
||||
msg "destroying disk loop device"
|
||||
msg "destroying disk loop device ($loop_dev)"
|
||||
losetup -d $loop_dev
|
||||
|
||||
msg "creating boot loop device"
|
||||
loop_dev=$(losetup -f)
|
||||
losetup -f -o $(($boot_offs * 512)) $DISK_IMG
|
||||
loop_dev=$(losetup -f --show -o $(($boot_offs * 512)) $DISK_IMG)
|
||||
|
||||
msg "copying boot image"
|
||||
dd if=$BOOT_IMG of=$loop_dev
|
||||
sync
|
||||
|
||||
msg "destroying boot loop device"
|
||||
msg "destroying boot loop device ($loop_dev)"
|
||||
losetup -d $loop_dev
|
||||
|
||||
msg "creating root loop device"
|
||||
loop_dev=$(losetup -f)
|
||||
losetup -f -o $(($root_offs * 512)) $DISK_IMG
|
||||
loop_dev=$(losetup -f --show -o $(($root_offs * 512)) $DISK_IMG)
|
||||
sync
|
||||
|
||||
msg "copying root image"
|
||||
dd if=$ROOT_IMG of=$loop_dev
|
||||
sync
|
||||
|
||||
msg "destroying root loop device"
|
||||
msg "destroying root loop device ($loop_dev)"
|
||||
losetup -d $loop_dev
|
||||
sync
|
||||
|
||||
|
@ -8,7 +8,7 @@ listen 0.0.0.0
|
||||
port 80
|
||||
mount_check_interval 300
|
||||
motion_check_interval 10
|
||||
cleanup_interval 43200
|
||||
cleanup_interval 3600
|
||||
remote_request_timeout 10
|
||||
mjpg_client_timeout 10
|
||||
mjpg_client_idle_timeout 10
|
||||
|
@ -1,4 +1,4 @@
|
||||
os_name="motionEyeOS"
|
||||
os_short_name="motioneyeos"
|
||||
os_prefix="meye"
|
||||
os_version="20180224"
|
||||
os_version="20180627"
|
||||
|
Binary file not shown.
@ -0,0 +1,92 @@
|
||||
# Cloned from bcm94345wlpagb_p2xx.txt
|
||||
NVRAMRev=$Rev: 498373 $
|
||||
sromrev=11
|
||||
vendid=0x14e4
|
||||
devid=0x43ab
|
||||
manfid=0x2d0
|
||||
prodid=0x06e4
|
||||
#macaddr=00:90:4c:c5:12:38
|
||||
macaddr=b8:27:eb:74:f2:6c
|
||||
nocrc=1
|
||||
boardtype=0x6e4
|
||||
boardrev=0x1304
|
||||
|
||||
#XTAL 37.4MHz
|
||||
xtalfreq=37400
|
||||
|
||||
btc_mode=1
|
||||
#------------------------------------------------------
|
||||
#boardflags: 5GHz eTR switch by default
|
||||
# 2.4GHz eTR switch by default
|
||||
# bit1 for btcoex
|
||||
boardflags=0x00480201
|
||||
boardflags2=0x40800000
|
||||
boardflags3=0x48200100
|
||||
phycal_tempdelta=15
|
||||
rxchain=1
|
||||
txchain=1
|
||||
aa2g=1
|
||||
aa5g=1
|
||||
tssipos5g=1
|
||||
tssipos2g=1
|
||||
femctrl=0
|
||||
AvVmid_c0=1,165,2,100,2,100,2,100,2,100
|
||||
pa2ga0=-129,6525,-718
|
||||
pa2ga1=-149,4408,-601
|
||||
pa5ga0=-185,6836,-815,-186,6838,-815,-184,6859,-815,-184,6882,-818
|
||||
pa5ga1=-202,4285,-574,-201,4312,-578,-196,4391,-586,-201,4294,-575
|
||||
itrsw=1
|
||||
pdoffsetcckma0=2
|
||||
pdoffset2gperchan=0,-2,1,0,1,0,1,1,1,0,0,-1,-1,0
|
||||
pdoffset2g40ma0=16
|
||||
pdoffset40ma0=0x8888
|
||||
pdoffset80ma0=0x8888
|
||||
extpagain5g=2
|
||||
extpagain2g=2
|
||||
tworangetssi2g=1
|
||||
tworangetssi5g=1
|
||||
# LTECX flags
|
||||
# WCI2
|
||||
ltecxmux=0
|
||||
ltecxpadnum=0x0504
|
||||
ltecxfnsel=0x22
|
||||
ltecxgcigpio=0x32
|
||||
|
||||
maxp2ga0=80
|
||||
ofdmlrbw202gpo=0x0022
|
||||
dot11agofdmhrbw202gpo=0x4442
|
||||
mcsbw202gpo=0x98444422
|
||||
mcsbw402gpo=0x98444422
|
||||
maxp5ga0=82,82,82,82
|
||||
mcsbw205glpo=0xb9555000
|
||||
mcsbw205gmpo=0xb9555000
|
||||
mcsbw205ghpo=0xb9555000
|
||||
mcsbw405glpo=0xb9555000
|
||||
mcsbw405gmpo=0xb9555000
|
||||
mcsbw405ghpo=0xb9555000
|
||||
mcsbw805glpo=0xb9555000
|
||||
mcsbw805gmpo=0xb9555000
|
||||
mcsbw805ghpo=0xb9555000
|
||||
|
||||
swctrlmap_2g=0x00000000,0x00000000,0x00000000,0x010000,0x3ff
|
||||
swctrlmap_5g=0x00100010,0x00200020,0x00200020,0x010000,0x3fe
|
||||
swctrlmapext_5g=0x00000000,0x00000000,0x00000000,0x000000,0x3
|
||||
swctrlmapext_2g=0x00000000,0x00000000,0x00000000,0x000000,0x3
|
||||
|
||||
vcodivmode=1
|
||||
deadman_to=481500000
|
||||
|
||||
ed_thresh2g=-54
|
||||
ed_thresh5g=-54
|
||||
eu_edthresh2g=-54
|
||||
eu_edthresh5g=-54
|
||||
ldo1=4
|
||||
rawtempsense=0x1ff
|
||||
cckPwrIdxCorr=3
|
||||
cckTssiDelay=150
|
||||
ofdmTssiDelay=150
|
||||
txpwr2gAdcScale=1
|
||||
txpwr5gAdcScale=1
|
||||
dot11b_opts=0x3aa85
|
||||
cbfilttype=1
|
||||
fdsslevel_ch11=6
|
@ -150,6 +150,11 @@ function do_download() {
|
||||
pid=$!
|
||||
echo $pid > $FW_DIR/$CURL_PID_FILE
|
||||
wait $pid
|
||||
|
||||
if [ "$?" != 0 ]; then
|
||||
cat $FW_DIR/$CURL_LOG_FILE
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function download_status() {
|
||||
@ -189,21 +194,27 @@ function do_extract() {
|
||||
rm -f $FW_DIR/$GUNZIP_PID_FILE $FW_DIR/$XZCAT_PID_FILE
|
||||
|
||||
if [ "$format" == "xz" ]; then
|
||||
DECOMPRESS_LOG_FILE=$FW_DIR/$XZCAT_LOG_FILE
|
||||
DECOMPRESS_PID_FILE=$FW_DIR/$XZCAT_PID_FILE
|
||||
xzcat $FW_DIR/$FW_FILE_XZ > $FW_DIR/$FW_FILE_EXTR 2>$FW_DIR/$XZCAT_LOG_FILE &
|
||||
elif [ "$format" == "gz" ]; then
|
||||
DECOMPRESS_LOG_FILE=$FW_DIR/$GUNZIP_LOG_FILE
|
||||
DECOMPRESS_PID_FILE=$FW_DIR/$GUNZIP_PID_FILE
|
||||
gunzip -k -c $FW_DIR/$FW_FILE_GZ > $FW_DIR/$FW_FILE_EXTR 2>$FW_DIR/$GUNZIP_LOG_FILE &
|
||||
else
|
||||
echo "firmware compression format $format not supported" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pid=$!
|
||||
if [ "$format" == "xz" ]; then
|
||||
echo $pid > $FW_DIR/$XZCAT_PID_FILE
|
||||
elif [ "$format" == "gz" ]; then
|
||||
echo $pid > $FW_DIR/$GUNZIP_PID_FILE
|
||||
fi
|
||||
echo $pid > $DECOMPRESS_PID_FILE
|
||||
wait $pid
|
||||
|
||||
if [ "$?" != 0 ]; then
|
||||
cat $DECOMPRESS_LOG_FILE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# TODO verify hash
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,13 @@ if [ -z "$1" ]; then
|
||||
exit -1
|
||||
fi
|
||||
|
||||
extensions=".img.gz .img.xz .img"
|
||||
opts="-s -S -f"
|
||||
test -n "$FW_USERNAME" && opts+=" --user $FW_USERNAME:$FW_PASSWORD"
|
||||
url="https://api.bitbucket.org/2.0/repositories/$1/downloads?pagelen=100&_=$(date +%s)"
|
||||
jq_expr='.values[] | [{a: .name | split("-"), url: .links.self.href}] | map((.a[2] | rtrimstr(".img.gz") | rtrimstr(".img")), "false", .a[1], .url) | join("|")'
|
||||
|
||||
rtrimstr=$(for e in $extensions; do echo -n " | rtrimstr(\"$e\")"; done)
|
||||
jq_expr=".values[] | [{a: .name | split(\"-\"), url: .links.self.href}] | map((.a[2] $rtrimstr), \"false\", .a[1], .url) | join(\"|\")"
|
||||
|
||||
curl $opts $url | jq --raw-output "$jq_expr"
|
||||
exit ${PIPESTATUS[0]}
|
||||
|
@ -23,8 +23,8 @@ rm -f /data/etc/shadow-
|
||||
|
||||
# set root and admin passwords (admin is just an alias for root)
|
||||
|
||||
echo -en "$PASSWORD\n$PASSWORD\n" | passwd &>/dev/null # root
|
||||
echo -en "$PASSWORD\n$PASSWORD\n" | passwd admin &>/dev/null # admin
|
||||
echo -en "$PASSWORD\n$PASSWORD\n" | passwd -a md5 &>/dev/null # root
|
||||
echo -en "$PASSWORD\n$PASSWORD\n" | passwd -a md5 admin &>/dev/null # admin
|
||||
|
||||
sed -r -i 's/root:([^:]+):[[:digit:]]+:/root:\1::/' /data/etc/shadow # removes pwd expiration
|
||||
sed -r -i 's/admin:([^:]+):[[:digit:]]+:/admin:\1::/' /data/etc/shadow # removes pwd expiration
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
export TARGET="$1"
|
||||
export BOARD=$(basename $(dirname $TARGET))
|
||||
export COMMON_DIR=$(dirname $0)
|
||||
@ -9,7 +11,9 @@ export IMG_DIR=$TARGET/../images
|
||||
|
||||
mkdir -p $BOOT_DIR
|
||||
|
||||
test -x $BOARD_DIR/postscript.sh && $BOARD_DIR/postscript.sh
|
||||
if [ -x $BOARD_DIR/postscript.sh ]; then
|
||||
$BOARD_DIR/postscript.sh
|
||||
fi
|
||||
|
||||
# transform /var contents as needed
|
||||
rm -rf $TARGET/var/cache
|
||||
@ -30,7 +34,9 @@ ln -s /tmp $TARGET/var/tmp
|
||||
|
||||
# cleanups
|
||||
$COMMON_DIR/cleanups.sh
|
||||
test -x $BOARD_DIR/cleanups.sh && test -x $BOARD_DIR/cleanups.sh || true
|
||||
if [ -x $BOARD_DIR/cleanups.sh ]; then
|
||||
$BOARD_DIR/cleanups.sh
|
||||
fi
|
||||
|
||||
# board-specific os.conf
|
||||
if [ -r $BOARD_DIR/os.conf ]; then
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
$HOST_DIR/bin/mkimage -C none -A arm -T script -d $BOARD_DIR/boot.cmd $BOOT_DIR/boot.scr
|
||||
$HOST_DIR/bin/mkimage -C none -A arm -T script -d $BOARD_DIR/boot-fwupdater.cmd $BOOT_DIR/boot-fwupdater.scr
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# boot directory
|
||||
mkdir -p $BOOT_DIR
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# boot directory
|
||||
mkdir -p $BOOT_DIR
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# boot directory
|
||||
mkdir -p $BOOT_DIR
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
$HOST_DIR/bin/mkimage -C none -A arm -T script -d $BOARD_DIR/boot.cmd $BOOT_DIR/boot.scr
|
||||
$HOST_DIR/bin/mkimage -C none -A arm -T script -d $BOARD_DIR/boot-fwupdater.cmd $BOOT_DIR/boot-fwupdater.scr
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# boot directory
|
||||
mkdir -p $BOOT_DIR/pine64
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo >> /boot/config.txt
|
||||
echo "initramfs fwupdater.gz" >> /boot/config.txt
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
RPI_FW_DIR=$TARGET/../images/rpi-firmware
|
||||
|
||||
cp $BOARD_DIR/config.txt $BOOT_DIR
|
||||
|
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo >> /boot/config.txt
|
||||
echo "initramfs fwupdater.gz" >> /boot/config.txt
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
RPI_FW_DIR=$TARGET/../images/rpi-firmware
|
||||
|
||||
cp $BOARD_DIR/config.txt $BOOT_DIR
|
||||
|
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo >> /boot/config.txt
|
||||
echo "initramfs fwupdater.gz" >> /boot/config.txt
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
RPI_FW_DIR=$TARGET/../images/rpi-firmware
|
||||
|
||||
cp $BOARD_DIR/config.txt $BOOT_DIR
|
||||
@ -7,6 +9,8 @@ cp $BOARD_DIR/cmdline.txt $BOOT_DIR
|
||||
cp $BOARD_DIR/fwupdater.gz $BOOT_DIR
|
||||
cp $IMG_DIR/zImage $BOOT_DIR/kernel.img
|
||||
cp $IMG_DIR/bcm2710-rpi-3-b.dtb $BOOT_DIR
|
||||
cp $IMG_DIR/bcm2710-rpi-3-b-plus.dtb $BOOT_DIR
|
||||
cp $IMG_DIR/bcm2710-rpi-cm3.dtb $BOOT_DIR
|
||||
cp $RPI_FW_DIR/bootcode.bin $BOOT_DIR
|
||||
cp $RPI_FW_DIR/start.elf $BOOT_DIR
|
||||
cp $RPI_FW_DIR/fixup.dat $BOOT_DIR
|
||||
|
95
build.sh
95
build.sh
@ -1,7 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: $0 <board|all> [mkimage|mkrelease|make_targets...]"
|
||||
echo "Usage: $0 <board|all> [mkimage|mkrelease|clean-target|make-targets...]"
|
||||
echo " mkimage - creates the OS image (.img)"
|
||||
echo " mkrelease - creates the compressed OS image (.img.gz, .img.xz)"
|
||||
echo " clean-target - removes the target dir, preserving the package build dirs"
|
||||
echo ""
|
||||
echo " for other make targets, see the BuildRoot manual"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -15,6 +20,25 @@ osname=$(source $basedir/board/common/overlay/etc/version && echo $os_short_name
|
||||
osversion=$(source $basedir/board/common/overlay/etc/version && echo $os_version)
|
||||
gzip=$(which pigz 2> /dev/null || which gzip 2> /dev/null)
|
||||
|
||||
# extra environment from local file
|
||||
test -f $basedir/.build-env && source $basedir/.build-env
|
||||
|
||||
# OS name
|
||||
if [ -n "$THINGOS_SHORT_NAME" ]; then
|
||||
osname=$THINGOS_SHORT_NAME
|
||||
else
|
||||
osname=$(source $basedir/board/common/overlay/etc/version && echo $os_short_name)
|
||||
fi
|
||||
|
||||
# OS version
|
||||
if [ -n "$THINGOS_VERSION" ]; then
|
||||
osversion=$THINGOS_VERSION
|
||||
else
|
||||
osversion=$(source $basedir/board/common/overlay/etc/version && echo $os_version)
|
||||
fi
|
||||
|
||||
# when the special "all" keyword is used for board,
|
||||
# all boards are processed, in turn
|
||||
if [ "$board" == "all" ]; then
|
||||
boards=$(ls $basedir/configs/*_defconfig | grep -v initramfs | grep -oE '\w+_defconfig$' | cut -d '_' -f 1)
|
||||
for b in $boards; do
|
||||
@ -42,20 +66,67 @@ fi
|
||||
|
||||
if [ "$target" == "mkimage" ]; then
|
||||
$boarddir/mkimage.sh
|
||||
|
||||
elif [ "$target" == "mkrelease" ]; then
|
||||
$boarddir/mkimage.sh
|
||||
cp $outputdir/images/$osname-$board.img $basedir
|
||||
mv $basedir/$osname-$board.img $basedir/$osname-$board-$osversion.img
|
||||
rm -f $basedir/$osname-$board-$osversion.img.xz
|
||||
xz -6ek $basedir/$osname-$board-$osversion.img
|
||||
echo "your xz image is ready at $basedir/$osname-$board-$osversion.img.xz"
|
||||
rm -f $basedir/$osname-$board-$osversion.img.gz
|
||||
$gzip $basedir/$osname-$board-$osversion.img
|
||||
echo "your gz image is ready at $basedir/$osname-$board-$osversion.img.gz"
|
||||
test -f $outputdir/images/$osname-$board.img || $boarddir/mkimage.sh
|
||||
cp $outputdir/images/$osname-$board.img $outputdir/images/$osname-$board-$osversion.img
|
||||
|
||||
echo "preparing compressed xz image"
|
||||
rm -f $outputdir/images/$osname-$board-$osversion.img.xz
|
||||
xz -6ek -T 0 $outputdir/images/$osname-$board-$osversion.img
|
||||
echo "your xz image is ready at $outputdir/images/$osname-$board-$osversion.img.xz"
|
||||
|
||||
echo "preparing compressed gz image"
|
||||
rm -f $outputdir/images/$osname-$board-$osversion.img.gz
|
||||
$gzip $outputdir/images/$osname-$board-$osversion.img
|
||||
echo "your gz image is ready at $outputdir/images/$osname-$board-$osversion.img.gz"
|
||||
|
||||
rm -f $outputdir/images/$osname-$board-$osversion.img
|
||||
|
||||
elif [ "$target" == "clean-target" ]; then
|
||||
if [ -d $outputdir/target ]; then
|
||||
echo "removing target directory"
|
||||
rm -rf $outputdir/target/*
|
||||
|
||||
echo "removing staging directory"
|
||||
rm -rf $outputdir/staging/*
|
||||
|
||||
echo "removing images directory"
|
||||
rm -rf $outputdir/images/*
|
||||
fi
|
||||
|
||||
if [ -d $outputdir/build ]; then
|
||||
echo "removing .stamp_target_installed files"
|
||||
find $outputdir/build -name .stamp_target_installed | xargs -r rm
|
||||
|
||||
echo "removing .stamp_staging_installed files"
|
||||
find $outputdir/build -name .stamp_staging_installed | xargs -r rm
|
||||
|
||||
echo "removing .stamp_host_installed files"
|
||||
find $outputdir/build -name .stamp_host_installed | xargs -r rm
|
||||
|
||||
echo "removing .stamp_images_installed files"
|
||||
find $outputdir/build -name .stamp_images_installed | xargs -r rm
|
||||
|
||||
echo "removing linux kernel build dir"
|
||||
make O=$outputdir linux-dirclean
|
||||
fi
|
||||
|
||||
if [ -f $outputdir/.config ]; then
|
||||
echo "removing .config file"
|
||||
rm -f $outputdir/.config
|
||||
fi
|
||||
|
||||
echo "target is clean"
|
||||
|
||||
elif [ "$target" == "all" ]; then
|
||||
make O=$outputdir all
|
||||
|
||||
elif [ -n "$target" ]; then
|
||||
make O=$outputdir $target
|
||||
else
|
||||
make O=$outputdir all
|
||||
|
||||
else # if [ -z "$target ]
|
||||
$0 $board all
|
||||
echo "build successful"
|
||||
fi
|
||||
|
||||
|
@ -14,7 +14,7 @@ BR2_ROOTFS_OVERLAY="board/common/overlay board/raspberrypi2/overlay"
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="board/common/postscript.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/4153f509b449f1c1c816cf124c314975c3daa824.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/81dda1af754c3af667944af7156bf1c5cdf9beee.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcm2709"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2709-rpi-2-b"
|
||||
|
@ -14,10 +14,10 @@ BR2_ROOTFS_OVERLAY="board/common/overlay board/raspberrypi3/overlay"
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="board/common/postscript.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/4153f509b449f1c1c816cf124c314975c3daa824.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/81dda1af754c3af667944af7156bf1c5cdf9beee.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcm2709"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b"
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b bcm2710-rpi-3-b-plus bcm2710-rpi-cm3"
|
||||
BR2_PACKAGE_BUSYBOX_CONFIG="board/common/busybox.config"
|
||||
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
|
||||
BR2_PACKAGE_MOTIONEYE=y
|
||||
|
@ -3,10 +3,15 @@ BR2_arm1176jzf_s=y
|
||||
BR2_CCACHE=y
|
||||
BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-raspberrypi"
|
||||
BR2_OPTIMIZE_2=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
|
||||
BR2_GCC_VERSION_4_9_X=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/raspberrypi/tools/archive/5caa7046982f0539cf5380f94da04b31129ed521.tar.gz"
|
||||
BR2_TOOLCHAIN_EXTERNAL_REL_BIN_PATH="arm-bcm2708/arm-linux-gnueabihf/bin"
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-linux-gnueabihf"
|
||||
BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CXX=y
|
||||
BR2_TARGET_OPTIMIZATION="-pipe"
|
||||
BR2_ROOTFS_SKELETON_CUSTOM=y
|
||||
BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/common/skeleton"
|
||||
@ -16,7 +21,7 @@ BR2_ROOTFS_OVERLAY="board/common/overlay board/raspberrypi/overlay"
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="board/common/postscript.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/4153f509b449f1c1c816cf124c314975c3daa824.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/81dda1af754c3af667944af7156bf1c5cdf9beee.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2708-rpi-0-w bcm2708-rpi-b bcm2708-rpi-b-plus bcm2708-rpi-cm"
|
||||
|
@ -882,6 +882,7 @@ menu "External python modules"
|
||||
source "package/python-pyxb/Config.in"
|
||||
source "package/python-pyyaml/Config.in"
|
||||
source "package/python-pyzmq/Config.in"
|
||||
source "package/python-redis/Config.in"
|
||||
source "package/python-requests/Config.in"
|
||||
source "package/python-requests-toolbelt/Config.in"
|
||||
source "package/python-rpi-gpio/Config.in"
|
||||
|
@ -10,7 +10,6 @@ LIBWEBCAM_SITE = http://freefr.dl.sourceforge.net/project/libwebcam/source
|
||||
LIBWEBCAM_DEPENDENCIES = libxml2
|
||||
|
||||
define LIBWEBCAM_INSTALL_TARGET_CMDS
|
||||
rm $(@D)/uvcdynctrl/uvcdynctrl-*.gz
|
||||
cp $(@D)/uvcdynctrl/uvcdynctrl $(TARGET_DIR)/usr/bin/uvcdynctrl
|
||||
cp -d $(@D)/libwebcam/libwebcam.so* $(TARGET_DIR)/usr/lib
|
||||
endef
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
#############################################################
|
||||
|
||||
MOTIONEYE_VERSION = c337b3a05a072aa06a97429b604882e9cb52bf8a
|
||||
MOTIONEYE_VERSION = 8d718c31387c6d9cdda2ef1358ebb05d075f178e
|
||||
MOTIONEYE_SITE = $(call github,ccrisan,motioneye,$(MOTIONEYE_VERSION))
|
||||
MOTIONEYE_SOURCE = $(MOTIONEYE_VERSION).tar.gz
|
||||
MOTIONEYE_LICENSE = GPLv3
|
||||
@ -15,8 +15,6 @@ MOTIONEYE_SETUP_TYPE = setuptools
|
||||
DST_DIR = $(TARGET_DIR)/usr/lib/python2.7/site-packages/motioneye
|
||||
SHARE_DIR = $(TARGET_DIR)/usr/share/motioneye
|
||||
BOARD = $(shell basename $(BASE_DIR))
|
||||
BOARD_DIR = $(BASE_DIR)/../../board/$(BOARD)
|
||||
COMMON_DIR = $(BASE_DIR)/../../board/common
|
||||
|
||||
|
||||
define MOTIONEYE_INSTALL_TARGET_CMDS
|
||||
@ -33,7 +31,7 @@ define MOTIONEYE_INSTALL_TARGET_CMDS
|
||||
cp package/motioneye/servicectl.py $(DST_DIR)
|
||||
cp package/motioneye/watchctl.py $(DST_DIR)
|
||||
cp package/motioneye/extractl.py $(DST_DIR)
|
||||
test -d $(BOARD_DIR)/motioneye-modules && cp $(BOARD_DIR)/motioneye-modules/*.py $(DST_DIR) || true
|
||||
test -d board/$(BOARD)/motioneye-modules && cp board/$(BOARD)/motioneye-modules/*.py $(DST_DIR) || true
|
||||
grep servicectl $(DST_DIR)/config.py &>/dev/null || echo -e '\nimport ipctl\nimport servicectl\nimport watchctl\nimport extractl\ntry:\n import boardctl\nexcept ImportError:\n pass' >> $(DST_DIR)/config.py
|
||||
|
||||
# log files
|
||||
|
6
package/python-redis/Config.in
Normal file
6
package/python-redis/Config.in
Normal file
@ -0,0 +1,6 @@
|
||||
config BR2_PACKAGE_PYTHON_REDIS
|
||||
bool "python-redis"
|
||||
depends on BR2_PACKAGE_PYTHON
|
||||
help
|
||||
Python driver for Redis
|
||||
|
13
package/python-redis/python-redis.mk
Normal file
13
package/python-redis/python-redis.mk
Normal file
@ -0,0 +1,13 @@
|
||||
################################################################################
|
||||
#
|
||||
# python-redis
|
||||
#
|
||||
################################################################################
|
||||
|
||||
PYTHON_REDIS_VERSION = 2.10.6
|
||||
PYTHON_REDIS_SOURCE = redis-$(PYTHON_REDIS_VERSION).tar.gz
|
||||
PYTHON_REDIS_SITE = https://pypi.python.org/packages/09/8d/6d34b75326bf96d4139a2ddd8e74b80840f800a0a79f9294399e212cb9a7
|
||||
PYTHON_REDIS_SETUP_TYPE = setuptools
|
||||
|
||||
$(eval $(python-package))
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
RPI_FIRMWARE_VERSION = 93aae1391121c44c7bbddf66abaf38725ffa2dc0
|
||||
RPI_FIRMWARE_VERSION = ce8652e2c743f02f04cb29f23611cbf13765483b
|
||||
RPI_FIRMWARE_SITE = $(call github,raspberrypi,firmware,$(RPI_FIRMWARE_VERSION))
|
||||
RPI_FIRMWARE_LICENSE = BSD-3-Clause
|
||||
RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
RPI_USERLAND_VERSION = 3cd60d45bc7c9d3ec8daee574bc99027cb1bab9e
|
||||
RPI_USERLAND_VERSION = a343dcad1dae4e93f4bfb99496697e207f91027e
|
||||
RPI_USERLAND_SITE = $(call github,raspberrypi,userland,$(RPI_USERLAND_VERSION))
|
||||
RPI_USERLAND_LICENSE = BSD-3-Clause
|
||||
RPI_USERLAND_LICENSE_FILES = LICENCE
|
||||
|
@ -71,13 +71,18 @@ else
|
||||
TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
|
||||
endif
|
||||
|
||||
# If binary path unset (known, supported external toolchains), use "bin".
|
||||
TOOLCHAIN_EXTERNAL_REL_BIN_PATH = $(or \
|
||||
$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_REL_BIN_PATH)), \
|
||||
bin)
|
||||
|
||||
ifeq ($(TOOLCHAIN_EXTERNAL_INSTALL_DIR),)
|
||||
ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),)
|
||||
# if no path set, figure it out from path
|
||||
TOOLCHAIN_EXTERNAL_BIN := $(dir $(shell which $(TOOLCHAIN_EXTERNAL_PREFIX)-gcc))
|
||||
endif
|
||||
else
|
||||
TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/bin
|
||||
TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(TOOLCHAIN_EXTERNAL_REL_BIN_PATH)
|
||||
endif
|
||||
|
||||
# If this is a buildroot toolchain, it already has a wrapper which we want to
|
||||
|
@ -12,6 +12,14 @@ config BR2_TOOLCHAIN_EXTERNAL_URL
|
||||
help
|
||||
URL of the custom toolchain tarball to download and install.
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_REL_BIN_PATH
|
||||
string "Toolchain relative bin path"
|
||||
default "bin"
|
||||
depends on BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD
|
||||
help
|
||||
Path to where the binaries (e.g. the compiler) can be found,
|
||||
relative to the downloaded toolchain root directory.
|
||||
|
||||
config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
|
||||
string "Toolchain prefix"
|
||||
default "$(ARCH)-linux"
|
||||
|
Loading…
x
Reference in New Issue
Block a user