Home | History | Annotate | Download | only in samples
      1 # dir on remote host to hold git repo
      2 repodir = '/tmp/kvm'
      3 
      4 # git url to clone
      5 giturl  = 'git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm.git'
      6 
      7 # web url to check remote version to determine whether or not to 'git pull'
      8 weburl  = 'http://git.kernel.org/?p=linux/kernel/git/avi/kvm.git'
      9 
     10 # CHANGEME - kernel config
     11 kconfig = 'http://git.kernel.org/?p=virt/kvm/kvm-userspace.git;a=blob_plain;f=kernel/x86_64.config;hb=HEAD'
     12 
     13 # CHANGEME
     14 myhostname = 'myhost'
     15 
     16 # init the git kernel
     17 kernel = git_kernel.GitKernel(repodir, giturl, weburl)
     18 
     19 # ssh to remote host
     20 h = hosts.create_host(myhostname)
     21 
     22 # acquire git repo, make sure it is up-to-date, clone repo into tmp dir
     23 kernel.get(h)
     24 
     25 # display local repo version
     26 print kernel.get_local_head(h)
     27 
     28 # configure, build, and install on remote host
     29 kernel.configure(kconfig)
     30 kernel.build(h)
     31 kernel.install(h)
     32 
     33 # add kernel to remote host bootloader, set up next boot entry
     34 h.bootloader.boot_once('autotest')
     35 
     36 # reboot and check that everything worked
     37 h.reboot()
     38 h.wait_up()
     39 print h.run("uname -a").stdout
     40