How to install ubuntu to rangeley


UEFI?

  UEFI(Unified Extensible Firmware Interface)는 BIOS(기본 입출력 시스템)를 대체하도록 고안된 PC용 표준 펌웨어 인터페이스입니다. 이 표준은 Microsoft를 비롯하여 UEFI 컨소시엄에 가입된 140개 이상의 기술 기업에 의해 제정되었습니다. => from MS homepage


EFI?

1990 년대 중반에 인텔에서 아이테이엄 플랫폼을 위해 개발한 것으로써, 기존 BIOS 의 단점을 극복하기 위해 개발하였다. 


EFI 사용법 : http://www.rodsbooks.com/efi-bootloaders/index.html


EFI 부팅이 완료되면 아래와 같이 EFI shell 이 실행된다. 


 EFI Shell version 2.31 [1.0] 

Current running mode 1.1.2 

Device mapping table

    fs0 :Removable HardDisk - Alias hd32b0e0b blk0               PciRoot(0x0)/Pci(0x16,0x0)/USB(0x1,0x0)/USB(0x4,0x0)/HD(1,MBR,0x00000000,0x20,0xEE8BE0)     blk0 :Removable HardDisk - Alias hd32b0e0b fs0 PciRoot(0x0)/Pci(0x16,0x0)/USB(0x1,0x0)/USB(0x4,0x0)/HD(1,MBR,0x00000000,0x20,0xEE8BE0)     blk1 :Removable BlockDevice - Alias (null) PciRoot(0x0)/Pci(0x16,0x0)/USB(0x1,0x0)/USB(0x4,0x0) 


 Press ESC in 1 seconds to skip startup.nsh, any other key to continue. 


 Shell>


start.nsh 를 작성하면, grub 이나 syslinux 같은 부트로더를 자동 실행 시킬 수 있다. 


GRUB 실행법


 EFI Shell version 2.31 [1.0] 

Current running mode 1.1.2 

Device mapping table

    fs0 :Removable HardDisk - Alias hd32b0e0b blk0               PciRoot(0x0)/Pci(0x16,0x0)/USB(0x1,0x0)/USB(0x4,0x0)/HD(1,MBR,0x00000000,0x20,0xEE8BE0)     blk0 :Removable HardDisk - Alias hd32b0e0b fs0 PciRoot(0x0)/Pci(0x16,0x0)/USB(0x1,0x0)/USB(0x4,0x0)/HD(1,MBR,0x00000000,0x20,0xEE8BE0)     blk1 :Removable BlockDevice - Alias (null) PciRoot(0x0)/Pci(0x16,0x0)/USB(0x1,0x0)/USB(0x4,0x0) 


 Press ESC in 1 seconds to skip startup.nsh, any other key to continue. 


Shell> fs0:


fs0: \> cd EFI


fs0: \EFI> cd BOOT


fs0: \EFI\BOOT> BOOTx64.EFI


                    GNU GRUB  version 2.02~beta2-9ubuntu1.3


 /----------------------------------------------------------------------------\

 |*Install Ubuntu Server                                                      | 

 | BABO                                                                       |

 | OEM install (for manufacturers)                                            |

 | Multiple server install with MAAS                                          |

 | Check disc for defects                                                     |

 | Rescue a broken system                                                     |

 |                                                                            |

 |                                                                            |

 |                                                                            |

 |                                                                            |

 |                                                                            |

 |                                                                            | 

 \----------------------------------------------------------------------------/


      Use the ^ and v keys to select which entry is highlighted.          

      Press enter to boot the selected OS, `e' to edit the commands       

      before booting or `c' for a command-line. ESC to return previous    

      menu.   




Intel FSF

  Homepage : http://www.intel.com/content/www/us/en/intelligent-systems/intel-firmware-support-package/intel-fsp-overview.html


  홈페이지에 접속하여 FSP 를 다운 로드 받은 후 아래와 같이 압축을 해제하면 2개의 파일을 얻을 수 있다.


