※ 아래의 내용은 직접 작성한 내용이며, 경어를 사용하지 않았습니다.
읽으시는동안 불편하시더라도 이해 부탁드립니다.
그리고 테스트를 위한 보드는 ICBanQ에서 제공되었으며, 체험단활동의 일환으로 본 게시물이 작성되었음을 알립니다
ICBanQ 체험단 박기빈님의 도움과 웹서핑으로 우연히 접하게된 ArchLinux 설치 script 를 참조하여 드디어 MarsBoard에 ArchLinux를 설치하였다.
이제막 Login만 끝낸 상태다.
참조 URL
1. Cubieboard를 위한 아키리눅스 공식 홈페이지 :
http://archlinuxarm.org/platforms/armv7/allwinner/cubieboard
2. 쉘스크립드를 이용한 간단설치법을 소개해주신 라즈베리파이 카페의 비스타님의 게시글 :
http://cafe.naver.com/pipc/3937
3. 비스타님이 참조하신 script를 이용한 설치법 원게시물 :
http://edwardsarkisyan.com/2013/06/02/installing-archlinux-on-cubieboard/
4. Marsboard 공식 홈페이지
http://www.marsboard.com/download.html
cf) 우선 script를 이용한 설치는 2013년 8월 8일 현재 cubieboard.tar.gz 를 다운로드 받는 과정에서 Unable to establish SSL connection. 메세지와 함께 설치가 중단됩니다.
본 게시물은 설치 스크립트 내용을 바탕으로 설치를 하되 필요한 바이너리들은 위 참조 URL 곳곳에서 가져다 사용하였습니다.
1. SD Card Partition (2 G 이상의 micro SD카드를 준비)
파티션시 부트로더를 위하여 첫번째 파티션은 두번째 cylinder 부터 시작합니다.
$ sudo fdisk /dev/sdc (cf. /dev/sdc 는 본인 PC에서의 sd카드 장치 ID임)
p 명령을 이용하여 현재 파티션 정보 확인가능
d 명령을 이용하여 모든 파티션 삭제
n 명령을 이용하여 새 파티션 생성 가능
cf) 기타 자세한 fdisk사용법은 검색을 통하여 습득하시기 바랍니다.
n (새 파티션 생성) -> p (primary partition type) -> 1 (partition number) -> 2 (first cylinder) -> +16M
=> /dev/sdc1 이 생성됨
p를 눌러 첫번째 파티션의 End Cylinder를 확인함. (ex End 값이 10 이라고 가정하고 진행)
n (새 파티션 생성) -> p (primary partition type) -> 2 (partition number) -> 11 (first cylinder) -> default 값으로 설정
=> /dev/sdc2 생성됨
w를 눌러 저장
2. SD Card Format (첫번째 파티션은 FAT로 두번째 파티션은 ext4 로 포맷한다. )
mkfs.vfat 로 포맷을 하면 되나 위3번 참조 URL에 있는 script를 참조하여 해당 명령을 이용하여 msdos type으로 포맷을 진행하였다.
$ mkfs.msdos -F 16 -n boot /dev/sdc1
$ mkfs.ext4 /dev/sdc2
3. boot loader writing
필요한 파일 다운로드
$ wget http://www.haoyuelectronics.com//marsboard/sunxi-spl.bin
$ wget http://www.haoyuelectronics.com//marsboard/u-boot.bin
1) cubieboard-bootloader.tar.gz에는 부트로더와 부팅을 위한 환경 파일이 있는데, 결론부터 말하면 부트로더가 동작하지 않는다.
따라서 부트로더는 marsboard 공식 홈페이지에 링크된 파일을 받는다.
sunxi-spl.bin 과 u-boot.bin 을 다운받으면된다.
2) bootloader writing
$ sudo dd if=u-boot.bin of=/dev/sdc bs=1024 seek=32
3) cubieboard-bootloader.tar.gz 의 압축을 풀고 필요한 바이너리들을 sdc1에 복사한다.
우선 마운드 부터 하자.
$ mkdir boot
$ sudo mount /dev/sdc1 ./boot
$ tar xvfz cubieboard-bootloader.tar.gz
$ cp cubieboard/cubieboard*.bin ./boot/
$ cp cubieboard/uEnv.txt ./boot/
4) uEnv.txt 수정
DRAM이 1G 버전이므로 부팅시 해당 바이너리를 참조하도록 한다.
$ vim ./boot/uEnv.txt
boot_mmc=fatload mmc 0 0x43000000 ${fexfile}; fatload mmc 0 0x48000000 ${ker nel}; bootm 0x48000000
extraargs=rootwait ethaddr=00:CE:39:B7:74:4E
fexfile=cubieboard.bin
fexfile=cubieboard_512.bin 를 fexfile=cubieboard.bin 로 바꿔 준다.
4. ArchLinux FileSystem 설치
필요한 파일 다운로드
1) /dev/sdc2 를 마운트 한다.
$ mkdir arch
$ sudo mount /dev/sdc2 ./arch
2) 파일시스템을 복사한다.
$ tar xvfz ArchLinuxArm-sun4i-latest.tar.gz -C ./arch
3) 커널이미지를 /dev/sdc1에 복사한다.
3번 과정에서 mount를 해제하였다면 다시 마운트 하여야 한다.
$ cp ./arch/boot/uImage ./boot
4) sync 명령을 통해 sd 카드에 데이터가 정확히 써지도록 한 후 마운트를 해제한다.
$ sync
$ sudo umount /dev/sdc1
$ sudo umount /dev/sdc2
이로써 설치는 모두 완료 되었다.
Mars Board에 SD카드를 삽입하고 전원을 넣으면 Linux가 부팅이 된다.
rogin ID / PW 는 root / root 이다.
부팅시 UART
U-Boot SPL 2012.10-04277-g7aa9f04-dirty (Apr 28 2013 - 10:20:24)
DRAM: 1024MB
SUNXI SD/MMC: 0
U-Boot 2012.10-04277-g7aa9f04-dirty (Apr 28 2013 - 10:20:24) Allwinner Technology
CPU: SUNXI Family
Board: MarsBoard A10
I2C: ready
DRAM: 1 GiB
MMC: SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
reading uEnv.txt
169 bytes read
Loaded environment from uEnv.txt
reading boot.scr
** Unable to read "boot.scr" from mmc 0:1 **
Loading file "boot.scr" from mmc device 0:1
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - mmc 0:1 **
ext2load - load binary file from a Ext2 filesystem
Usage:
ext2load <interface> <dev[:part]> [addr] [filename] [bytes]
- load binary file 'filename' from 'dev' on 'interface'
to address 'addr' from ext2 filesystem
Loading file "boot/boot.scr" from mmc device 0:1
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - mmc 0:1 **
ext2load - load binary file from a Ext2 filesystem
Usage:
ext2load <interface> <dev[:part]> [addr] [filename] [bytes]
- load binary file 'filename' from 'dev' on 'interface'
to address 'addr' from ext2 filesystem
reading cubieboard.bin
43628 bytes read
reading uImage
3348688 bytes read
## Booting kernel from Legacy Image at 48000000 ...
Image Name: Linux-3.0.57-5-ARCH
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3348624 Bytes = 3.2 MiB
Load Address: 40008000
Entry Point: 40008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
(중략)
Welcome to Arch Linux ARM!
[ 6.540000] systemd[1]: Set hostname to <alarm>.
[ 6.730000] systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.serv
ice failed to load: No such file or directory. See system logs and 'systemctl status display-manager.service' for details.
[ 6.750000] systemd[1]: Expecting device dev-ttyS0.device...
Expecting device dev-ttyS0.device...
[ 6.780000] systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
[ 6.780000] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[ 6.790000] systemd[1]: Starting Syslog Socket.
[ OK ] Listening on Syslog Socket.
[ 6.820000] systemd[1]: Listening on Syslog Socket.
[ 6.820000] systemd[1]: Starting Remote File Systems.
[ OK ] Reached target Remote File Systems.
[ 6.850000] systemd[1]: Reached target Remote File Systems.
[ 6.850000] systemd[1]: Starting LVM2 metadata daemon socket.
[ OK ] Listening on LVM2 metadata daemon socket.
[ 6.880000] systemd[1]: Listening on LVM2 metadata daemon socket.
[ 6.880000] systemd[1]: Starting /dev/initctl Compatibility Named Pipe.
[ OK ] Listening on /dev/initctl Compatibility Named Pipe.
[ 6.910000] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[ 6.910000] systemd[1]: Starting Device-mapper event daemon FIFOs.
[ OK ] Listening on Device-mapper event daemon FIFOs.
[ 6.940000] systemd[1]: Listening on Device-mapper event daemon FIFOs.
[ 6.940000] systemd[1]: Starting Delayed Shutdown Socket.
[ OK ] Listening on Delayed Shutdown Socket.
[ 6.970000] systemd[1]: Listening on Delayed Shutdown Socket.
[ 6.970000] systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point.
[ OK ] Set up automount Arbitrary Executable File Formats F...utomount Point.
[ 7.010000] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ 7.010000] systemd[1]: Starting Journal Socket.
[ OK ] Listening on Journal Socket.
[ 7.040000] systemd[1]: Listening on Journal Socket.
[ 7.040000] systemd[1]: Mounted Debug File System.
[ 7.050000] systemd[1]: Mounting POSIX Message Queue File System...
Mounting POSIX Message Queue File System...
[ 7.080000] systemd[1]: Starting Apply Kernel Variables...
Starting Apply Kernel Variables...
[ 7.110000] systemd[1]: Mounted Huge Pages File System.
[ 7.120000] systemd[1]: Starting Journal Service...
Starting Journal Service...
[ OK ] Started Journal Service.
[ 7.160000] systemd[1]: Started Journal Service.
[ 7.160000] systemd[1]: Starting Dispatch Password Requests to Console Directory Watch.
[ 7.170000] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[ 7.180000] systemd[1]: Starting Paths.
[ OK ] Reached target Paths.
[ 7.210000] systemd[1]: Reached target Paths.
[ 7.210000] systemd[1]: Starting udev Kernel Socket.
[ OK ] Listening on udev Kernel Socket.
[ 7.240000] systemd[1]: Listening on udev Kernel Socket.
[ 7.240000] systemd[1]: Starting udev Control Socket.
[ OK ] Listening on udev Control Socket.
[ 7.270000] systemd[1]: Listening on udev Control Socket.
[ 7.270000] systemd[1]: Starting udev Coldplug all Devices...
Starting udev Coldplug all Devices...
[ 7.340000] systemd[1]: Started Set Up Additional Binary Formats.
[ 7.340000] systemd[1]: Starting Encrypted Volumes.
[ OK ] Reached target Encrypted Volumes.
[ 7.370000] systemd[1]: Reached target Encrypted Volumes.
[ 7.380000] systemd[1]: Starting Setup Virtual Console...
Starting Setup Virtual Console...
[ 7.410000] systemd[1]: Starting Create static device nodes in /dev...
Starting Create static device nodes in /dev...
[ 7.430000] systemd[1]: Started Load Kernel Modules.
[ 7.440000] systemd[1]: Mounted Configuration File System.
[ 7.450000] systemd[1]: Mounting FUSE Control File System...
Mounting FUSE Control File System...
[ 7.470000] systemd[1]: Starting Swap.
[ OK ] Reached target Swap.
[ 7.490000] systemd[1]: Reached target Swap.
[ 7.490000] systemd[1]: Started File System Check on Root Device.
[ 7.500000] systemd[1]: Starting Remount Root and Kernel File Systems...
Starting Remount Root and Kernel File Systems...
[ 7.530000] systemd[1]: Mounting Temporary Directory...
Mounting Temporary Directory...
[ OK ] Mounted POSIX Message Queue File System.
[ 7.600000] systemd[1]: Mounted POSIX Message Queue File System.
[ OK ] Started Apply Kernel Variables.
[ 7.630000] systemd[1]: Started Apply Kernel Variables.
[ OK ] Started Create static device nodes in /dev.
[ 7.660000] systemd[1]: Started Create static device nodes in /dev.
[ OK ] Mounted FUSE Control File System.
[ 7.690000] systemd[1]: Mounted FUSE Control File System.
[ OK ] Started Remount Root and Kernel File Systems.
[ 7.720000] systemd[1]: Started Remount Root and Kernel File Systems.
[ OK ] Mounted Temporary Directory.
[ 7.750000] systemd[1]: Mounted Temporary Directory.
[ OK ] Started udev Coldplug all Devices.
[ 7.780000] systemd[1]: Started udev Coldplug all Devices.
[ 7.780000] systemd[1]: Starting Load Random Seed...
Starting Load Random Seed...
[ 7.820000] systemd[1]: Starting udev Kernel Device Manager...
Starting udev Kernel Device Manager...
[ OK ] Started Load Random Seed.
[ OK [ 7.890000] systemd-udevd[77]: starting version 204
] Started udev Kernel Device Manager.
[ OK ] Reached target Local File Systems (Pre).
[ OK ] Reached target Local File Systems.
Starting Recreate Volatile Files and Directories...
Starting Trigger Flushing of Journal to Persistent Storage...
[ OK ] Started Setup Virtual Console.
[ OK ] Started Recreate Volatile Files and Directories.
Starting Update UTMP about System Reboot/Shutdown...
[ OK ] Started Update UTMP about System Reboot/Shutdown.
[ OK ] Started Trigger Flushing of Journal to Persistent Storage.
[ OK ] Reached target System Initialization.
[ OK ] Reached target Timers.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting System Logger Daemon...
[ OK ] Started System Logger Daemon.
Starting SSH Key Generation...
Starting Netcfg multi-profile daemon...
Starting Periodic Command Scheduler...
[ OK ] Started Periodic Command Scheduler.
Starting Permit User Sessions...
Starting D-Bus System Message Bus...
[ OK ] Started D-Bus System Message Bus.
Starting Login Service...
[ OK ] Started Permit User Sessions.
Starting Getty on tty1...
[ OK ] Started Getty on tty1.
[ OK ] Reached target Sound Card.
[ OK ] Found device /dev/ttyS0.
Starting Serial Getty on ttyS0...
[ OK ] Started Serial Getty on ttyS0.
[ OK ] Reached target Login Prompts.
[ OK ] Started Login Service.
[ 13.190000] wemac wemac.0: WARNING: no IRQ resource flags set.
[ 13.330000] wemac wemac.0: eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
Arch Linux 3.0.57-5-ARCH (ttyS0)
alarm login: [ OK ] Started Netcfg multi-profile daemon.
[ OK ] Reached target Network.
Starting OpenNTP Daemon...
[ OK ] Started OpenNTP Daemon.
[ 23.740000] eth0: no IPv6 routers present
[ OK ] Started SSH Key Generation.
Starting OpenSSH Daemon...
[ OK ] Started OpenSSH Daemon.
[ OK ] Reached target Multi-User System.
[ OK ] Reached target Graphical Interface.
alarm login: