____ ____________ ____
/ / / / / ____/ __ \/ __ \
__ / / /_/ / __/ / /_/ / / / /
/ /_/ / __ / /___/ _, _/ /_/ /
\____/_/ /_/_____/_/ |_|\____/
- awk
- sed
- echo pipe
- tar
- color bash
- kill
- device-tree compiler
- samba
- reset USB
- fio
- usb bandwidth ctrl
- i2c tools
- can util
- k26 suspend
- grep if
- install rpm
- install rpm on ubuntu
- initrd boot run script
- SD flash
- minicom
- PCIE reset
- ffmpeg
- kill
- ethernet
awk '{print $4}'
awk -F: {'print $2'}
awk -F, {'print $2'}
sed -i 's/MEANR/%s/g' %s
sed 's/MEANR/NWER/g'
find /sys/devices/platform -name "control" | grep 'usb1\|usb2\|usb3\|usb4' | xargs cat
echo on | tee $(find /sys/devices/platform -name "control" | grep 'usb1\|usb2\|usb3\|usb4')
cd <path-to-package-all>
sudo tar -zcvf rootfs.tar.gz .
sudo tar -zcvf <path-you-like>/rootfs.tar.gz .
sudo tar -zxvf rootfs.tar.gz -C $ROOTPATH
RED='\033[0;31m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
GREEN='\033[0;32m'
NC='\033[0m'
echo -e "I am ${RED}dangerous${NC}."
jobs -l
kill -9 ${PID}
ps -aux | pgrep ${TARGET} | xargs kill -9
dtc -O dts -o system.dts system.dtb
dtc -O dtb -o system.dtb system.dts
mount -t cifs -o username=jhh,password=user,vers=1.0 //172.16.92.131/share /mnt/cifs
sudo sh -c 'AUTHFILE="/sys/bus/usb/devices/usb2/authorized" ; echo 0 > "$AUTHFILE" ; sleep 1 ; echo 1 > "$AUTHFILE"'
sudo sh -c 'AUTHFILE="/sys/bus/usb/devices/usb1/authorized" ; echo 0 > "$AUTHFILE" ; sleep 1 ; echo 1 > "$AUTHFILE"'
echo -1 > /sys/module/usbcore/parameters/autosuspend
echo 0x400 > /sys/module/uvcvideo/parameters/trace
echo 640 > /sys/module/uvcvideo/parameters/quirks
i2cdetect -r -y 0
i2cdump -f -y 0 0x74
i2cset -f -y 0 0x74 0x00 0x0f
i2cdump -f -y 0 0x27
ip link set can0 up type can bitrate 100000
cansend can0 123#0011223344556677
candump can0
ifconfig can0 down
echo enabled > /sys/devices/platform/amba/ff000000.serial/tty/ttyPS1/power/wakeup
cat /sys/devices/platform/amba/ff000000.serial/tty/ttyPS1/power/wakeup
echo enabled > /sys/devices/platform/amba/ff010000.serial/tty/ttyPS0/power/wakeup
cat /sys/devices/platform/amba/ff010000.serial/tty/ttyPS0/power/wakeup
echo mem > /sys/power/state
cat 1.log | grep -q "string"
if [ "$?" -eq "0" ] ; then
echo "exist"
else
echo "not exist"
fi
sudo rpm -ivh --froce ./*.rpm
sudo alien --to-deb --target=arm64 ./*.rpm
sudo dpkg -i --force-all ./*.deb
cd /etc/init.d
touch innodisk.sh
vi innodisk.sh
#!/bin/bash
case "$1" in
'start')
/home/petalinux/boot.sh
;;
'stop')
;;
*)
;;
esac
exit
sudo update-rc.d innodisk.sh defaults 99
sudo update-rc.d -f innodisk.sh remove
echo -e "d\n\nd\n\nd\n\nn\n\n\n\n+1G\ny\na\nn\n\n\n\n\ny\nw\n" | sudo fdisk /dev/sdx
sudo mkfs.vfat -F 32 -n boot /dev/sd
sudo mkfs.ext4 -L root /dev/sd
echo -e "d\n\nd\n\nd\n\nn\n\n\n\n+1G\ny\na\nn\n\n\n\n\ny\nw\n" | fdisk /dev/mmcblk0
sleep 3
mkfs.vfat -F 32 -n boot /dev/mmcblk0p1
mkfs.ext4 -L root /dev/mmcblk0p2
sleep 3
mount /dev/mmcblk0p1 /media/sd-mmcblk0p1
mount /dev/mmcblk0p2 /media/sd-mmcblk0p2
sleep 3
cp /home/petalinux/emmc/* /media/sd-mmcblk0p1/
sleep 3
tar -zxvf rootfs.tar.gz -C /media/sd-mmcblk0p2/
sync
cfdisk /dev/mmcblk1
e2fsck -f /dev/mmcblk1p2
resize2fs /dev/mmcblk1p2
sudo minicom -c on -D /dev/ttyUSB1
echo 1 > /sys/bus/pci/rescan
ffmpeg -i $INPUTVIDEO -an -vcodec libx264 -crf 23 $OUTPUTVIDEO
ffmpeg -i $INPUTVIDEO -vf scale=${W}:${H} $OUTPUTVIDEO
ffmpeg -i $INPUTVIDEO -vf scale=${W}:-1 $OUTPUTVIDEO
ps aux | pgrep gst | sudo xargs kill -9
SPEED=${1:-1000}
sudo ethtool -s eth0 autoneg on speed ${SPEED} duplex full
sleep 3
cat /sys/class/net/eth0/speed