Commands
Commands:
extract dtb file.
1.go to the linux path
cd linux/scripts/dtc
decompile dtb to dts
2.dtc -I dtb -O dts -o <deviceTree_source_file_name.dts> <devicetree.dtb>
compile dts to dtb
3.dtc -I dts -O dtb -f <deviceTree_source_file_name.dts> -o <devicetree.dtb>
dmesg
- dmesg -x => print log level type
- dmesg -T => human readable formate.
- dmesg -t => Will not print timestamps
- dmesg -l err,warn will print only error and warn messages
- dmesg -w & -
Dynamic logs
- echo 'file driver/usb/core/* =p' > /sys/kernel/debug/dynamic_debug/control
kernel config
- cat /boot/config-<kernle_version> | grep CONFIG_DYMANIC_DEDBUG.
Ko:
- strings <file_name.ko>
- objdump --section-headers <file_name.ko>
- objdump --section-headers --section=.modinfo --full-contents <file_name.ko>
Device Tree:
- cat /sys/firmware/devicetree/base/
- cat /proc/device-tree
ldd
- ldd <binary_flie> or ldd <excutable_file > --> give list of dependent libraries
EXTRACTION
- tar -czvf tar-archieve-name.tar.gz source-folder-name --> create tar.gz
- tar -xzvf tar-archieve-name.tar.gz --> extract tar.gz
- zip -r tecmint_files.zip tecmint_files
- unrar x <file_name.rar> -->
- unzip <file_name.zip>
- zip -r tecmint_files.zip tecmint_files
- unzip tecmint_files.zip -d /tmp/unziped
- unsquashfs <squashfs_file.squashfs>
- mksquashfs squashfs-root/ rootfs.squashfs
Yum has a very handy 'whatprovides' function to find things like this out:
Code:
yum whatprovides */lib64/libGL.so.1
that will tell you that it is provided in the 'mesa-libGL' package.
- rpm -i your_name.rpm --> install
- rpm -u your-rpm-package_name.rpm -> update
yum -y install packagename --> The '-y' implies 'yes'.
enable the kernel prints:
- echo 1 > /proc/sys/kernel/printk
Patch:
create patch:
diff -u OriginalFile UpdatedFile > PatchFile
diff -ru Original_directory Updated_directory > File
apply patch:
patch foo.c < patch.diff
create patch:
diff -u OriginalFileOriginalFile UpdatedFile > PatchFile
diff -ru Original_directory Updated_directory > File
apply patch:
patch foo.c < patch.diff
NFS mount:
- mount -t nfs -o nolock <IP_address>:<Directtory_to_share> <Mouting_Ponit_direcory>
- showmount -e
Comments
Post a Comment