]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Split custom rootfs init into two stages
authorSasha Levin <levinsasha928@gmail.com>
Mon, 5 Dec 2011 14:16:32 +0000 (16:16 +0200)
committerPekka Enberg <penberg@kernel.org>
Sun, 11 Dec 2011 09:15:08 +0000 (11:15 +0200)
commiteaf720b285947a6f4e29174d0eba1899de31d8ab
tree629e6ad241de021398ca6fcc7ffbdfd2a43863e5
parentd5e6b9fa5d5a8d08f79b379bc95c42926abbc047
kvm tools: Split custom rootfs init into two stages

Currently custom rootfs init is built along with the main KVM tools executable
and is copied into custom rootfs directories when they are created with
'kvm setup'. The problem there is that if the init code changes, they have
to be manually copied to custom rootfs directories.

Instead, this patch splits init process into two parts. One part that simply
handles mounts, and passes it to stage 2 of the init.

Stage 2 really sits along in the code tree, and does all the heavy lifting.

This allows us to make init changes in the code tree and have it automatically
be updated in custom rootfs guests without having to copy files over manua

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
[ penberg@kernel.org: fix 'make check' breakage in Makefile ]
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/Makefile
tools/kvm/builtin-run.c
tools/kvm/guest/init.c
tools/kvm/guest/init_stage2.c [new file with mode: 0644]