. 보안 업데이트가 계속 실패하길래 다음의 사이트에서 해당 내용을 확인

 

http://technet.microsoft.com/ko-kr/security/bulletin/MS13-017

 

 

결론은 KB2724197 업데이트를 삭제하고, KB2799494 업데이트가 된다.

 

 

KB2724197 업데이트를 삭제하는 방법은

 

1. 시작 -> 설정 -> 제어판 -> 프로그램 추가/제거

2. 상단 체크 박스에 "업데이트 표시" 에 체크

3. Windows XP - 소프트웨어 업데이트 중 KB2724197 삭제

 

그 뒤에 다시 업데이트 실행~!

About USB 컴퓨터 기본 2009. 9. 21. 15:16

Host를 기준

Device -> Host  :: In Transaction

Device <- Host :: Out Transaction

http://www.usb.org/developers/docs/

2.0 Spec 과 3.0 Spec 을 보자.


USB 3.0 Specification

Universal Serial Bus Revision 3.0 Specification (.zip file format, size 3.80 MB) provides the technical details to understand USB 3.0 requirements and design USB 3.0 compatible products. Modifications to the USB 3.0 specification are made through Engineering Change Notices (ECNs). Enclosed in this zip file are the following documents:

  1. The USB 3.0 Specification released on November 12, 2008
  2. USB 3.0 Adopters Agreement
  3. New Addition of Link Command LDN Engineering Change Notice as of April 4, 2009
  4. USB 3.0 Standard-B and Standard-B Crosstalk Engineering Change Notice as of April 4, 2009
  5. Reset Propagation Engineering Change Notice as of May 8, 2009
  6. Reset Propagation Figure
  7. Q1 09 USB 3.0 Errata as of May 15, 2009
Ubuntu Linux에 제로보드를 사용할 수 있는 웹서버를 만들고 싶다면

우선 제로보드가 필요한 APM을 설치해야 합니다.

□ APM 설치
리눅스 터미널 상에서 다음의 명령으로 간단히 설치가 가능합니다.

$sudo apt-get install ********

apache2 
libapache2-mod-auth-mysql
; mysql인증을 위한 모듈을 설치

php5
php5-common
php5-gd
php5-mysql
; mysql과 연동하기 위한 모듈
libapache2-mod-php5

mysql-server
mysql-client 
mysql-common


설치 중 위와 같은 화면에서는 MySQL의 root 권한의 패스워드를 설정하는 부분입니다.

자신이 설정하는 비밀번호를 입력하고, 그 뒤에 비밀번호를 재확인한 후 설치가 계속됩니다.

□ MySQL 에서의 Database 생성

제로보드에서 사용할 Database를 생성하는 부분입니다.

터미널 상에서 다음과 같이 입력합니다.

$mysql -u root -p

그러면 MySQL의 쉘 명령 입력 상태로 진입할 수 있습니다.

쉘 상태에서 다음과 같이 입력합니다.

>create database 사용할 데이터 베이스의 이름명;
Query OK, 1 row affected (0.05 sec)
>\q

* 데이터 베이스의 이름뒤에 세미콜론(;)을 넣어주는 거 중요합니다.

□ 제로보드의 설치

제로보드를 설치하기 위해 다음과 같은 명령을 실행합니다.

$cd /var/www
$svn checkout http://svn.zeroboard.com/zeroboard_xe/trunk . < 주소변경으로 접속불가
$svn checkout
http://svn.xpressengine.com/XpressEngine/trunk .

혹시라도 svn 명령이 듣지 않는다면 다음과 같은 명령으로 subversion을 설치하시기 바랍니다.

$sudo apt-get install subversion

그럼 제로보드가 /var/www 의 위치에 다음과 같이 설치됩니다.


그리고 다음의 명령으로 제로보드의 필수 설치조건을 통과하기 위해 퍼미션 권한을 변경합니다.

$cd ..
$sudo chmod 707 www/


그 후 다음의 명령으로 아파치 웹서버를 리부팅 합니다.

$sudo /etc/init.d/apache2 restart


Linux 상에서 ifconfig 명령으로 자신의 IP를 확인하고

웹브라우저 주소 입력창에 입력하면 다음과 같은 화면을 볼 수 있습니다.


설치를 진행하다 보면 다음과 같은 화면이 나타나게 됩니다.


DB의 비밀번호는 APM 설치 때 Root의 권한으로 입력한 비밀번호를 넣으시면 됩니다.

