Skip to content

Instantly share code, notes, and snippets.

View Embedded-linux's full-sized avatar

G Satish Kumar Embedded-linux

  • Cavium Networks
  • Bangalore
View GitHub Profile
@Embedded-linux
Embedded-linux / debug
Created July 1, 2014 12:34
qemu-debug
Qemu Running:
qemu-system-arm -M versatilepb -kernel linux-3.2/arch/arm/boot/zImage -initrd initramfs -append "console=tty1"
##qemu-system-arm -M versatilepb -m 128M -kernel /home/satishg/qemu/zImage -initrd rootfs.img.gz -append "root=/dev/ram rdinit=/sbin/init"
versatile-Pb uImage:
qemu-system-arm -M versatilepb -m 128M -kernel /home/satishg/qemu/vers-uimage/zImage -initrd rootfs.img.gz -append "root=/dev/ram rdinit=/sbin/init"
For Debug:
qemu-system-arm -s -S -M versatilepb -m 128M -kernel /home/satishg/qemu/debug-image/zImage -initrd /home/satishg/qemu/debug/busybox-1.17.1/rootfs.img.gz -append "root=/dev/ram rdinit=/sbin/init"
@Embedded-linux
Embedded-linux / objdump
Created June 19, 2014 14:40
Kernel debug-objdump
Debugging Linux kernel using "objdump"
To create objdump file include source and symbol address and line numbers.
/home/satishg/gcc/arm-2010q1/bin/arm-none-linux-gnueabi-objdump -l -S -d vmlinux > vmlinux.asm
Use System.map file to find base address of function "am3517_evm_init"
cat System.map | grep -n am3517_evm_init
38140:c0623668 t am3517_evm_init
38140 is line number in System.map.
@Embedded-linux
Embedded-linux / board_am335xevm.c
Last active August 29, 2015 14:02
Kernel-porting[Beaglebone]
File Name: am335x_evm_board.c
+MACHINE_START(AM335XEVM, "am335xevm")
+ /* Maintainer: Texas Instruments */
+ .atag_offset = 0x100,
+ .map_io = am335x_evm_map_io,
+ .init_early = am33xx_init_early,
+ .init_irq = ti81xx_init_irq,
@Embedded-linux
Embedded-linux / start.S
Last active August 29, 2015 14:02
arm uboot code analysis[versatilePB]
u-boot/arch/arm/cpu/arm926ejs/start.S
This file initilizies
cpu mode,
interrupts,
SDRAM, and
relocate loader code to RAM and
continue the boot from RAM code.
@Embedded-linux
Embedded-linux / board.c
Created June 10, 2014 11:36
u-boot port [NOR port]
files changed to add port NOR to u-boot code
1.arch/arm/cpu/armv7/am33xx/emif4.c
2.arch/arm/cpu/armv7/am33xx/mem.c
3.board/ti/am335x/board.c
4.board/ti/am335x/board.h
5.board/ti/am335x/mux.c
6.board/ti/am335x/u-boot.lds
7.boards.cfg
@Embedded-linux
Embedded-linux / board.c
Created June 10, 2014 11:19
u-boot port [NAND support]
Files changed for adding NAND support
1.arch/arm/include/asm/arch-am33xx/mem.h
2.board/ti/am335x/board.c
3.board/ti/am335x/board.h
4.board/ti/am335x/mux.c
5.include/configs/am335x_evm.h
@Embedded-linux
Embedded-linux / board.c
Created June 10, 2014 11:07
u-boot port [Ethernet support]
Files chaged to add Ethernet support in u-boot code :
1.board/ti/am335x/board.c
2.board/ti/am335x/board.h
3.board/ti/am335x/mux.c
4.include/configs/am335x_evm.h
1.board/ti/am335x/board.c
+ /* Enable MII pin mux on Beaglebone */
+ enable_mii1_pin_mux();
@Embedded-linux
Embedded-linux / board.c
Created June 10, 2014 10:59
MMC Port to uboot
Files chaged to add MMC support in u-boot code :
1.board/ti/am335x/board.c
2.board/ti/am335x/board.h
3.board/ti/am335x/mux.c
4.include/configs/am335x_evm.h
1.board/ti/am335x/board.c
+ /* Enable pin mux for mmc0 */
File name: boards.cfg
File provides Target , Arch.name, CPU, Board name, vendor name, SoC name adn optios to boot.
# Target ARCH CPU Board name Vendor SoC Options
am335x_evm arm armv7 am335x ti am33xx am335x_evm:SERIAL1,CONS_INDEX=1
am335x_evm_usbspl arm armv7 am335x ti am33xx am335x_evm:SERIAL1,CONS_INDEX=1,SPL_USBETH_SUPPORT
am335x_evm_spiboot arm armv7 am335x ti am33xx am335x_evm:SERIAL1,CONS_INDEX=1,SPI_BOOT
am335x_evm_uart1 arm armv7 am335x ti am33xx am335x_evm:SERIAL2,CONS_INDEX=2
am335x_evm_uart2 arm armv7 am335x ti am33xx am335x_evm:SERIAL3,CONS_INDEX=3
File Name: include/configs/am335x_evm.h
This file talks about different configurations of System parametrs
-> DMA size,
#define CONFIG_DMA_COHERENT_SIZE (1 << 20)
->system Malloc len
#define CONFIG_SYS_MALLOC_LEN (1024 << 10)
->Machine type and number to pass to atag list[for identification of Machine]
#define MACH_TYPE_TIAM335EVM 3589 /* Until the next sync */