
Linux
hushui
Coding Since 1998
展开
-
openssl pem/der and key/crt
openssl原创 2022-12-26 19:33:25 · 357 阅读 · 0 评论 -
tftp linux
NA原创 2022-07-14 18:14:43 · 250 阅读 · 0 评论 -
history/bash
Linux shell history原创 2022-07-12 15:19:25 · 185 阅读 · 0 评论 -
dd/skip(input file)/seek(outputfile) 参数计算/十六进制等
:skip=xxx是在备份时对if 后面的部分也就是原文件跳过多少块再开始备份;seek=xxx则是在备份时对of 后面的部分也就是目标文件跳过多少块再开始写。Example:u-boot_params.bin is saved in MMC offset 40960, size 153600dump itroot@localhost:/tmp# dd if=/dev/mmcblk0 of=./u-boot_params.bin bs=1 skip=40960 count=15360...原创 2022-05-14 17:32:37 · 729 阅读 · 0 评论 -
ssh remote etc
ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no example.com原创 2021-12-06 09:22:07 · 1043 阅读 · 0 评论 -
The Linux Kernel Module Programming Guide <5.0 kernel>
GitHub - sysprog21/lkmpg: The Linux Kernel Module Programming Guide (updated for 5.x kernels)原创 2021-11-26 15:26:15 · 440 阅读 · 0 评论 -
Centos ISO install from harddisk
Grub1kernel (hd0,0)/isolinux/vmlinuz linux textrepo=hd:/dev/sda2:/initrd (hd0,0)/isolinux/initrd.imgOrkernel (hd0,0)/isolinux/vmlinuz noeject inst.stage2=hd:/dev/sda1:/CentOS-7-x86_64-DVD-1503-01.isoinitrd (hd0,0)/isolinux/initrd.img...原创 2021-10-27 15:44:02 · 238 阅读 · 0 评论 -
Manual initrd/busybox for qemu/i386
### for i386 32bit build [lake@localhost busybox-1.33.0]$ CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 make defconfig[lake@localhost busybox-1.33.0]$ CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 make menuconfig ---> Static link busyboxscripts/kconf...原创 2021-10-27 10:11:03 · 1366 阅读 · 0 评论 -
FIREFLY-RK3399-UBUNTU-20.04 GUI info
firefly@firefly:~$ echo $XDG_SESSION_TYPEx11firefly@firefly:~$firefly@firefly:~$ xdriinfolibGL error: failed to create dri screenlibGL error: failed to load driver: rockchiplibGL error: failed to create dri screenlibGL error: failed to load dr...原创 2021-10-07 21:08:08 · 3395 阅读 · 3 评论 -
kmscube/RK3399/Linux
No waylandNo westonNo qtKmscubebased on libdrm/EGL>>>>>>>>>> log[root@rk3399:/]# kmscubearm_release_ver of this libmali is 'r18p0-01rel0', rk_so_ver is '4'.Using display 0x19ffc390 with EGL version 1.4EGL..原创 2021-09-28 19:12:03 · 1852 阅读 · 0 评论 -
韦东山Linux视频第1期
我用阿里云盘分享了「韦东山Linux视频第1期 S3C6410版本」,你可以不限速下载???? 复制这段内容打开「阿里云盘」App 即可获取 链接:https://www.aliyundrive.com/s/ZhN7XcNgAAR原创 2021-09-21 13:50:34 · 308 阅读 · 0 评论 -
sed macro
[lake@localhost]$ echo "href=\"./index.php@commmnd=223\""href="./index.php@commmnd=223"[lake@localhost]$ echo "href=\"./index.php@commmnd=223\"" |sed 's/href\=\"\(.*\)\"/href\=\"\1\.html\"/g'href="./index.php@commmnd=223.html"Use [^\"]* ,...原创 2021-07-29 09:43:01 · 129 阅读 · 0 评论 -
cp filelist
# sed for empty lines' removecat yourfilelist | sed -r '/^\s*$/d' |xargs -r cp -p -v --target-directory=/your_destnation_folder_name/原创 2021-07-27 17:16:49 · 188 阅读 · 0 评论 -
x86_64bit/Weston/Wayland/Buildroot
BuildrootEnable Mesa3d/EGL/Weston etcNote1.GALLIUM_DRIVER_SWRAST, keep DRI_DRIVER_SWRAST New Mesa3d 20.x should useGALLIUM_DRIVER_SWRAST2. use -vga std (qemu Bosch standard VGA)3. Weston test with fbdev4. $mkdir /tmp/wayland ; ch...原创 2021-07-13 10:33:50 · 1152 阅读 · 0 评论 -
Linux/hadware acceleration 3D driver DRI vs. Gallium
Make.conf/VIDEO CARDS/DRI vs. Galliumhttps://www.funtoo.org/Make.conf/VIDEO_CARDS/DRI_vs._Gallium_vs._NVIDIADRI vs. GalliumGraphics on Linux can be confusing due to the various technologies involved, not just the different graphics cards available b.原创 2021-07-09 16:54:43 · 270 阅读 · 0 评论 -
find all sub folders and move
find path/to/dir/* \! -name 'this_dir_stays_put' -type d -maxdepth 0 \ -exec mv {} new/location \;原创 2021-07-02 20:47:36 · 124 阅读 · 0 评论 -
pip install without root
[lake@server /]$ cat > $HOME/.pydistutils.cfg <<EOF> [install]> user=1> EOF[lake@server /]$ pip install --upgrade youtube_dlCollecting youtube_dl Downloading https://files.pythonhosted.org/packages/a4/43/1f586e49e68f8b41c4be41630.原创 2021-06-25 10:29:17 · 349 阅读 · 0 评论 -
Ubuntu16/18/20 LTS kernel version
https://www.thomas-krenn.com/en/wiki/Ubuntu_LTS_Hardware_Enablement_Stack_informationThe following table shows the GA and HWE kernel versions of Ubuntu 20.04 LTS, 18.04 LTS und 16.04 LTS: Ubuntu LTS Version Kernel Version Kernel Note Kernel .原创 2021-06-22 10:34:05 · 956 阅读 · 0 评论 -
readelf/cross tool without ldd
arm-none-linux-gnueabi-readelf -a $elffilename | grep "Shared library:"原创 2021-06-18 13:53:45 · 106 阅读 · 0 评论 -
Linux Shell 进入乱码目录/rm 怪异文件名
cd `ls | awk 'NR==1'`NR 由ls确定是第几个乱码目录例如[lake@localhhost down.52pojie.cn]$ ls |awk 'NR==2' ...原创 2021-04-10 12:07:22 · 305 阅读 · 0 评论 -
Cross Build procps/ps/free/kill/pidof etc
Source https://gitlab.com/procps-ng/procps###tool chain[lake@localhost8 toolchain]$ which aarch64-your-toolchain-gnu-gcc~/usr/local/kreatv/toolchain/aarch64/2.0.3/bin/aarch64-your-toolchain-gnu-gcc[lake@localhost8 toolchain]$ basename /usr/lo...原创 2021-03-29 16:59:00 · 243 阅读 · 1 评论 -
ROOT Linux summary
chrootfakeroot ===> ext imageContainerdocker ==> cgroup/overlay/lxcqemu-static ==> qemu + chrootlib/so PATHpatchelf ===>ld-linux-xxx.soLD_LIBRARY_PATH ===> app so PATH only原创 2021-01-31 10:49:12 · 141 阅读 · 0 评论 -
diff -up ==> patch/format
[lake@localhost kernel]$ diff --helpUsage: diff [OPTION]... FILESCompare FILES line by line.Mandatory arguments to long options are mandatory for short options too. --normal output a normal diff (the default) -u, -U NUM, --un.原创 2021-01-29 22:31:09 · 265 阅读 · 1 评论 -
sshfs_2_5 build on Centos7.x/RHEL7.x
[lake@localhost source]$ git clone --depth 1 --branch sshfs_2_5 https://github.com/libfuse/sshfsCloning into 'sshfs'...remote: Enumerating objects: 19, done.remote: Counting objects: 100% (19/19), done.remote: Compressing objects: 100% (18/18).原创 2021-01-28 08:48:11 · 211 阅读 · 0 评论 -
ffmpeg hwaccels
Refer tohttp://trac.ffmpeg.org/wiki/HWAccelIntroPlatform API Availability Linux Windows Android Apple Other AMD Intel NVIDIA AMD Intel NVIDIA macOS iOS Raspberry Pi AMF N N N Y ...原创 2021-01-23 10:38:43 · 1317 阅读 · 0 评论 -
patchelf to change ld-linux-xxx with new glibc on old system/Centos7-RHEL7.x
####### patchelf## Change ld-linux-XXXX.so### Change with new glibc version [lake@Centos7 hello]$ pwd/home/lake/extra/source/hello### Centos7/RHEL7.x glibc is 2.17 NOT 2.18/2.19 [lake@Centos7 hello]$ rpm -qf /lib64/libc.so.6glibc-2.17-78.el7..原创 2021-01-21 16:48:20 · 378 阅读 · 0 评论 -
chrt FIFO example
[lake@localhost ~]$ cat test_chrt.sh#!/bin/bash## sudo chrt -f 99 /home/lake/test_chrt.sh#dd if=/home/lake/rk15G-size-sd-XXX.img of=/dev/sdd原创 2021-01-21 15:30:46 · 257 阅读 · 0 评论 -
printk/kernel/ignore_loglevel
1. how to generate kernel messages via /dev/kmsg echo "8 4 1 7" >/proc/sys/kernel/print / # echo "<7>Writing critical printk messages from userspace" >/dev/kmsg Writing critical printk messages from userspace ...原创 2020-12-07 09:00:06 · 675 阅读 · 0 评论 -
systemd
1. list service 列出正在运行的 Unit$ systemctl list-units# 列出所有Unit,包括没有找到配置文件的或者启动失败的$ systemctl list-units --all# 列出所有没有运行的 Unit$ systemctl list-units --all --state=inactive# 列出所有加载失败的 Unit$ systemctl list-units --failed# 列出所有正在运行的、类型为 service 的.原创 2020-12-04 14:46:41 · 244 阅读 · 0 评论 -
scp folder/keep symbolic link etc (by tar or rsync)
1. folder sync scp -r user@server:remove_folder local2. keep symbolic link through tar# On the source server:# cd /path/to/contenttar cf - * | ssh user@destination '(cd /path/to/content; tar xf - )'The files are compressed and...原创 2020-12-03 17:46:00 · 370 阅读 · 0 评论 -
find all obj files and do du summary
find obj.XXX -type f -name '*.o' |xargs du -hcs |grep total$38M total53M total21M total原创 2020-12-02 16:10:20 · 146 阅读 · 0 评论 -
FFMPEG convert
1. Imageffmpeg -pix_fmts ?ffmpeg -i ImageSegmentation_threshold_histogram.jpg -f rawvideo -pix_fmt yuv420p ImageSegmentation_threshold_histogram_4032X3024_yuv420.yuv2. audio$ffmpeg-iINPUT.ape output.wav$ffmpeg-iINPUT.ape outpu...原创 2020-11-30 14:09:54 · 357 阅读 · 0 评论 -
Python tool/pydtc parse device tree binary to dts
Microsoft Windows [Version 10.0.18363.1139](c) 2019 Microsoft Corporation. All rights reserved.C:\Windows\SysWOW64>cd c:\Python38c:\Python38>PATHPATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\w.原创 2020-11-19 17:22:54 · 461 阅读 · 0 评论 -
RHEL/Centos7 Shell tips: find file in mulitiple tgz
find . -type f -name "*.tgz" -printf [%f]\\n -exec tar -tf {} \; | grep -iE "[\[]|CompressedfilenameInsideTgz"原创 2020-11-13 17:16:29 · 121 阅读 · 0 评论 -
SSH tunnel Aliyun to Home Windows Desktop
Ethernet adapter Ethernet: Connection-specific DNS Suffix . : WindowsHOME IPv4 Address. . . . . . . . . . . : 10.73.197.146 Subnet Mask . . . . . . . . . . . : 255.255.255.01. Step on Windows side Win10 has OpenSSH Server now! Wind...原创 2020-09-27 14:18:43 · 196 阅读 · 0 评论 -
python2.7/serial/test/ARM Linux
#-*- coding:UTF-8 -*-# author:Lake Hu :2020/9# -*- coding: utf-8 -*-import time import serialimport reimport randomimport time localtime = time.asctime(time.localtime(time.time()))reboot_timeout_default = 30 read_timeout_default = 5ser = .原创 2020-09-18 14:54:33 · 218 阅读 · 0 评论 -
eMMC dd/performance check on aarch64
http://www.brendangregg.com/Perf/linux_observability_tools.pngeMMC dd/performance check on aarch64########## note bs size will affect performance./ # dd if=/dev/mmcblk0p1 of=/dev/null bs=1 count=1024MB670040576+0 records in6700...原创 2020-09-17 14:33:07 · 244 阅读 · 0 评论 -
Linux exp script to test remote ARM through SSH/login
[localroot]$ cat stresstest.exp#!/usr/bin/expectset timeout 60set prompt {~ # }#exp_internal 1set mtc 0set starttime [exec date ]set ip [lindex $argv 0]set NUM 0while { 1 } { set sleeptime [expr int(rand() * 10 + 30)] set NUM [ expr $N.原创 2020-09-17 11:01:21 · 149 阅读 · 0 评论 -
Rsync through SSH
Rsync through SSHExamplersync -r -l -t -e ssh --include="*.cpp" --include="*.c" --include="*.h" --include='*/' --exclude='*' --progress lake@10.0.0.1:/home/lake/live-git/ live-local rsync -r -l -t -e ssh --include=...原创 2020-09-11 09:07:22 · 174 阅读 · 0 评论 -
readelf string from .text code
examplecat hello.c#include <stdio.h>int main(){ printf("Hello world \n"); return 1 ;}$ readelf -p .rodata hello-x86String dump of section '.rodata': [ 10] Hello worldExample with toolchaine...原创 2020-08-25 10:28:03 · 252 阅读 · 0 评论