DB 데이터베이스는 이전에

>create database 사용할 데이터 베이스의 이름명;
Query OK, 1 row affected (0.05 sec)
>\q

로 입력한 데이터 베이스의 이름을 적어주시면 됩니다.
Linux 자체의 컴파일러를 사용하여 빌드할 수 있겠지만

별도의 컴파일러인 Code Sourcery를 Ubuntu Linux에서 사용하는 법을 소개합니다.

ARM®
ColdFire®
fido™
MIPS®
Power Architecture®
Stellaris®
and x86

위에 보이는 환경에 맞는 컴파일러는 각각 여러가지가 있지만 여기에서는 ARM®에 대해서만 다룹니다.


1. 설치하기

다운로드 받은 .bin 파일은 실행속성이 없기 때문에 바로 실행할 수가 없습니다.

실행가능 속성(+x)를 부여하여 실행할 수 있게 해줍니다.

다운받은 파일이 있는 디렉토리에서 다음과 같은 명령을 줍니다.

$chmod +x arm-2008q3-66-arm-none-eabi.bin

$./arm-2008q3-66-arm-none-eabi.bin

그럼 아래와 같은 익숙한 설치화면이 나오고 설명에 따라 설치를 계속 진행하면 됩니다.


2. Makefile의 수정

빌드하려는 곳의 디렉토리로 이동하여 vi로 Makefile을 열어줍니다.

$vi Makefile

그리고 ARCH의 내용을 다음과 같이 수정하여 크로스 컴파일러의 위치를 설정하여 줍니다.

ARCH            := arm
CROSS_COMPILE   := /home/xeno/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-
Microsoft  Visual Studio 가 무료로 배포되고 있습니다.
정확히 말하면 Express Edition 이라는 버전으로 말이죠.

대상은 비전문 프로그래머, 초보자, 학생들인데,
누구든지 무료로 다운받아 사용해볼 수 있고,
무료라고 해서 기능상의 제한이 있는것은 아닙니다.
가장 기본적인 VisualStudio .Net 200x 버전에서 각종 지원툴과
몇몇 라이브러리 기능이 제외된 순수한 컴파일러의 모습입니다.

작다고 무시할게 아닌, 오히려 순수 C/C++만을 공부해보실 분이라면
 가장 적합한 툴이 아닐까 생각합니다.
(MFC Wizard 지원은 안되지만 Win32API 공부먼저 해보기 딱 좋은 툴입니다.)

DirectX Software Development Kit :
다운

Visual Studio Express Edition 2008 : 다운

Visual Studio Express Edition 2005 : 다운


전... API를 공부해야 합니다!!
ioctl() 컴퓨터 기본 2008. 12. 15. 20:15

IOCTL 컴퓨터 기본 2008. 12. 14. 01:59
 

IOCTL-based Win32 joystick interface

Introduction

This interface allows PPJoy to represent a virtual joystick interface. A Win32 application provides joystick input to PPJoy via IOCTL calls. PPJoy will feed this input into DirectInput as a joystick; Win32 applications will think the input comes from a real joystick.

Below we present the steps required to open the virtual joystick control device, send input to it and finally close the control device. 

이 방법은 PPJoy가 사용하는 가상 조이스틱 인터페이스의 예를 보여준다.
Win32 어플릿이 PPJoy via IOCTL 호출에 의한 조이스틱 입력을 제공한다.
PPJoy는 조이스틱처럼 DirectInput으로 궤환(?)하여 이것을 입력한다.
;Win32 어플릿은 진짜 조이스틱 처럼 입력된다 생각할 것이다.

Opening a PPJoy virtual joystick

PPJoy creates a control device for each virtual joystick defined. This device is named \\.\PPJoyIOCTL1 for the first virtual joystick through to \\.\PPJoyIOCTL16 for the last one. Before you can send IOCTL commands to the joystick device you need a handle to it:

HANDLE h;
h= CreateFile("\\\\.\\PPJoyIOCTL1",GENERIC_WRITE,FILE_SHARE_WRITE,NULL,OPEN_EXISTING,0,NULL);

PPJoy는 조이스틱이 정의된 컨트롤 장치를 생성한다.
이것의 이름은 처음엔  \\.\PPJoyIOCTL1 부터 \\.\PPJoyIOCTL16 까지 될 것이다.
사용자가 IOCTL 명령을 조이스틱 장치에 보내기 전에 이 핸들이 필요하다.

Sending data to virtual joystick

Joystick data is placed in a special structure and then sent to PPJoy using the DeviceIoControl() function. The structure consists is defined as follows:

조이스틱 데이터는 특수한 구조체에 위치하고 난 다음 DeviceIoControl() 함수를 통해 PPJoy에 보낸다. 구조체엔 아래와 같은 것이 정의되어 있다.
#pragma pack(push,1)		/* All fields in structure must be byte aligned. */
typedef struct
{
 unsigned long  Signature;             /* Signature to identify packet to PPJoy IOCTL */
 char           NumAnalog;             /* Num of analog values we pass */
 long           Analog[NUM_ANALOG];    /* Analog input values */
 char           NumDigital;            /* Number of digital values we pass */
 char           Digital[NUM_DIGITAL];  /* Digital input values */
} JOYSTICK_STATE;
#pragma pack(pop)

The Signature field should be set to the constant JOYSTICK_STATE_V1 (defined in ppjioctl.h). NumAnalog and NumDigital should be set to the size of axis and button arrays respectively. PPJoy currently supports up to 63 analog and 128 digital values. Extra values in the arrays will be ignored. By default the first 8 analog values will be reported as axes and the first 16 digital values as buttons. Undefined analog values will be centred; undefined digital values will be off/not pressed.

Signature 영역엔 JOYSTICK_STATE_V1 (ppjioctl.h에서 정의된) 의 상수가 위치해야 한다.
NumAnalog 와 NumDigital에는 축의 크기와 각 버튼 배열이 위치해야 한다.
PPJoy는 63개의 아날로그와 128개의 디지탈 값을 지원한다.
배열에 있는 별도의 값은 무시된다.
초기 설정으로는 8개의 아날로그 값이 축으로, 16개의 디지탈 값이 버튼으로 되어있다.
정의되지 않은 아날로그 값은 중립 상태이다.;
정의되지 않은 디지탈 값은 꺼지거나/안 눌러진 것으로 된다.

NOTE: The fields in the structure must be byte aligned with no padding between the fields.

NOTE: 구조체의 영역들은 각 영역사이에서 빈 공간 없이 바이트로 정렬된다.

PPJOY_AXIS_MIN and PPJOY_AXIS_MAX represents the minimum and maximum values for an analog value. For digital values 1 means pressed and 0 is not pressed.

PPJOY_AXIS_MIN 와 PPJOY_AXIS_MAX 는 아날로그 값에서의 최소값과 최대값을 나타낸다.
디지탈 값에서 1은 "눌러짐"을 0은 "안 눌러짐"을 의미한다.


The sequence of axes are as follows: /*축의 시퀀스는 아래의 순서와 같다*/

  • X Position
  • Y Position
  • Z Position
  • Z Rotation
  • Slider
  • X Rotation
  • Y Rotation
  • Dial

PPJoy does not current support changing the number of axes or buttons reported; however extra axes or button can be mapped to "nothing".

PPJoy는 축의 숫자를 바꾸거나 버튼 알림을 통상 지원하지 않는다.;
그러나 별도의 축이나 버튼을 "아무것도 아님"으로 매핑이 가능하다.


A memory dump of the structure with two analog and four digital values looks like this:

구조체의 메모리 덤프를 보면 두개의 아날로그와 네개의 디지탈값이 보여진다.
 43 41 54 53       Header
 02                Two analog values to follow
 xx xx xx xx       Analog value 1 (defaults to X Axis)
 xx xx xx xx       Analog value 2 (defaults to Y Axis)
 04                Four digital values to follow
 xx                Digital value 1 (defaults to Button 1)
 xx                Digital value 2 (defaults to Button 2)
 xx                Digital value 3 (defaults to Button 3)
 xx                Digital value 4 (defaults to Button 4)
After setting the axis and button values in the structure it is passed to PPJoy using DeviceIoControl() with an IOCTL code of IOCTL_PPORTJOY_SET_STATE (defined in ppjioctl.h). This code snippet illustrates:
구조체에서 축과 버튼값을 설정하면 DeviceIoControl() 함수를 통해 PPJoy가 사용할 수 있게 IOCTL_PPORTJOY_SET_STATE (defined in ppjioctl.h)가 IOCTL 코드로 전해진다. 이 코드의 부분을 아래와 같이 나타냈다:
 JOYSTICK_STATE   JoyState;
 DWORD            RetSize;
 DWORD            rc;

 /* Initialise JoyState structure here... */

 if (!DeviceIoControl(h,IOCTL_PPORTJOY_SET_STATE,&JoyState,sizeof(JoyState),NULL,0,&RetSize,NULL))
 {
  rc= GetLastError();
  /* ... */
 }
