일단은 yocto 프로젝트의 코어인 poky를 받고(빌드 환경 구성 + 커널 등등?)

하드웨어 의존적인 metadata layer를 다운로드 받는다(meta-raspberrypi)


1.     Clone the Yocto Project Git repo

2.     Get the meta-raspberrypi layer

3.     Setup the build environment

4.     Configure the build

5.     Next up, we need to add the meta-rasperrypi layer we cloned earlier to the file conf/bblayers.conf.

6.     Build a minimal distribution

[링크 : http://ric96.blogspot.in/2014/09/yocto-for-raspberry-pi-build-guide.html]

[링크 : http://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/about/]



Poky is a reference system of the Yocto Project - a collection of Yocto Project tools and metadata that serves as a set of working examples. To use the Yocto Project tools, you can download Poky and use it to bootstrap your own distribution.


Poky is the platform-independent, cross-compiling integration layer that utilizes OpenEmbedded Core. It provides the mechanism to build and combine thousands of distributed open source projects together to form a fully customizable, complete, coherent Linux software stack.

[링크 : https://www.yoctoproject.org/tools-resources/projects/poky]



[링크 : http://git.yoctoproject.org/]

[링크 : http://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html]


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

imx8 yocto  (0) 2023.08.28
imx8 yocto build on ubuntu 22.04  (0) 2023.02.10
라즈베리 파이 with yocto project  (2) 2015.07.30
라즈베리 파이 2 yocto 프로젝트?  (0) 2015.06.08
rpi in yocto project  (0) 2015.04.29
Posted by 구차니

lighttpd 설정관련해서 epoll이 먼지 조사...

읽어봐도 모르겠다.. -_-


현재 epoll은 realtime signal과 함께 가장 빠른 입출력 처리 방식 중 하나로 알려져 있습니다.

[링크 : http://www.joinc.co.kr/modules/moniwiki/wiki.php/Site/Network_Programing/AdvancedComm/epoll24]


리얼타임 시그날 (RealTime Sinal)의 대안으로 제안

[링크 : http://www.xevious7.com/52]


epoll은 '한 대의 서버에서 아주많은 동시접속자를 처리하기 위한 수단'이다.

M$ window$ 환경의 개발자라면 이미 iocp 라는 훌륭한 도구가 있고 ?FreeBSD라면 kqueue라는 도구가 있다.

[링크 : http://biscuit.cafe24.com/moniwiki/wiki.php/epoll]



Event Handlers

--------------


The first one is the Event Handler which takes care of notifying the server

that one of the connections is ready to send or receive. As you can see,

every OS has at least the select() call which has some limitations.


============ ========== ===============

OS           Method     Config Value

============ ========== ===============

all          select     select

Unix         poll       poll

Linux 2.4+   rt-signals linux-rtsig

Linux 2.6+   epoll      linux-sysepoll

Solaris      /dev/poll  solaris-devpoll

FreeBSD, ... kqueue     freebsd-kqueue

NetBSD       kqueue     kqueue

============ ========== ===============


For more information on this topic take a look at http://www.kegel.com/c10k.html


[링크 : http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_Performance/16]

[링크 : http://redmine.lighttpd.net/projects/1/wiki/Server_event-handlerDetails]


epoll

This is the recommended edge-triggered poll replacement for the 2.6 Linux kernel.

On 11 July 2001, Davide Libenzi proposed an alternative to realtime signals; his patch provides what he now calls /dev/epoll www.xmailserver.org/linux-patches/nio-improve.html. This is just like the realtime signal readiness notification, but it coalesces redundant events, and has a more efficient scheme for bulk event retrieval.


Epoll was merged into the 2.5 kernel tree as of 2.5.46 after its interface was changed from a special file in /dev to a system call, sys_epoll. A patch for the older version of epoll is available for the 2.4 kernel.


There was a lengthy debate about unifying epoll, aio, and other event sources on the linux-kernel mailing list around Halloween 2002. It may yet happen, but Davide is concentrating on firming up epoll in general first.

[링크 : http://www.kegel.com/c10k.html]

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

lighttpd cgi.assign  (0) 2017.07.28
lighttpd / mod-websocket  (0) 2014.12.30
Posted by 구차니
프로그램 사용/docker2015. 7. 27. 15:34

웹 개발시 많이 쓰는 녀석으로

개발환경을 동일하게 만들고 배포하는데 쓰인다고 한다.


[링크 : https://www.freebsd.org/doc/handbook/jails.html]

[링크 : https://en.wikipedia.org/wiki/FreeBSD_jail]


[링크 : https://www.docker.com/]

[링크 : http://pyrasis.com/Docker/Docker-HOWTO]

[링크 : http://pyrasis.com/docker.html]

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

docker 개념 다시 조사..  (0) 2019.02.01
docker 설명..  (0) 2019.02.01
docker run = create + start  (0) 2019.02.01
docker howto  (4) 2018.11.23
docker static ip  (0) 2018.11.23
Posted by 구차니
프로그램 사용/gcc2015. 7. 14. 16:59


$ cat size.c
#include <stdio.h>
#include <stdint.h>

void main()
{
        int a;
        int64_t b;

        printf("%d\n", sizeof(a));
        printf("%d\n", sizeof(b));

} 


$ ./a.out

4
8


+

#include <stdint.h>를 넣지 않으면 에러가 발생한다.

$ gcc size.c

size.c: In function ‘main’:

size.c:6:2: error: unknown type name ‘int64_t’


2013/01/13 - [프로그램 사용/gcc] - gcc 64bit 확장


Posted by 구차니
프로그램 사용/gcc2015. 7. 14. 16:47

나중에 리눅스 서버 하나 다시 만들어서 해봐야지


These -m switches are supported in addition to the above on AMD x86-64 processors in 64-bit environments.


-m32

-m64

Generate code for a 32-bit or 64-bit environment. The 32-bit environment sets int, long and pointer to 32 bits and generates code that runs on any i386 system. The 64-bit environment sets int to 32 bits and long and pointer to 64 bits and generates code for AMD's x86-64 architecture. 


[링크 : https://gcc.gnu.org/onlinedocs/gcc-3.1/gcc/i386-and-x86-64-Options.html]


64bit 우분투에서 빌드 하려니 에러가 발생한다. multilib을 설치하라는데..

$ gcc -m32 void.c

In file included from /usr/include/stdio.h:28:0,

                 from void.c:1:

/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory

compilation terminated.


$ sudo apt-get install gcc-multilib

[링크 : http://uce.uniovi.es/tips/Programming/Cpp/forc32bitscompilation.html] 

[링크 : http://stackoverflow.com/questions/22355436/how-to-compile-32-bit-apps-on-64-bit-ubuntu]


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

gcc에서 precompiled header 사용하기  (0) 2015.07.29
gcc 64bit 변수 선언하기  (0) 2015.07.14
gcc 특정 표준 따르도록 강제하기  (0) 2015.07.14
크기가 0인 배열 허용  (0) 2015.06.29
ubuntu gcc가 바보  (2) 2013.09.19
Posted by 구차니
프로그램 사용/gcc2015. 7. 14. 16:34


-ansi

In C mode, this is equivalent to -std=c90. In C++ mode, it is equivalent to -std=c++98.


-std=

A value for this option must be provided; possible values are

‘c90’

‘c89’

‘iso9899:1990’

Support all ISO C90 programs (certain GNU extensions that conflict with ISO C90 are disabled). Same as -ansi for C code. 

‘iso9899:199409’

ISO C90 as modified in amendment 1. 

‘c99’

‘c9x’


[링크 : https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html]

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

gcc 64bit 변수 선언하기  (0) 2015.07.14
gcc 32bit/ 64bit 컴파일하기  (0) 2015.07.14
크기가 0인 배열 허용  (0) 2015.06.29
ubuntu gcc가 바보  (2) 2013.09.19
gcc 64bit 확장  (0) 2013.01.13
Posted by 구차니
프로그램 사용/Putty2015. 7. 14. 14:21

putty를 통해서 CR+LF로 전송이 가능한가 했더니..

보이는 부분에 대해서만 가능한 듯...

기본적으로 putty는 \n 만 보내는 것으로 보인다.



LF는 line feed - \n 으로 대개 표기되며

CR은 carriage return - \r 로 대개 표기된다.


4.3.3 ‘Implicit CR in every LF’

Most servers send two control charactersCR and LF, to start a new line of the screen. The CR character makes the cursor return to the left-hand side of the screen. The LF character makes the cursor move one line down (and might make the screen scroll).

Some servers only send LF, and expect the terminal to move the cursor over to the left automatically. If you come across a server that does this, you will see a stepped effect on the screen, like this:

First line of text
                  Second line
                             Third line

If this happens to you, try enabling the ‘Implicit CR in every LF’ option, and things might go back to normal:

First line of text
Second line
Third line

4.3.4 ‘Implicit LF in every CR’

Most servers send two control characters, CR and LF, to start a new line of the screen. The CR character makes the cursor return to the left-hand side of the screen. The LF character makes the cursor move one line down (and might make the screen scroll).

Some servers only send CR, and so the newly written line is overwritten by the following line. This option causes a line feed so that all lines are displayed.


[링크 : http://tartarus.org/~simon/putty-snapshots/htmldoc/Chapter4.html]


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

ssh X11 forwarding 속도 향상.. 2?  (0) 2016.02.03
putty chrome socks5 / dns remote  (0) 2014.12.18
putty로 proxy 설정하기 (socks5 + firefox)  (0) 2014.12.17
linux용 putty  (2) 2011.09.21
putty를 이용한 vnc 터널링  (1) 2011.06.21
Posted by 구차니
프로그램 사용/gcc2015. 6. 29. 14:30

오늘따라 지력 감소상태인지.. 이해가 안되는 문장들 ㅠㅠ


Zero-length arrays are allowed in GNU C. They are very useful as the last element of a structure that is really a header for a variable-length object:


struct line

{

int length;

char contents[0];

};


struct line *thisline = (struct line *)malloc (sizeof (struct line) + this_length);

thisline->length = this_length;


[링크 : https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html] 


[링크 : https://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html]

    [링크 : http://todayhumor.com/?programmer_11717]

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

gcc 32bit/ 64bit 컴파일하기  (0) 2015.07.14
gcc 특정 표준 따르도록 강제하기  (0) 2015.07.14
ubuntu gcc가 바보  (2) 2013.09.19
gcc 64bit 확장  (0) 2013.01.13
GCC 기본 include 경로(default include path on GCC/G++)  (0) 2012.02.12
Posted by 구차니
프로그램 사용/wiki2015. 6. 25. 16:07

위키에 한번 적용해볼까나?


[링크 : https://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration]



2012년에 해놓고 까먹고 있었... -_-

2012/07/18 - [프로그램 사용/wiki] - mediawiki google analystics extension


홀로 쓰는 데라 외부 유입은 없다고 봐야겠군...



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

mediawiki 1.28.0과 Xcache  (0) 2017.01.09
mediawiki extension - deletehistory  (0) 2015.11.04
mediawiki 위지윅 에디터  (0) 2015.04.16
mediawiki 무겁구나.. (1.23.9)  (0) 2015.04.14
mediawiki db 구조  (0) 2014.03.24
Posted by 구차니

마우스 축 뒤집히는 것만 손보면..

umid mbook m1 에서 쾌적하게 쓸수 있지 않으려나?

그리고.. 절대좌표가 문제네 끄응.....


설정 파일은.. config.mnt?


To run games (Quake,Doom,3Dmaze,..) at full speed, it's enough to define mtrr_default in config.mnt.

[링크 : http://www.menuetos.net/faq.txt]

[링크 : http://www.menuetos.net/download.htm]


37 - Get mouse data

         In : rbx - 0 Mouse coordinates, screen relative

         Out: rax - X shl 32 + Y

         In : rbx - 1 Mouse coordinates, window relative

         Out: rax - X shl 32 + Y

         In : rbx - 2 Mouse buttons state

         Out: rax - State

         In : rbx - 3 Scroll wheel change

         Out: rax - Change



+

집에와서 보니 config.mnt 는 32비트 버전에는 존재하지 않는다 -_-


config.dat

# Menuet32 kernel setup

#

# This file lists the video, mouse and RAM setup that the kernel will use.

# Blank lines, or lines beginning with # are ignored - they are comments.

# The format for each line is: [KERNEL PARAMETER] value

# The allowable values for 'KERNEL PARAMETER' and corresponding 'value' are

# defined below. The file may be Unix or DOS format; <cr>s are ignored.

# A value of 0 => ask the user


# Select the video mode to use: there are 3 basic groups.

# Specify a value within the appropriate group.

# Vesa 2.0+ 16 M LFB:  {1} 640x480, {2} 800x600, {3} 1024x768, {4} 1280x1024

# Vesa 1.2  16 M Bnk:  {5} 640x480, {6} 800x600, {7} 1024x768, {8} 1280x1024

# EGA/CGA   256 Cols:  {9} 320x200, {A} VGA: 16 Color 640x480.

# {9} => VGA mode 0x13. {A} => VGA mode 0x12.


[VIDEO] 0


# Direct LFB write, paging (available VESA 2+ only)

# Use predefined settings or probe video mode.

# Probing enabled {1} no, {2} yes.


[PROBE] 0


# Hardware accelerated graphics

# Vesa 2.0+ (only): MTRR graphics acceleration {1} yes, {2} no.


[VACCEL] 0


# Mouse at: {1} PS/2 (USB), {2} Com1, {3} Com2.


[MOUSE] 0


# Amount of RAM (MB) available on the system

# {1} 32, {2} 64, {3} 128, {4} 256, {5} 512,{6} 1024, {7} 2048.


[RAM] 0


# Cached information from floppy or hard disk (boot device)

# When floppy is selected, the entire disk is copied to RAM as a RAM_Disk (/RD)

# Load disk image from: {1} floppy (default), {2} hd/msetup.exe (hdboot.txt), 

# {3} use preloaded ram-image from kernel restart.


[RSOURCE] 0 


비슷한 느낌의.. kernel.mnt는 있는데

바이너리 커널 파일인 것으로 추측된다.



+

64비트 버전에는 config.mnt가 존재한다.

#

#  MenuetOS 64 configuration

#


config_version          = 0x000025   # For kernel.


# Default screen resolution


screen_resolution       = 0x000002   # 1 = 640x480  , 2 = 800x600

                                     # 3 = 1024x768 , 4 = 1280x1024

                                     # 5 = 1440x900 , 9 = Custom


# Custom resolution must be supported by both

# graphics card and display.


custom_res_x            = 00000000   # Custom X resolution

custom_res_y            = 00000000   # Custon Y resolution


# PS/2 Mouse settings


mouse_scroll_wheel      = 0x000000   # 0/1 = disabled/enabled


# Window transparency

#

# 512MB of RAM required for resolutions up to 1280x1024.

# 1GB of RAM required for HD resolutions.

# Define with parameter amount_of_ram.


window_transparency     = 0x000001   # 0 = Disabled

                                     # 1 = Enabled for Title and Frames

                                     # 2 = Enabled for Title, Menu and Frames


transparency_opacity    = 0x000002   # 0 = 75:25, 1 = 50:50, 2 = 25:75


# Memory

#

# 128 MB required (0x080)


amount_of_ram           = 0x000200   # 0x100 = 256 MB, 0x200 = 512 MB


# Verify the amount for ram from Bios


ram_verify              = 0x000001   # 0x000 = Disabled, 0x001 = Enabled


# Verify OS memory map from Bios

#

# Map:0x8000-0x58000,1M-14M,16M-amount_of_ram


map_verify              = 0x000001   # 0x000 = Disabled, 0x001 = Enabled


# Memory acceleration

#

# Mtrr_default works without defining mtrr_vesa_lfb or mtrr_mask.

# Some multiprocessor systems require enabling SMP at parameter smp_enable.

# Unstable, if defined by BIOS at bootup.


mtrr_default            = 0x000100   # 0x006 = write-back, 0x100 = disabled


# Graphics acceleration

#

# Mtrr_mask is required for defining mtrr_vesa_lfb

# Unstable, if defined by BIOS at bootup.


mtrr_vesa_lfb           = 0x000100     # 0x001 = write-combine, 0x100 = disabled

mtrr_mask               = 0xffffffff   # 4 Gigabytes (default), CPU dependent


# Mtrr cache writeback

#

# If display update seems late or out of sync, enabling this feature

# results to faster display updates.


mtrr_wbinvd             = 0x000000     # 0x000 = disabled, 0x001 = enabled


# Mtrr cache delay

#

# If display has residuals from mouse or other gui events, increasing 

# this value results to cleaner display updates.


mtrr_delay              = 00000010     # 5-1000ms, default:10ms


# USB 2.0 (ehci)

#

# Webcam, TV/Radio, Printer, Mass storage (read/write, Fat32)

#

# Note: 1) USB Legacy support in BIOS must be disabled, unless

#          the computer boots from USB device. See usb_legacy_disable.

#       2) Sandisk flash drives and regular backups are recommended,

#          since not all of the mass storage functions are supported.

#       3) If motherboard has multiple ehci controllers, the first pci 

#          device is activated.


usb_enable              = 0x000000     # 0x000 = Disabled, 0x001 = Enabled


# USB 2.0 - Disable BIOS legacy support after bootup

#

# If the computer boots from USB drive, enabling this feature

# enables access to USB drive when Menuet is running.

# Not all BIOSs support this feature.


usb_legacy_disable      = 0x000000     # 0x000 = Disabled, 0x001 = Enabled


# USB 2.0 - Ehci driver cache mode

#

# To debug cache coherency between driver and controller.

# 0x000       = Normal     (non-cacheable pages)

# 0x001/0x002 = Invalidate (cache writeback and invalidate,slower)

#                          (0x001/0x002=all cpus/single cpu)

#                          (Amd sb600 and sb700 rev 3a & 3b)


usb_ehci_cache_mode     = 0x000000     # 0x000 = Normal

                                       # 0x001/0x002 = Invalidate


# USB 1.X (ohci/amd - uhci/intel)

#

# USB keyboard and mouse


usb_ohci_enable         = 0x000000     # 0x000 = Disabled, 0x001 = Enabled

usb_uhci_enable         = 0x000000     # 0x000 = Disabled, 0x001 = Enabled


# Display window content while moving


display_window          = 00000001  # 0x000 = Disabled, 0x001 = Enabled

display_interval        = 00000025  # times/second


# Window skin


window_skin             = '/FD/1/SKIN.BMP'


# Fat12 floppy


fd_1_enable             = 0x000001  # 0 = disable, 1 = enable

fd_1_write              = 0x000000  # 0/1 = disable/enable direct write


# Fat32 partition


hd_1_enable             = 0x000000  # 0x000 disabled, 0x001 enabled

hd_1_base               = 0x000000  # 0x1f0 primary, 0x170 secondary

hd_1_id                 = 0x000000  # 0x00 master, 0x10 slave

hd_1_partition          = 0x000001  # 1 first, fixed to first now

hd_1_irq                = 0x000000  # hd 1 irq, not yet implemented


# CD/DVD


cd_1_enable             = 0x000000  # 0x000 disabled, 0x001 enabled

cd_1_base               = 0x000000  # 0x1f0 primary, 0x170 secondary

cd_1_id                 = 0x000000  # 0x00 master, 0x10 slave

cd_1_irq                = 0x000000  # cd 1 irq, not yet implemented


# System directory


system_directory        = '/FD/1/'  # System file location


# Window shape


window_corners          = 0x000000  # 0 = round, 1 = sharp


# Network at boot


network_driver          = '/FD/1/DRIVER/I8254X' # Ethernet driver


network_card_enable     = 0x00000000  # 0/1 = network card disabled/enabled

                                      # When enabled, requires also selecting 

                                      # ethernet interface at network_config


network_ip              = 0x1800a8c0  # 192.168.0.24

network_gateway         = 0x0100a8c0  # 192.168.0.1

network_subnet_mask     = 0x00FFFFFF  # 255.255.255.0

network_dns             = 0x0100a8c0  # 192.168.0.1

network_config          = 0x03f80400  # Bits 16- Com port

                                      # Bits 08- Com IRQ

                                      # Bit  07  Server assigned

                                      # Bits 00- Interface 0=disabled 

                                      #                    3=ethernet


# Audio at boot


audio_driver            = '/FD/1/DRIVER/INTELHDA'

audio_card_enable       = 0x00000000  # 0/1 = audio card disabled/enabled


# Midi at boot


midi_driver             = '/FD/1/DRIVER/MPU401'

midi_card_enable        = 0x00000000  # 0/1 = midi card disabled/enabled


# Graphics


graphics_driver         = '/FD/1/DRIVER/GRX'

graphics_driver_enable  = 00000000   # 0/1 = no/yes

graphics_boot_driver    = 00000000   # 0/1 = vesa/driver

graphics_boot_x         = 00000000   # Driver boot X resolution

graphics_boot_y         = 00000000   # Driver boot Y resolution

graphics_boot_hz        = 00000000   # Driver boot frequency


# Email


email_pop_server        = 'pop.server'

email_pop_user          = 'Username'

email_smtp_server       = 'smtp.server'

email_smtp_user         = 'Username@smtp.server'


# File browser

#

# 00XY - X=Contents(0/1=close/open), Y=Paths(0/1=close/open)


file_browser_setup      = 00000001   # Contents,Paths


# Background at bootup

#

# bmp, png, jpg or gif

# [Default] = Default Menuet background


background              = '/fd/1/bgr.jpg'


# Main Menu Position

#

# 0 = up, 1 = down


main_menu_position      = 0x000001


# Multi-Processor support

#

# Upto 8 processors are supported. Pressing ctrl-alt-pageup

# moves all processes to CPU-0 and disables SMP.


smp_enable              = 0x000000   # 0x000/0x001 = disabled/enabled


# MCE

#

# CPU is disabled at machine check exception 

# (dot at top-left screen)


mce_enable              = 0x000000   # 0x000/0x001 = disabled/enabled


# Keyboard layout

#

# See app kbd-map for values (1=fin,2=eng,3=est,..)


keyboard_layout         = 00000000   # 000 = Default western


# System font default size


system_font_size        = 0x00000A   # Values: 0x009-0x00C


# Font type

#

# 0x000/0x001/0x002 = Upper/Capitalized/Lower


icon_font               = 0x000000   # 0x000-0x002

main_menu_font          = 0x000000   # 0x000-0x002

file_browser_font       = 0x000000   # 0x000-0x002


# Configuration edit delay


configuration_delay     = 0x000003   # Seconds 


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

Menuet OS 테스트  (0) 2015.06.14
KolibriOS / MenuetOS  (0) 2015.06.13
Posted by 구차니