poplinux@raw FSP $ > ls

333407_RANGELEY_POSTGOLD_4_001US.tgz

poplinux@raw FSP $> tar zxvf 333407_RANGELEY_POSTGOLD_4_001US.tgz

RANGELEY_POSTGOLD_4.se

Readme_Extract.txt

poplinux@raw FSP $ > ls

333407_RANGELEY_POSTGOLD_4_001US.tgz 

RANGELEY_POSTGOLD_4.se 

Readme_Extract.txt


압축을 풀고 난 후, 아래와 같이 ./RANGELEY_POSTGOLD_4.se 를 실행하면 압축이 추가로 풀리면서 필요한 파일을 얻을 수 있다. 자세한 내용은 ./Readme_Extract.txt 를 읽어 보면 된다. 

 

poplinux@raw FSP $ > cat  

Readme Notes on how to extract the contents of the *.se file in Linux: 


1.           Run the following command to make the *.se file executable 


              chmod +x <filename>.se 


2.          Run the following command to extract the contents of the *.se file 

  

             ./<filename>.se 


3.          Page through the license using the space bar. At the end enter 'y' 

             and press ENTER to accept the license. 


4.          The contents of the *.se file will be extracted into a directory 

             with the same name as the *.se file (without the .se extension).


poplinux@raw FSP $> chmod 777 RANGELEY_POSTGOLD_4.se

poplinux@raw FSP $ > ./RANGELEY_POSTGOLD_4.se

poplinux@raw FSP $ > ls

333407_RANGELEY_POSTGOLD_4_001US.tgz 

./RANGELEY_POSTGOLD_4

RANGELEY_POSTGOLD_4.se 

Readme_Extract.txt

poplinux@raw FSP $ > cd RANGELEY_POSTGOLD_4

poplinux@raw FSP $ > ls

./DOCUMENTATION 

./FSP  

FSP Kit Production RULAC click-through License.pdf 

./Microcode 

ReadMe.pdf




CoreBOOT

  HomePage : https://www.coreboot.org/

  WIKI : https://ko.wikipedia.org/wiki/%EC%BD%94%EC%96%B4%EB%B6%80%ED%8A%B8

 BUILD HOW-TO : https://www.coreboot.org/Build_HOWTO 


 HOST PC 준비 사항

 아래와 같이 필수 팩키지를 설치해야 한다.


 sudo aptitude install gnat-4.8 libncurses5-dev m4 bison flex iasl build-essential zlib1g-dev libftdi-dev pciutils-dev libusb-dev libpci-dev


  소스 다운로드

 poplinux@raw work $ > git clone http://review.coreboot.org/coreboot.git ./


  추가 모듈 다운로드

  정상적인 빌드를 위해서는 추가 모듈을 다운로드 받아야 한다. 


 poplinux@raw work $ > cd coreboot

poplinux@raw coreboot $ > git submodule update --init --checkout

Submodule 'arm-trusted-firmware' (http://review.coreboot.org/arm-trusted-firmware.git) registered for path '3rdparty/arm-trusted-firmware'

Submodule '3rdparty' (http://review.coreboot.org/blobs.git) registered for path '3rdparty/blobs'

Submodule 'vboot' (http://review.coreboot.org/vboot.git) registered for path '3rdparty/vboot' 

Submodule 'util/nvidia-cbootimage' (http://review.coreboot.org/nvidia-cbootimage.git) registered for path 'util/nvidia/cbootimage'


  추가 모듈을 다운로드 받지 않으면, make 도중 "이 파일이 없습니다" 등등의 메시지를 보게 된다.


  컴파일러 빌드

  빌드에 사용할 컴파일러를 빌드해야 한다. 모든 플랫폼용을 전부  빌드하는 구조여서 시간이 오래 걸린다.


 poplinux@raw coreboot $ > make crossgcc 

Welcome to the coreboot cross toolchain builder v1.33 (November 25th, 2015)


Target architecture is now i386-elf

Downloading tar balls ...


  설정

  준비가 완료되었다면 아래와 같이 설정을 진행하자. 


poplinux@raw coreboot $ > make menuconfig 

  

  빌드

  모든 준비가 완료되었다면 빌드를 진행하자.


 poplinux@raw coreboot $ > make




빌드 환경 검사

  coreboot 는 타겟 시스템을 빌드할 수 있는 환경이 준비되어 있는지를 검사해 주는 기능이 들어가 있다. 


  HomePage : https://www.coreboot.org/Abuild


  intel mohonpeak 플랫폼을 사용할 예정이므로 아래와 같이 검사를 진행해 보자. 빌드 환경을 준비하지 않았다면 아래와 같이 에러가 발생함을 알 수 있다. 


poplinux@raw coreboot $ > util/abuild/abuild -t intel/mohonpeak

Building INTEL_MOHONPEAK

    Creating config file for INTEL_MOHONPEAK... 

    INTEL_MOHONPEAK (default configuration) 

   INTEL_MOHONPEAK config created.

  Compiling INTEL_MOHONPEAK image... 

  INTEL_MOHONPEAK build FAILED after 1s! 

Log excerpt: 

toolchain.inc:205: 

toolchain.inc:207: To try to use any toolchain in your path, run 'make menuconfig', then select 

toolchain.inc:209: the config option: 'General setup', and 'Allow building with any toolchain' 

toolchain.inc:211: Note that this is NOT supported. Using it means you're on your own. 

toolchain.inc:213: toolchain.inc:215: *** Halting the build. 멈춤.





Fusing

  flashrom : http://www.flashrom.org/Flashrom

  How to use : http://www.flashrom.org/Documentation 


How to read the manual

  flashrom 에서 제공하는 메뉴얼의 확장자는 ".tmpl" 입니다. 이 문서를 읽으려면 아래와 같이 준비해야 합니다. 


poplinux@raw coreboot $ > sudo aptitude install docbook-utils

poplinux@raw coreboot $ > sudo aptitude install xmlto

poplinux@raw coreboot $ > docbook2html [tmplfile].tmpl

=> man page 로 만들다가 에러 발생했음.



How to get flashrom

Get the source code and build


poplinux@raw coreboot $ > svn co svn://flashrom.org/flashrom/trunk flashrom 

poplinux@raw coreboot $ > cd flashrom

poplinux@raw coreboot $ > make

poplinux@raw coreboot $ > sudo make install


Get the pre-builded package 


poplinux@raw coreboot $ > sudo aptitude install flashrom





How to use the flashrom


dump


poplinux@raw  $ > sudo flashrom -p internal:laptop=this_is_not_a_laptop -r BIOS1_org.bin


Write




'development' 카테고리의 다른 글

coreboot  (2) 2016.05.13
How to use serial console on Intel rangeley platform  (0) 2016.03.18
[gcc] -march, -mtune 옵션  (0) 2016.01.08
[gcc] __attribute__((......)) 키워드  (0) 2016.01.06
openwrt  (0) 2015.02.24
블로그 이미지

김유석0

,

cpu clock(속도) 조절

linux 2013. 3. 4. 19:06

Table of contents

1. 환경

2. cpu 설정 확인

3. 설정법

4. 정리글



1. 환경

  CPU : Intel(R) Core(TM)2 Duo CPU     E7400  @ 2.80GHz

  RAM : 8GByte

  model : Samsung SENS SF511

  OS : ubuntu 12.04 64bit


2. cpu clock 설정 확인

2-1. cpu 정보 있는곳

  cpu 0 : /sys/devices/system/cpu/cpu0/cpufreq

  cpu 1 : /sys/devices/system/cpu/cpu1/cpufreq

  cpu 2 : /sys/devices/system/cpu/cpu2/cpufreq

  cpu 3 : /sys/devices/system/cpu/cpu3/cpufreq


poplinux@poplinux: ~$ (3.33) ls /sys/devices/system/cpu/cpu0/cpufreq/

affected_cpus

cpuinfo_max_freq = > 사용 가능한 최고 clock

related_cpus

scaling_cur_freq

scaling_max_freq

stats

bios_limit

cpuinfo_min_freq

scaling_available_frequencies => 설정 가능한 clock 목록

scaling_driver

scaling_min_freq

cpuinfo_cur_freq => 현재 동작중인 clock

cpuinfo_transition_latency

scaling_available_governors => 설정 가능한 동작 mode

scaling_governor => 현재 설정되어 있는 동작 mode

scaling_setspeed


cpufreq 디렉토리에는 여러 파일이 있지만 위에 굵게 표시한 파일만 신경쓰면 된다.




3. 설정법

3-1. 준비

속도 설정은 직접 cpufreq/* 의 파일들을 수정해서 할 수도 있지만, cpufreq-set 바이너리를 사용하는 것이 편리하다. 

아래와 같이 설치한다. 


 sudo aptitude install cpufrequtils

 


3-2. 설정 방법

아래 명령을 수행하면, cpu0, cpu1, cpu2, cpu3 을 최대 성능을 내도록 설정하게 된다. 


 sudo cpufreq-set -c 0 -g performance
 sudo cpufreq-set -c 1 -g performance
 sudo cpufreq-set -c 2 -g performance
 sudo cpufreq-set -c 3 -g performance


  

  /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 

  /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor 

  /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor 

  /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor 


파일의 내용을 "performance" 로 변경하게 된다. 


3-3. 부팅시점에 자동 적용

 3-2 에서 설명한 방법은 부팅 이후에 사용자가 수동으로 변경하는 방법으로 부팅 시점에 자동으로 설정하려면 아래와 같이 하면 된다.


step 1. /etc/init.d/cpufrequtils 수정

poplinux@poplinux: cpufreq$ (3.33) vi /etc/init.d/cpufrequtils


GOVERNOR="performance"


 step 2. /etc/rc2.d/S19cpufrequtils 추가 ( 원래 있었으면 생략)

 poplinux@poplinux: rc2.d $ (3.33) ln -s ../init.d/S19cpufrequtils ./


step 3. /etc/rc2.c/S99ondemand 삭제

 ubuntu 에서는 CPU clock 를 상황에 따라 자동으로 변경하게 하는 것을 기본으로 하고 있는데 그걸 설정하는 스크립트가 S99ondemand 입니다. 


 이걸 삭제해야 합니다.   


  poplinux@poplinux: rc2.d $ (3.33) rm S99ondemand



 여기까지 작업하고 재부팅하면 사용 가능한 최대성능으로 동작하게 됩니다.(CPU 에 한해서) 



4. 정리글

 컴파일 할 때는 큰 영향은 없을 수도 있지만, 일상적인 사용시에는 버벅거림이 덜 하게 됩니다. 








'linux' 카테고리의 다른 글

lxc 에 외부 IP 설정하여 직접 접속하는법  (0) 2019.01.24
virtualbox 사용법  (0) 2013.03.07
opensource 정보  (0) 2012.05.18
IPv4 packet forwarding  (0) 2012.05.03
리눅스 콘솔내용을 시리얼로 출력해서 보려면  (0) 2012.04.03
블로그 이미지

김유석0

,

Table of Content

1. Why?

2. BIOS 설정

3. GRUB 설정


1. Why?

 x86 기반에서 작업을 하다보면 시리얼 때문에 고생하게 되는 경우가 종종 있다. 

 예를 들어 네트웍 관련 장비(라우터, Firewall, server)에서 작업할 경우, 장비에 VGA, keyboard, mouse 없이 딸랑 시리얼 포트만 달려있는 경우가 많은데 이런 장비에서 작업 하려면 모든 입,출력을 serial port 를 통해서 해야 한다. 

 보통의 상용 장비는 이런 준비가 다 되어 있지만, 처음부터 시작할 경우엔 개발자가 환경 준비를 모두 해 주어야 한다. 


2. BIOS 설정

 일반적으로 이런 장비들은 BIOS 에서 "모든 출력을 serial(console) 로 보내라" 고 설정하는 옵션이 있다. 이 옵션을 enable 시켜야 한다. 

 이 옵션을 살려주면 보통 부트로더 전까지 시리얼로 input/output 할 수 있다. 


3. GRUB 설정

 BIOS 에서 설정해 주었다고 하여도 GRUB Bootloader 가 동작되면 serial 로 아무런 메시지도 볼 수 없게 된다. 

 그 이유는 GRUB 가 동작하면서 text 기반에서 graphic 기반으로 모드를 바꾸기 때문에 시리얼로는 아무것도 볼 수 없게 되는 것이다. 

우선 아래와 같이 graphic 관련 기능을 모두 주석 처리하자. 

#if loadfind /use/share/grub/unicode.pf2 ; then

#  set gfxmode=auto

#  load_video

#  insmod gfxterm

.

.

.

#fi

#terminal_output gfxterm

# text 모드로 설정 

linux_gfx_mode=text


위와 같이 설정하면 일단 GRUB 부트로더까지는 시리얼로 볼 수 있다. 하지만 부팅을 시작하면 시리얼로는 아무것도 볼 수 없다. 이제는 kernel 옵션을 바꿔 주어야 한다. 

그 다음엔 아래와 같이 kernel option 을 설정하면 부팅로그까지 시리얼로 볼 수 있다. 

 linux /boot/vmlinuz-3.0.0-15-generic root=UUID=865f57fe-30a8-4e6e-9bf8 ro console=tty0 console=ttyS0,115200


하지만 커널 부팅이 완료되고 나면 로그인 창을 볼 수가 없다. 

아래와 같이 /etc/init/ttyS0 파일을 생성해 주어야 한다. 


poplinux@test : $ cd /etc/init

poplinux@test : /etc/init $ cp tty1.conf ttyS0.conf

poplinux@test : /etc/init $ vi ttyS0.conf


# ttyS0 -getty


# This service maintains a getty on ttyS0 from the point the system is 

#started until it is shut down again.


start on stopped rc RUNLEVEL=[2345]

stop on runlevel [!2345]


respawn

exec /sbin/getty -L 115200 ttyS0 vt100




이렇게 하면 로그인 쉘이 동작할때 시리얼로 메시지를 볼 수 있다. 




'linux' 카테고리의 다른 글

opensource 정보  (0) 2012.05.18
IPv4 packet forwarding  (0) 2012.05.03
iproute2  (0) 2012.02.07
ubuntu 에서 tftp server 설치하는법  (0) 2011.11.24
GNOME 설정  (0) 2011.09.27
블로그 이미지

김유석0

,
참 간단하지요잉?

sudo aptitude install tftpd-hpa 
mkdir /tftpboot
 
설정파일 수정
sudo vi /etc/default/tftpd-hpa

# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"
 
설정 내용 적용
sudo service tftpd-hpa restart
 
테스트는 아래와 같이 하면 됩니다. 

tftp 10.100.4.48
tftp> get test_file
 
끝입니다. 

'linux' 카테고리의 다른 글

리눅스 콘솔내용을 시리얼로 출력해서 보려면  (0) 2012.04.03
iproute2  (0) 2012.02.07
GNOME 설정  (0) 2011.09.27
Iconv 로 인코딩 변경하기  (0) 2011.09.26
LFS(Linux From Scratch)  (0) 2011.09.23
블로그 이미지

김유석0

,
우분투의 런레벨은 아래와 같다. 

  0 : halt
  1 : single
  2 : default (GUI)
  3 : GUI
  4 : GUI
  5 : GUI
  6 : reboot
 

현재 런 레벨을 확인하려면 아래와 같이 입력한다. 

  $ who -r

'linux' 카테고리의 다른 글

Iconv 로 인코딩 변경하기  (0) 2011.09.26
LFS(Linux From Scratch)  (0) 2011.09.23
화면 캡쳐하는 방법  (0) 2011.09.21
svn+ssh 사용법  (0) 2011.09.21
shell script  (0) 2011.09.21
블로그 이미지

김유석0

,

데비안 계열에서는 아래 설정 파일을 통해 네트웍 설정을 변경합니다.

 

 

/etc/network/interface

 

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
 auto eth0
 iface eth0 dhcp
 iface eth0 inet static
 address 192.168.1.69
 netmask 255.255.255.0
 network 192.168.1.0
 broadcast 192.168.1.255
 gateway 192.168.1.1
 dns-nameservers 168.126.63.1

 

우부투 계열에서도 interface 설정 파일을 사용하지만 만약 gnome desktop 에서 네트웍 관련 설정을 건드리게 되면 interface 설정 파일을 무력화 됩니다.

 

 이후에는 아래 위치에 있는 설정 파일을 사용하게 됩니다.

 

/etc/NetworkManager/system-connections/Auto eth0

 

 

 만약 /etc/network/interface 설정 파일을 사용하고 싶다면 "Auto eth0" 파일을 삭제하면 됩니다.

 

 

'linux' 카테고리의 다른 글

shell script  (0) 2011.09.21
init.d run script 를 쉽게 각 run level 에 등록하는  (0) 2011.09.21
MAC 변경하는 법  (0) 2011.09.21
윈도우용 서브버전 클라이언트 TOTOISE  (0) 2011.09.21
windows hosts 파일 위치  (0) 2011.09.21
블로그 이미지

김유석0

,

윈도우 공유 디렉토리를 Linux PC 에 마운트 시키는 방법.

1. 마운트 명령 사용

sudo mount -t cifs //192.168.1.250/rnd /home/poplinux/samba -o username=kay.kim,password=kay.kim,iocharset=euc-kr,rw,setuids,uid=1000

  cifs : 인터넷 파일 시스템
   //192.168.1.250/rnd : 마운트 하고 싶은 디렉토리 위치
   /home/poplinux/samba : 마운트할 위치
   -o : 이거 이하로는 옵션
   username:kay.kim : 삼바 디렉토리 사용자명
   password:kay.kim : 삼바 디렉토리 비밀번호
   iocharset=euc-kr : euc-kr 캐릭터 코드 사용
   rw : 읽고 쓰고 가능.
   setuids : 모름
   uid=1000 : 마운트할 삼바 디렉토리의 권한을 uid 1000 으로 지정. 참고로 uid 1000 은 내 계정(poplinux) 의 uid임

2. /etc/fstab 등록

 # /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=1251eddf-bb2d-4249-828f-cb05d6686f55 /                     ext4    errors=remount-ro 0       1
# /home was on /dev/sda2 during installation
UUID=617694d7-93e6-4042-b549-bd8789bb75ea /home           ext4    defaults        0       2
# swap was on /dev/sda3 during installation
UUID=23621cd0-1719-44df-9f68-38999496a3c8 none                swap    sw              0       0
//192.168.1.250/rnd /home/poplinux/samba                         smbfs   username=kay.kim,password=kay.kim,rw,setuids,uid=1000,iocharset=euc-kr  0   0

'linux' 카테고리의 다른 글

삼바 마운트 하는법  (0) 2011.09.21
BuildRoot 시스템  (0) 2011.09.21
media player 개발  (0) 2011.02.07
X window programming site  (0) 2011.01.10
VLC player  (0) 2011.01.04
블로그 이미지

김유석0

,