履歴: 電気回路/z-turn/Linuxの設定

各行は、その日時に書かれた内容です。追加・削除は、1 つ前の版との行数の差です (全 14 版)。「差分」は比較する版、「基準」は比べる相手の版を選びます

日時タイトル文字数追加削除内容差分基準
2017/2/14 9:54:21電気回路/z-turn/Linuxの設定 最新版10,224+1 -1表示差分—
2017/2/14 9:54:21電気回路/z-turn/Linuxの設定 10,230+4 -5表示差分選択
2017/2/14 0:54:21電気回路/z-turn/Linuxの設定 10,246+9 -0表示表示中選択
2017/2/14 0:54:21電気回路/z-turn/Linuxの設定 10,175+25 -39表示差分選択
2017/2/6 15:57:27電気回路/z-turn/Linuxの設定 11,131+1 -1表示差分選択
2017/2/6 15:57:27電気回路/z-turn/Linuxの設定 11,128+11 -0表示差分選択
2017/2/6 15:57:27電気回路/z-turn/Linuxの設定 10,907+2 -2表示差分選択
2017/2/6 15:57:27電気回路/z-turn/Linuxの設定 10,913+27 -2表示差分選択
2017/2/6 15:57:27電気回路/z-turn/Linuxの設定 10,445+32 -4表示差分選択
2017/2/6 15:57:27電気回路/z-turn/Linuxの設定 9,881+9 -9表示差分選択
2017/2/6 8:02:54電気回路/z-turn/Linuxの設定 10,016+236 -50表示差分基準
2017/1/27 6:00:05電気回路/z-turn/Linuxの設定 3,385+0 -61表示差分選択
2017/1/26 14:20:18電気回路/z-turn/Linuxの設定 5,036+133 -11表示差分選択
2017/1/26 9:16:58電気回路/z-turn/Linuxの設定 1,962— —表示—選択

基準: 電気回路/z-turn/Linuxの設定 (2017/2/6 8:02:54) → 比較: 電気回路/z-turn/Linuxの設定 (2017/2/14 0:54:21)

