프로그램 사용/u-boot2009. 8. 19. 17:20
fw_printenv는 uboot에 포함된 tool이다
uboot/tool/env 에 존재하는 녀석인데
ethaddr을 값을 변경하려고 하니 에러가 발생하였다.

fw_setenv()의 리턴값은 30인데 아마도 EROFS가 30인듯 하다(errno.h에서는 발견하지 못한 변수이다.)
눈에 들어온 부분은 아래의 strcmp() 이다.
	/*
	 * Delete any existing definition
	 */
	if (oldval) {
		/*
		 * Ethernet Address and serial# can be set only once
		 */
		if ((strcmp (name, "ethaddr") == 0) ||
			(strcmp (name, "serial#") == 0)) {
			fprintf (stderr, "Can't overwrite \"%s\"\n", name);
			return (EROFS);
		}

		if (*++nxt == '\0') {
			*env = '\0';
		} else {
			for (;;) {
				*env = *nxt++;
				if ((*env == '\0') && (*nxt == '\0'))
					break;
				++env;
			}
		}
		*++env = '\0';
	}

아무튼, uboot에서 기본적으로 ethaddr과 serial#을 지원하고
이값들은, 한번만 write되고 수정되서는 안되기 때문에 제약사항으로 묶어놓은 듯 하다.
Posted by 구차니
Programming/C Win32 MFC2009. 8. 19. 12:06
ODBC - Open DataBase Connection
DAO - Data Access Object
ADO - ActiveX Data Object


OBDC는 db 연결을 위한 일종의 드라이버/API이고
DAO는 access에서 사용하는 로컬 database 파일에 접근하는데 유용하고
ADO는 개발에 편하고, 웹어플에서 주로 사용한다고 한다.

