LoginSignup
1
1

More than 5 years have passed since last update.

petalinux / microzed > P. 自動ログイン設定

Last updated at Posted at 2016-07-11
動作環境
PetaLinux 2014.4
MicroZed

2014年の自分のメモより

通常は起動の度にid:root, password:rootを入力してログインしないといけない。自動ログインは以下のようにして設定できる。

`1. autologin.shを以下の内容で作成する (/home/root以下に作るとする)

#!/bin/sh
exec /bin/login -f root

2. chmod a+x autologin.sh にて実行権限をつけておく
3. /etc/inittabの最後の方を以下のように変更する

#PS0:2345:respawn:/sbin/getty -L 115200 ttyPS0 vt100
PS0:2345:respawn:/sbin/getty -l /home/root/autologin.sh -n -L 115200 ttyPS0 vt100

Petalinux-buildを行う場合は、 petalinux-build -x packageの前に以下を行う

  • autologin.shを build/linux/rootfs/targetroot/home/root以下に上記の内容で作成
  • build/linux/rootfs/targetroot/etc/inittab を上記のように変更する

build/linux/rootfs/targetroot/ 以下の編集でなく、別の方法としては、myapp/Makefileのinstallラベルに以下のような行を追加すること forums.xilinx

install:
        $(TARGETINST) -a "PS0:2345:respawn:/sbin/getty -L 115200 ttyPS0 vt100" /etc/inittab

/etc/inittabに追加するような感じか。
ただ、この場合、元々あるPS0:2345:で始まる行が複数になるので、その影響を調べる必要がありそう。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1