It is important to check the return code for the DeviceIOControl() funcion. If the control device is still open when the underlying joystick device is deleted the PPortJoy.sys driver cannot unload. In this case GetLastError() will return 2. When you get this error code close the handle to the control device and retry opening the control device.
DeviceIOControl() 함수 동안에 리턴되는 코드를 체크하는 것이 중요하다.
만일 제어 장치가 잠재되어 있는 동안에 여전히 오픈되어 있다면 조이스틱 장치는 PPortJoy.sys 드라이버를
삭제당해 언로드 할 수 없다.
이 경우 GetLastError() 함수는 2를 리턴한다.
이 에러코드가 나오게 되면 제어 장치의 핸들을 닫고, 제어장치의 오프닝을 시도할 것이다.


Closing the virtual joystick

When the Win32 application is no longer using the control device, the control device handle should be closed with the CloseHandle() function. Also see the note above about closing the control device.

Sample application

This is a very simple sample application to demonstrate a Win32 application providing joystick input. It also contains the ppjioctl.h file needed to build other user mode joystick drivers.

Get IOCTLSample sample application (Microsoft Visual C++ 6.0).

1

5. Ext2(Second Extended File System)

Ext2 파일시스템은 현재 리눅스의 기본 파일시스템인 Ext3에서 저널링 기능을 뺀 파일시스템으로

UFS를 근간으로 하고 있다.

UFS에서 유명무실한 구조들은 제거하고, 전체적인 구조를 보다 간략히 한 Ext2는

비교적 명료하고 간단하면서도 UFS의 속도와 안정성을 고루 갖춘 파일시스템이다.

그 증거로 Ext2는 현재까지도 리눅스 기본 파일시스템으로 자리 잡고 있는 Ext3에서 그대로 사용되고 있다.

(Ext2에 저널링 기능만 추가한 것이 Ext3)

4. UFS(Unix File System)

UFS는 유닉스의 대표적인 파일시스템으로서

현재까지 대부분의 유닉스에서 사용되는 파일시스템의 근간이 되었다.

BSD 계열 (FreeBSD , NetBSD , OpenBSD) 은 물론이고

HP-UX , Apple OS X , Sun Solaris 에 이르기까지 많은 유닉스 계열의 OS들이

UFS를 각각의 OS에 맞게 변형해서 사용하고 있다.

UFS는 빠른 속도와 높은 안정성을 목표로 만들어졌다.

또한 저장장치를 그룹화하여 관련된 데이터끼리는

최대한 가까운 위치에 자리할 수 있는 구조로 되어 있어 디스크 헤드의 이동이 비교적 작고,

중요한 데이터는 여러 그룹에 걸쳐 많은 백업을 저장하므로

만일의 사태에 대하여 보다 신뢰성을 높였다.

UFS는 미국 Berkeley 대학의 FFS(Fast File System)에서 근간을 이루었으며,

Bell 연구소에서 Unix Version 7을 개발할 때부터 본격적으로 UFS라는 명칭을 사용하였다.

UFS는 리눅스의 파일시스템인 Ext2에도 큰 영향을 미치게 된다.

3. NTFS(New Technology File System)

마이크로소프트사의 서버급 운영체제인 Windows NT에서 사용되는 파일시스템이며,

윈도우 NT 및 2000이상의 OS에서 대표적인 파일시스템으로 자리잡아

서버시스템은 물론 일반 PC에서도 널리 사용되고 있다.

NTFS는 대용량 저장장치를 겨냥해서 제작되었으며, 높은 안정성과 부가 기능을 지원하고,

FAT와 HPFS에 있던 여러 제약 사항들을 크게 개선한 파일시스템이다.


그러나 제작사인 마이크로소프트사에서 전체 스펙을 공개하지 않아

현재까지도 완벽한 분석이 이루어지지 않았으며,

이로 인해 리눅스등의 다른 OS에서 NTFS를 지원한다고 해도 미흡한 부분이 있을 수 밖에 없다.