commit | 1800ed4d798fdb26013cfbbead7e28afc7a96c65 | [log] [tgz] |
---|---|---|
author | Andrew Jeffery <andrew@aj.id.au> | Mon Sep 27 10:24:33 2021 +0930 |
committer | Andrew Jeffery <andrew@aj.id.au> | Mon Sep 27 10:40:22 2021 +0930 |
tree | 8197ef73711f27e14025529ca06005911c37eec7 | |
parent | 08ce0a5bad2b5c970af567c2e9888d444afe3946 [diff] |
Add prepare-emmc-qemu prepare-emmc-qemu is a script that assembles a bootable eMMC image from the WIC and u-boot artefacts of an eMMC-based build of OpenBMC: ``` andrew@mistburn:~/src/openbmc/openbmc/build/p10bmc $ prepare-emmc-qemu -h NAME prepare-emmc-qemu: Assemble an OpenBMC eMMC image that can be booted under QEMU SYNOPSYS prepare-emmc-qemu <TARGET> <BUILDDIR> [IMAGESIZE] DESCRIPTION TARGET: The name of the target machine, used to locate the required images. BUILDDIR: The path to the OpenBMC build directory. IMAGESIZE: The output image size, may be specified with units. Defaults to 16G. EXAMPLE: prepare-emmc-qemu p10bmc ~/src/openbmc/openbmc/build/p10bmc andrew@mistburn:~/src/openbmc/openbmc/build/p10bmc $ prepare-emmc-qemu p10bmc . + target=p10bmc + build_dir=. + image_size=16G + fw_dir=./tmp/deploy/images/p10bmc + wicxz=./tmp/deploy/images/p10bmc/obmc-phosphor-image-p10bmc.wic.xz + mmc=mmc-p10bmc.img + dd of=mmc-p10bmc.img if=/dev/zero bs=1M count=128 128+0 records in 128+0 records out 134217728 bytes (134 MB, 128 MiB) copied, 0.115718 s, 1.2 GB/s + dd of=mmc-p10bmc.img if=./tmp/deploy/images/p10bmc/u-boot-spl.bin conv=notrunc 107+0 records in 107+0 records out 54784 bytes (55 kB, 54 KiB) copied, 0.00642483 s, 8.5 MB/s + dd of=mmc-p10bmc.img if=./tmp/deploy/images/p10bmc/u-boot.bin conv=notrunc bs=1K seek=64 411+1 records in 411+1 records out 421275 bytes (421 kB, 411 KiB) copied, 0.0129515 s, 32.5 MB/s + xzdec ./tmp/deploy/images/p10bmc/obmc-phosphor-image-p10bmc.wic.xz + dd of=mmc-p10bmc.img conv=notrunc bs=1M seek=2 0+1846910 records in 0+1846910 records out 15167689728 bytes (15 GB, 14 GiB) copied, 100.126 s, 151 MB/s + truncate --size 16G mmc-p10bmc.img + set +x For an AST2600-based machine, invoke QEMU with the following parameters: -drive file=/home/andrew/src/openbmc/openbmc/build/p10bmc/mmc-p10bmc.img,if=sd,format=raw,index=2 ``` Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I9dff01b4f85aa51e3253a6989bcd80bb2c48b6a9
The goal of this repository is to collect the two-minute hacks you write to automate interactions with OpenBMC systems.
It's highly likely the scripts don't meet your needs - they could be undocumented, dysfunctional or utterly broken. Please help us improve!
Then this repository aims to be the default destination for your otherwise un-homed scripts. As such we are setting the bar for submission pretty low, and we aim to make the process as easy as possible.
Please use gerrit for all patches to this repository:
Do note that you will need to be party to the OpenBMC CLA before your contributions can be accepted. See Gerrit Setup and CLA for more information.
So long as your patches look sane with a cursory glance you can expect them to be applied. We may push back in the event that similar tools already exist or there are egregious issues.
We don't ask for much, but you need to give us at least a Signed-off-by, use SPDX markers in your source files and put your work under an Apache 2.0 compatible license.
There's no standard way to install the scripts housed here, and adding parts of the repository to your PATH might be a bit of a dice-roll. We may also move or remove scripts from time to time as part of housekeeping. It's probably best to copy things out if you need stability.