SSH로 서버에 접속 후,
서버에서 로컬의 다른 서버로  SSH 접속을 하는데 아래와 같은 경우를 만났다.

[userid@hostname ~]$ ssh localserver_ip
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00.
Please contact your system administrator.
Add correct host key in /home/userid/.ssh/known_hosts to get rid of this message.
Offending key in /home/userid/.ssh/known_hosts:1
RSA host key for 192.168.10.10 has changed and you have requested strict checking.
Host key verification failed.

해결방법은, 그냥 저 파일을 지우면 된다.
(아마.. 지금까지 접속했던 서버들에 대한 RSA 키도 전부 삭제 되므로, 다음번 접속시 전부 키를 받을 거냐고 물어볼 듯 하다)
Posted by 구차니
포터블 우분투를 실행하면 Xming을 구동하여 사용하는데 옵션이 특이해서
도움말을 찾아보게 되었다.

portable_ubuntu.conf 파일의 내용
kernel=vmlinux
cobd0=images\rootfs.img
cobd3="D:\Documents and Settings\czw5hv\Application Data\Windux\images\root.img"
cofs0=config
cofs1=c:\ #Para tener acceso a la unidad C:
#cofs1=otra_unidad:\ #Si se necesita tener acceso a otras unidades?ej: d:\
#scsi0=cdrom,\Device\Cdrom0 # Para tener acceso al CDROM de la PC
root=/dev/cobd0
ro
initrd=initrd.gz
mem=256
eth0=slirp,00:ff:75:39:D3:C1,tcp:22:22
exec0="Xming\Xming.exe :0 -notrayicon +bs -wm -auth Xauthority -clipboard -multiwindow -dpi 100"
exec1=pulseaudio-0.9.6\pulseaudio.exe # Ejecuta al servidor Pulse Audio para Windows


+bs                    enable any backing store support
-wm                    WhenMapped default backing-store

위의 옵션들에 backing store라는 내용이 들어간다.
이곳저것 검색을 해봐도 딱히 시원한 대답은 없었지만, 검색 내용중 윈도우 내용이 복구 안될 경우
backing store를 X11에 설정한다는 내용이 발견되었다. 아마 clipping 영역 복구가 제대로 되지 않을 때,
강제로 복구 하도록 하는 옵션인거 같기도 하고.. 용어 내용만 봤을 경우 일종의 캐시 구조인거 같기도하고..

(고속일 수록 가격이 비싸고, 저속일수록 가격이 싸다. 단위용량당 가격적인 면에서
레지스터 > 캐쉬 > 메모리(DRAM) > HDD > ODD > TAPE 등의 순서를 피라미드식으로 이루게 되는데
memory hierarchy 라고 한다.)

