Yabu.log

ITなどの雑記

パタヘネのMIPS学習環境をMacOSのVagrant上に作成する1

とりあえずこのビデオの通りに進めます

www.youtube.com

まずは64bitのdebianを入れる

vagrant init debian/jessie64

sudo apt-getの入手先にMIPSのクロスコンパイルに対応したGCCがない

/etc/apt/sources.listを書き換える必要がある

最終行に

deb http://httpredir.debian.org/debian unstable main

を追加

mipsのクロスコンパイラがインストールできるようになったので、レッツインストール

sudo apt-get istall gcc-mips-linux-gnu

しばらくした後、linux karnelのバージョンを上げろ、的なメッセージがでた。

You have mail in /var/mail/vagrant
vagrant@jessie:~$ cat /var/mail/
cat: /var/mail/: Is a directory
vagrant@jessie:~$ cat /var/mail/vagrant
From root@jessie.vagrantup.com Mon Aug 13 19:24:54 2018
Return-path: <root@jessie.vagrantup.com>
Envelope-to: root@jessie.vagrantup.com
Delivery-date: Mon, 13 Aug 2018 19:24:54 +0000
Received: from root by jessie.vagrantup.com with local (Exim 4.84_2)
    (envelope-from <root@jessie.vagrantup.com>)
    id 1fpISU-0000Ub-A6
    for root@jessie.vagrantup.com; Mon, 13 Aug 2018 19:24:54 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Auto-Submitted: auto-generated
Subject: apt-listchanges: news for jessie
To: root@jessie.vagrantup.com
Message-Id: <E1fpISU-0000Ub-A6@jessie.vagrantup.com>
From: root <root@jessie.vagrantup.com>
Date: Mon, 13 Aug 2018 19:24:54 +0000

glibc (2.26-5) unstable; urgency=medium

  Starting with version 2.26-1, the glibc requires a 3.2 or later Linux
  kernel.  If you use an older kernel, please upgrade it *before*
  installing this glibc version. Failing to do so will end-up with the
  following failure:

    Preparing to unpack .../libc6_2.26-5_amd64.deb ...
    ERROR: This version of the GNU libc requires kernel version
    3.2 or later.  Please upgrade your kernel before installing
    glibc.

  The decision to not support older kernels is a GNU libc upstream
  decision.

  Note: This obviously does not apply to non-Linux kernels.

 -- Aurelien Jarno <aurel32@debian.org>  Tue, 23 Jan 2018 22:03:12 +0100

現在使っているバージョンが3.16のようなので、バージョンアップが必要なようだ

vagrant@jessie:~$ uname -v
#1 SMP Debian 3.16.56-1+deb8u1 (2018-05-08)

さーてインストール可能なlinuxは?

vagrant@jessie:~$ apt-cache search linux-image |grep "x86"
linux-image-4.16.0-2-cloud-amd64 - Linux 4.16 for x86-64 cloud
linux-image-4.17.0-1-cloud-amd64 - Linux 4.17 for x86-64 cloud
linux-image-cloud-amd64 - Linux for x86-64 cloud (meta-package)

よくわからんからとりあえず最新版にしとくか

sudo aptitude install linux-image-4.17.0-1-cloud-amd64

インストール完了

$ mips-linux-gnu-
mips-linux-gnu-addr2line     mips-linux-gnu-gcc-nm        mips-linux-gnu-ld.bfd
mips-linux-gnu-ar            mips-linux-gnu-gcc-nm-8      mips-linux-gnu-ld.gold
mips-linux-gnu-as            mips-linux-gnu-gcc-ranlib    mips-linux-gnu-nm
mips-linux-gnu-c++filt       mips-linux-gnu-gcc-ranlib-8  mips-linux-gnu-objcopy
mips-linux-gnu-cpp           mips-linux-gnu-gcov          mips-linux-gnu-objdump
mips-linux-gnu-cpp-8         mips-linux-gnu-gcov-8        mips-linux-gnu-ranlib
mips-linux-gnu-dwp           mips-linux-gnu-gcov-dump     mips-linux-gnu-readelf
mips-linux-gnu-elfedit       mips-linux-gnu-gcov-dump-8   mips-linux-gnu-size
mips-linux-gnu-gcc           mips-linux-gnu-gcov-tool     mips-linux-gnu-strings
mips-linux-gnu-gcc-8         mips-linux-gnu-gcov-tool-8   mips-linux-gnu-strip
mips-linux-gnu-gcc-ar        mips-linux-gnu-gprof         
mips-linux-gnu-gcc-ar-8      mips-linux-gnu-ld            

使いそうなもの

使い方よくわからんので、次回は使い方編のビデオを見たいと思います。

https://www.youtube.com/watch?v=iSiYGifDltI

かなり良い情報なんだけどgoodと再生数少ないね...

https://www.linuxquestions.org/questions/linux-software-2/how-to-upgrade-libc6-i-am-not-able-to-install-730618/