( 망고 220 ubuntu 포팅 ) $ wget http://launchpadlibrarian.net/52888742/rootstock_0.1.99.4-0ubuntu1_i386.deb --2014-09-23 18:02:26-- http://launchpadlibrarian.net/52888742/rootstock_0.1.99.4-0ubuntu1_i386.deb Resolving launchpadlibrarian.net (launchpadlibrarian.net)... 91.189.89.229, 91.189.89.228 접속 launchpadlibrarian.net (launchpadlibrarian.net) 91.189.89.229 :80... 접속됨. HTTP request sent, awaiting response... 200 OK Length: 17790 (17K) [application/x-debian-package] Saving to: `rootstock_0.1.99.4-0ubuntu1_i386.deb' 100%[============================================================ =============>] 17,790 68.4K/s in 0.3s 2014-09-23 18:02:28 (68.4 KB/s) - `rootstock_0.1.99.4-0ubuntu1_i386.deb' saved [17790/17790] $ sudo apt-get install qemu-kvm-extras-static qemu-kvm-extras debootstrap fuseext2 fuse-utils genext2fs $ sudo dpkg -i rootstock_0.1.99.4-0ubuntu1_i386.deb Selecting previously unselected package rootstock:i386. ( 데이터베이스읽는중... 현재 193222개의파일과디렉터리가설치되어있습니다.) rootstock:i386 패키지를푸는중입니다 (rootstock_0.1.99.4-0ubuntu1_i386.deb에서)... dpkg: 의존성문제로 rootstock:i386을 ( 를 ) 설정할수없습니다 : rootstock:i386 패키지는다음패키지에의존 : qemu-kvm-extras-static. rootstock:i386 패키지는다음패키지에의존 : qemu-kvm-extras. rootstock:i386 패키지는다음패키지에의존 : debootstrap (>= 1.0.10ubuntu3). rootstock:i386 패키지는다음패키지에의존 : fuseext2. rootstock:i386 패키지는다음패키지에의존 : fuse-utils. rootstock:i386 패키지는다음패키지에의존 : genext2fs. rootstock:i386 패키지는다음패키지에의존 : fakeroot. dpkg: rootstock:i386을 ( 를 ) 처리하는데오류가발생했습니다 (--install): 의존성문제 - 설정하지않고남겨둠 man-db에대한트리거를처리하는중입니다... 처리하는데오류가발생했습니다 : rootstock:i386
무시하고진행합니다. $ sudo rootstock -d precise --seed ubuntu-standard -x en_us.utf-8 -f ubuntu -l ubuntu -p ubuntu -i 2G I: Running on a x86_64 machine I: Creating temporary qemu Image to be used as rootfs I: Mounting temporary Image I: Running first stage I: Retrieving Release I: Retrieving Release.gpg I: Checking Release signature I: Valid Release signature (key id 630239CC130E1A7FD81A27B140976EAF437D05B5) I: Retrieving Packages I: Validating Packages I: Resolving dependencies of required packages... I: Resolving dependencies of base packages..... 생략 I: Chroot done I: Umounting temporary Image I: Creating tarball from rootfs I: Mounting temporary Image I: ARM rootfs created as /home/treego/project/temp2/ubuntu_mango220/armel-rootfs- 201409231809.tgz I: Umounting temporary Image I: Rootstock finished successfully I: Cleaning up...... I: A logfile was saved as /home/treego/project/temp2/ubuntu_mango220/rootstock- 201409231809.log I: Done $ ls armel-rootfs-201409231809.tgz rootstock-201409231809.log rootstock_0.1.99.4-0ubuntu1_i386.deb
Ubuntu 용 rootfs 생성이됩니다. "armel-rootfs-201409231809.tgz" Ubuntu 로부팅하기위한스크립트를생성합니다. $ mkdir rootfs $ sudo tar xf armel-rootfs-201409231809.tgz -C rootfs/ $ cd rootfs/ $ sudo vi etc/init/serial-auto-detect-console.conf # serial-auto-detect-console - starts getty on serial console # # This service starts a getty on the serial port given in the 'console' kernel argument. # start on runlevel [23] stop on runlevel [!23] respawn exec /bin/sh /bin/serial-console $ sudo vi bin/serial-console for arg in $(cat /proc/cmdline) do case $arg in console=*) tty=${arg#console=} tty=${tty#/dev/} case $tty in tty[a-za-z]* ) PORT=${tty%%,*} # check for service which do something on this port if [ -f /etc/init/$port.conf ];then continue;fi tmp=${tty##$port,}
SPEED=${tmp%%n*} BITS=${tmp##${SPEED}n} # 8bit serial is default [ -z $BITS ] && BITS=8 [ 8 -eq $BITS ] && GETTY_ARGS="$GETTY_ARGS -8 " [ -z $SPEED ] && SPEED='115200,57600,38400,19200,9600' done esac esac GETTY_ARGS="$GETTY_ARGS $SPEED $PORT" exec /sbin/getty $GETTY_ARGS $ sudo chmod +rx bin/serial-console 암호부분제거 $ sudo vi etc/shadow root::16336:0:99999:7::: daemon:*:16336:0:99999:7::: bin:*:16336:0:99999:7::: sys:*:16336:0:99999:7::: sync:*:16336:0:99999:7::: games:*:16336:0:99999:7::: man:*:16336:0:99999:7::: ubuntu::16336:0:99999:7::: $ sudo mv securetty securetty.old $ sudo tar zcf../rootfs.tar * PC에 SD카드삽입 $ dmesg tail [32174.191412] EXT3-fs (loop0): mounted filesystem with ordered data mode [33675.788065] kjournald starting. Commit interval 5 seconds
[33675.788133] EXT3-fs (loop0): using internal journal [33675.788138] EXT3-fs (loop0): mounted filesystem with ordered data mode [34117.713115] sd 6:0:0:0: [sdc] 15523840 512-byte logical blocks: (7.94 GB/7.40 GiB) [34117.714658] sd 6:0:0:0: [sdc] No Caching mode page present [34117.714663] sd 6:0:0:0: [sdc] Assuming drive cache: write through [34117.719406] sd 6:0:0:0: [sdc] No Caching mode page present [34117.719411] sd 6:0:0:0: [sdc] Assuming drive cache: write through [34117.726452] sdc: sdc1 sdc2 sdc3 sdc4 treego@treego-c2sba:~/project/temp2/ubuntu_ 파티션설정을해줍니다. $ sudo fdisk -c /dev/sdc 파티션을확인하고, Command (m for help): p 모든파티션을삭제합니다. Command (m for help): d Partition number (1-4): 4 Command (m for help): d Partition number (1-4): 3 Command (m for help): d
Partition number (1-4): 2 Command (m for help): d Selected partition 1 Command (m for help): n Partition type: p e primary (0 primary, 0 extended, 4 free) extended Select (default p): p Partition number (1-4, default 1): 엔터 Using default value 1 First sector (2048-15523839, default 2048): 20480 Last sector, +sectors or +size{k,m,g} (20480-15523839, default 15523839): 엔터 Using default value 15523839 Command (m for help): p Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
$ sudo mkfs.ext4 /dev/sdc1 sd카드 1번째파티션에 rootfs을 write합니다. $ mkdir temp $ sudo mount /dev/sdc1 temp $ sudo tar xf rootfs.tar -C temp/ $ sync $ sudo umount /dev/sdc1 setenv bootargs "quiet rw root=/dev/mmcblk0p1 init=/sbin/init rootfstype=ext4 console=ttysac1,115200 rootwait" sdwriter 스크립트.
Apt-get install 동작확인
echo "nameserver 8.8.8.8" > /etc/resolv.conf route add default gw 192.168.55.1 eth0 우분투화면출력 apt-get install ubuntu-desktop root@ubuntu:~# apt-get install ubuntu-desktop Do you want to continue [Y/n]? Y 엄청오래걸림 3 시간가량걸립니다. 다하고.. rootfs 저장해놓읍시다.
setenv bootargs "quiet rw root=/dev/mmcblk0p2 init=/sbin/init rootfstype=ext4 console=ttysac1,115200 rootwait" sudo apt-get install xorg openbox sudo apt-get install fxlrg sudo apt-get install xserver-xorg-core sudo apt-get install xserver-xorg 위설치 [ 3.870513] hub 1-2:1.0: over-current condition root@ubuntu:~# x-window-manager Openbox-Message: Failed to open the display from the DISPLAY environment variable. root@ubuntu:~# export DISPLAY=10.10.10.1:0.0 root@ubuntu:~# root@ubuntu:~# x-window-manager 모두다하고, kernel HDMI 포팅합시다. 용량이부족해서 다시하였습니다. 6 월 23 일소스로진행하였습니다. 2 기가이상을잡아야합니다.
idle 상태에서 CPU 점유율확인 아래명령어로돌리고, CPU 점유율확인 root@ubuntu:~# dd if=/dev/zero of=/dev/zero &