Unfortunately some XFree86 drivers are buggy, and when you render an accelerated primitive which overlaps an area which is not visible to the user, the driver fails to update the backing store (it only draws the clipped primitive using accelarated functions and does not complete the job by calling the software renderer to update the backing store.)
[출처 : http://www.ibiblio.org/ggicore/documentation/libggi/current/display-x.7.html]


Posted by 구차니
프로그램 사용/libjpeg2009. 5. 19. 00:40
/*
 * Ordering of RGB data in scanlines passed to or from the application.
 * If your application wants to deal with data in the order B,G,R, just
 * change these macros.  You can also deal with formats such as R,G,B,X
 * (one extra byte per pixel) by changing RGB_PIXELSIZE.  Note that changing
 * the offsets will also change the order in which colormap data is organized.
 * RESTRICTIONS:
 * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
 * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
 *    useful if you are using JPEG color spaces other than YCbCr or grayscale.
 * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
 *    is not 3 (they don't understand about dummy color components!).  So you
 *    can't use color quantization if you change that value.
 */
#define RGB_RED		0	/* Offset of Red in an RGB scanline element */
#define RGB_GREEN	1	/* Offset of Green */
#define RGB_BLUE	2	/* Offset of Blue */
#define RGB_PIXELSIZE	3	/* JSAMPLEs per RGB scanline element */

libjpeg를 일반적인 표준 Bitmap 파일에 적용하기 위해서는 (혹은 Blit 함수에)
RGBQUADRGBTRIPLE과 동일한 구조로 나오는 것이 좋다.

typedef struct tagRGBQUAD { 
  BYTE rgbBlue;
  BYTE rgbGreen;
  BYTE rgbRed;
  BYTE rgbReserved;
} RGBQUAD;

typedef struct tagRGBTRIPLE { 
  BYTE rgbtBlue; 
  BYTE rgbtGreen; 
  BYTE rgbtRed;
} RGBTRIPLE;

이런 이유로 설정값을 바꾸지 않고 그냥 libjpeg를 사용하게 되면,
변환후에 RGB를 일일이 순서를 바꾸어 주어야 한다.

제약사항으로는
sample application인 djpeg cjpeg 는 적용이 되지 않고(어짜피 BGR로 표준 bitmap 포맷으로 나온다..)
YCbCr(YUV) <-> RGB 변환에만 적용이 된다는 것(JPEG가 YUV 아닌게 있던가?)
color quantizer는 RGBTIPLE(24bit)만 적용되지 RGBQUAD(32bit)는 적용되지 않는다.

솔찍히 먼소리인지 모르겠고.. 실질적으로 YUV->RGB 변환만 한다면 무시해도 될 듯하다.
Posted by 구차니
프로그램 사용/libjpeg2009. 5. 18. 18:22
libtool: link: unable to infer tagged configuration
libtool: link: specify a tag with `--tag'

라는 에러가 날경우에는, make 파일에서
libtools를 찾은후 --tag=CXX 를 넣어 주면 된다.

vi jpeg-6b/Makefile
142 .c.lo:^M
143         $(LIBTOOL) --tag=CXX --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$*.c^M

[링크 : http://www.geodynamics.org/roundup/issues/issue40]



위의 방법은 제대로 된 해결 방법이 아니다.
./configure --prefix 를 하면 위의 설정을 하지 않아도 제대로 작동한다.

2009/05/20 - [프로그램 사용/libjpeg] - libjpeg 크로스컴파일 하기 - libjpeg cross-compile using libtool

Posted by 구차니
프로그램 사용/libjpeg2009. 5. 18. 17:29
unsigned int scale_num, scale_denom
    scale_num/scale_denom 의 분수비로 영상 비율을 조절합니다.
    기본값은 1/1 혹은 조절하지 않음입니다.
    현재, 지원되는 조정 비율은 1/1, 1/2, 1/4, 1/8 입니다.
    (라이브러리 설계는 무제한의 비율이 가능하도록 되어있지만,
    빠른시일내로 적용되기는 힘들것으로 보입니다.)
    작은 조절 비율은 적은 수의 픽셀 연산과 단순화된 IDCT 방법을
    사용 할 수 있기 때문에, 매우 빠른 속도의 변환을 합니다

(scale_num은 분자, scale_denom은 분모입니다.
만약에 1/4로 하려고 한다면 scale_num = 1; scale_denom = 4; 로 하면 될 듯 합니다
- 확인요망)



6. while (scan lines remain to be read)
    jpeg_read_scanlines(...);

jpeg_read_scanlines()을 한번 혹은 여러번 호출함으로서 압축해제 된 영상정보를 읽을 수 있습니다.
각각의 호출시에, 읽을 최대 scanline을 넘겨줍니다
(예를들어, working buffer의 높이); jpeg_read_scanlines() 은
많은 줄들의 값을 돌려줄 것 입니다. 돌려준 값은 실제로 읽은 줄의 갯수입니다.
돌려받은 영상정보의 형태(format)는 위의 "Data formats"에 기술되어 있습니다.
흑백과 색상이 있는 JPEG는 서로 다른 데이터 형태라는 것을 잊지마십시오!

영상정보는 상-하 순서로 주어집니다. 만약에 하-상 순서로 영상정보를 저장해야 한다면,
효과적으로 JPEG 라이브러리의 가상 배열 방식을 사용하여 뒤집을 수 있습니다.
예제 프로그램인 djpeg에서 이러한 사용예를 찾으실 수 있습니다.



Data formats

픽셀들은 scanline 단위로 왼쪽에서 오른쪽 방향으로 저장됩니다
각각의 픽셀을 위한 값들은 열단위로 나란히 있습니다;
24-bit RGB 를 예를 들자면, R,G,B,R,G,B,R,G,B 순서로 되어있습니다.  각각의 scanline은
JSAMPLE 데이터 형의 배열로 되어있습니다 --- jmorecfg.h를 수정하지 않았다면,
일반적으로 "unsigned char" 입니다.  (또한 jmorecfg.h를 수정함으로서
RGB 픽셀의 순서를 B,G,R 순서로 변경할수도 있습니다. 하지만 수정전에 제약사항을
먼저 읽어 보시기 바랍니다.)


Posted by 구차니
프로그램 사용/libjpeg2009. 5. 18. 00:54
int w = cinfo.image_width;
int h = cinfo.image_height;
int d = cinfo.jpeg_color_space;
int out_h = cinfo.output_height;

printf("width:%d height:%d depth:%d out_height:%d\n", w, h ,d, out_h);

unsigned char *data = new unsigned char[w * h * d];
while (cinfo.output_scanline < cinfo.output_height)
{
	jpeg_read_scanlines(&cinfo, &data, 1);
	data += d * cinfo.output_width;
}

jpeg_read_header() 한뒤
jpeg_read_scanline()까지는 알았지만, 문서를 대충 읽다 보니..
도무니 어떻게 메모리를 할당해야 할지 감이 안 잡혔는데..
이 문서를 보니 어떻게 하면 될꺼 같다라는 감이 조금은 온다..
내일 해보고 결과를 적도록 해야겠다.
위에서 대로 전체 할당하고 jpeg_read_scanlines로 읽어 오니 잘된다!

[링크 : http://www.korone.net/bbs/board.php?bo_table=etc_misc&wr_id=168]
Posted by 구차니
프로그램 사용/libjpeg2009. 5. 15. 20:40
Subject: [21] What if I need more than 8-bit precision?

Baseline JPEG stores images with 8 bits per color sample, in other words

24 bits per pixel for RGB images
,
8 bits/pixel for grayscale,
32 bits/pixel for CMYK, etc.

There is an extension that stores 12 bits/sample for applications that need higher accuracy.
Medical images, for example, are often 12-bit grayscale.  The 12-bit extension is not very widely supported,
however.  One package that does support it is the free IJG source code (see part 2, item 15).

For lossless JPEG, the standard permits any data precision between 2 and 16 bits per sample,
but high-precision lossless JPEG is even less widely supported than high-precision lossy JPEG.
The Stanford PVRG codec (see part 2, item 15) reportedly supports up to 16 bits/sample for lossless JPEG.

[링크 : http://www.faqs.org/faqs/jpeg-faq/part1/]




struct jpeg_decompress_struct {
  JDIMENSION image_width;    /* nominal image width (from SOF marker) */
  JDIMENSION image_height;    /* nominal image height */
  int num_components;        /* # of color components in JPEG image */
  J_COLOR_SPACE out_color_space; /* colorspace for output */
  UINT16 X_density;        /* Horizontal pixel density */
  UINT16 Y_density;        /* Vertical pixel density */
};

typedef enum {
    JCS_UNKNOWN,        /* error/unspecified */
    JCS_GRAYSCALE,        /* monochrome */
    JCS_RGB,        /* red/green/blue */
    JCS_YCbCr,        /* Y/Cb/Cr (also known as YUV) */
    JCS_CMYK,        /* C/M/Y/K */
    JCS_YCCK        /* Y/Cb/Cr/K */
} J_COLOR_SPACE;

순서는 조금 뒤바뀌지만, 윈도우에서 출력되는 데이터는 위의 6개로 거의 표기가 가능하다.
Posted by 구차니
프로그램 사용/nfs2009. 5. 12. 20:33
setenv bootargs console=ttyAS0,115200 root=/dev/nfs nwhwconf=device:eth0,hwaddr:00:00:00:00:00:00 nfsroot=192.168.10.10:/home/user,tcp ip=192.168.10.100::192.168.10.1:255.255.255.0:hostname::off bigphysarea=2000 systemid=01000000

u-boot에서 리눅스 커널로 bootargs를 넘겨주어 nfs를 연결할 경우, 기본값이면 UDP로 연결되게 된다.

mount로 확인해보면
# mount
rootfs on / type rootfs (rw)
/dev/root on / type nfs (rw,noatime,vers=2,rsize=4096,wsize=4096,hard,nolock,proto=tcp,timeo=600,retrans=2,addr=192.168.10.10)
proc on /proc type proc (rw)
/dev/sda1 on /root/sda1 type vfat (rw,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1)
로 udp가 아닌 tcp로 붙은것을 알 수 있다.

자세한건 확인해 봐야겠지만, nfs ver=2 라서 udp 인지는 모르겠다.
Posted by 구차니
Recommended Repository Layout
While Subversion's flexibility allows you to lay out your repository in any way that you choose, we recommend that you create a trunk directory to hold the “main line” of development, a branches directory to contain branch copies,
and a tags directory to contain tag copies. For example:

$ svn list file:///var/svn/repos
/trunk
/branches
/tags

You'll learn more about tags and branches in Chapter 4, Branching and Merging. For details and how to set up multiple projects, see the section called “Repository Layout” and the section called “Planning Your Repository Organization” to read more about project roots.

[출처 : svnbook.red-bean.com/nightly/en/svn-book.pdf]

cvs2svn으로 변환해보니 저러한 구조가 나왔는데, 아무생각없이 저 391장에 이르는 문서를 대충 넘기다 보니
정말 아무생각없이 넘어간 듯 하다.(38페이지)



브랜치쪽 역시.. 그냥 그림만 봤지 자세한 내용을 안봤더니..(106페이지)

'프로그램 사용 > Version Control' 카테고리의 다른 글

SVN의 장점  (0) 2009.09.19
svn tagging/branching  (0) 2009.08.20
SVN과 CVS 저장소 용량비교(compare Repository Size of CVS & SVN)  (0) 2009.05.11
cvs2svn 사용방법  (0) 2009.05.10
SVN의 단점  (0) 2009.05.08
Posted by 구차니
프로그램 사용/busybox2009. 5. 11. 13:04
# ftp
ftp: ftp/tcp: unknown service

검색을 해보니 root로는 잘되는데 일반유저로는 안된다는 문제도 있고
-> /etc/services 의 퍼미션 문제
[링크 : 워낙 자주 나오니 생략]

services에 제대로 등록이 안되서 그렇다는 문제도 있고
-> /etc/services에
ftp-data         20/tcp
ftp              21/tcp
만 등록되어 있는 문제
[링크 : https://www.linuxquestions.org/questions/linux-software-2/ftptcpunknown-services-368671/]

그리고 내가 원했던 대답은
libncurse.so 뿐만 아니라 libnss_files.so 도 필요 하다는 것이었다.
[링크 : http://lists.busybox.net/pipermail/busybox/2004-August/012250.html]


일단 busybox에서 구동을 하다 보면, 용량을 위해서 사용하지 않는 각종 라이브러리들을 삭제하게 되는데
그로 인해서, nss관련 라이브러리가 삭제 되어 있었나보다.

문제는, ftp 프로그램이 ncurse가 없을때는 에러가 나더니
nss가 없을때는 nss 라이브러리 부족이라고 에러가 안나고 뜬금없는 unknown service라는 에러를 발생한다.
Posted by 구차니