Microsoft PowerPoint - LN_4_Bootloader.ppt [호환 모드]

Size: px
Start display at page:

Download "Microsoft PowerPoint - LN_4_Bootloader.ppt [호환 모드]"

Transcription

1 프로젝트 1 부트로더구조및원리파악 : Blob 소스분석 단국대학교컴퓨터학과 2009 백승재 ibanez1383@dankook.ac.kr k k

2 Linux 의부팅과정이해 강의목표 실행파일과링커스크립트관계이해 부트로더구조및원리파악 Blob 을통한부트로더소스분석

3 Booting 의의미 Booting 의정의 Kernel이메모리에올려지고하드웨어가초기화되어바로사용가능한상태로만드는과정을부팅이라고한다. Booting 의목적 processor 초기화 memory 점검및초기화 각종하드웨어점검및초기화 kernel loading kernel 자료구조등록및초기화 사용환경조성

4 부팅과정도식도 (1/5) SUN Sparc, Intel ix86 ROM BIOS HDD 의 MBR Power On VGA 체크 Memory 체크 IDE 장치체크각종장치정보수집 FDD 의 MBR StrongARM, XScale, Flash Memory MBR 에있는 Boot loader 로딩또는 bootsect.s 로딩

5 부팅과정도식도 (2/5) kernel 을 main memory 로로딩 kernel 압축해제

6 부팅과정도식도 (3/5) 초기화 code 수행 start_kernel() { Architecture 의존적인설정 trap에대한초기화 } Interrupt에대한초기화 Scheduler 에대한초기화 softirq에대한초기화 Timer 초기화 Console 초기화 kernel module 사용을위한초기화 kernel cache 에대한초기설정 Clock tick과 BogoMIPS를구함 buddy system 사용을위한 memory 초기화 kernel cache 에대한초기화 fork에관한초기화 (max threads) 각종 kernel cache 및 buffer에대한생성및초기화 /proc 디렉토리에대한초기화 IPC 에대한초기화 SMP에대한초기화 init kernel thread 시작 kernel idle init kernel thread 각종 interface 장치초기화 network interface 초기화 initrd 로딩및 / mount free memory 재계산 console open /sbin/init process 수행

7 부팅과정도식도 (4/5) /sbin/init 수행 signal handler 설정 console 설정 /etc/inittab 파일 read /etc/rc.d/rc.sysinit script 수행 /etc/rc.d/rc script 수행 /sbin/mingetty 수행 run level 5이면 /etc/x11/prefdm수행 /etc/x11/prefdm /etc/rc.d/rc.sysinit host name 설정시간설정 usb 설정 file system check ISA 설정 sound 설정 /etc/rc.d/rc 3 run level에따른 /etc/rc*.d 디렉토리의 script 를수행 gdm 또는 kdm 또는 xdm 실행 /sbin/mingetty 가상터미널을띄우고 login 프로그램실행

8 부팅과정도식도 (5/5) /sbin/login 인증수행후 shell 실행 Shell 실행

9 MBR 의이해 (1/2) MBR 의이해 MBR이란하드디스크로부팅하기위한 boot loader와파티션분할정보, 부팅에사용되는실제파티션 (ACTIVE PARTITION) 에대한정보가저장된곳으로하드디스크의제일바깥쪽에위치한공간으로 ( 절대섹터 0(Cylinder 0, Head 0, Sector 1), 크기 :1sector(512byte)) 하드디스크로들어오는관문이되는곳이다. MBR은 boot sector에포함되나모든 boot sector가 MBR은아니다. boot sector는각파티션의첫번째 sector를의미한다. MBR 트랙0, 섹터1 플래터의구조

10 MBR 의이해 (2/2) MBR 이미지 (dd if=/dev/had of=mbr.img bs=1c count=512) LILO 문자열 time out 시간 jmp 0x7C second boot loader 의위치 map 파일 image 디스크립트 1 위치 Boot Loader code 파티션 1 파티션 2 파티션 3 파티션 4 fs type Magic number

11 Bootloader 의역할과종류 Boot Loader 의역할 Kernel을 memory에적재하고제어를 kernel로옮김 OS의선택적부팅 Kernel 다운로드를제공하기도한다 Embedded system을위한 boot loader는 BIOS에서해주는하드웨어초기화작업담당 Boot Loader 의종류 LILO 전통적인 linux boot loader이다. 일반적인 boot loader가그렇듯 assembly로짜여져있고크게 MBR에들어가는 first.s와 /boot/boot.b로만들어지는 second.s 두부분으로이루어져있다 GRUB 최근에주목받고있는 boot loader로서기능과유연성면에서 LILO보다앞선다. GNU에서만들었으며뛰어난 shell interface를제공한다 bootsector.s Kernel에서제공되는 boot loader로서압축된 kernel의제일앞 512byte 공간을차지하고있으며 floppy 등으로부팅할때사용되어지고다른 boot loader로부팅할때는건너띄는부분이다 Blob ARM SA-11x0 architecture 에서사용하는대표적인 boot loader 로서 GNU GPL 이여서사용에제한이없고 serial을통한다운로드를지원한다

12 프로젝트 1 Blob

13 ~/src/start-ld-script Entry point 확인 OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) SECTIONS {. = 0x ;. = ALIGN(4);.text : { *(.text) }. = ALIGN(4);.rodata : { *(.rodata) } 32bit ELF 포맷을가지는 little endian 형태의코드를생성 이파일이컴파일된뒤 ARM 이라는 Architecture에서실행됨을알려줌 실행파일의 entry point 가 _start 라는레이블임을알려줌 }. = ALIGN(4);.data : { *(.data) }. = ALIGN(4);.got : { *(.got) }. = ALIGN(4);.bss : { *(.bss) } 물리주소 0x 번지에서수행이시작되며, 실행파일은코드가들어가있는 text와 rodata, data, got, bss의순서대로 4byte 단위로구성됨을의미

14 Memory 구성도 start.s 0x

15 _start 레이블 ~/src/start.s.text 영역의시작임을나타냄.text /* Jump vector table as in table 3.1 in [1] */.globl _start _start: b reset b undefined_instruction b software_interrupt b prefetch_abort b data_abort b not_used b irq.globl로선언된_start 즉, 외부에서 extern 해다쓸수있는 _start 심볼 b fiq ARM의각exception의 handler 를등록시켜놓은table

16 reset 레이블 ~/src/start.s IC_BASE:.word 0x #define ICMR 0x04 reset: /* First, mask **ALL** interrupts */ ldr r0, IC_BASE mov r1, #0x00 str r1, [r0, #ICMR] 모든인터럽트를불허함

17 ~/src/start.s PWR_BASE:.word 0x #define PSPR 0x08 #define PPCR 0x14 reset 레이블 /* switch CPU to correct speed */ ldr r0, PWR_BASE LDR r1, cpuspeed str r1, [r0, #PPCR] /* setup memory */ bl memsetup /* init LED */ bl ledinit CPU clock speed 설정

18 reset 레이블 ~/src/start.s /* The initial CPU speed. Note that the SA11x0 CPUs can be safely overclocked: * 190 MHz CPUs are able to run at 221 MHz, 133 MHz CPUs can do 206 Mhz. */ #if (defined ASSABET) (defined CLART) (defined LART) (defined NESA) (defined NESA) cpuspeed:.long 00b 0x0b /* 221 MHz */ #elif defined SHANNON cpuspeed:.long 0x09 /* MHz */ #else #warning "FIXME: Include code to use the correct clock speed for your board" cpuspeed:.long 0x05 /* safe 133 MHz speed */ #endif

19 ~/src/memsetup.s memsetup 레이블.text MEM_BASE:.long 0xa MEM_START:.long 0xc #define MDCNFG 0x0 #define MDCAS0 0x04 #define MDCAS1 0x08 #define MDCAS2 0x0c #define MCS0 0x10 #if (defined BRUTUS) mdcas0:.long 0xc71c703f mdcas1:.long 0xffc71c71 mdcas2:.long 0xffffffff mdcnfg:.long 0x0334b22f mcs0:.long 0xfff8fff8 #endif.globl memsetup memsetup:

20 memsetup 레이블 ~/src/memsetup.s #elif defined USE_SA1110 /* This part is actually for the Assabet only. If your board MDCAS00, 20, 01, 21, 02, 22, MDREFR, MDCNFG register설정 * uses other settings, you'll have to ifdef f them here. */ /* Set up the SDRAM */ mov r1, #0xA /* MDCNFG base address */ ldr r2, =0xAAAAAA7F str r2, [r1, #0x04] /* MDCAS00 */ str r2, [r1, #0x20] /* MDCAS20 */ ldr r2, =0xAAAAAAAA str r2, [r1, #0x08] /* MDCAS01 */ str r2, [r1, #0x24] /* MDCAS21 */ ldr r2, =0xAAAAAAAA str r2, [r1, #0x0C] /* MDCAS02 */ str r2, [r1, #0x28] /* MDCAS22 */ ldr r2, =0x4dbc0327 /* MDREFR */ str r2, [r1, #0x1C] ldr r2, =0x /* MDCNFG */ str r2, [r1, #0x00]

