* [RFC PATCH] Add palmetto target to runqemu @ 2016-03-17 4:52 Andrew Jeffery 2016-03-17 4:52 ` [PATCH] runqemu: Add palmetto target Andrew Jeffery 2016-03-17 15:53 ` [RFC PATCH] Add palmetto target to runqemu Patrick Williams 0 siblings, 2 replies; 13+ messages in thread From: Andrew Jeffery @ 2016-03-17 4:52 UTC (permalink / raw) To: OpenBMC Hi all, The patches modelling a bare-bones AST2400 in QEMU have been merged into master for the upcoming 2.6 release. Attached is a half-hearted attempt at integrating the necessary bits into openbmc so we can `bitbake obmc-phosphor-image` then `runqemu palmetto` to boot the BMC kernel and some representation of the userspace. I'm not sure if the hacks I've made to runqemu{,-internal} are the right approach or even something we'd want to carry going forward. Similarly, a wholesale switch to qemu_git.bb might be a bit extreme - any thoughts there? I must admit I haven't tried applying the AST2400 patches to 2.4, maybe that's a better approach? Regardless, depending on 2.6 when it gets released is prefereble, but that's probably a month or so away. I'll split the patches up in the future, just wanted to get this on the list for some feedback. Cheers, Andrew Andrew Jeffery (1): RFC: Add palmetto target to runqemu yocto-poky/meta/recipes-devtools/qemu/qemu.inc | 17 ----------------- .../meta/recipes-devtools/qemu/qemu_2.4.0.bb | 22 ---------------------- yocto-poky/meta/recipes-devtools/qemu/qemu_git.bb | 21 +++++++++++++++++++++ yocto-poky/scripts/runqemu | 9 ++++++--- yocto-poky/scripts/runqemu-internal | 12 ++++++++++++ 5 files changed, 39 insertions(+), 42 deletions(-) delete mode 100644 yocto-poky/meta/recipes-devtools/qemu/qemu_2.4.0.bb create mode 100644 yocto-poky/meta/recipes-devtools/qemu/qemu_git.bb -- 2.5.0 ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH] runqemu: Add palmetto target 2016-03-17 4:52 [RFC PATCH] Add palmetto target to runqemu Andrew Jeffery @ 2016-03-17 4:52 ` Andrew Jeffery 2016-03-17 5:19 ` Joel Stanley ` (3 more replies) 2016-03-17 15:53 ` [RFC PATCH] Add palmetto target to runqemu Patrick Williams 1 sibling, 4 replies; 13+ messages in thread From: Andrew Jeffery @ 2016-03-17 4:52 UTC (permalink / raw) To: OpenBMC The patch does a few things, but is more for inciting feedback than for merging: * Adds qemu_git.bb in favour of qemu_2.4.0.bb * Configured to build from master, at the commit merging the AST2400 support * Adds a runqemu target 'palmetto' Example use: $ bitbake obmc-phosphor-image $ runqemu palmetto slirp Specifying slirp avoids needing root to configure network, which won't work anyway. The palmetto-bmc machine currently only models the VIC and timers from the AST2400, and adds a 8250 UART for a console so there's not much interesting to play with in terms of hardware support. But, we can now boot the one kernel on both the hardware and in QEMU. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> --- yocto-poky/meta/recipes-devtools/qemu/qemu.inc | 17 ----------------- .../meta/recipes-devtools/qemu/qemu_2.4.0.bb | 22 ---------------------- yocto-poky/meta/recipes-devtools/qemu/qemu_git.bb | 21 +++++++++++++++++++++ yocto-poky/scripts/runqemu | 9 ++++++--- yocto-poky/scripts/runqemu-internal | 12 ++++++++++++ 5 files changed, 39 insertions(+), 42 deletions(-) delete mode 100644 yocto-poky/meta/recipes-devtools/qemu/qemu_2.4.0.bb create mode 100644 yocto-poky/meta/recipes-devtools/qemu/qemu_git.bb diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu.inc b/yocto-poky/meta/recipes-devtools/qemu/qemu.inc index f6c0ae3..80ba2ca 100644 --- a/yocto-poky/meta/recipes-devtools/qemu/qemu.inc +++ b/yocto-poky/meta/recipes-devtools/qemu/qemu.inc @@ -14,20 +14,6 @@ PR = "r1" # QEMU_TARGETS is overridable variable QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc sh4 x86_64" -SRC_URI = "\ - file://powerpc_rom.bin \ - file://disable-grabs.patch \ - file://exclude-some-arm-EABI-obsolete-syscalls.patch \ - file://wacom.patch \ - file://add-ptest-in-makefile.patch \ - file://run-ptest \ - file://cpus.c-qemu_mutex_lock_iothread-fix-race-condition-a.patch \ - " - -SRC_URI_append_class-native = "\ - file://fix-libcap-header-issue-on-some-distro.patch \ - file://cpus.c-qemu_cpu_kick_thread_debugging.patch \ - " EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-bluez --disable-libiscsi --with-system-pixman --extra-cflags='${CFLAGS}'" @@ -83,7 +69,6 @@ do_install () { export STRIP="true" autotools_do_install install -d ${D}${datadir}/qemu - install -m 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu } # The following fragment will create a wrapper for qemu-mips user emulation @@ -114,12 +99,10 @@ PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap a PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio," PACKAGECONFIG[xfs] = "--enable-xfsctl,--disable-xfsctl,xfsprogs," PACKAGECONFIG[xen] = "--enable-xen,--disable-xen,xen,xen-libxenstore xen-libxenctrl xen-libxenguest" -PACKAGECONFIG[vnc-tls] = "--enable-vnc --enable-vnc-tls,--disable-vnc-tls, gnutls," PACKAGECONFIG[vnc-sasl] = "--enable-vnc --enable-vnc-sasl,--disable-vnc-sasl,cyrus-sasl," PACKAGECONFIG[vnc-jpeg] = "--enable-vnc --enable-vnc-jpeg,--disable-vnc-jpeg,jpeg," PACKAGECONFIG[vnc-png] = "--enable-vnc --enable-vnc-png,--disable-vnc-png,libpng," PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,libcurl," -PACKAGECONFIG[nss] = "--enable-smartcard-nss,--disable-smartcard-nss,nss," PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux," PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses," PACKAGECONFIG[gtk+] = "--enable-gtk --enable-vte,--disable-gtk --disable-vte,gtk+ libvte," diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu_2.4.0.bb b/yocto-poky/meta/recipes-devtools/qemu/qemu_2.4.0.bb deleted file mode 100644 index 59b1788..0000000 --- a/yocto-poky/meta/recipes-devtools/qemu/qemu_2.4.0.bb +++ /dev/null @@ -1,22 +0,0 @@ -require qemu.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ - file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" - -SRC_URI += "file://configure-fix-Darwin-target-detection.patch \ - file://qemu-enlarge-env-entry-size.patch \ - file://Qemu-Arm-versatilepb-Add-memory-size-checking.patch \ - file://smc91c111_fix1.patch \ - file://smc91c111_fix2.patch \ - file://smc91c111_fix3.patch \ - " -SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2" -SRC_URI[md5sum] = "186ee8194140a484a455f8e3c74589f4" -SRC_URI[sha256sum] = "72b0b991bbcc540663a019e1e8c4f714053b691dda32c9b9ee80b25f367e6620" - -COMPATIBLE_HOST_class-target_mips64 = "null" - -do_install_append() { - # Prevent QA warnings about installed ${localstatedir}/run - if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi -} diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu_git.bb b/yocto-poky/meta/recipes-devtools/qemu/qemu_git.bb new file mode 100644 index 0000000..5128425 --- /dev/null +++ b/yocto-poky/meta/recipes-devtools/qemu/qemu_git.bb @@ -0,0 +1,21 @@ +# Based off of [1], appears to be MIT licensed [2]. +# +# [1] https://github.com/dirtybit/gumstix-yocto/blob/master/meta/recipes-devtools/qemu/qemu_git.bb +# [2] https://github.com/dirtybit/gumstix-yocto/blob/master/meta/COPYING.MIT + +require qemu.inc + +SRCREV = "d1f8764099022bc1173f2413331b26d4ff609a0c" + +LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ + file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" + +SRC_URI = "git://git.qemu.org/qemu.git;protocol=git" +S = "${WORKDIR}/git" + +COMPATIBLE_HOST_class-target_mips64 = "null" + +do_install_append() { + # Prevent QA warnings about installed ${localstatedir}/run + if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi +} diff --git a/yocto-poky/scripts/runqemu b/yocto-poky/scripts/runqemu index 23cf5be..f09da50 100755 --- a/yocto-poky/scripts/runqemu +++ b/yocto-poky/scripts/runqemu @@ -110,7 +110,7 @@ while true; do arg=${1} case "$arg" in "qemux86" | "qemux86-64" | "qemuarm" | "qemuarm64" | "qemumips" | "qemumipsel" | \ - "qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq") + "qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq" | "palmetto") [ -z "$MACHINE" ] && MACHINE=$arg || \ error "conflicting MACHINE types [$MACHINE] and [$arg]" ;; @@ -236,13 +236,13 @@ fi if [ -z "$MACHINE" ]; then if [ "x$FSTYPE" = "xvmdk" ] || [ "x$FSTYPE" = "xhddimg" ] || [ "x$FSTYPE" = "xhdddirect" ]; then - MACHINE=`basename $VM | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm64\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'` + MACHINE=`basename $VM | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm64\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4|palmetto\).*/\1/p'` if [ -z "$MACHINE" ]; then error "Unable to set MACHINE from image filename [$VM]" fi echo "Set MACHINE to [$MACHINE] based on image [$VM]" else - MACHINE=`basename $KERNEL | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm64\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'` + MACHINE=`basename $KERNEL | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm64\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4|palmetto\).*/\1/p'` if [ -z "$MACHINE" ]; then error "Unable to set MACHINE from kernel filename [$KERNEL]" fi @@ -332,6 +332,9 @@ QEMUMICROBLAZE_DEFAULT_FSTYPE=cpio QEMUZYNQ_DEFAULT_KERNEL=uImage QEMUZYNQ_DEFAULT_FSTYPE=cpio +PALMETTO_DEFAULT_KERNEL=cuImage +PALMETTO_DEFAULT_FSTYPE=cpio.gz + AKITA_DEFAULT_KERNEL=zImage-akita.bin AKITA_DEFAULT_FSTYPE=jffs2 diff --git a/yocto-poky/scripts/runqemu-internal b/yocto-poky/scripts/runqemu-internal index 1527268..479d61c 100755 --- a/yocto-poky/scripts/runqemu-internal +++ b/yocto-poky/scripts/runqemu-internal @@ -53,6 +53,9 @@ else "qemuarm64") mem_size=512 ;; + "palmetto") + mem_size=512 + ;; "qemumicroblaze") mem_size=64 ;; @@ -295,6 +298,7 @@ fi case "$MACHINE" in "qemuarm") ;; + "palmetto") ;; "qemuarm64") ;; "qemumicroblaze") ;; "qemumips") ;; @@ -384,6 +388,14 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarm fi fi +if [ "$MACHINE" = "palmetto" ]; then + QEMU=qemu-system-arm + MACHINE_SUBTYPE=palmetto-bmc + export QEMU_AUDIO_DRV="none" + KERNCMDLINE="console=ttyS4" + QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} -initrd $ROOTFS -no-reboot -nographic" +fi + if [ "$MACHINE" = "qemuarm64" ]; then QEMU=qemu-system-aarch64 -- 2.5.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] runqemu: Add palmetto target 2016-03-17 4:52 ` [PATCH] runqemu: Add palmetto target Andrew Jeffery @ 2016-03-17 5:19 ` Joel Stanley 2016-03-17 22:32 ` Andrew Jeffery 2016-03-17 7:42 ` Chris Austen ` (2 subsequent siblings) 3 siblings, 1 reply; 13+ messages in thread From: Joel Stanley @ 2016-03-17 5:19 UTC (permalink / raw) To: Andrew Jeffery; +Cc: OpenBMC, Patrick Williams On Thu, Mar 17, 2016 at 3:22 PM, Andrew Jeffery <andrew@aj.id.au> wrote: > The patch does a few things, but is more for inciting feedback than for > merging: > > * Adds qemu_git.bb in favour of qemu_2.4.0.bb > * Configured to build from master, at the commit merging the AST2400 support > * Adds a runqemu target 'palmetto' This is a good idea. Fix up the commit message so we can merge it :) > > diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu.inc b/yocto-poky/meta/recipes-devtools/qemu/qemu.inc > index f6c0ae3..80ba2ca 100644 > --- a/yocto-poky/meta/recipes-devtools/qemu/qemu.inc > +++ b/yocto-poky/meta/recipes-devtools/qemu/qemu.inc yocto-poky is supposed to be the upstream repository, and shouldn't be patched by us. I don't know how poky lets us override built in recipies with those from other meta- packages. Can we carry your qemu-git.bb in meta-whatever instead? Patrick, do you have any suggestions here? > diff --git a/yocto-poky/scripts/runqemu b/yocto-poky/scripts/runqemu > index 23cf5be..f09da50 100755 > --- a/yocto-poky/scripts/runqemu > +++ b/yocto-poky/scripts/runqemu The changes to this script look like a good start. > @@ -110,7 +110,7 @@ while true; do > arg=${1} > case "$arg" in > "qemux86" | "qemux86-64" | "qemuarm" | "qemuarm64" | "qemumips" | "qemumipsel" | \ > - "qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq") > + "qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq" | "palmetto") Perhaps call it qemupalmetto? qemupalmbmc? to match the existing ones. > [ -z "$MACHINE" ] && MACHINE=$arg || \ > error "conflicting MACHINE types [$MACHINE] and [$arg]" > ;; > @@ -236,13 +236,13 @@ fi > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] runqemu: Add palmetto target 2016-03-17 5:19 ` Joel Stanley @ 2016-03-17 22:32 ` Andrew Jeffery 0 siblings, 0 replies; 13+ messages in thread From: Andrew Jeffery @ 2016-03-17 22:32 UTC (permalink / raw) To: Joel Stanley; +Cc: OpenBMC, Patrick Williams [-- Attachment #1: Type: text/plain, Size: 2891 bytes --] On Thu, 2016-03-17 at 15:49 +1030, Joel Stanley wrote: > On Thu, Mar 17, 2016 at 3:22 PM, Andrew Jeffery <andrew@aj.id.au> wrote: > > The patch does a few things, but is more for inciting feedback than for > > merging: > > > > * Adds qemu_git.bb in favour of qemu_2.4.0.bb > > * Configured to build from master, at the commit merging the AST2400 support > > * Adds a runqemu target 'palmetto' > > This is a good idea. Fix up the commit message so we can merge it :) > > > > > diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu.inc b/yocto-poky/meta/recipes-devtools/qemu/qemu.inc > > index f6c0ae3..80ba2ca 100644 > > --- a/yocto-poky/meta/recipes-devtools/qemu/qemu.inc > > +++ b/yocto-poky/meta/recipes-devtools/qemu/qemu.inc > > yocto-poky is supposed to be the upstream repository, and shouldn't be > patched by us. Yep, I understand that :) My process here was "hack things 'til it builds and boots - oh look it works, I'll post the patch and get feedback". > > I don't know how poky lets us override built in recipies with those > from other meta- packages. Can we carry your qemu-git.bb in > meta-whatever instead? I wasn't immediately sure about the answer to this, so I used the most practical approach I thought would work :) > > Patrick, do you have any suggestions here? I'll have a dig through the yocto/bitbake documentation, Patrick suggests there's plenty of override capability in a separate email. > > > > diff --git a/yocto-poky/scripts/runqemu b/yocto-poky/scripts/runqemu > > index 23cf5be..f09da50 100755 > > --- a/yocto-poky/scripts/runqemu > > +++ b/yocto-poky/scripts/runqemu > > The changes to this script look like a good start. > > > @@ -110,7 +110,7 @@ while true; do > > arg=${1} > > case "$arg" in > > "qemux86" | "qemux86-64" | "qemuarm" | "qemuarm64" | "qemumips" | "qemumipsel" | \ > > - "qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq") > > + "qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq" | "palmetto") > > Perhaps call it qemupalmetto? qemupalmbmc? to match the existing ones. Right, I considered that. However, I went with 'palmetto' as the script searches for image names based on the machine name: findimage() { ... filename=`ls -t1 $where/*-image*$machine.$extension 2>/dev/null | head -n1` if [ "x$filename" != "x" ]; then ROOTFS=$filename return fi ... } I guess we could strip off the qemu prefix in the qemupalmetto case, or we could change the image name to match * -image*qemupalmetto.$extension. Conditional stripping is certainly more sensible than changing the image name, but IMO going with 'palmetto' is easier and less redundant than doing either of the two. But less consistent. Andrew [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] runqemu: Add palmetto target 2016-03-17 4:52 ` [PATCH] runqemu: Add palmetto target Andrew Jeffery 2016-03-17 5:19 ` Joel Stanley @ 2016-03-17 7:42 ` Chris Austen 2016-03-17 16:33 ` Patrick Williams 2016-03-17 16:28 ` Patrick Williams [not found] ` <201603170742.u2H7gVIF013244@d03av03.boulder.ibm.com> 3 siblings, 1 reply; 13+ messages in thread From: Chris Austen @ 2016-03-17 7:42 UTC (permalink / raw) To: joel; +Cc: andrew, openbmc [-- Attachment #1: Type: text/html, Size: 4500 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] runqemu: Add palmetto target 2016-03-17 7:42 ` Chris Austen @ 2016-03-17 16:33 ` Patrick Williams 0 siblings, 0 replies; 13+ messages in thread From: Patrick Williams @ 2016-03-17 16:33 UTC (permalink / raw) To: Chris Austen; +Cc: joel, openbmc On Thu, Mar 17, 2016 at 07:42:11AM +0000, Chris Austen wrote: > > Add your command to the same help file here you see the existing qemuarm > target > > You can now run 'bitbake <target>' > Common targets are: > obmc-phosphor-image > You can also run generated qemu images with a command like: > runqemu qemuarm <<<<<---------WHERE EVER THAT COMES FROM > Along the lines of some of my previous comments... Maybe we don't need/want to add 'palmetto' as a machine type. Is there a mechanism for us to override some of the 'qemuarm' behavior to match 'palmetto' when that is the machine we built for. Then your yocto machine profile will control which qemuarm machine it is running on. Again, probably should discuss with #yocto to get ideas on how to proceed. I anticipate we may someday have lots and lots of machines so maintaining the runqemu script ourselves sounds unpleasant. > _______________________________________________ > openbmc mailing list > openbmc@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/openbmc -- Patrick Williams ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] runqemu: Add palmetto target 2016-03-17 4:52 ` [PATCH] runqemu: Add palmetto target Andrew Jeffery 2016-03-17 5:19 ` Joel Stanley 2016-03-17 7:42 ` Chris Austen @ 2016-03-17 16:28 ` Patrick Williams 2016-03-17 22:59 ` Andrew Jeffery [not found] ` <201603170742.u2H7gVIF013244@d03av03.boulder.ibm.com> 3 siblings, 1 reply; 13+ messages in thread From: Patrick Williams @ 2016-03-17 16:28 UTC (permalink / raw) To: Andrew Jeffery; +Cc: OpenBMC [-- Attachment #1: Type: text/plain, Size: 1772 bytes --] On Thu, Mar 17, 2016 at 03:22:48PM +1030, Andrew Jeffery wrote: > diff --git a/yocto-poky/scripts/runqemu b/yocto-poky/scripts/runqemu > index 23cf5be..f09da50 100755 > --- a/yocto-poky/scripts/runqemu > +++ b/yocto-poky/scripts/runqemu > @@ -110,7 +110,7 @@ while true; do > arg=${1} > case "$arg" in > "qemux86" | "qemux86-64" | "qemuarm" | "qemuarm64" | "qemumips" | "qemumipsel" | \ > - "qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq") > + "qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq" | "palmetto") It seems like there should be a way to extend the machines in runqemu without modifying the script. Maybe an environment variable like "palmetto_SUPPORTS_QEMU=1" that we can set in one of the bitbake machine files for each machine? Might want to bounce this problem off of #yocto on IRC. > +PALMETTO_DEFAULT_KERNEL=cuImage > +PALMETTO_DEFAULT_FSTYPE=cpio.gz Also ideally have these come from a bitbake file. > + "palmetto") > + mem_size=512 > + ;; > +if [ "$MACHINE" = "palmetto" ]; then > + QEMU=qemu-system-arm > + MACHINE_SUBTYPE=palmetto-bmc > + export QEMU_AUDIO_DRV="none" > + KERNCMDLINE="console=ttyS4" > + QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} -initrd $ROOTFS -no-reboot -nographic" > +fi > + Would be nice if this stuff was also in a bitbake file of sorts. Would really be nice if we could leverage the machine classes (palmetto is-a openpower) to reduce the redundancy. > > -- > 2.5.0 > > _______________________________________________ > openbmc mailing list > openbmc@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/openbmc -- Patrick Williams [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] runqemu: Add palmetto target 2016-03-17 16:28 ` Patrick Williams @ 2016-03-17 22:59 ` Andrew Jeffery 0 siblings, 0 replies; 13+ messages in thread From: Andrew Jeffery @ 2016-03-17 22:59 UTC (permalink / raw) To: Patrick Williams; +Cc: OpenBMC [-- Attachment #1: Type: text/plain, Size: 2661 bytes --] On Thu, 2016-03-17 at 11:28 -0500, Patrick Williams wrote: > On Thu, Mar 17, 2016 at 03:22:48PM +1030, Andrew Jeffery wrote: > > diff --git a/yocto-poky/scripts/runqemu b/yocto-poky/scripts/runqemu > > index 23cf5be..f09da50 100755 > > --- a/yocto-poky/scripts/runqemu > > +++ b/yocto-poky/scripts/runqemu > > @@ -110,7 +110,7 @@ while true; do > > arg=${1} > > case "$arg" in > > "qemux86" | "qemux86-64" | "qemuarm" | "qemuarm64" | "qemumips" | "qemumipsel" | \ > > - "qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq") > > + "qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq" | "palmetto") > > It seems like there should be a way to extend the machines in runqemu > without modifying the script. Maybe an environment variable like > "palmetto_SUPPORTS_QEMU=1" that we can set in one of the bitbake machine > files for each machine? Yeah reading the script it did seem odd that there doesn't appear to be a way to add qemu machine support. > > Might want to bounce this problem off of #yocto on IRC. Will do. > > > +PALMETTO_DEFAULT_KERNEL=cuImage > > +PALMETTO_DEFAULT_FSTYPE=cpio.gz > > Also ideally have these come from a bitbake file. So I was just following the convention here - but I'm taking your comment was tied to the "it should be easier" issue above? I'll have to see what my priorities are wrt reorganising the upstream scripts. > > > + "palmetto") > > + mem_size=512 > > + ;; > > > +if [ "$MACHINE" = "palmetto" ]; then > > + QEMU=qemu-system-arm > > + MACHINE_SUBTYPE=palmetto-bmc > > + export QEMU_AUDIO_DRV="none" > > + KERNCMDLINE="console=ttyS4" > > + QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} -initrd $ROOTFS -no-reboot -nographic" > > +fi > > + > > Would be nice if this stuff was also in a bitbake file of sorts. Would > really be nice if we could leverage the machine classes (palmetto is-a > openpower) to reduce the redundancy. I'm not enough of a bitbake master to know how easily that can be achieved, but it sounds nice in theory. The script as it stands just tests against the relevant 'qemu*' names and goes from there - the code I've added just follows that same pattern. Eg, from the script: ... if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarmv7" ]; then QEMU=qemu-system-arm ... fi ... if [ "$MACHINE" = "qemumips" -o "$MACHINE" = "qemumipsel" -o "$MACHINE" = "qemumips64" ]; then case "$MACHINE" in ... fi ... Andrew [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <201603170742.u2H7gVIF013244@d03av03.boulder.ibm.com>]
* Re: [PATCH] runqemu: Add palmetto target [not found] ` <201603170742.u2H7gVIF013244@d03av03.boulder.ibm.com> @ 2016-03-17 22:38 ` Andrew Jeffery 2016-03-22 11:31 ` Andrew Jeffery 1 sibling, 0 replies; 13+ messages in thread From: Andrew Jeffery @ 2016-03-17 22:38 UTC (permalink / raw) To: Chris Austen, joel; +Cc: openbmc [-- Attachment #1: Type: text/plain, Size: 1263 bytes --] On Thu, 2016-03-17 at 07:42 +0000, Chris Austen wrote: > > Add your command to the same help file here you see the existing > qemuarm target > > You can now run 'bitbake <target>' > Common targets are: > obmc-phosphor-image > You can also run generated qemu images with a command like: > runqemu qemuarm <<<<<---------WHERE EVER THAT COMES FROM Yep, thanks for bringing that to my attention. I'll fix that. > > > > I hit a build failure, but it went away the 2nd time I tried. > Probably just ignore unless that is an interesting data point. > > | ERROR: Function failed: Fetcher failure for URL: > 'git://git.qemu.org/qemu.git;protocol=git'. Unable to fetch URL from > any source. > ERROR: Task 71 (virtual:native:/home/causten/openbmc > -barreleye/meta/recipes-devtools/qemu/qemu_git.bb, do_fetch) failed > with exit code '1' Interesting! So the same thing happened for me also, but I tweaked a relevant part of the .bb after the first run, and the second run succeeded. Correlation is not causation. Who knew? > > No network yet :( Makes things hard to use. Can you add an > ethernet device? Baby steps ;) If I have time I'll take a look at gluing an adapter in. Thanks for testing! Andrew [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] runqemu: Add palmetto target [not found] ` <201603170742.u2H7gVIF013244@d03av03.boulder.ibm.com> 2016-03-17 22:38 ` Andrew Jeffery @ 2016-03-22 11:31 ` Andrew Jeffery 1 sibling, 0 replies; 13+ messages in thread From: Andrew Jeffery @ 2016-03-22 11:31 UTC (permalink / raw) To: Chris Austen, joel; +Cc: openbmc [-- Attachment #1: Type: text/plain, Size: 453 bytes --] Hi Chris, On Thu, 2016-03-17 at 07:42 +0000, Chris Austen wrote: > No network yet :( Makes things hard to use. Can you add an > ethernet device? Give this branch a go: https://github.com/amboar/openbmc/tree/runqemu-palmetto This time invoke `runqemu palmetto` (i.e. without 'slirp'): It will configure tun/tap for full network capabilities, but you'll need sudo powers for it to be successful. Let me know what you think. Andrew [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC PATCH] Add palmetto target to runqemu 2016-03-17 4:52 [RFC PATCH] Add palmetto target to runqemu Andrew Jeffery 2016-03-17 4:52 ` [PATCH] runqemu: Add palmetto target Andrew Jeffery @ 2016-03-17 15:53 ` Patrick Williams 2016-03-17 22:40 ` Andrew Jeffery 1 sibling, 1 reply; 13+ messages in thread From: Patrick Williams @ 2016-03-17 15:53 UTC (permalink / raw) To: Andrew Jeffery; +Cc: OpenBMC [-- Attachment #1: Type: text/plain, Size: 2071 bytes --] On Thu, Mar 17, 2016 at 03:22:47PM +1030, Andrew Jeffery wrote: > Hi all, > > The patches modelling a bare-bones AST2400 in QEMU have been merged into > master for the upcoming 2.6 release. Attached is a half-hearted attempt at > integrating the necessary bits into openbmc so we can `bitbake > obmc-phosphor-image` then `runqemu palmetto` to boot the BMC kernel and some > representation of the userspace. > > I'm not sure if the hacks I've made to runqemu{,-internal} are the right > approach or even something we'd want to carry going forward. Similarly, a > wholesale switch to qemu_git.bb might be a bit extreme - any thoughts there? I > must admit I haven't tried applying the AST2400 patches to 2.4, maybe that's a > better approach? Regardless, depending on 2.6 when it gets released is > prefereble, but that's probably a month or so away. > > I'll split the patches up in the future, just wanted to get this on the list > for some feedback. > > Cheers, > > Andrew > > Andrew Jeffery (1): > RFC: Add palmetto target to runqemu > > yocto-poky/meta/recipes-devtools/qemu/qemu.inc | 17 ----------------- > .../meta/recipes-devtools/qemu/qemu_2.4.0.bb | 22 ---------------------- > yocto-poky/meta/recipes-devtools/qemu/qemu_git.bb | 21 +++++++++++++++++++++ > yocto-poky/scripts/runqemu | 9 ++++++--- > yocto-poky/scripts/runqemu-internal | 12 ++++++++++++ Please refrain from making changes to content in the yocto-poky tree. This is intended to be a clean mirror of upstream yocto. Yocto has lots of capability for overrides in the openbmc parts of the tree. > 5 files changed, 39 insertions(+), 42 deletions(-) > delete mode 100644 yocto-poky/meta/recipes-devtools/qemu/qemu_2.4.0.bb > create mode 100644 yocto-poky/meta/recipes-devtools/qemu/qemu_git.bb > > -- > 2.5.0 > > _______________________________________________ > openbmc mailing list > openbmc@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/openbmc -- Patrick Williams [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC PATCH] Add palmetto target to runqemu 2016-03-17 15:53 ` [RFC PATCH] Add palmetto target to runqemu Patrick Williams @ 2016-03-17 22:40 ` Andrew Jeffery 2016-03-18 15:54 ` Patrick Williams 0 siblings, 1 reply; 13+ messages in thread From: Andrew Jeffery @ 2016-03-17 22:40 UTC (permalink / raw) To: Patrick Williams; +Cc: OpenBMC [-- Attachment #1: Type: text/plain, Size: 2047 bytes --] On Thu, 2016-03-17 at 10:53 -0500, Patrick Williams wrote: > On Thu, Mar 17, 2016 at 03:22:47PM +1030, Andrew Jeffery wrote: > > Hi all, > > > > The patches modelling a bare-bones AST2400 in QEMU have been merged into > > master for the upcoming 2.6 release. Attached is a half-hearted attempt at > > integrating the necessary bits into openbmc so we can `bitbake > > obmc-phosphor-image` then `runqemu palmetto` to boot the BMC kernel and some > > representation of the userspace. > > > > I'm not sure if the hacks I've made to runqemu{,-internal} are the right > > approach or even something we'd want to carry going forward. Similarly, a > > wholesale switch to qemu_git.bb might be a bit extreme - any thoughts there? I > > must admit I haven't tried applying the AST2400 patches to 2.4, maybe that's a > > better approach? Regardless, depending on 2.6 when it gets released is > > prefereble, but that's probably a month or so away. > > > > I'll split the patches up in the future, just wanted to get this on the list > > for some feedback. > > > > Cheers, > > > > Andrew > > > > Andrew Jeffery (1): > > RFC: Add palmetto target to runqemu > > > > yocto-poky/meta/recipes-devtools/qemu/qemu.inc | 17 ----------------- > > .../meta/recipes-devtools/qemu/qemu_2.4.0.bb | 22 ---------------------- > > yocto-poky/meta/recipes-devtools/qemu/qemu_git.bb | 21 +++++++++++++++++++++ > > yocto-poky/scripts/runqemu | 9 ++++++--- > > yocto-poky/scripts/runqemu-internal | 12 ++++++++++++ > > Please refrain from making changes to content in the yocto-poky tree. > This is intended to be a clean mirror of upstream yocto. Yocto has lots > of capability for overrides in the openbmc parts of the tree. Yep, just wasn't sure how to go about it, so I took the sledgehammer approach and got something working. I'll take a look at the Yocto/bitbake documentation to see how this is best achieved. Do you have any good links on the subject? Andrew [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC PATCH] Add palmetto target to runqemu 2016-03-17 22:40 ` Andrew Jeffery @ 2016-03-18 15:54 ` Patrick Williams 0 siblings, 0 replies; 13+ messages in thread From: Patrick Williams @ 2016-03-18 15:54 UTC (permalink / raw) To: Andrew Jeffery; +Cc: OpenBMC [-- Attachment #1: Type: text/plain, Size: 2522 bytes --] On Fri, Mar 18, 2016 at 09:10:55AM +1030, Andrew Jeffery wrote: > On Thu, 2016-03-17 at 10:53 -0500, Patrick Williams wrote: > > On Thu, Mar 17, 2016 at 03:22:47PM +1030, Andrew Jeffery wrote: > > > Hi all, > > > > > > The patches modelling a bare-bones AST2400 in QEMU have been merged into > > > master for the upcoming 2.6 release. Attached is a half-hearted attempt at > > > integrating the necessary bits into openbmc so we can `bitbake > > > obmc-phosphor-image` then `runqemu palmetto` to boot the BMC kernel and some > > > representation of the userspace. > > > > > > I'm not sure if the hacks I've made to runqemu{,-internal} are the right > > > approach or even something we'd want to carry going forward. Similarly, a > > > wholesale switch to qemu_git.bb might be a bit extreme - any thoughts there? I > > > must admit I haven't tried applying the AST2400 patches to 2.4, maybe that's a > > > better approach? Regardless, depending on 2.6 when it gets released is > > > prefereble, but that's probably a month or so away. > > > > > > I'll split the patches up in the future, just wanted to get this on the list > > > for some feedback. > > > > > > Cheers, > > > > > > Andrew > > > > > > Andrew Jeffery (1): > > > RFC: Add palmetto target to runqemu > > > > > > yocto-poky/meta/recipes-devtools/qemu/qemu.inc | 17 ----------------- > > > .../meta/recipes-devtools/qemu/qemu_2.4.0.bb | 22 ---------------------- > > > yocto-poky/meta/recipes-devtools/qemu/qemu_git.bb | 21 +++++++++++++++++++++ > > > yocto-poky/scripts/runqemu | 9 ++++++--- > > > yocto-poky/scripts/runqemu-internal | 12 ++++++++++++ > > > > Please refrain from making changes to content in the yocto-poky tree. > > This is intended to be a clean mirror of upstream yocto. Yocto has lots > > of capability for overrides in the openbmc parts of the tree. > > Yep, just wasn't sure how to go about it, so I took the sledgehammer > approach and got something working. I'll take a look at the > Yocto/bitbake documentation to see how this is best achieved. Do you > have any good links on the subject? > > Andrew I understand it was just RFC quality code. The "Mega Manual" is the definitive source of documentation on everything Yocto. It is, unfortunately, rather complete. I would start with this chapter: http://www.yoctoproject.org/docs/1.8/mega-manual/mega-manual.html#using-bbappend-files -- Patrick Williams [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2016-03-22 11:32 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-03-17 4:52 [RFC PATCH] Add palmetto target to runqemu Andrew Jeffery 2016-03-17 4:52 ` [PATCH] runqemu: Add palmetto target Andrew Jeffery 2016-03-17 5:19 ` Joel Stanley 2016-03-17 22:32 ` Andrew Jeffery 2016-03-17 7:42 ` Chris Austen 2016-03-17 16:33 ` Patrick Williams 2016-03-17 16:28 ` Patrick Williams 2016-03-17 22:59 ` Andrew Jeffery [not found] ` <201603170742.u2H7gVIF013244@d03av03.boulder.ibm.com> 2016-03-17 22:38 ` Andrew Jeffery 2016-03-22 11:31 ` Andrew Jeffery 2016-03-17 15:53 ` [RFC PATCH] Add palmetto target to runqemu Patrick Williams 2016-03-17 22:40 ` Andrew Jeffery 2016-03-18 15:54 ` Patrick Williams
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.