From patchwork Fri Apr 20 14:43:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 7979 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 45E5E23E00 for ; Fri, 20 Apr 2012 14:44:06 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id E9FE9A18009 for ; Fri, 20 Apr 2012 14:44:05 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so18430772iag.11 for ; Fri, 20 Apr 2012 07:44:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=7pTxX4ql7uGfkRLksjwkbTbkfljhejhzNSqTdQycUoE=; b=ih89vXdiXwJztAVfZkjMvE7FHD0cs5C6jRTIdGa6ZP9t2MmRwLwy7eKd6xVtMYoS9i JR1edykomNt9XlQLVphtn3aZPYjo3W/UuOLHnhIfY8wbp0zDBtYyiVDCIuTeYAlTCoNr Yl6mvF9ia3Bv1pG1WrribaXE2XjIG/HWL6tdHYJxrDaFPN/FJDKksZrYyDgf0hvT1WjZ pSJwSlRotV59V2nYKBa2n0BjzGiK/z38oKtHfU3o+8EVydQ9OK9f5AeDzydF5iERXwpZ MHPwEnSHDr1ebuofjcypZgXaj+xvhqSH9Ke5KrXlEWtFcaXiJDo1ffqa2tyFGv4+2HCz 6kMQ== Received: by 10.42.19.72 with SMTP id a8mr5055573icb.39.1334933045626; Fri, 20 Apr 2012 07:44:05 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.137.198 with SMTP id x6csp38916ibt; Fri, 20 Apr 2012 07:44:05 -0700 (PDT) Received: by 10.236.145.104 with SMTP id o68mr377631yhj.74.1334933043547; Fri, 20 Apr 2012 07:44:03 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id z65si5696013yhl.130.2012.04.20.07.44.01 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 Apr 2012 07:44:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1SLF43-0002o4-4i; Fri, 20 Apr 2012 15:43:59 +0100 From: Peter Maydell To: kvm-arm Cc: patches@linaro.org, Michael Hope , Dave Martin Subject: [PATCH 4/4] bootwrapper: Add README Date: Fri, 20 Apr 2012 15:43:58 +0100 Message-Id: <1334933038-10755-5-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1334933038-10755-1-git-send-email-peter.maydell@linaro.org> References: <1334933038-10755-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQmQbGWN2+awP8krETZHpjSt3zydCRtKIkEFU59CJtmSHkzWSPp9B90RLT3ltKajMc+1KFEZ Add a short README file describing what the bootwrapper is and how to run it. Signed-off-by: Peter Maydell --- README.txt | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 README.txt diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..d0277ee --- /dev/null +++ b/README.txt @@ -0,0 +1,73 @@ +boot-wrapper: Start Linux kernels under ARM Fast Models + +The boot-wrapper is a fairly simple implementation of a boot loader +intended to run under an ARM Fast Model and boot Linux. + +License +======= + +The boot-wrapper is generally under a 3 clause BSD license +(see LICENSE.txt for details). Note that some source files +are under similar but compatible licenses. In particular +libfdt is dual-license GPL/2-clause-BSD. + +Compilation +=========== + +The expected method of building is to cross-compile on an +x86 box. You'll need an ARM cross-compiler. On Ubuntu you +can get this by installing the packages: + gcc-4.6-arm-linux-gnueabi binutils-arm-linux-gnueabi + libc6-armel-cross linux-libc-dev-armel-cross gcc-arm-linux-gnueabi + libc6-dev-armel-cross cpp-arm-linux-gnueabi + +The boot-wrapper can be compiled in two ways: + (1) as a small standalone binary which uses the model's semihosting + ABI to load a kernel (and optionally initrd and flattened device tree) + when you run the model + (2) with a specific kernel and initrd compiled into the binary; + this is less flexible but may be useful in some situations + +For case (1) you can just run: + make CROSS_COMPILE=arm-linux-gnueabi- semi +which will build "linux-system-semi.axf". +(As with a Linux kernel cross-compile, the CROSS_COMPILE +variable is set to the prefix of the cross toolchain. +"arm-linux-gnueabi-" matches the prefix used by the Ubuntu +cross toolchain.) + +For case (2) you'll need a Linux kernel tree to hand; the +boot-wrapper makefile will automatically look into it to +extract the kernel. By default this tree is assumed to be in +"../linux-kvm-arm". Assuming you have that tree set up and +have built a kernel in it, you can run: + make CROSS_COMPILE=arm-linux-gnueabi- +which will build "linux-system.axf". + +You can configure the makefile system by copying config-default.mk +to config.mk and editing it. This is only likely to be useful for +case (2); see the comments in config-default.mk for more information. + +Running +======= + +To run a model with a linux-system-semi.axf: + +RTSM_VE_Cortex-A15x1 linux-system-semi.axf -C cluster.cpu0.semihosting-cmd_line="--kernel /path/to/zImage [--initrd /path/to/initrd] [--fdt /path/to/fdt] [-- kernel command line arguments]" + +The paths to the kernel, initrd and fdt should all be host filesystem +paths. The initrd and fdt are both optional. Any text following '--' +is passed to the kernel as its command line; this is also optional. + +You may also want to pass other options to the model (for instance +to enable networking); these are not described here. See the Fast +Models documentation for more information. + +Running a linux-system.axf is the same, except that since all +the files are built in there's no need to pass a command line: + +RTSM_VE_Cortex-A15x1 linux-system.axf + +Passing a command line to linux-system.axf is allowed, and any +kernel/initrd/fdt/commandline specified will override the compiled-in +version.