@@ -26,15 +26,22 @@
ふむ。
+インストール済みのカーネルバージョンは
+- 3.15.0-xilinx
+
インストール済みの Ubuntu のバージョンは
- precise (12.04LTS, Linux kernel 3.2)
-https://ja.wikipedia.org/wiki/Ubuntu によればまだギリギリサポートは続いているけれど、
+カーネルのバージョンはそこそこ高いけれど
+ディストリビューションのバージョンが低い感じです。
+
+https://ja.wikipedia.org/wiki/Ubuntu によれば precise
+はまだギリギリサポートは続いているけれど、
それも今年 2017 年の4月までなので、早めに
- trusty (14.04 LTS, Linux Kernel 3.13) あるいは
- xenial (16.04 LTS, Linux Kernel 4.3) に
-上げたいところです。
+上げたいところ。
ちなみに Debian は
- wheezy が Linux 3.2
@@ -43,7 +50,7 @@
となっています。
-* ゼロから Debian (jessie) を入れる [#l73821e0]
+* ゼロから Debian 8 (jessie) を入れる [#l73821e0]
Ubuntu のアップグレードも試したけれど、途中で動作が不安定になってしまったのと、
必要のないパッケージやファイルが多数含まれているのとが気になるところ。
@@ -80,30 +87,34 @@
** debootstrap で最小限のファイルを用意する [#vef75621]
LANG:console
- $ mkdir ~/z-turn/rootfs
+ $ mkdir -p ~/z-turn/rootfs
$ export targetdir=~/z-turn/rootfs
$ export distro=jessie
$ sudo debootstrap --arch=armhf --foreign $distro $targetdir
- $ sudo cp /usr/bin/qemu-arm-static $atargetdir/usr/bin
+ $ sudo cp /usr/bin/qemu-arm-static $targetdir/usr/bin
$ sudo cp /etc/resolv.conf $targetdir/etc
$ sudo chroot $targetdir
+ $ bash --version
+ GNU bash, version 4.4.11(1)-release (arm-unknown-linux-gnueabihf)
+ Copyright (C) 2016 Free Software Foundation, Inc.
+ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+
+ This is free software; you are free to change and redistribute it.
+ There is NO WARRANTY, to the extent permitted by law.
-以降は ~/z-turn/rootfs をルートディレクトリとして実行されることになります。
+以降は ~/z-turn/rootfs をルートディレクトリとして,
+arm エミュレータ上で実行されることになります。
+** debootstrap の2段目を起動 [#i0357483]
-
-** debootstrap の2段目(arm エミュレータ)を起動 [#i0357483]
-
LANG:console
$ export distro=jessie
$ export LANG=C
- $ sudo /debootstrap/debootstrap --second-stage
- $ uname -a
- Linux debian8 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) armv7l GNU/Linux
- ^^^^^^
+ $ /debootstrap/debootstrap --second-stage
+
** apt の設定 [#o3545f51]
LANG:console
- $ cat <<EOT > /etc/opt/sources.list
+ $ cat <<EOT > /etc/apt/sources.list
deb http://ftp.jp.debian.org/debian $distro main contrib non-free
deb-src http://ftp.jp.debian.org/debian $distro main contrib non-free
deb http://ftp.debian.org/debian $distro-updates main contrib non-free
@@ -119,41 +130,30 @@
$ apt-get install locales dialog
$ dpkg-reconfigure locales
Generating locales (this might take a while)...
- en_US.ISO-8859-1... done
- en_US.ISO-8859-15... done
en_US.UTF-8... done
- ja_JP.EUC-JP... done
ja_JP.UTF-8... done
Generation complete.
+ $ apt-get install etckeeper # /etc 以下の更新履歴を取る
+
** 必要最低限のパッケージをインストール [#mbd4f937]
+- jed は普段使っている emacs ライクなエディタです
+- aptitude は何らかのパッケージがインストール済みかどうかを調べるのに便利なので
+
LANG:console
- $ apt-get install openssh-server ntpdate resolvconf sudo hwinfo ntp tcsh zsh jed
- The following extra packages will be installed:
- jed-common libbsd0 libedit2 libgpm2 libgssapi-krb5-2 libhd21 libk5crypto3 libkeyutils1
- libkrb5-3 libkrb5support0 libonig2 libopts25 libpng12-0 libslang2-modules libwrap0
- openssh-client openssh-sftp-server slsh zsh-common
- Suggested packages:
- gpm info info-browser krb5-doc krb5-user ntp-doc ssh-askpass libpam-ssh keychain
- monkeysphere rssh molly-guard ufw zsh-doc
- Recommended packages:
- krb5-locales tcpd perl lockfile-progs xauth ncurses-term
- The following NEW packages will be installed:
- hwinfo jed jed-common libbsd0 libedit2 libgpm2 libgssapi-krb5-2 libhd21 libk5crypto3
- libkeyutils1 libkrb5-3 libkrb5support0 libonig2 libopts25 libpng12-0 libslang2-modules
- libwrap0 ntp ntpdate openssh-client openssh-server openssh-sftp-server resolvconf slsh
- sudo tcsh zsh zsh-common
- 0 upgraded, 28 newly installed, 0 to remove and 0 not upgraded.
- Need to get 8946 kB of archives.
- After this operation, 28.4 MB of additional disk space will be used.
- ...
- [ ok ] Starting NTP server: ntpd.
- ...
- [ ok ] Starting OpenBSD Secure Shell server: sshd.
+ $ apt-get install openssh-server ntpdate resolvconf sudo hwinfo ntp samba jed aptitude
+** 開発用ツールのインストール [#y84f349d]
+
+ LANG:console
+ $ apt-get install build-essential
+
** ネットワークとファイルシステムの設定 [#ldbd3b11]
+- eth0 を DHCP でネットワーク接続
+- SD カードのブート領域を /boot にマウント
+
LANG:console
$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
@@ -162,8 +162,9 @@
$ cat << EOT >> /etc/network/interfaces
allow-hotplug eth0
iface eth0 inet dhcp
+ EOT
$ echo debian8-zynq > /etc/hostname
- $ echo "debian8-zynq 127.0.0.1" >> /etc/hosts
+ $ echo "127.0.0.1 debian8-zynq" >> /etc/hosts
$ echo "/dev/mmcblk0p1 /boot auto defaults 0 0" >> /etc/fstab
** ユーザーの作成 [#uc191ae6]
@@ -174,7 +175,17 @@
Adding user `osamu' to group `sudo' ...
Adding user osamu to group sudo
Done.
+ $ su osamu
+ $ groups
+ osamu sudo
+ $ exit
+
+** 次回以降、ホスト PC のarm エミュレータ上で arm コンソールを起動するには [#icc733a5]
+
+ LANG:console
+ $ sudo chroot ~/z-turn/rootfs
+
** ファイルシステムのコピー [#kac02ea1]
以上でファイルシステムは完成しているので、SD カードへコピーすれば終了です。
@@ -277,14 +288,11 @@
$ date
2017年 2月 6日 月曜日 07:07:16 UTC
$ sudo apt-get update
- 無視 http://ftp.us.debian.org jessie InRelease
- ヒット http://ftp.us.debian.org jessie Release.gpg
- ヒット http://ftp.us.debian.org jessie Release
- ヒット http://ftp.us.debian.org jessie/main armhf Packages
- 取得:1 http://ftp.us.debian.org jessie/main Translation-ja [795 kB]
- ヒット http://ftp.us.debian.org jessie/main Translation-en
- 795 kB を 19秒 で取得しました (39.9 kB/s)
- パッケージリストを読み込んでいます... 完了
+ ヒット http://security.debian.org jessie/updates InRelease
+ ...
+ 取得:4 http://ftp.debian.org jessie-updates/non-free Translation-en/DiffIndex [736 B]
+ 11.1 kB を 26秒 で取得しました (420 B/s)
+ パッケージリストを読み込んでいます... 完了
$ ls -l /usr/bin/qemu-arm-static
-rwxr-xr-x 1 root root 2898728 2月 6 04:53 /usr/bin/qemu-arm-static
$ sudo rm /usr/bin/qemu-arm-static
@@ -292,6 +300,57 @@
Shinya Takamaeda-Y さんのおかげで
あっけないほと簡単にインストールできました。
+* その他設定 [#m176c9ad]
+
+** samba を入れて /boot を共有してしまう [#q478491b]
+
+[[管理者/smbd の設定]] も参考にしつつ
+
+ LANG:console
+ $ apt-get install samba
+ $ sudo jed /etc/samba/smb.conf
+ [global]
+ + # プリンタ関連の警告が出ないようにする
+ + printing = bsd
+ + load printers = no
+ + printcap name = /dev/null
+ ...
+ [homes]
+ ...
+ - read only = yes
+ + # ホームディレクトリを書き込み可能にする
+ + read only = no
+ ...
+ + # /boot 以下を共有する
+ + [boot]
+ + path = /boot
+ + force group = root
+ + force user = root
+ + create mode = 600
+ + directory mode = 755
+ + valid user = osamu
+ + writable = yes
+ $ # samba インストール前に作られた既存ユーザーについては
+ $ # 別途 samba に登録してやる必要がある
+ $ sudo pdbedit -a -u osamu
+ new password:
+ retype new password:
+
+これで Windows から //debian8-zynq/boot としてブート領域にアクセスが可能となり、
+ネットワーク越しに内容を書き換えたい放題になります。
+
+ロジック (*.bit) やデバイスツリー (*.dtb) を書き換えるのに
+SD カードを抜き差ししなくてよくなるのでとても楽です。
+
+* ちょいメモ [#f293e538]
+
+手動でインストールしたパッケージを一覧する
+
+ $ apt-mark showmanual
+
+
+
* コメント・質問 [#x541d936]
#article_kcaptcha
+