21 ~/src/memsetup.s memsetup 레이블 /* Issue read requests to disabled bank to start refresh */ disable 된뱅크에 refresh 가일어나는것을막기위해 8번반복하여읽기연산수행 ldr.rept 8 ldr.endr r1, =0xC r0, [r1] mov r1, #0xA /* MDCNFG base address */ ldr r2, =0x /* Enable the banks */ str r2, [r1, #0x00] /* MDCNFG */ 그런뒤 MDCNFG값을 0x 로설정하여 0/1 bank pair 활성화

22 memsetup 레이블 ~/src/memsetup.s /* Static memory chip selects on Assabet: */ ldr r2, =0x4b90 /* MCS0 */ orr r2,r2,r2,lsl #16 str r2, [r1, #0x10] ldr r2, =0x /* MCS1 */ str r2, [r1, #0x14] ldr r2, =0x /* MCS2 */ str r2, [r1, #0x2C] ldr r2, =0xafccafcc /* SMCNFG */ str r2, [r1, #0x30] /* Set up PCMCIA space */ ldr r2, =0x994a994a str r2, [r1, #0x18] /* All SDRAM memory settings should be ready to go... */ /* For best performance, should fill out remaining memory config regs: */ Board specific 한 PCMCIA/memory 설정을수행 gogogo2: /* Testing,Chester */ mov r3,#0x mov r2,#0x5000 /* D9_LED on and D8_LED off */ str r2,[r3] mov r4, #0x20000 subs r4, r4, #1 bne gogogo2 BL로점프해왔으므로lr값을 PC에복원하여원래위치로복귀 mov pc, lr

23 ledinit 레이블 ~/src/ledasm.s.text LED:.long LED_GPIO GPIO_BASE:.long 0x #define GPDR 0x #define GPSR 0x #define GPCR 0x c LED 점등후원래루틴으로복귀.globl ledinit /* initialise LED GPIO and turn LED on. * clobbers r0 and r1 */ ledinit: ldr r0, GPIO_BASE ldr r1, LED str r1, [r0, #GPDR] /* LED GPIO is output */ str r1, [r0, #GPSR] /* turn LED on */ mov pc, lr

24 reset 레이블 ~/src/start.s RST_BASE:.word 0x #define RCSR 004 0x04 /* check if this is a wake-up from sleep */ ldr r0, RST_BASE ldr r1, [r0, #RCSR] and r1, r1, #0x0f teq r1, #0x08 bne normal_boot /* no, continue booting */ SA11X0엔 H/W reset, S/W reset, Watchdog reset, Sleep reset 네가지의 reset이존재한다. RCSR register는어떤이유로 reset 인터럽트가발생했는가를나타내며, RSSR register는 S/W reset을발생시키는 register이다. 따라서 Blob에선 RCSR register의값을읽어서하위네비트값을통해어떤이유로 reset되었는지를살펴본뒤, Sleep reset 인경우엔대응하는비트를클리어한뒤, PSPR register값을읽어 r1에넣어주고, 이값으로 jump함으로써이전상태로복원하게되며, 정상적인 H/W reset인경우라면 normal_boot 레이블로이동하게된다.

25

26 normal_boot 레이블 ~/src/start.s normal_boot: /* enable I-cache */ mrc p15, 0, r1, c1, c0, read control reg orr r1, r1, set Icache mcr p15, 0, r1, c1, c0, write it back I-cache enable 작업수행 control register 값을읽은뒤 Icache 를 set 하고 다시덮어씀

27 normal_boot 레이블 ~/src/start.s normal_boot: /* enable I-cache */ mrc p15, 0, r1, c1, c0, read control reg orr r1, r1, set Icache mcr p15, 0, r1, c1, c0, write it back I-cache enable 작업수행 control register 값을읽은뒤 Icache 를 set 하고 다시덮어씀 /* main memory starts at 0xc */ MEM_START:.long 0xc /* check the first 1MB in increments of 4k */ mov r7, #0x1000 mov r6, r7, lsl #8 /* 4k << 2^8 = 1MB */ ldr r5, MEM_START 메모리시작번지로부터 1MB를테스트한다. r7에 0x1000을넣고좌로 8번 shift연산을수행하여 r6에 1M를넣은후, 메모리의시작번지주소인 0xc 을 r5 register에넣는다.

28 normal_boot 레이블 ~/src/start.s mem_test_loop: mov r0, r5 bl testram teq r0, #1 beq badram add subs bne r5, r5, r7 r6, r6, r7 mem_test_loop 그런뒤 (~/src/testmem.s) 파일내에정의되어있는 testram 을호출하여메모리테스트수행

29 normal_boot 레이블 ~/src/start.s /* the first megabyte is OK, so let's clear it */ mov r0, #((1024 * 1024) / (8 * 4)) /* 1MB in steps of 32 bytes */ ldr r1, MEM_START mov r2, #0 mov r3, #0 mov r4, #0 mov r5, #0 mov r6, #0 mov r7, #0 mov r8, #0 mov r9, #0 clear_loop: stmia r1!, {r2-r9} subs r0, r0, #(8 * 4) bne clear_loop 이상없다면루프를돌면서확인된 1M영역의내용을 0으로초기화함. r0를 1MB/32 값을넣고, r1엔메모리의시작주소를넣는다. stmia 명령어를이용하여 r1이가리키는곳에r2-r9의값 (0) 을넣어주고r0의값을 32 만큼감소시킨다. 감소시킨값이 0이아니면계속하여루프를돌면서 1MB 영역을모두 0으로만든다

30 normal_boot 레이블 ~/src/start.s /* get a clue where we are running, so we know what to copy */ and r0, pc, #0xff /* we don't care about the low bits */ /* relocate the second stage loader */ add r2, r0, #(128 * 1024) /* blob b is 128kB */ add r0, r0, #0x400 /* skip first 1024 bytes */ ldr r1, MEM_START add r1, r1, #0x400 /* skip over here as well */ Blob 자신을확인이완료된 RAM 으로복사하려한다. PC 값을이용해어디서부터복사해야하는지결정한다. Blob 의전체 size 가 128K 이므로복사작업을끝마쳐야하는주소즉, 현재 PC 에 128K 를더한값을 r2 에넣는다.

31 normal_boot 레이블 ~/src/start.s /* get a clue where we are running, so we know what to copy */ and r0, pc, #0xff /* we don't care about the low bits */ /* relocate the second stage loader */ add r2, r0, #(128 * 1024) /* blob b is 128kB */ add r0, r0, #0x400 /* skip first 1024 bytes */ ldr r1, MEM_START add r1, r1, #0x400 /* skip over here as well */ r0에는 PC + 0x400 값을넣는다. r0는복사작업에서source의위치를나타내는데이는현재수행되고있는 start.s 외의다른파일의컴파일에관계가있는 rest-ld-script script 에.text 의시작이 0xc 번지로지정되어있기때문이다. 다음으로 r1에는복사작업의 destination 값을넣어준다. 따라서복사작업에서 target 주소를나타내는 r1도 0xc 을가리키도록하여 rest-ld-script 로링킹된 binary 들이지장없이수행되도록한다.

32 normal_boot 레이블 ~/src/start.s copy_loop: ldmia r0!, {r3-r10} stmia r1!, {r3-r10} cmp r0, r2 ble copy_loop r0가가리키고있는곳의내용을r3~r10에담고이내용을r1이가리키고있는곳으로저장한다. 이작업은 source 의끝에해당되는 r2 와 ldmia 명령어를통해자동으로증가되고있는 r0값이같아질때까지수행된다. /* turn off the LED. if it stays off it is an indication that * we didn't make it into the C code */ bl led_off 디버그정보출력을위해 led 를끈다

33 normal_boot 레이블 ~/src/start.s /* set up the stack pointer */ ldr r0, MEM_START add r1, r0, #(1024 * 1024) sub sp, r1, #0x04 /* blob is copied to ram, so jump to it */ add r0, r0, #0x400 mov pc, r0 Stack pointer를 0xc M 0x04 위치로설정한후 PC를방금복사해놓은RAM상의 Blob를가리키게한다. 따라서 0xc 위치에있는실행파일로제어가넘어간다.

