Günlük

Kernel Options And System Debugging Düzenle


09 Kasım 2016 14:43 tarihinde Mehmet Özgür Bayhan tarafından yazılmıştır.


Debug Options For Kernel:


- Kernel hacking 
-- [*] Show timing information on printks 
-- [*] Magic SysRq key 
-- [*] Debug filesystem
-- [*] Kernel debugging 
-- [*] Detect Soft Lockups 
-- [ ] Collect scheduler statistics 
-- [*] Debug slab memory allocations 
-- [*] Memory leak debugging 
-- [*] RT Mutex debugging, deadlock detection 
-- [*] Spinlock debugging 
-- [*] Sleep-inside-spinlock checking 
-- [ ] kobject debugging 
-- [ ] Highmem debugging 
-- [ ] Compile the kernel with debug info

Mount debugfs

mount -t debugfs none /sys/kernel/debug

 

Test GPIO

echo 30 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio30/direction
cat /sys/class/gpio/gpio30/value
cat /sys/kernel/debug/gpio

 

Disable Peripherals

http://labs.isee.biz/index.php/Mux_instructions

Set sdmmc2_dat5 to gpio137 (mode 4):

# -> root@localhost:/sys/kernel/debug/omap_mux# 
cat sdmmc2_dat5
# Result
# name: sdmmc2_dat5.gpio_137 (0x48002166/0x136 = 0x0004), b ah3, t NA
# mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE4
# signals: sdmmc2_dat5 | sdmmc2_dir_dat1 | cam_global_reset | sdmmc3_dat1 | gpio_137 | hsusb3_tll_stp | mm3_rxdp | safe_mode

# Set sdmmc2_dat5 to gpio137 (mode 4): 
echo 0x004 > sdmmc2_dat5 

# Check that gpio137 is in user space: 

# -> root@localhost:/sys/class/gpio# 
ls
# Result: export  gpio137  gpio138  gpio139  gpio170  gpio64  gpiochip0  gpiochip128  gpiochip160  gpiochip192  gpiochip32  gpiochip64  gpiochip96  unexport

 

List iomem and ioports

 

cat /proc/iomem
cat /proc/ioports

 


Yorum Yazın:


Arama

Arşivler

  • 2019 (1)
    • Mart (1)
  • 2018 (7)
    • Aralık (1)
    • Kasım (5)
    • Şubat (1)
  • 2017 (4)
    • Kasım (1)
    • Haziran (1)
    • Mart (1)
    • Ocak (1)
  • 2016 (18)
    • Aralık (2)
    • Kasım (3)
    • Ağustos (1)
    • Haziran (4)
    • Nisan (1)
    • Mart (1)
    • Şubat (1)
    • Ocak (5)
  • 2015 (10)
    • Eylül (2)
    • Ağustos (5)
    • Mayıs (1)
    • Mart (2)
  • 2014 (21)
    • Aralık (1)
    • Kasım (20)
"Even a man who is pure in heart, and says his prayers by night, may become a wolf when the wolfbane blooms, and the autumn moon is bright."

Listen Me!