Kişisel Çalışma Notlarım
Notlarım
ls -l (sorting in various criteria)ls -la (shows hidden files)
ls -lt (displays newest first)
ls -lx (displays files with no extension first)
ls -lS (displays largest first)
ls -ltr (r indicates sorting the files in reverse)
command --help (help about the command)
man command (manual pages about the command)
info command
mkdir /tmp/test (makes a directory called test in the tmp directory)
touch ~/Documents/myfile.txt (Usually, the touch command updates the modification and access date for an existing file. If you use touch with a filename which does not exist in your target directory, it creates a new file.)
cp ~/Documents/myfile.txt . (Do not forget the dot at the end. This command tells Bash to go to your home directory and to copy myfile.txt from the Documents subdirectory to the current directory, /tmp/test, without changing the name of the file.)
mv myfile.txt tuxfile.txt (To rename the file)
rm tuxfile.txt (Bash deletes the file without any confirmation.)
rmdir test (removes the test directory)
chmod g+w kde-start.xml (If you want to grant the users group also write access to kde-start.xml)
chmod go+w kde-start.xml (To grant the users group and other users write access to kde-start.xml)
chmod -w kde-start.xml (To remove write access for all users)
chmod go-x local (To prohibit the usersgroup and others to change into the directory local)
chmod o+w kde_quick.xml gnome_quick.xml (To grant others write permissions for two files, for kde_quick.xml and gnome_quick.xml, enter)
chown wilber kde_quick.xml (Changing ownership: You should get the following output: -rw-r--r-- 1 wilber users 47896 2006-06-21 09:46 kde_quick.xml)
*****
nmap -sP 192.168.1.0/24 (search in network for the clients)
ssh -l root 192.168.1.** (nmap sonucuna göre ip girilir)
cat /home/root/.bash_history (history deki kodları gösterir)
mount 192.168.1.1:/home/ibrahim/work/nfs/tuner /media/net -o nolock
ps ardından dmesg | head (cihaz rootu üzerindeyken yaz)
rm /home/ibrahim/.ssh/known_hosts (kayıtlı hostları silmek için)
*****
(7) numaralı cihazı programlayınca ip: 192.168.1.2(7) oldu.
nmap -sP 192.168.1.0/24 --> burada 24 olmasının sebebi 192.168.1. ağındaki cihazları araması içindir. Eğer 16 olsaydı 192.168. ağındaki bütün cihazları arardı. Bunlar 8 bitlik oktetler olduğundan 8 ve katları olarak artar.
*****
head (with head you can view the first lines of a text file, if not specified, it shows the first 10 lines)
tail (counterpart of head, if no options given, it shows the last 10 lines)
less (displays the whole content of a text file)
cat (displays the whole content of a file)
okular ~/vacation.pdf or evince ~/vacation.pdf (simply start the file)(you will realize command line is blocked as long as the PDF viewer is open. To change this press Ctrl+Z to suspend the process and enter "bg" to send the process to the background. Now u can still have a look at vacation.pdf while your prompt available.)
jobs (if u have started several bg processes, jobs gives u the overview of the jobs)
ps (shows a list of all your processes u started. It provides the codes of the running processes)
kill 3011 (end the process 3011 which is a code u can see after the ps command)
kill -9 PID (to kill the runaway programs)
*****
tar czvf tarfile.tgz /etc/sysconfig
c = create
z = compress
v = verify
f = filename to create
/etc/sysconfig everything in that directory will go into the tar file.
dd if=/home/ibrahim/Downloads/linuxmint-11-gnome-cd-nocodecs-32bit.iso of=/dev/sdb (bootable usb yapmak için iso dosyasını alıp usb içine uygun olarak yapıştırıyor. if input, of output adresidir)
fdisk -l (bağlı olan diskler hakkında bilgi verir)
*****
"cat /etc/*-release" = "lsb_release -a" (finds out the linux version)
lspci --> information about all pci buses
xrandr --> about the resolution
history | grep command --> command ile ilgili historydeki bütün kodlamaları gösterir
lspci -nn | grep VGA --> ekran kartı bilgisini verir
ubuntuforums.org/showpost.php?p=11503588&postcount=4 (bu adreste startup için shell scripti yazmaya bakılabilir)
*****
sudo minicom -o, sonra uboot'a düşmek için enterla setenv ile başlayan kodu gir sonra root ile login ol, .update ve rakam ver
setenv serverip 192.168.1.1;setenv ipaddr 192.168.1.177;tftp 80700000 uImage_blec32_tuner;setenv bootargs 'console=ttyS0,115200n8 ip=192.168.1.177:192.168.1.1:192.168.1.1:255.255.255.0:cam1:eth0:off root=/dev/nfs mem=98M davinci_mmc.use_dma=0 nfsroot=192.168.1.1:/home/ibrahim/blec32/blec32nfs,nolock';bootm
* bootloader, linux kernel, linux filesystem, nand, nfs
vi dev/.../adapter0 (test için)
* bootloader, linux kernel, linux filesystem, nand, nfs konularını araştır
------->Bootloader is a piece of code that runs before any operating system is running.
------->Bootloaders usually contain several ways to boot the OS kernel and also contain commands for debugging and/or modifying the kernel environment.
------->Kernel,core,nucleus, is the main component of most computer operating systems; it is a bridge between applications and the actual data processing done at the hardware level
*****
cat /media/hdd/dvb.sh
cp /media/hdd/dvb.sh /etc/mdev/
chmod +x /etc/mdev/dvb.sh
vi /etc/init.d/start-tstreamer.sh ---->/etc/mdev/dvb.sh---> esc + shift z z
*(sync pwd)
*****
dmesg | tail (harici disk bağladığımızda kontrol )
******
image'ı yüklemek için:
fdisk -l (eğer /dev/sdb üzerindeyse harddisk, dd komutuna geçilir)
dd if=/home/ibrahim/work/uretım/infotek/server/Infotek_Multimedia_Server.i686-1.0.6.raw of=/dev/sdb
yeni bilg başlatınca:
ram ve harddiski taktıktan sonra
bios
restore ac power loss power on konumuna getir
boot priority harddisk seç
boot menude nomodeset yaz başlat
login:root şifre:ghr+shift76+BNC = ghr&^BNC
yast2 komutunu yaz
network services nfs server space bas enter finish sonra quit
vi /boot/grub/menu.lst
showopts dan sonra nomodeset yaz
diski tak
mount dev/sdb1 /mnt/
cp /mnt/caglar/media/movie/ru/* /root/caglar/media/movie/ru
yeni konsolda cp /mnt/caglar/media/muzikler/* /root/caglar/media/muzikler/ (yeni konsola win tuşuyla geçilebilir)
kopyalamalar bitince
sync; umount /mnt/
bilg. restart et başlıyorsa teste gönder.
tokat için:
film ve müzikler bittikten sonra
cp -a /mnt/tokatseyahat/* /root/caglar/media/
cat /root/caglar/media/silbeni_update.sh
cp /mnt/tokatseyahat/silbeni_update.sh /root/caglar/media
cd /root/caglar/media
./silbeni.update.sh
rm silbeni.update.sh
sync; reboot
*****
svn checkout?
ls -l /dev/ttyUSB0
ls -l /dev/ttyUSB1
.
.
.
stm32flash??
linux gcc compile 32 bit??
gnu/stubs-32.h??
-------->QProcess ile stm32flash çağırıyoruz.
****
dmesg | grep tty > filename
QFile
******
sudo chmod 777 something (izin verme)
dd if=/dev/urandom of=sample.bin count=1 bs=1024 (random sayılardan oluşan bir komut dosyası oluşturur.)
dd if=/dev/zero of=sample.bin count=1 bs=1024 (sıfırlardan oluşan bir komut dosyası oluşturur.)
******
/etc/init.d altında bütün servisler bulunur
Örneğin;
sudo /etc/init.d/nfsserver restart
******
blec32 kartında /etc/init.d altında sh dosyası oluşturulup (vi filename yapılırsa boş dosya açılır, gerekli script kodları girilir)
, vi inittab yapılıp tty4::once::/etc/init.d/filename.sh satırı eklendiğinde, reboot edilirse (root olunup) o script dosyası
başlangıçta otomatik olarak başlar.
Örnek olarak:
/etc/init.d içinde vi blec32.sh yazıp, boş dosyayı açtık ve içine kamera test kodunu yapıştırıp sh dosyasını kaydettik:
#!/bin/sh
cat /dev/zero > /dev/fb2
gst-launch v4l2src ! video/x-raw-yuv,width=720,height=480,format=\(fourcc\)UYVY ! TIDmaiVideoSink contiguousInputFrame=false
accelFrameCopy=false resizer=false videoStd=WVGA displayDevice=/dev/fb3 displayStd=FBDev
vi inittab yapıp gerekli satırı ekleyip kaydettik. Ardından chmod 777 filename ve chown users filename yaptığımızda
yeniden başlatılınca kendi kendine başlamaya hazır hale geldi.
******
mono, kart içinde u-boot bölümüne geçip karta giriş yapmamıza olanak veren bir program yükler. Böylece u-boot'tan başlayıp
diğer adımları teker teker izleyerek karta gerekli müdahaleyi yapabiliriz.
Örnek:
file path: /home/ibrahim/blec32/programmer/install
mono sfh_DM644x.exe -nandflash -p /dev/ttyUSB0 ubl.bin u-boot-F0_ED_1E_FE_00_4C.bin
******
binary firmware programında samba hatası çözümü:
/etc/init.d/sshd status
/etc/init.d/sshd stop
/etc/init.d/sshd status
/sbin/service smb restart
/sbin/service smb status
******
java fusionserver & (buradaki and işareti ile process backgrounda atılıyor ve biz konsolda işlerimize devam edebiliyoruz)
uname -a (bilgisayar info)
******
gzip file (makes a zip file)
dd if=/dev/urandom of=filename.log bs=1M count=2 (2MB random dosya yapar)
dd if=/dev/zero of=a.log bs=1M count=2 (2MB sıfırlardan oluşan dosya yapar)
hexdump filename | head (dosyanın içeriğine bakmayı sağlar)
******
in beaglebone root, "busybox ifconfig eth0 192.168.1.199" ip adresini bu adres yapar.
ifconfig eth0 ile kontrol edebiliyoruz.
minicom -o usb2 ile beaglebone a bağlandık
cat /proc/meminfo (memory info)
tmpfs ram'i kullanan bir dosya sistemi
mount -t tmpfs tmpfs mytmpfs/ (mytmpfs diye bir dosyaya tmpfs sistemini mount etti)
/mnt/mytmpfs # dd if=/dev/zero of=deleteMe bs=4096 count=1024
busybox time busybox cp b.log.g /mnt/mytmpfs/
******
sh mkcard.txt /dev/sdd ile sdCardı iki partitona ayırdık biri küçük biri büyük boyutlu olmak üzere
mkfs.vfat -F 32 -n "boot" /dev/sdd1 ile sdCardın ilk partitionı fat32 yaptık
oluşan BOOT içine sırasıyla MLO, u-Boot ve uImage dosyalarını kopyaladık
mke2fs -j -L "Angstrom" /dev/sdd2 ile sdCardın ikinci ve büyük partition'ını ext3 linux dosya sistemine çevirdik.
son olarak Angstrom root filesystem'i büyük partition'a çıkardık (alt satırdaki kod)
(sudo tar -xjv -C /media/Angstrom/ -f /home/ibrahim/Downloads/Angstrom-systemd-image-eglibc-ipk-v2012.05-beaglebone.rootfs.tar.bz2)
konsola sudo minicom -o usb1 ile bağlandık
konsolda uname -m yapınca caglar görmek gerekiyor ama armv7l görüyoruz
dmesg | head yaptık (uImage dosyasını androidde kullandığımız uImage ile değiştirince 13 eylül tarihli güncel olan olduğunu gördük)
******
cd /etc/rc5.d/ altında cihazın açılışı sırasında numara sırasına göre scriptler çalıştırılır. Biz scriptin başına en son numarayıverip(S22utest.sh)
en son çalışmasını sağladık.
scriptimiz:
#!/bin/sh
cd /home/root/utest/
./utestOven -qws
olmak üzere utestOven programını çalıştırdık.
******
beaglebone pinlerinden UART, TTL seviyesindedir (3.3 V) bunu ST232 kartı sayesinde rs232 seviyesine çevirebiliriz.(9v ve -6 V)
TX ve RX bağlantıları çapraz şekilde bağlanmalıdır. RS232 erkek çıkışını düşünürsek, 1. pin RX, 3. pin TX ve 5. pin GND'dir.