34 rest-ld-script OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_trampoline) SECTIONS {. = 0xc ; }. = ALIGN(4);.text : { *(.text) }. = ALIGN(4);.rodata : { *(.rodata) }. = ALIGN(4);.data : { *(.data) }. = ALIGN(4);.got : { *(.got) }. = ALIGN(4);.bss : { *(.bss) } 실행파일의 entry point가 _trampoline 이라는레이블임을알려줌물리주소 0xc 번지에서수행이시작되며, 실행파일은코드가들어가있는text와 rodata, data,,g got, bss의순서대로 4byte 단위로구성됨을의미

35 Memory 구성도 start.s 0x rest(trampoline.s, main.c ) 0x c

36 ~/src/trampoline.s _trampoline 레이블.text t.globl _trampoline _trampoline: bl main /* if main ever returns we just call it again */ b _trampoline main 으로분기하는역할만을담당함 만약 main 에서리턴한다면다시분기

37 main 함수 ~/src/main.c int main(void) { u32 blocksize = 0x ; int numread = 0; char commandline[128]; int i; int retval = 0; /* Turn the LED on again, so we can see that we safely made it * into C code. */ led_on(); /* We really want to be able to communicate, so initialise the * serial port at 9k6 (which works good for terminals) */ SerialInit(baud9k6); TimerInit(); S i li it(b d9k6) LED 를켠후, 시리얼포트를초기화한뒤 타이머를초기화하고, msg 출력 /* Print the required GPL string */ SerialOutputString(" nconsider yourself LARTed! n n"); SerialOutputString(PACKAGE " version " VERSION " n" "Copyright (C) " "Jan-Derk Bakker and Erik Mouw n" "Copyright (C) 2000 " "Johan Pouwelse n"); SerialOutputString(PACKAGE " comes with ABSOLUTELY NO WARRANTY; " "read the GNU GPL for details. n n"); SerialOutputString("This is free software, and you are welcome " "to redistribute it n"); SerialOutputString("under certain conditions; " "read the GNU GPL for details. n");

38 SerialInit() 함수 ~/src/serial.c void SerialInit(eBauds baudrate) { /* Theory of operations: * - Flush the output buffer * - switch receiver and transmitter off * - clear all sticky bits in control register 3 * - set the port to sensible defaults (no break, no interrupts, * no parity, 8 databits, 1 stopbit, transmitter and receiver * enabled * - set the baudrate to the requested value * - turn the receiver and transmitter back on */ #if defined USE_SERIAL1 while(ser1utsr1 & UTSR1_TBY) TBY) { } Ser1UTCR3 = 0x00; Ser1UTSR0 = 0xff; Ser1UTCR0 = ( UTCR0_1StpBit UTCR0_8BitData ); Ser1UTCR1 = 0; Ser1UTCR2 = (u32)baudrate; Ser1UTCR3 = ( UTCR3_RXE UTCR3_TXE ); #elif defined USE_SERIAL3 while(ser3utsr1 & UTSR1_TBY) { } Ser3UTCR3 = 0x00; Ser3UTSR0 = 0xff; Ser3UTCR0 = ( UTCR0_1StpBit UTCR0_8BitData ); Ser3UTCR1 = 0; Ser3UTCR2 = (u32)baudrate; Ser3UTCR3 = ( UTCR3_RXE UTCR3_TXE ); #else #error "Configuration error: No serial port used at all!" #endif }

39 TimerInit() 함수 ~/src/time.c void TimerInit(void) { /* clear counter */ OSCR = 0; /* we don't want to be interrupted */ 1개의 OSCR(Operating System Counter OIER = 0; Register)(up-counter register) 과 4개의 /* wait until OSCR > 0 */ OSMR(Operating System Match while(oscr == 0) Register) 존재 ; /* clear match register 0 */ OSMR0 = 0; /* clear match bit for OSMR0 */ OSSR = OSSR_M0; OSCR이 OSMR과일치되면 OSSR(Operating System Status Register) 의해당비트가set되고, INT가 enable된경우라면int발생됨 } numoverflows = 0;

40 main 함수 ~/src/main.c /* get the amount of memory */ get_memory_map(); /* initialise status */ blob_status.kernelsize = 0; blob_status.kerneltype = fromflash; blob_status.ramdisksize = 0; blob_status.ramdisktype = fromflash; blob_status.blocksize = blocksize; blob_status.downloadspeed = baud115k2; get_memory_map() 함수를호출하여시스템의메모리양을결정하고 blob_status 구조체에변수를초기화함

41 get_memory_map() 함수 ~/src/memory.c #define NUM_MEM_AREAS (32) typedef struct { u32 start; t; u32 len; int used; } memory_area_t; extern memory_area_t memory_map[num_mem_areas] /* memory start and end */ #define MEMORY_START (0xc ) #define MEMORY_END (0xe ) #define TEST_BLOCK_SIZE (1024 * 1024) void get_memory_map(void) { u32 addr; int i; /* init */ for(i = 0; i < NUM_MEM_AREAS; i++) memory_map[i].used = 0; /* first write a 0 to all memory locations */ for(addr = MEMORY_START; addr < MEMORY_END; addr += TEST_BLOCK_SIZE) * (u32 *)addr = 0; memory 의상태를저장할구조체의사용중을표시하는 used 필드를 clear 하고 실제물리메모리에 MegaB 단위로건너뛰면서 0 을쓴다

42 } get_memory_map() 함수 ~/src/memory.c i = 0; for(addr = MEMORY_START; addr < MEMORY_END; addr += TEST_BLOCK_SIZE) { if(testram(addr) == 0) { /* yes, memory */ if(* (u32 *)addr!= 0) { /* alias? */ } if(memory_map[i].used) map[i] i++; continue; /* not an alias, write the ~/src/testmem.s current address */ 내의 testram을호출하여메모리를검사한다. * (u32 *)addr = addr; /* does this start a new block? */ 정상적으로검사가수행되면 0을리턴한다. if(memory_map[i].used == 0) { memory_map[i].start = addr; memory_map[i].len = TEST_BLOCK_SIZE; memory_map[i].used map[i] = 1; } else { memory_map[i].len += TEST_BLOCK_SIZE; } } else { /* no memory here */ if(memory_map[i].used == 1) i++; } } SerialOutputString("Memory map: n"); for(i = 0; i < NUM_MEM_AREAS; i++) { if(memory_map[i].used) { SerialOutputString(" 0x"); SerialOutputHex(memory_map[i].len); 0x"); SerialOutputHex(memory_map[i].start); } } 새로운 area 가아니라면이전 area 에 size 만더해준다. 새로운 area 라면구조체를적절히셋팅한다 SerialOutputString(" ("); SerialOutputDec(memory_map[i].len / (1024 * 1024)); SerialOutputString(" MB) n"); 그런뒤확인된메모리양을화면에출력

43 blob_status 구조체설명 typedef enum { fromflash = 0, fromdownload ownload = 1 } block_source_t; typedef struct { int kernelsize; block_source_t kerneltype; int ramdisksize; block_source_t ramdisktype; int blobsize; block_source_t blobtype; u32 blocksize; ebauds downloadspeed; } blob_status_t; 커널이미지의크기커널을어디서가져오는지를정의 Ramdisk 의크기 Ramdisk 를어디서가져오는지를정의 Blob 자체의크기 Blob를어디서가져오는지를정의 하나의 Block 의크기를정의 Downloading speed 를정의 blob_status_t blob_status;

44 main 함수 ~/src/main.c /* Load kernel and ramdisk from flash to RAM */ Reload("blob"); Reload("kernel"); Reload("ramdisk"); Reload() 함수를이용하여 blob, kernel, ramdisk 를메인메모리로끌고올라옴

45 ~/src/main.cc void Reload(char *commandline) { u32 *src = 0; u32 *dst = 0; int numwords; if(mystrncmp(commandline, "blob", 4) == 0) { src = (u32 *)BLOB_RAM_BASE; dst = (u32 *)BLOB_START; numwords = BLOB_LEN / 4; blob_status.blobsize = 0; blob_status.blobtype = fromflash; SerialOutputString("Loading blob from flash "); } else if(mystrncmp(commandline, "kernel", 6) == 0) { src = (u32 *)KERNEL_RAM_BASE; dst = (u32 *)KERNEL_START; numwords = KERNEL_LEN / 4; blob_status.kernelsize = 0; blob_status.kerneltype = fromflash; SerialOutputString("Loading kernel from flash "); } else if(mystrncmp(commandline, "ramdisk", 7) == 0) { src = (u32 *)RAMDISK_RAM_BASE; dst = (u32 *)INITRD_START; numwords = INITRD_LEN / 4; blob_status.ramdisksize = 0; blob_status.ramdisktype = fromflash; SerialOutputString("Loading g ramdisk from flash "); } else { SerialOutputString("*** Don't know how to reload ""); SerialOutputString(commandline); SerialOutputString(" " n"); return; } Reload 함수 MyStrNCmp() 함수를이용하여인자로넘어온이미지를 Blob인경우0xc 번지에 Kernel인경우0xc 번지에 Ramdisk인경우0xc 번지에올린다. } MyMemCpy(src, dst, numwords); SerialOutputString(" done n");

46 Memory 구성도 start.s 0x rest(trampoline.s, main.c ) 0x c Kernel Ramdisk Blob 0x c x c x c

47 ~/src/main.cc main 함수 /* wait 10 seconds before starting autoboot */ SerialOutputString("Autoboot in progress, press any key to stop "); for(i = 0; i < 10; i++) { SerialOutputByte('.'); 10초간기다린뒤별도의입력이없었다면리눅스를부팅시킨다 retval = SerialInputBlock(commandline, 1, 1); } if(retval > 0) break; /* no key was pressed, so proceed booting the kernel */ if(retval == 0) { commandline[0] = ' 0'; boot_linux(commandline); }

48 ~/src/main.cc main 함수 void boot_linux(char *commandline) { register u32 i; void (*thekernel)(int zero, int arch) = (void (*)(int, int))kernel_ram_base; setup_start_tag(); setup_memory_tags(); setup_commandline_tag(commandline); setup_initrd_tag(); setup_ramdisk_tag(); tag(); setup_end_tag(); 커널이사용할 BOOT_PARAMS 를채워서메모리 0xc 에올려놓고 } /* we assume that the kernel is in place */ SerialOutputString(" nstarting kernel... n n"); /* turn off I-cache */ asm ("mrc p15, 0, %0, c1, c0, 0": "=r" (i)); i &= ~0x1000; asm ("mcr p15, 0, %0, c1, c0, 0": : "r" (i)); /* flush I-cache */ asm ("mcr p15, 0, %0, c7, c5, 0": : "r" (i)); thekernel(0, ARCH_NUMBER); SerialOutputString("Hey, the kernel returned! This should not happen. n"); I-cache 를끄고, flush 시킨뒤첫번째 arg에는 0을두번째 arg에는 ARCH_NUMBER를넣고제어를넘긴다.

49 tag구조체 linux/include/asm-arm/setup arm/setup.h struct tag_header { u32 size; u32 tag; }; struct tag { struct tag_header hdr; union { struct tag_core core; struct tag_mem32 mem; struct tag_videotext videotext; struct tag_ramdisk ramdisk; struct tag_initrd initrd; struct tag_serialnr serialnr; struct tag_revision revision; struct tag_videolfb videolfb; struct tag_cmdline cmdline; tag 의크기와 magic number 메모리의크기와시작주소비디오램의위치와 resolution ramdisk의옵션, 크기및시작주소 Initial RAM disk의크기와시작주소 Serial의개수 Revision 번호 Video Frame Buffer의설정사항 }; } u; /* * Acorn specific */ struct tag_acorn acorn; /* * DC21285 specific */ struct tag_memclk memclk;

50 Memory 구성도 start.s 0x BOOT_PARAMS rest(trampoline.s, main.c ) 0x c x c Kernel Ramdisk Blob 0x c x c x c

Microsoft PowerPoint - LN_2_Bootloader.ppt [호환 모드]

Microsoft PowerPoint - LN_2_Bootloader.ppt [호환 모드] 프로젝트 2 부트로더동작원리분석 단국대학교컴퓨터학과 2009 백승재 baeksj@dankook.ac.kr k k k http://embedded.dankook.ac.kr/~baeksj Target Board 가생기면... Schematic Chip manual Bootloader blob, u-boot,... Kernel Rootfs ramdisk, cramfs,

More information

슬라이드 제목 없음

슬라이드 제목 없음 < > Target cross compiler Target code Target Software Development Kit (SDK) T-Appl T-Appl T-VM Cross downloader Cross debugger Case 1) Serial line Case 2) LAN line LAN line T-OS Target debugger Host System

More information

K&R2 Reference Manual 번역본

K&R2 Reference Manual 번역본 typewriter structunion struct union if-else if if else if if else if if if if else else ; auto register static extern typedef void char short int long float double signed unsigned const volatile { } struct

More information

SRC PLUS 제어기 MANUAL

SRC PLUS 제어기 MANUAL ,,,, DE FIN E I N T R E A L L O C E N D SU B E N D S U B M O TIO

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 (Host) set up : Linux Backend RS-232, Ethernet, parallel(jtag) Host terminal Target terminal : monitor (Minicom) JTAG Cross compiler Boot loader Pentium Redhat 9.0 Serial port Serial cross cable Ethernet

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 BOOTLOADER Jo, Heeseung 부트로더컴파일 부트로더소스복사및압축해제 부트로더소스는웹페이지에서다운로드 /working 디렉터리로이동한후, wget으로다운로드 이후작업은모두 /working 디렉터리에서진행 root@ubuntu:# cp /media/sm5-linux-111031/source/platform/uboot-s4210.tar.bz2 /working

More information

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F >

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F > 10주차 문자 LCD 의인터페이스회로및구동함수 Next-Generation Networks Lab. 5. 16x2 CLCD 모듈 (HY-1602H-803) 그림 11-18 19 핀설명표 11-11 번호 분류 핀이름 레벨 (V) 기능 1 V SS or GND 0 GND 전원 2 V Power DD or V CC +5 CLCD 구동전원 3 V 0 - CLCD 명암조절

More information

휠세미나3 ver0.4

휠세미나3 ver0.4 andromeda@sparcs:/$ ls -al dev/sda* brw-rw---- 1 root disk 8, 0 2014-06-09 18:43 dev/sda brw-rw---- 1 root disk 8, 1 2014-06-09 18:43 dev/sda1 brw-rw---- 1 root disk 8, 2 2014-06-09 18:43 dev/sda2 andromeda@sparcs:/$

More information

hlogin2

hlogin2 0x02. Stack Corruption off-limit Kernel Stack libc Heap BSS Data Code off-limit Kernel Kernel : OS Stack libc Heap BSS Data Code Stack : libc : Heap : BSS, Data : bss Code : off-limit Kernel Kernel : OS

More information

GNU/Linux 1, GNU/Linux MS-DOS LOADLIN DOS-MBR LILO DOS-MBR LILO... 6

GNU/Linux 1, GNU/Linux MS-DOS LOADLIN DOS-MBR LILO DOS-MBR LILO... 6 GNU/ 1, qkim@pecetrirekr GNU/ 1 1 2 2 3 4 31 MS-DOS 5 32 LOADLIN 5 33 DOS- LILO 6 34 DOS- 6 35 LILO 6 4 7 41 BIOS 7 42 8 43 8 44 8 45 9 46 9 47 2 9 5 X86 GNU/LINUX 10 1 GNU/, GNU/ 2, 3, 1 : V 11, 2001

More information

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 -

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - (Asynchronous Mode) - - - ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - UART (Univ ers al As y nchronous Receiver / T rans mitter) 8250A 8250A { COM1(3F8H). - Line Control Register

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 KeyPad Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 에는 16 개의 Tack Switch 를사용하여 4 행 4 열의 Keypad 가장착 4x4 Keypad 2 KeyPad 를제어하기위하여 FPGA 내부에 KeyPad controller 가구현 KeyPad controller 16bit 로구성된

More information

Microsoft Word - FS_ZigBee_Manual_V1.3.docx

Microsoft Word - FS_ZigBee_Manual_V1.3.docx FirmSYS Zigbee etworks Kit User Manual FS-ZK500 Rev. 2008/05 Page 1 of 26 Version 1.3 목 차 1. 제품구성... 3 2. 개요... 4 3. 네트워크 설명... 5 4. 호스트/노드 설명... 6 네트워크 구성... 6 5. 모바일 태그 설명... 8 6. 프로토콜 설명... 9 프로토콜 목록...

More information

<4D F736F F F696E74202D20BBB7BBB7C7D15F FBEDFB0A3B1B3C0B05FC1A638C0CFC2F72E BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20BBB7BBB7C7D15F FBEDFB0A3B1B3C0B05FC1A638C0CFC2F72E BC8A3C8AF20B8F0B5E55D> 뻔뻔한 AVR 프로그래밍 The Last(8 th ) Lecture 유명환 ( yoo@netplug.co.kr) INDEX 1 I 2 C 통신이야기 2 ATmega128 TWI(I 2 C) 구조분석 4 ATmega128 TWI(I 2 C) 실습 : AT24C16 1 I 2 C 통신이야기 I 2 C Inter IC Bus 어떤 IC들간에도공통적으로통할수있는 ex)

More information

Mango220 Android How to compile and Transfer image to Target

Mango220 Android How to compile and Transfer image to Target Mango220 Android How to compile and Transfer image to Target http://www.mangoboard.com/ http://cafe.naver.com/embeddedcrazyboys Crazy Embedded Laboratory www.mangoboard.com cafe.naver.com/embeddedcrazyboys

More information

Here is a "PLDWorld.com"... // EXCALIBUR... // Additional Resources // µc/os-ii... Page 1 of 23 Additional Resources: µc/os-ii Author: Source: HiTEL D

Here is a PLDWorld.com... // EXCALIBUR... // Additional Resources // µc/os-ii... Page 1 of 23 Additional Resources: µc/os-ii Author: Source: HiTEL D Page 1 of 23 Additional Resources: µc/os-ii Author: Source: HiTEL Digital Sig Date: 2004929 µ (1) uc/os-ii RTOS uc/os-ii EP7209 uc/os-ii, EP7209 EP7209,, CPU ARM720 Core CPU ARM7 CPU wwwnanowitcom10 '

More information

KEY 디바이스 드라이버

KEY 디바이스 드라이버 KEY 디바이스드라이버 임베디드시스템소프트웨어 I (http://et.smu.ac.kr et.smu.ac.kr) 차례 GPIO 및 Control Registers KEY 하드웨어구성 KEY Driver 프로그램 key-driver.c 시험응용프로그램 key-app.c KEY 디바이스드라이버 11-2 GPIO(General-Purpose Purpose I/O)

More information

Microsoft Word - 1. ARM Assembly 실습_xp2.doc

Microsoft Word - 1. ARM Assembly 실습_xp2.doc ARM asm 의구조 ARM Assembly 실습 1. 기본골격 AREA armex,code, READONLY ;Mark first instruction to execute start MOV r0, #10 MOV r1,#3 ADD r0, r0, r1 ; r0 = r0 + r1 stop NOP NOP B stop ; Mark end of file 위의 asm의구조를이해하고실행해보세요.

More information

Microsoft PowerPoint - ch07.ppt

Microsoft PowerPoint - ch07.ppt chapter 07. 시스코라우터기본동작 한빛미디어 -1- 학습목표 시스코라우터외적, 내적구성요소 시스코라우터부팅단계 시스코라우터명령어모드 한빛미디어 -2- 시스코라우터구성요소 라우터외부구성요소 (1) [ 그림 ] 2600 라우터전면도 인터페이스카드 전원부 LED 라우터조건 한빛미디어 -3- 시스코라우터구성요소 라우터외부구성요소 (2) [ 그림 ] VTY 를이용한라우터접속

More information

Solaris Express Developer Edition

Solaris Express Developer Edition Solaris Express Developer Edition : 2008 1 Solaris TM Express Developer Edition Solaris OS. Sun / Solaris, Java, Web 2.0,,. Developer Solaris Express Developer Edition System Requirements. 768MB. SPARC

More information

MAX+plus II Getting Started - 무작정따라하기

MAX+plus II Getting Started - 무작정따라하기 무작정 따라하기 2001 10 4 / Version 20-2 0 MAX+plus II Digital, Schematic Capture MAX+plus II, IC, CPLD FPGA (Logic) ALTERA PLD FLEX10K Series EPF10K10QC208-4 MAX+plus II Project, Schematic, Design Compilation,

More information

(SW3704) Gingerbread Source Build & Working Guide

(SW3704) Gingerbread Source Build & Working Guide (Mango-M32F4) Test Guide http://www.mangoboard.com/ http://cafe.naver.com/embeddedcrazyboys Crazy Embedded Laboratory www.mangoboard.com cafe.naver.com/embeddedcrazyboys CRZ Technology 1 Document History

More information

[8051] 강의자료.PDF

[8051] 강의자료.PDF CY AC F0 RS1 RS0 OV - P 0xFF 0x80 0x7F 0x30 0x2F 0x20 0x1F 0x18 0x17 0x10 0x0F 0x08 0x07 0x00 0x0000 0x0FFF 0x1000 0xFFFF 0x0000 0xFFFF RAM SFR SMOD - - - GF1 GF0 PD IDL 31 19 18 9 12 13 14 15 1 2 3 4

More information

untitled

untitled Step Motor Device Driver Embedded System Lab. II Step Motor Step Motor Step Motor source Embedded System Lab. II 2 open loop, : : Pulse, 1 Pulse,, -, 1 +5%, step Step Motor (2),, Embedded System Lab. II

More information

1217 WebTrafMon II

1217 WebTrafMon II (1/28) (2/28) (10 Mbps ) Video, Audio. (3/28) 10 ~ 15 ( : telnet, ftp ),, (4/28) UDP/TCP (5/28) centralized environment packet header information analysis network traffic data, capture presentation network

More information

강의10

강의10 Computer Programming gdb and awk 12 th Lecture 김현철컴퓨터공학부서울대학교 순서 C Compiler and Linker 보충 Static vs Shared Libraries ( 계속 ) gdb awk Q&A Shared vs Static Libraries ( 계속 ) Advantage of Using Libraries Reduced

More information

Mango-AM335x LCD Type 커널 Module Parameter에서 변경하기

Mango-AM335x LCD Type 커널 Module Parameter에서 변경하기 Mango-AM335x LCD Type 커널 Module Parameter 에서 변경하기 http://www.mangoboard.com/ http://cafe.naver.com/embeddedcrazyboys Crazy Embedded Laboratory www.mangoboard.com cafe.naver.com/embeddedcrazyboys CRZ Technology

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Web server porting 2 Jo, Heeseung Web 을이용한 LED 제어 Web 을이용한 LED 제어프로그램 web 에서데이터를전송받아타겟보드의 LED 를조작하는프로그램을작성하기위해다음과같은소스파일을생성 2 Web 을이용한 LED 제어 LED 제어프로그램작성 8bitled.html 파일을작성 root@ubuntu:/working/web# vi

More information

6주차.key

6주차.key 6, Process concept A program in execution Program code PCB (process control block) Program counter, registers, etc. Stack Heap Data section => global variable Process in memory Process state New Running

More information

슬라이드 1

슬라이드 1 / 유닉스시스템개요 / 파일 / 프로세스 01 File Descriptor file file descriptor file type unix 에서의파일은단지바이트들의나열임 operating system 은파일에어떤포맷도부과하지않음 파일의내용은바이트단위로주소를줄수있음 file descriptor 는 0 이나양수임 file 은 open 이나 creat 로 file

More information

untitled

untitled Embedded System Lab. II Embedded System Lab. II 2 RTOS Hard Real-Time vs Soft Real-Time RTOS Real-Time, Real-Time RTOS General purpose system OS H/W RTOS H/W task Hard Real-Time Real-Time System, Hard

More information

Deok9_Exploit Technique

Deok9_Exploit Technique Exploit Technique CodeEngn Co-Administrator!!! and Team Sur3x5F Member Nick : Deok9 E-mail : DDeok9@gmail.com HomePage : http://deok9.sur3x5f.org Twitter :@DDeok9 > 1. Shell Code 2. Security

More information

Stage 2 First Phonics

Stage 2 First Phonics ORT Stage 2 First Phonics The Big Egg What could the big egg be? What are the characters doing? What do you think the story will be about? (큰 달걀은 무엇일까요? 등장인물들은 지금 무엇을 하고 있는 걸까요? 책은 어떤 내용일 것 같나요?) 대해 칭찬해

More information

INTRO Basic architecture of modern computers Basic and most used assembly instructions on x86 Installing an assembly compiler and RE tools Practice co

INTRO Basic architecture of modern computers Basic and most used assembly instructions on x86 Installing an assembly compiler and RE tools Practice co Basic reverse engineering on x86 This is for those who want to learn about basic reverse engineering on x86 (Feel free to use this, email me if you need a keynote version.) v0.1 SeungJin Beist Lee beist@grayhash.com

More information

Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3

Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3 Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3 Example 3.1 Files 3.2 Source code 3.3 Exploit flow

More information

Microsoft PowerPoint - 03-Development-Environment-2.ppt

Microsoft PowerPoint - 03-Development-Environment-2.ppt 개발환경 2 임베디드시스템소프트웨어 I 차례 부트로더의기능, 컴파일방법 커널의기능, 컴파일방법 파일시스템의기능, 생성방법 Host-KIT 네트워크연결방법 (Bootp, TFTP, NFS) 개발환경 2 2 부트로더의기능 하드웨어초기화 CPU clock, Memory Timing, Interrupt, UART, GPIO 등을초기화 커널로드 커널이미지를 flash

More information

T100MD+

T100MD+ User s Manual 100% ) ( x b a a + 1 RX+ TX+ DTR GND TX+ RX+ DTR GND RX+ TX+ DTR GND DSR RX+ TX+ DTR GND DSR [ DCE TYPE ] [ DCE TYPE ] RS232 Format Baud 1 T100MD+

More information

MPLAB C18 C

MPLAB C18 C MPLAB C18 C MPLAB C18 MPLAB C18 C MPLAB C18 C #define START, c:\mcc18 errorlevel{0 1} char isascii(char ch); list[list_optioin,list_option] OK, Cancel , MPLAB IDE User s Guide MPLAB C18 C

More information

hd1300_k_v1r2_Final_.PDF

hd1300_k_v1r2_Final_.PDF Starter's Kit for HelloDevice 1300 Version 11 1 2 1 2 3 31 32 33 34 35 36 4 41 42 43 5 51 52 6 61 62 Appendix A (cross-over) IP 3 Starter's Kit for HelloDevice 1300 1 HelloDevice 1300 Starter's Kit HelloDevice

More information

슬라이드 1

슬라이드 1 마이크로컨트롤러 2 (MicroController2) 2 강 ATmega128 의 external interrupt 이귀형교수님 학습목표 interrupt 란무엇인가? 기본개념을알아본다. interrupt 중에서가장사용하기쉬운 external interrupt 의사용방법을학습한다. 1. Interrupt 는왜필요할까? 함수동작을추가하여실행시키려면? //***

More information

Remote UI Guide

Remote UI Guide Remote UI KOR Remote UI Remote UI PDF Adobe Reader/Adobe Acrobat Reader. Adobe Reader/Adobe Acrobat Reader Adobe Systems Incorporated.. Canon. Remote UI GIF Adobe Systems Incorporated Photoshop. ..........................................................

More information

목차 1. 제품 소개... 4 1.1 특징... 4 1.2 개요... 4 1.3 Function table... 5 2. 기능 소개... 6 2.1 Copy... 6 2.2 Compare... 6 2.3 Copy & Compare... 6 2.4 Erase... 6 2

목차 1. 제품 소개... 4 1.1 특징... 4 1.2 개요... 4 1.3 Function table... 5 2. 기능 소개... 6 2.1 Copy... 6 2.2 Compare... 6 2.3 Copy & Compare... 6 2.4 Erase... 6 2 유영테크닉스( 주) 사용자 설명서 HDD014/034 IDE & SATA Hard Drive Duplicator 유 영 테 크 닉 스 ( 주) (032)670-7880 www.yooyoung-tech.com 목차 1. 제품 소개... 4 1.1 특징... 4 1.2 개요... 4 1.3 Function table... 5 2. 기능 소개... 6 2.1 Copy...

More information

2. GCC Assembler와 AVR Assembler의차이 A. GCC Assembler 를사용하는경우 i. Assembly Language Program은.S Extension 을갖는다. ii. C Language Program은.c Extension 을갖는다.

2. GCC Assembler와 AVR Assembler의차이 A. GCC Assembler 를사용하는경우 i. Assembly Language Program은.S Extension 을갖는다. ii. C Language Program은.c Extension 을갖는다. C 언어와 Assembly Language 을사용한 Programming 20011.9 경희대학교조원경 1. AVR Studio 에서사용하는 Assembler AVR Studio에서는 GCC Assembler와 AVR Assmbler를사용한다. A. GCC Assembler : GCC를사용하는경우 (WinAVR 등을사용하는경우 ) 사용할수있다. New Project

More information

CD-RW_Advanced.PDF

CD-RW_Advanced.PDF HP CD-Writer Program User Guide - - Ver. 2.0 HP CD-RW Adaptec Easy CD Creator Copier, Direct CD. HP CD-RW,. Easy CD Creator 3.5C, Direct CD 3.0., HP. HP CD-RW TEAM ( 02-3270-0803 ) < > 1. CD...3 CD...5

More information

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202834C1D6C2F7207E2038C1D6C2F729>

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202834C1D6C2F7207E2038C1D6C2F729> 8주차중간고사 ( 인터럽트및 A/D 변환기문제및풀이 ) Next-Generation Networks Lab. 외부입력인터럽트예제 문제 1 포트 A 의 7-segment 에초시계를구현한다. Tact 스위치 SW3 을 CPU 보드의 PE4 에연결한다. 그리고, SW3 을누르면하강 에지에서초시계가 00 으로초기화된다. 동시에 Tact 스위치 SW4 를 CPU 보드의

More information

Sena Technologies, Inc. HelloDevice Super 1.1.0

Sena Technologies, Inc. HelloDevice Super 1.1.0 HelloDevice Super 110 Copyright 1998-2005, All rights reserved HelloDevice 210 ()137-130 Tel: (02) 573-5422 Fax: (02) 573-7710 E-Mail: support@senacom Website: http://wwwsenacom Revision history Revision

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-Segment Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 6-Digit 7-Segment LED controller 16비트로구성된 2개의레지스터에의해제어 SEG_Sel_Reg(Segment

More information

DE1-SoC Board

DE1-SoC Board 실습 1 개발환경 DE1-SoC Board Design Tools - Installation Download & Install Quartus Prime Lite Edition http://www.altera.com/ Quartus Prime (includes Nios II EDS) Nios II Embedded Design Suite (EDS) is automatically

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-Segment Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 6-Digit 7-Segment LED Controller 16비트로구성된 2개의레지스터에의해제어 SEG_Sel_Reg(Segment

More information

vi 사용법

vi 사용법 유닉스프로그래밍및실습 gdb 사용법 fprintf 이용 단순디버깅 확인하고자하는코드부분에 fprintf(stderr, ) 를이용하여그지점까지도달했는지여부와관심있는변수의값을확인 여러유형의단순한문제를확인할수있음 그러나자세히살펴보기위해서는디버깅툴필요 int main(void) { int count; long large_no; double real_no; init_vars();

More information

Something that can be seen, touched or otherwise sensed

Something that can be seen, touched or otherwise sensed Something that can be seen, touched or otherwise sensed Things about an object Weight Height Material Things an object does Pen writes Book stores words Water have Fresh water Rivers Oceans have

More information

임베디드시스템설계강의자료 4 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과

임베디드시스템설계강의자료 4 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 임베디드시스템설계강의자료 4 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 Outline n n n n n n 보드개요보드연결필수패키지, Tool-Chain 설치 Kernel, file system build Fastboot 및 Tera Term설치 Kernel, file system 이미지전송및설치 - 2 - Young-Jin Kim X-Hyper320TKU

More information

2 / 26

2 / 26 1 / 26 2 / 26 3 / 26 4 / 26 5 / 26 6 / 26 7 / 26 8 / 26 9 / 26 10 / 26 11 / 26 12 / 26 13 / 26 14 / 26 o o o 15 / 26 o 16 / 26 17 / 26 18 / 26 Comparison of RAID levels RAID level Minimum number of drives

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Text-LCD Device Control - Device driver Jo, Heeseung M3 모듈에장착되어있는 Tedxt LCD 장치를제어하는 App 을개발 TextLCD 는영문자와숫자일본어, 특수문자를표현하는데사용되는디바이스 HBE-SM5-S4210 의 TextLCD 는 16 문자 *2 라인을 Display 할수있으며, 이 TextLCD 를제어하기위하여

More information

MicrocontrollerAcademy_Lab_ST_040709

MicrocontrollerAcademy_Lab_ST_040709 Micro-Controller Academy Program Lab Materials STMicroelectronics ST72F324J6B5 Seung Jun Sang Sa Ltd. Seung Jun Sang Sa Ltd. Seung Jun Sang Sa Ltd. Seung Jun Sang Sa Ltd. Seung Jun Sang Sa Ltd. Seung Jun

More information

다음 사항을 꼭 확인하세요! 도움말 안내 - 본 도움말에는 iodd2511 조작방법 및 활용법이 적혀 있습니다. - 본 제품 사용 전에 안전을 위한 주의사항 을 반드시 숙지하십시오. - 문제가 발생하면 문제해결 을 참조하십시오. 중요한 Data 는 항상 백업 하십시오.

다음 사항을 꼭 확인하세요! 도움말 안내 - 본 도움말에는 iodd2511 조작방법 및 활용법이 적혀 있습니다. - 본 제품 사용 전에 안전을 위한 주의사항 을 반드시 숙지하십시오. - 문제가 발생하면 문제해결 을 참조하십시오. 중요한 Data 는 항상 백업 하십시오. 메 뉴 다음 사항을 꼭 확인하세요! --------------------------------- 2p 안전을 위한 주의 사항 --------------------------------- 3p 구성품 --------------------------------- 4p 각 부분의 명칭 --------------------------------- 5p 제품의 규격

More information

Chapter #01 Subject

Chapter #01  Subject Device Driver March 24, 2004 Kim, ki-hyeon 목차 1. 인터럽트처리복습 1. 인터럽트복습 입력검출방법 인터럽트방식, 폴링 (polling) 방식 인터럽트서비스등록함수 ( 커널에등록 ) int request_irq(unsigned int irq, void(*handler)(int,void*,struct pt_regs*), unsigned

More information

R50_51_kor_ch1

R50_51_kor_ch1 S/N : 1234567890123 Boot Device Priority NumLock [Off] Enable Keypad [By NumLock] Summary screen [Disabled] Boor-time Diagnostic Screen [Disabled] PXE OPROM [Only with F12]

More information

Microsoft Word ARM_ver2_0a.docx

Microsoft Word ARM_ver2_0a.docx [Smart]0703-ARM 프로그램설치 _ver1_0a 목차 1 윈도우기반으로리눅스컴파일하기 (Cygwin, GNU ARM 설치 )... 2 1.1 ARM datasheet 받기... 2 1.2 Cygwin GCC-4.0 4.1 4.2 toolchain 파일받기... 2 1.3 Cygwin 다운로드... 3 1.4 Cygwin Setup... 5 2 Cygwin

More information

CPX-E-SYS_BES_C_ _ k1

CPX-E-SYS_BES_C_ _ k1 CPX-E 8727 27-7 [875294] CPX-E-SYS-KO CODESYS, PI PROFIBUS PROFINET (). :, 2 Festo CPX-E-SYS-KO 27-7 ... 5.... 5.2... 5.3... 5.4... 5.5... 5 2... 6 2.... 6 2..... 6 2..2 CPX-E... 7 2..3 CPX-E... 9 2..4...

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-SEGMENT DEVICE CONTROL - DEVICE DRIVER Jo, Heeseung 디바이스드라이버구현 : 7-SEGMENT HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 디바이스드라이버구현 : 7-SEGMENT 6-Digit 7-Segment LED

More information

LCD Monitor

LCD Monitor LCD MONITOR quick start guide 400FP-2 460FP-2 400FPn-2 460FPn-2 ii Floor standing type) Note LCD Display MagicInfo Software CD MagicInfo Manual CD (FPn-2.) (AAA X 2) (FPn-2.) BNC to RCA (46.) D-Sub DVI

More information

BMP 파일 처리

BMP 파일 처리 BMP 파일처리 김성영교수 금오공과대학교 컴퓨터공학과 학습내용 영상반전프로그램제작 2 Inverting images out = 255 - in 3 /* 이프로그램은 8bit gray-scale 영상을입력으로사용하여반전한후동일포맷의영상으로저장한다. */ #include #include #define WIDTHBYTES(bytes)

More information

<32B1B3BDC32E687770>

<32B1B3BDC32E687770> 008년도 상반기 제회 한 국 어 능 력 시 험 The th Test of Proficiency in Korean 일반 한국어(S-TOPIK 중급(Intermediate A 교시 이해 ( 듣기, 읽기 수험번호(Registration No. 이 름 (Name 한국어(Korean 영 어(English 유 의 사 항 Information. 시험 시작 지시가 있을

More information

CANTUS Evaluation Board Ap. Note

CANTUS Evaluation Board Ap. Note Preliminary CANTUS - UART - 32bits EISC Microprocessor CANTUS Ver 1. October 8, 29 Advanced Digital Chips Inc. Ver 1. PRELIMINARY CANTUS Application Note( EVM B d ) History 29-1-8 Created Preliminary Specification

More information

PowerChute Personal Edition v3.1.0 에이전트 사용 설명서

PowerChute Personal Edition v3.1.0 에이전트 사용 설명서 PowerChute Personal Edition v3.1.0 990-3772D-019 4/2019 Schneider Electric IT Corporation Schneider Electric IT Corporation.. Schneider Electric IT Corporation,,,.,. Schneider Electric IT Corporation..

More information

Chap06(Interprocess Communication).PDF

Chap06(Interprocess Communication).PDF Interprocess Communication 2002 2 Hyun-Ju Park Introduction (interprocess communication; IPC) IPC data transfer sharing data event notification resource sharing process control Interprocess Communication

More information

DSP_MON 프로그램 메뉴얼

DSP_MON 프로그램 메뉴얼 UART_CAN Analyzer 윈도우 프로그램 사용자 메뉴얼 리얼시스 TEL : 031-420-4326 FAX : 031-420-4329 주소 : 경기도 안양시 동안구 관양동 799 안양메가밸리 319호 - 1 - UART_CAN Analyzer 제품을 구입해 주셔서 감사합니다. 본 제품을 구입하신 고객께서는 먼저 사용 설명서를 잘 읽어 보시고 제품을 사용하여

More information

CPX-E-EC_BES_C_ _ k1

CPX-E-EC_BES_C_ _ k1 CPX-E CPX-E-EC EtherCAT 8071155 2017-07 [8075310] CPX-E-EC CPX-E-EC-KO EtherCAT, TwinCAT (). :, 2 Festo CPX-E-EC-KO 2017-07 CPX-E-EC 1... 4 1.1... 4 1.2... 4 1.3... 4 1.4... 5 1.5... 5 2... 6 2.1... 6

More information

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070>

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070> #include "stdafx.h" #include "Huffman.h" 1 /* 비트의부분을뽑아내는함수 */ unsigned HF::bits(unsigned x, int k, int j) return (x >> k) & ~(~0

More information

/chroot/lib/ /chroot/etc/

/chroot/lib/ /chroot/etc/ 구축 환경 VirtualBox - Fedora 15 (kernel : 2.6.40.4-5.fc15.i686.PAE) 작동 원리 chroot유저 ssh 접속 -> 접속유저의 홈디렉토리 밑.ssh의 rc 파일 실행 -> daemonstart실행 -> daemon 작동 -> 접속 유저만의 Jail 디렉토리 생성 -> 접속 유저의.bashrc 의 chroot 명령어

More information

Microsoft Word doc

Microsoft Word doc 2. 디바이스드라이버 [ DIO ] 2.1. 개요 타겟보드의데이터버스를이용하여 LED 및스위치동작을제어하는방법을설명하겠다. 2.2. 회로도 2.3. 준비조건 ARM 용크로스컴파일러가설치되어있어야한다. 하드웨어적인점검을하여정상적인동작을한다고가정한다. NFS(Network File System) 를사용할경우에는 NFS가마운트되어있어야한다. 여기서는소스전문을포함하지않았다.

More information

LCD Monitor

LCD Monitor LCD MONITOR quick start guide 320TSn-2 ii Floor standing type) LCD Display D-Sub AAA X 2) 8 DVI KIT LAN TV Note TV MENU MENU] 9 ENTER ENTER] SOURCE SOURCE] [PC DVI HDMI MagicInfo] TV TV D.MENU D.MENU TV

More information

untitled

untitled CAN BUS RS232 Line Ethernet CAN H/W FIFO RS232 FIFO IP ARP CAN S/W FIFO TERMINAL Emulator COMMAND Interpreter ICMP TCP UDP PROTOCOL Converter TELNET DHCP C2E SW1 CAN RS232 RJ45 Power

More information

untitled

untitled Push... 2 Push... 4 Push... 5 Push... 13 Push... 15 1 FORCS Co., LTD A Leader of Enterprise e-business Solution Push (Daemon ), Push Push Observer. Push., Observer. Session. Thread Thread. Observer ID.

More information

Microsoft PowerPoint - o8.pptx

Microsoft PowerPoint - o8.pptx 메모리보호 (Memory Protection) 메모리보호를위해 page table entry에 protection bit와 valid bit 추가 Protection bits read-write / read-only / executable-only 정의 page 단위의 memory protection 제공 Valid bit (or valid-invalid bit)

More information

API 매뉴얼

API 매뉴얼 PCI-DIO12 API Programming (Rev 1.0) Windows, Windows2000, Windows NT and Windows XP are trademarks of Microsoft. We acknowledge that the trademarks or service names of all other organizations mentioned

More information

APOGEE Insight_KR_Base_3P11

APOGEE Insight_KR_Base_3P11 Technical Specification Sheet Document No. 149-332P25 September, 2010 Insight 3.11 Base Workstation 그림 1. Insight Base 메인메뉴 Insight Base Insight Insight Base, Insight Base Insight Base Insight Windows

More information

본교재는수업용으로제작된게시물입니다. 영리목적으로사용할경우저작권법제 30 조항에의거법적처벌을받을수있습니다. [ 실습 ] 스위치장비초기화 1. NVRAM 에저장되어있는 'startup-config' 파일이있다면, 삭제를실시한다. SWx>enable SWx#erase sta

본교재는수업용으로제작된게시물입니다. 영리목적으로사용할경우저작권법제 30 조항에의거법적처벌을받을수있습니다. [ 실습 ] 스위치장비초기화 1. NVRAM 에저장되어있는 'startup-config' 파일이있다면, 삭제를실시한다. SWx>enable SWx#erase sta [ 실습 ] 스위치장비초기화 1. NVRAM 에저장되어있는 'startup-config' 파일이있다면, 삭제를실시한다. SWx>enable SWx#erase startup-config Erasing the nvram filesystem will remove all configuration files Continue? [confirm] ( 엔터 ) [OK] Erase

More information

1. GigE Camera Interface를 위한 최소 PC 사양 CPU : Intel Core 2 Duo, 2.4GHz이상 RAM : 2GB 이상 LANcard : Intel PRO/1000xT 이상 VGA : PCI x 16, VRAM DDR2 RAM 256MB

1. GigE Camera Interface를 위한 최소 PC 사양 CPU : Intel Core 2 Duo, 2.4GHz이상 RAM : 2GB 이상 LANcard : Intel PRO/1000xT 이상 VGA : PCI x 16, VRAM DDR2 RAM 256MB Revision 1.0 Date 11th Nov. 2013 Description Established. Page Page 1 of 9 1. GigE Camera Interface를 위한 최소 PC 사양 CPU : Intel Core 2 Duo, 2.4GHz이상 RAM : 2GB 이상 LANcard : Intel PRO/1000xT 이상 VGA : PCI x

More information

Microsoft PowerPoint - 알고리즘_1주차_2차시.pptx

Microsoft PowerPoint - 알고리즘_1주차_2차시.pptx Chapter 2 Secondary Storage and System Software References: 1. M. J. Folk and B. Zoellick, File Structures, Addison-Wesley. 목차 Disks Storage as a Hierarchy Buffer Management Flash Memory 영남대학교데이터베이스연구실

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Verilog: Finite State Machines CSED311 Lab03 Joonsung Kim, joonsung90@postech.ac.kr Finite State Machines Digital system design 시간에배운것과같습니다. Moore / Mealy machines Verilog 를이용해서어떻게구현할까? 2 Finite State

More information

Integ

Integ HP Integrity HP Chipset Itanium 2(Processor 9100) HP Integrity HP, Itanium. HP Integrity Blade BL860c HP Integrity Blade BL870c HP Integrity rx2660 HP Integrity rx3600 HP Integrity rx6600 2 HP Integrity

More information

Microsoft Word - ExecutionStack

Microsoft Word - ExecutionStack Lecture 15: LM code from high level language /* Simple Program */ external int get_int(); external void put_int(); int sum; clear_sum() { sum=0; int step=2; main() { register int i; static int count; clear_sum();

More information

Microsoft PowerPoint - polling.pptx

Microsoft PowerPoint - polling.pptx 지현석 (binish@home.cnu.ac.kr) http://binish.or.kr Index 이슈화된키보드해킹 최근키보드해킹이슈의배경지식 Interrupt VS polling What is polling? Polling pseudo code Polling 을이용한키로거분석 방어기법연구 이슈화된키보드해킹 키보드해킹은연일상한가! 주식, 펀드투자의시기?! 최근키보드해킹이슈의배경지식

More information

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어 개나리 연구소 C 언어 노트 (tyback.egloos.com) 프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어먹고 하더라구요. 그래서,

More information

TEL:02)861-1175, FAX:02)861-1176 , REAL-TIME,, ( ) CUSTOMER. CUSTOMER REAL TIME CUSTOMER D/B RF HANDY TEMINAL RF, RF (AP-3020) : LAN-S (N-1000) : LAN (TCP/IP) RF (PPT-2740) : RF (,RF ) : (CL-201)

More information

API 매뉴얼

API 매뉴얼 PCI-TC03 API Programming (Rev 1.0) Windows, Windows2000, Windows NT, Windows XP and Windows 7 are trademarks of Microsoft. We acknowledge that the trademarks or service names of all other organizations

More information

알아 둘 사항 아이오드 제조사는 본 기기에 하드디스크를 포함하여 출고하지 않습니다. 따라서 하드디스크에 문제가 발생할 경우, 구매처 또는 해당 하드디스크 서비 스센터에 문의 하시기 바랍니다. 정해진 용도 외의 사용으로 발생한 문제에 대해서, 당사는 어떠한 책임도 지지

알아 둘 사항 아이오드 제조사는 본 기기에 하드디스크를 포함하여 출고하지 않습니다. 따라서 하드디스크에 문제가 발생할 경우, 구매처 또는 해당 하드디스크 서비 스센터에 문의 하시기 바랍니다. 정해진 용도 외의 사용으로 발생한 문제에 대해서, 당사는 어떠한 책임도 지지 경기도 용인시 기흥구 중동 1030번지 대우프론티어밸리 1단지 714호 고객지원실 1599-7936 www.iodd.co.kr MNU2541-01-201309 알아 둘 사항 아이오드 제조사는 본 기기에 하드디스크를 포함하여 출고하지 않습니다. 따라서 하드디스크에 문제가 발생할 경우, 구매처 또는 해당 하드디스크 서비 스센터에 문의 하시기 바랍니다. 정해진 용도

More information

Microsoft PowerPoint - 02-Development-Environment-1.ppt

Microsoft PowerPoint - 02-Development-Environment-1.ppt 개발환경 1 임베디드시스템소프트웨어 I 차례 개발환경 Host와 Target의연결 Host 및 target 사양 Toolchain이란, 설치방법 시험 Cross Compile Minicom 설정및사용방법 JTAG 설치및사용방법 Bootloader, kernel, file system flash 방법 개발환경 1 2 개발환경 Host 시스템 임베디드소프트웨어를개발하는시스템

More information

Mango-E-Toi Board Developer Manual

Mango-E-Toi Board Developer Manual Mango-E-Toi Board Developer Manual http://www.mangoboard.com/ http://cafe.naver.com/embeddedcrazyboys Crazy Embedded Laboratory www.mangoboard.com cafe.naver.com/embeddedcrazyboys CRZ Technology 1 Document

More information

C 프로그래밍 언어 입문 C 프로그래밍 언어 입문 김명호저 숭실대학교 출판국 머리말..... C, C++, Java, Fortran, Python, Ruby,.. C. C 1972. 40 C.. C. 1999 C99. C99. C. C. C., kmh ssu.ac.kr.. ,. 2013 12 Contents 1장 프로그래밍 시작 1.1 C 10 1.2 12

More information

10주차.key

10주차.key 10, Process synchronization (concurrently) ( ) => critical section ( ) / =>, A, B / Race condition int counter; Process A { counter++; } Process B { counter ;.. } counter++ register1 = counter register1

More information

슬라이드 제목 없음

슬라이드 제목 없음 ETOS-DPS-X Guide AC&T SYSTEM 1 ETOS-DPS-X 개요 ETOS-DPS-X Field Bus Network 중 Profibus-DP Network 에연결되는장비. ProfiBus-DP Network 시스템에 DP 통신을지원하지않는현장장비에대한통신서버기능구현. Profibus-DP Slave 동작하기때문에반드시 DP-Master 모듈이있는시스템에서적용가능.

More information

H3050(aap)

H3050(aap) USB Windows 7/ Vista 2 Windows XP English 1 2 3 4 Installation A. Headset B. Transmitter C. USB charging cable D. 3.5mm to USB audio cable - Before using the headset needs to be fully charged. -Connect

More information

10X56_NWG_KOR.indd

10X56_NWG_KOR.indd 디지털 프로젝터 X56 네트워크 가이드 이 제품을 구입해 주셔서 감사합니다. 본 설명서는 네트워크 기능 만을 설명하기 위한 것입니다. 본 제품을 올바르게 사 용하려면 이 취급절명저와 본 제품의 다른 취급절명저를 참조하시기 바랍니다. 중요한 주의사항 이 제품을 사용하기 전에 먼저 이 제품에 대한 모든 설명서를 잘 읽어 보십시오. 읽은 뒤에는 나중에 필요할 때

More information

Microsoft PowerPoint - a10.ppt [호환 모드]

Microsoft PowerPoint - a10.ppt [호환 모드] Structure Chapter 10: Structures t and Macros Structure 관련된변수들의그룹으로이루어진자료구조 template, pattern field structure를구성하는변수 (cf) C언어의 struct 프로그램의 structure 접근 entire structure 또는 individual fields Structure는

More information

KDTÁ¾ÇÕ-1-07/03

KDTÁ¾ÇÕ-1-07/03 CIMON-PLC CIMON-SCADA CIMON-TOUCH CIMON-Xpanel www.kdtsys.com CIMON-PLC Total Solution for Industrial Automation PLC (Program Logic Controller) Sphere 8 Total Solution For Industrial Automation PLC Application

More information

Copyright 2004 Sun Microsystems, Inc Network Circle, Santa Clara, CA U.S.A..,,. Sun. Sun. Berkeley BSD. UNIX X/Open Company, Ltd.. Sun, Su

Copyright 2004 Sun Microsystems, Inc Network Circle, Santa Clara, CA U.S.A..,,. Sun. Sun. Berkeley BSD. UNIX X/Open Company, Ltd.. Sun, Su Java Desktop System 2 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A. : 817 7757 10 2004 9 Copyright 2004 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A..,,.

More information