[링크 : http://blog.naver.com/hp925/80014754374]
Posted by 구차니
오늘은 5.1채널 앰프


갑자기 지르고 싶어지는게 첫번째 문제
그리고 앞으로 내 자리에 온 이상 내가 테스트를 맡게 될꺼라는 두번째 문제








이래저래 좋지 않아 ㄱ-
Posted by 구차니
Linux API/network2009. 8. 18. 14:51
vi /usr/include/linux/in.h

53 /* Internet address. */
54 struct in_addr {
55         __u32   s_addr;
56 };

char *inet_ntoa(struct in_addr in);

에서 사용하는 구조체이다.
단일 변수 하나의 구조체인데..
굳이 구조체로 만든 이유는.. IPv6 등을 위한걸려나..



사족 : 귀찮으면 int형으로 그냥 쓰면된다. 그런데.. 이 내용 저번에 적었던거 같은데... 기억이 안나네 -ㅁ-?
Posted by 구차니
아직도 전 노무현 대통령보다 좋게 보지 않고 있지만
그래도 한 획을 그으신 분으로 이러한 시국에 떠나시는게 석연찮다..

물론 이전부터 미리미리 서거에 대비해서 방송준비를 해놓는 건 알고 있었지만
서거 소식과 동시에 특집 방송...
Posted by 구차니
Linux API/network2009. 8. 18. 11:16
이 녀석들은 데비안 출신이었나?

5.3.5. The network interface with the static IP

The network interface served by the static IP is configured by creating the configuration entry in the "/etc/network/interfaces" file as the following.

allow-hotplug eth0
iface eth0 inet static
address 192.168.11.100
netmask 255.255.255.0
broadcast 192.168.11.255
gateway 192.168.11.1
dns-domain lan
dns-nameservers 192.168.11.1

When the Linux kernel detects the physical interface eth0, the allow-hotplug stanza will cause ifup to bring up the interface and the iface stanza will cause ifup to use the static IP to configure the interface.


[링크 : http://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_network_interface_with_the_static_ip]


간단하게 해석하자면, 물리적으로 연결이 되었음을 탐지하게 되면, 자동으로 설정을 실행한다는 의미이다.
(interface-eth0-를 up 시키고 iface구절을 실행함)


Check to see if a Network Link/Interface is up|down

ip link show eth0
//the iproute package is required. If there is no ip package, apt-get install iproute

If eth0 has a Network link, the following will be returned:
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0c:29:26:57:4e brd ff:ff:ff:ff:ff:ff

If eth0 has no Network link, the following will be returned:
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0c:29:26:57:4e brd ff:ff:ff:ff:ff:ff

The "UP" is the operative word.


[링크 : http://wiki.kartbuilding.net/index.php/Ifup-ifdown]


실제로 ifup, ifdown 시에 제대로 interface가 up / down 되었는지 확인하는 방법이다.
Posted by 구차니
개소리 왈왈/영화2009. 8. 18. 00:43
너 머야!
국가대표
머라고 똑바로 말해봐!!
대한민국 국가대표!



유치뽕짝하면서도 은근히 감동을 주는 대사이고
실화를 바탕으로 해서 감동을 끌어내주면서도
강하시의 그래픽 효과는 상당히 멋져서
정말 내가 타고 내려가는 것 만 같은 느낌이 든다.

그래도 아쉬운 건, 이야기를 풀어가는 긴장감이 없다는 점
개인적으로 킹콩을 들다의 긴장감(뻔한 진행과 진부한 대사임에도 불구하고)에 반에도 못 미치고
도대체 여주인공격인 이은성은 왜 나오는지 (시나리오상에서 코믹 역으로 약간의 존재감이..)
이러한 아쉬움을 남겨둔 채

마지막의 하이라이트 점프 부분은(머. 예고편에 나오지만) 감동 그 자체이다.

'개소리 왈왈 > 영화' 카테고리의 다른 글

불꽃처럼 나비처럼 (2009)  (6) 2009.09.26
[영화] BLACK (2009)  (8) 2009.09.06
영화 - 해운대 (2009)  (6) 2009.07.25
기대하지 않았던 대박 - 킹콩을 들다  (4) 2009.07.05
박물관이 살아있다 2  (2) 2009.06.06
Posted by 구차니
프로그램 사용/u-boot2009. 8. 17. 18:34
busybox에서 라고 해야 하나,
아무튼, busybox의 경우에는 커널에서 부팅시에 ip를 설정한다.

TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
stmmaceth_open: MAC address 00:fa:e0:fa:e0:59
stmmac_init_phy: phy_id=0:03, phy_addr=0x3
IP-Config: Complete:
      device=eth0, addr=192.168.10.116, mask=255.255.255.0, gw=192.168.10.1,
     host=hmp_7109, domain=, nis-domain=(none),
     bootserver=255.255.255.255, rootserver=192.168.10.10, rootpath=
Looking up port of RPC 100003/2 on 192.168.10.10
PHY: 0:03 - Link is Up - 100/Full
Looking up port of RPC 100005/1 on 192.168.10.10
VFS: Mounted root (nfs filesystem) readonly.
Freeing unused kernel memory: 100k freed
  Vendor: AXXEN     Model: SKYMIRROR         Rev: 1.00
  Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sda: 4016128 512-byte hdwr sectors (2056 MB)
sda: assuming Write Enabled
sda: assuming drive cache: write through
SCSI device sda: 4016128 512-byte hdwr sectors (2056 MB)
sda: assuming Write Enabled
sda: assuming drive cache: write through
 sda: sda1
sd 1:0:0:0: Attached scsi removable disk sda
Welcome to STLinux BusyBox system

머.. 이건 중요한게 아니고, 아무튼, ifdown을 통해서 죽이고
ifup을 통해서 올리려고 하는데, ifup시 static ip가 설정이 되지 않고
초기 kernel argument로 넘긴 값으로 부팅이 되는 문제가 있다.

검색을 해보니

Re: ETH0 already configured durring boot
The U-boot uses its own network driver and only the MAC address set up by the U-boot affects the network driver under Linux.

The network is started by the script /etc/init.d/networking in Debian/Emdebian distribution.  The soft links are used in each run level start up directories /etc/rcX.d, where X is run level 0, 1, 2, etc.  The normal run level is 3.  You can remove the link in the directory to disable the network start up.

The text file /etc/network/interfaces configures the network interfaces.  It should be something like,

auto eth0
iface eth0 inet dhcp

You can also just remove everything in this file to disable the automatic start up of the network.

[링크 : http://glomation.net/smf/index.php?topic=111.0]

라고 되어있는데, 일단 커널레벨에서 설정하는 것과는 별개의 문제이다.

# cat /etc/network/interfaces
######################################################################
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
#
# A "#" character in the very first column makes the rest of the line
# be ignored. Blank lines are ignored. Lines may be indented freely.
# A "\" character at the very end of the line indicates the next line
# should be treated as a continuation of the current one.
#
# The "pre-up", "up", "down" and "post-down" options are valid for all
# interfaces, and may be specified multiple times. All other options
# may only be specified once.
#
# See the interfaces(5) manpage for information on what options are
# available.
######################################################################

# We always want the loopback interface.
#
# auto lo
# iface lo inet loopback

# An example ethernet card setup: (broadcast and gateway are optional)
#
# auto eth0
# iface eth0 inet static
#     address 192.168.0.42
#     network 192.168.0.0
#     netmask 255.255.255.0
#     broadcast 192.168.0.255
#     gateway 192.168.0.1

# A more complicated ethernet setup, with a less common netmask, and a downright
# weird broadcast address: (the "up" lines are executed verbatim when the
# interface is brought up, the "down" lines when it's brought down)
#
# auto eth0
# iface eth0 inet static
#     address 192.168.1.42
#     network 192.168.1.0
#     netmask 255.255.255.128
#     broadcast 192.168.1.0
#     up route add -net 192.168.1.128 netmask 255.255.255.128 gw 192.168.1.2
#     up route add default gw 192.168.1.200
#     down route del default gw 192.168.1.200
#     down route del -net 192.168.1.128 netmask 255.255.255.128 gw 192.168.1.2

# A more complicated ethernet setup with a single ethernet card with
# two interfaces.
# Note: This happens to work since ifconfig handles it that way, not because
# ifup/down handles the ':' any differently.
# Warning: There is a known bug if you do this, since the state will not
# be properly defined if you try to 'ifdown eth0' when both interfaces
# are up. The ifconfig program will not remove eth0 but it will be
# removed from the interfaces state so you will see it up until you execute:
# 'ifdown eth0:1 ; ifup eth0; ifdown eth0'
# BTW, this is "bug" #193679 (it's not really a bug, it's more of a
# limitation)
#
# auto eth0 eth0:1
# iface eth0 inet static
#     address 192.168.0.100
#     network 192.168.0.0
#     netmask 255.255.255.0
#     broadcast 192.168.0.255
#     gateway 192.168.0.1
# iface eth0:1 inet static
#     address 192.168.0.200
#     network 192.168.0.0
#     netmask 255.255.255.0

# "pre-up" and "post-down" commands are also available. In addition, the
# exit status of these commands are checked, and if any fail, configuration
# (or deconfiguration) is aborted. So:
#
# auto eth0
# iface eth0 inet dhcp
#     pre-up [ -f /etc/network/local-network-ok ]
#
# will allow you to only have eth0 brought up when the file
# /etc/network/local-network-ok exists.

# Two ethernet interfaces, one connected to a trusted LAN, the other to
# the untrusted Internet. If their MAC addresses get swapped (because an
# updated kernel uses a different order when probing for network cards,
# say), then they don't get brought up at all.
#
# auto eth0 eth1
# iface eth0 inet static
#     address 192.168.42.1
#     netmask 255.255.255.0
#     pre-up /path/to/check-mac-address.sh eth0 11:22:33:44:55:66
#     pre-up /usr/local/sbin/enable-masq
# iface eth1 inet dhcp
#     pre-up /path/to/check-mac-address.sh eth1 AA:BB:CC:DD:EE:FF
#     pre-up /usr/local/sbin/firewall

# Two ethernet interfaces, one connected to a trusted LAN, the other to
# the untrusted Internet, identified by MAC address rather than interface
# name:
#
# auto eth0 eth1
# mapping eth0 eth1
#     script /path/to/get-mac-address.sh
#     map 11:22:33:44:55:66 lan
#     map AA:BB:CC:DD:EE:FF internet
# iface lan inet static
#     address 192.168.42.1
#     netmask 255.255.255.0
#     pre-up /usr/local/sbin/enable-masq $IFACE
# iface internet inet dhcp
#     pre-up /usr/local/sbin/firewall $IFACE

# A PCMCIA interface for a laptop that is used in different locations:
# (note the lack of an "auto" line for any of these)
#
# mapping eth0
#    script /path/to/pcmcia-compat.sh
#    map home,*,*,*                  home
#    map work,*,*,00:11:22:33:44:55  work-wireless
#    map work,*,*,01:12:23:34:45:50  work-static
#
# iface home inet dhcp
# iface work-wireless bootp
# iface work-static static
#     address 10.15.43.23
#     netmask 255.255.255.0
#     gateway 10.15.43.1
#
# Note, this won't work unless you specifically change the file
# /etc/pcmcia/network to look more like:
#
#     if [ -r ./shared ] ; then . ./shared ; else . /etc/pcmcia/shared ; fi
#     get_info $DEVICE
#     case "$ACTION" in
#         'start')
#             /sbin/ifup $DEVICE
#             ;;
#         'stop')
#             /sbin/ifdown $DEVICE
#             ;;
#     esac
#     exit 0

# An alternate way of doing the same thing: (in this case identifying
# where the laptop is is done by configuring the interface as various
# options, and seeing if a computer that is known to be on each particular
# network will respond to pings. The various numbers here need to be chosen
# with a great deal of care.)
#
# mapping eth0
#    script /path/to/ping-places.sh
#    map 192.168.42.254/24 192.168.42.1 home
#    map 10.15.43.254/24 10.15.43.1 work-wireless
#    map 10.15.43.23/24 10.15.43.1 work-static
#
# iface home inet dhcp
# iface work-wireless bootp
# iface work-static static
#     address 10.15.43.23
#     netmask 255.255.255.0
#     gateway 10.15.43.1
#
# Note that the ping-places script requires the iproute package installed,
# and the same changes to /etc/pcmcia/network are required for this as for
# the previous example.


# Set up an interface to read all the traffic on the network. This
# configuration can be useful to setup Network Intrusion Detection
# sensors in 'stealth'-type configuration. This prevents the NIDS
# system to be a direct target in a hostile network since they have
# no IP address on the network. Notice, however, that there have been
# known bugs over time in sensors part of NIDS (for example see
# DSA-297 related to Snort) and remote buffer overflows might even be
# triggered by network packet processing.
#
# auto eth0
# iface eth0 inet manual
#     up ifconfig $IFACE 0.0.0.0 up
#       up ip link set $IFACE promisc on
#       down ip link set $IFACE promisc off
#       down ifconfig $IFACE down

# Set up an interface which will not be allocated an IP address by
# ifupdown but will be configured through external programs. This
# can be useful to setup interfaces configured through other programs,
# like, for example, PPPOE scripts.
#
# auto eth0
# iface eth0 inet manual
#       up ifconfig $IFACE 0.0.0.0 up
#       up /usr/local/bin/myconfigscript
#       down ifconfig $IFACE down

/etc/network/interfaces는 ifup / ifdown 에서 사용하는 내용으로 저러면 된다는데...
결국 미궁이다.. 후우...

[링크 : http://www.annodex.net/cgi-bin/man/man2html?interfaces]
[링크 : http://www.annodex.net/cgi-bin/man/man2html?8+ifup]
[링크 : http://www.annodex.net/cgi-bin/man/man2html?8+ifdown]


Posted by 구차니
개소리 왈왈2009. 8. 17. 09:34

강릉 통일공원의 강릉 무장공비 침투사건 시 인양된 북한 잠수함과 그 옆에 세계 최초 육상 전시한
최역 해군 함정인데

저 사진만 보면 참 쉽죠~ 라는 밥 로스 아저씨의 말이 생각나는건 왜일까?

'개소리 왈왈' 카테고리의 다른 글

허스키 익스프레스  (2) 2009.08.23
난 붕어가 아니에요~  (0) 2009.08.22
휴가에 남는건 욕과 근육통?  (8) 2009.08.15
휴가때 모하시나요?  (1) 2009.08.14
휴가징크스  (6) 2009.08.11
Posted by 구차니
개소리 왈왈2009. 8. 15. 20:30
운전을 했더니 온몸이 찌뿌둥 하다..
아마도 너무 긴장해서라고 하지만..
긴장한거 치고는 속도를 너무 냈다고 욕을 먹어대는 바람에
명박이 보다 더 오래 살지도 모르겠다 -ㅁ-



아무튼 통일공원에서 찍은 갖은 사진들을 정리해서 올려야 할 듯 -ㅁ-!

'개소리 왈왈' 카테고리의 다른 글

난 붕어가 아니에요~  (0) 2009.08.22
참쉽죠?  (2) 2009.08.17
휴가때 모하시나요?  (1) 2009.08.14
휴가징크스  (6) 2009.08.11
프레스~~~~핫!! 2  (4) 2009.08.10
Posted by 구차니