All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH openbmc v3 0/8] Add palmetto target to runqemu, with networking
@ 2016-03-23  8:03 Andrew Jeffery
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 1/8] meta-openbmc-bsp: Add qemu git recipe Andrew Jeffery
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: Andrew Jeffery @ 2016-03-23  8:03 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 an 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.

This revision includes support for slirp and tun/tap networking: The machine
will come up at either 10.0.2.15 or 192.168.7.2 respectively. Note that the
network controller modelled is a Cadence GEM and not the ftgmac device, which
is a little inaccurate but means we can have networking sooner rather than
later.

The patches are also available on Github:

  https://github.com/amboar/openbmc/commits/runqemu-palmetto

I'd appreciate some testing and comments. I'm not sure about the approach of
baking in the Cadence driver for both environments (hardware, qemu) for
instance. Maybe we should use a different bitbake target altogether?

Cheers,

Andrew

Andrew Jeffery (8):
  meta-openbmc-bsp: Add qemu git recipe
  runqemu: Add palmetto target
  qemu_git.bb: Update to palmetto-bmc model with Cadence GEM
  linux-obmc: Allow processing of multiple device trees
  linux-obmc: Add a devicetree for QEMU palmetto-bmc machine
  palmetto: Configure macb driver into kernel
  palmetto: Build devicetrees for hardware and QEMU
  runqemu-internal: Configure tun/tap network for palmetto-bmc

 meta-openbmc-bsp/conf/layer.conf                   |   8 ++
 .../recipes-devtools/qemu/qemu-targets.inc         |  22 ++++
 meta-openbmc-bsp/recipes-devtools/qemu/qemu.inc    | 125 +++++++++++++++++++++
 meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb |  21 ++++
 .../meta-palmetto/conf/bblayers.conf.sample        |   1 +
 .../meta-ibm/meta-palmetto/conf/conf-notes.txt     |   3 +
 .../meta-palmetto/conf/machine/palmetto.conf       |   1 +
 ...d-qemupalmetto-dts-with-Cadence-GEM-suppo.patch |  43 +++++++
 .../recipes-kernel/linux/linux-obmc/palmetto.cfg   |   2 +
 .../recipes-kernel/linux/linux-obmc_%.bbappend     |   1 +
 .../meta-barreleye/conf/bblayers.conf.sample       |   1 +
 .../common/recipes-kernel/linux/linux-obmc_4.3.bb  |   2 +-
 yocto-poky/scripts/runqemu                         |   9 +-
 yocto-poky/scripts/runqemu-internal                |  16 +++
 14 files changed, 251 insertions(+), 4 deletions(-)
 create mode 100644 meta-openbmc-bsp/conf/layer.conf
 create mode 100644 meta-openbmc-bsp/recipes-devtools/qemu/qemu-targets.inc
 create mode 100644 meta-openbmc-bsp/recipes-devtools/qemu/qemu.inc
 create mode 100644 meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb
 create mode 100644 meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/recipes-kernel/linux/linux-obmc/0001-arch-arm-Add-qemupalmetto-dts-with-Cadence-GEM-suppo.patch

-- 
2.5.0

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [RFC PATCH openbmc v3 1/8] meta-openbmc-bsp: Add qemu git recipe
  2016-03-23  8:03 [RFC PATCH openbmc v3 0/8] Add palmetto target to runqemu, with networking Andrew Jeffery
@ 2016-03-23  8:03 ` Andrew Jeffery
  2016-05-16 20:14   ` Patrick Williams
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 2/8] runqemu: Add palmetto target Andrew Jeffery
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Andrew Jeffery @ 2016-03-23  8:03 UTC (permalink / raw)
  To: OpenBMC

The change adds meta-openbmc-bsp/recipes-devtools/qemu, building qemu
from git as priority over yocto-poky/meta/recipes-devtools/qemu. The .bb
is configured to build from openbmc/qemu's master branch, at the merging
of the AST2400 SoC support. This commit enables a future change to add
palmetto-bmc support to the runqemu scripts.

The files qemu.inc and qemu-targets.inc are copies from
yocto-poky/meta/recipes-devtools/qemu, but with the extra support files
(patches and binaries) removed due to conflicts and lack of necessity.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 meta-openbmc-bsp/conf/layer.conf                   |   8 ++
 .../recipes-devtools/qemu/qemu-targets.inc         |  22 ++++
 meta-openbmc-bsp/recipes-devtools/qemu/qemu.inc    | 125 +++++++++++++++++++++
 meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb |  21 ++++
 .../meta-palmetto/conf/bblayers.conf.sample        |   1 +
 .../meta-barreleye/conf/bblayers.conf.sample       |   1 +
 6 files changed, 178 insertions(+)
 create mode 100644 meta-openbmc-bsp/conf/layer.conf
 create mode 100644 meta-openbmc-bsp/recipes-devtools/qemu/qemu-targets.inc
 create mode 100644 meta-openbmc-bsp/recipes-devtools/qemu/qemu.inc
 create mode 100644 meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb

diff --git a/meta-openbmc-bsp/conf/layer.conf b/meta-openbmc-bsp/conf/layer.conf
new file mode 100644
index 0000000..7f07802
--- /dev/null
+++ b/meta-openbmc-bsp/conf/layer.conf
@@ -0,0 +1,8 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH .= ":${LAYERDIR}"
+# We have a recipes directory containing .bb and .bbappend files, add to BBFILES
+BBFILES := "${BBFILES} ${LAYERDIR}/recipes*/*/*.bb \ ${LAYERDIR}/recipes*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "openbmc-bsp"
+BBFILE_PATTERN_openbmc-bsp = ""
+BBFILE_PRIORITY = "1"
diff --git a/meta-openbmc-bsp/recipes-devtools/qemu/qemu-targets.inc b/meta-openbmc-bsp/recipes-devtools/qemu/qemu-targets.inc
new file mode 100644
index 0000000..5c35655
--- /dev/null
+++ b/meta-openbmc-bsp/recipes-devtools/qemu/qemu-targets.inc
@@ -0,0 +1,22 @@
+# possible arch values are arm aarch64 mips mipsel mips64 mips64el ppc ppc64 ppc64abi32
+# ppcemb armeb alpha sparc32plus i386 x86_64 cris m68k microblaze sparc sparc32
+# sparc32plus
+
+def get_qemu_target_list(d):
+    import bb
+    archs = d.getVar('QEMU_TARGETS', True).split()
+    tos = d.getVar('HOST_OS', True)
+    softmmuonly = ""
+    for arch in ['mips64', 'mips64el', 'ppcemb']:
+        if arch in archs:
+            softmmuonly += arch + "-softmmu,"
+            archs.remove(arch)
+    linuxuseronly = ""
+    for arch in ['armeb', 'alpha', 'ppc64abi32', 'sparc32plus']:
+        if arch in archs:
+            linuxuseronly += arch + "-linux-user,"
+            archs.remove(arch)
+    if 'linux' not in tos:
+        return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',')
+    return softmmuonly + linuxuseronly + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',')
+
diff --git a/meta-openbmc-bsp/recipes-devtools/qemu/qemu.inc b/meta-openbmc-bsp/recipes-devtools/qemu/qemu.inc
new file mode 100644
index 0000000..c867d53
--- /dev/null
+++ b/meta-openbmc-bsp/recipes-devtools/qemu/qemu.inc
@@ -0,0 +1,125 @@
+SUMMARY = "Fast open source processor emulator"
+HOMEPAGE = "http://qemu.org"
+LICENSE = "GPLv2 & LGPLv2.1"
+DEPENDS = "glib-2.0 zlib pixman"
+RDEPENDS_${PN}_class-target += "bash python"
+RDEPENDS_${PN}-ptest = "bash make"
+
+require qemu-targets.inc
+inherit autotools ptest
+BBCLASSEXTEND = "native nativesdk"
+
+PR = "r0"
+
+# QEMU_TARGETS is overridable variable
+QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc sh4 x86_64"
+
+EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror  --disable-bluez --disable-libiscsi --with-system-pixman --extra-cflags='${CFLAGS}'"
+
+EXTRA_OECONF_append_class-native = " --enable-debug --enable-debug-info"
+INHIBIT_SYSROOT_STRIP = "1"
+
+EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror \
+				"
+export LIBTOOL="${HOST_SYS}-libtool"
+
+do_configure_prepend_class-native() {
+	# Append build host pkg-config paths for native target since the host may provide sdl
+	BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "")
+	if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
+		export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
+		# link with system dbus on Ubuntu 15.10
+		# FIXME: remove below 4 lines when oe dbus is upgraded
+		if [ -r /etc/lsb-release -a "$(lsb_release -is)$(lsb_release -rs)" = "Ubuntu15.10" ] ; then
+			libs=$(PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_PATH=$BHOST_PKGCONFIG_PATH PATH=/usr/bin:/bin pkg-config --libs dbus-1 || echo "")
+			[ -n "$libs" ] && export LDFLAGS="$libs $LDFLAGS"
+		fi
+	fi
+}
+
+KVMENABLE = "--enable-kvm"
+KVMENABLE_darwin = "--disable-kvm"
+KVMENABLE_mingw32 = "--disable-kvm"
+
+do_configure() {
+    # Handle distros such as CentOS 5 32-bit that do not have kvm support
+    KVMOPTS="--disable-kvm"
+    if [ "${PN}" != "qemu-native" -a "${PN}" != "nativesdk-qemu" ] \
+       || [ -f /usr/include/linux/kvm.h ] ; then
+       KVMOPTS="${KVMENABLE}"
+    fi
+
+    ${S}/configure --prefix=${prefix} --sysconfdir=${sysconfdir} --libexecdir=${libexecdir} --localstatedir=${localstatedir} --disable-strip ${EXTRA_OECONF} $KVMOPTS
+    test ! -e ${S}/target-i386/beginend_funcs.sh || chmod a+x ${S}/target-i386/beginend_funcs.sh
+}
+
+do_compile_ptest() {
+	make buildtest-TESTS
+}
+
+do_install_ptest() {
+	cp -rL ${B}/tests ${D}${PTEST_PATH}
+	find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {}
+
+	cp ${S}/tests/Makefile ${D}${PTEST_PATH}/tests
+}
+
+do_install () {
+	export STRIP="true"
+	autotools_do_install
+	install -d ${D}${datadir}/qemu
+}
+
+# The following fragment will create a wrapper for qemu-mips user emulation
+# binary in order to work around a segmentation fault issue. Basically, by
+# default, the reserved virtual address space for 32-on-64 bit is set to 4GB.
+# This will trigger a MMU access fault in the virtual CPU. With this change,
+# the qemu-mips works fine.
+# IMPORTANT: This piece needs to be removed once the root cause is fixed!
+do_install_append() {
+	if [ -e "${D}/${bindir}/qemu-mips" ]; then
+		create_wrapper ${D}/${bindir}/qemu-mips \
+			QEMU_RESERVED_VA=0x0
+	fi
+}
+# END of qemu-mips workaround
+
+PACKAGECONFIG ??= " \
+	fdt sdl \
+	${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
+	${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen', '', d)} \
+	"
+PACKAGECONFIG_class-native ??= "fdt alsa uuid"
+PACKAGECONFIG_class-nativesdk ??= "fdt sdl"
+NATIVEDEPS = ""
+NATIVEDEPS_class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libxext-native', '',d)}"
+PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl ${NATIVEDEPS},"
+PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr,"
+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-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[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,"
+PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng,"
+PACKAGECONFIG[ssh2] = "--enable-libssh2,--disable-libssh2,libssh2,"
+PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1"
+PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc"
+PACKAGECONFIG[alsa] = ",,alsa-lib"
+PACKAGECONFIG[glx] = "--enable-opengl,--disable-opengl,mesa"
+PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo"
+PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl"
+PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls"
+
+EXTRA_OECONF += "${@bb.utils.contains('PACKAGECONFIG', 'alsa', '--audio-drv-list=oss,alsa', '', d)}"
+
+# Qemu target will not build in world build for ARM or Mips
+BROKEN_qemuarm = "1"
+BROKEN_qemumips64 = "1"
+BROKEN_qemumips = "1"
+
+INSANE_SKIP_${PN} = "arch"
diff --git a/meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb b/meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb
new file mode 100644
index 0000000..97667ba
--- /dev/null
+++ b/meta-openbmc-bsp/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://github.com/openbmc/qemu.git;protocol=https"
+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/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/bblayers.conf.sample b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/bblayers.conf.sample
index d0e0219..c0dc6cf 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/bblayers.conf.sample
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/bblayers.conf.sample
@@ -9,6 +9,7 @@ BBLAYERS ?= " \
   ##OEROOT##/meta \
   ##OEROOT##/meta-yocto \
   ##OEROOT##/meta-phosphor \
+  ##OEROOT##/meta-openbmc-bsp \
   ##OEROOT##/meta-openbmc-bsp/meta-aspeed \
   ##OEROOT##/meta-openbmc-bsp/meta-aspeed/meta-ast2400 \
   ##OEROOT##/meta-openbmc-machines/meta-openpower \
diff --git a/meta-openbmc-machines/meta-openpower/meta-rackspace/meta-barreleye/conf/bblayers.conf.sample b/meta-openbmc-machines/meta-openpower/meta-rackspace/meta-barreleye/conf/bblayers.conf.sample
index a261b26..b68e458 100644
--- a/meta-openbmc-machines/meta-openpower/meta-rackspace/meta-barreleye/conf/bblayers.conf.sample
+++ b/meta-openbmc-machines/meta-openpower/meta-rackspace/meta-barreleye/conf/bblayers.conf.sample
@@ -9,6 +9,7 @@ BBLAYERS ?= " \
   ##OEROOT##/meta \
   ##OEROOT##/meta-yocto \
   ##OEROOT##/meta-phosphor \
+  ##OEROOT##/meta-openbmc-bsp \
   ##OEROOT##/meta-openbmc-bsp/meta-aspeed \
   ##OEROOT##/meta-openbmc-bsp/meta-aspeed/meta-ast2400 \
   ##OEROOT##/meta-openbmc-machines/meta-openpower \
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [RFC PATCH openbmc v3 2/8] runqemu: Add palmetto target
  2016-03-23  8:03 [RFC PATCH openbmc v3 0/8] Add palmetto target to runqemu, with networking Andrew Jeffery
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 1/8] meta-openbmc-bsp: Add qemu git recipe Andrew Jeffery
@ 2016-03-23  8:03 ` Andrew Jeffery
  2016-03-24  2:56   ` Joel Stanley
  2016-05-16 20:17   ` Patrick Williams
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 3/8] qemu_git.bb: Update to palmetto-bmc model with Cadence GEM Andrew Jeffery
                   ` (6 subsequent siblings)
  8 siblings, 2 replies; 20+ messages in thread
From: Andrew Jeffery @ 2016-03-23  8:03 UTC (permalink / raw)
  To: OpenBMC

Example use:

    $ bitbake obmc-phosphor-image
    $ runqemu palmetto slirp

Specifying slirp avoids needing root to configure network, which won't
work (yet). 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 both on the hardware and in QEMU.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 .../meta-ibm/meta-palmetto/conf/conf-notes.txt               |  3 +++
 yocto-poky/scripts/runqemu                                   |  9 ++++++---
 yocto-poky/scripts/runqemu-internal                          | 12 ++++++++++++
 3 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/conf-notes.txt b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/conf-notes.txt
index 9b3c01a..24bfffe 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/conf-notes.txt
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/conf-notes.txt
@@ -1,2 +1,5 @@
 Common targets are:
      obmc-phosphor-image
+
+You can also run generated images with qemu:
+     runqemu palmetto
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] 20+ messages in thread

* [RFC PATCH openbmc v3 3/8] qemu_git.bb: Update to palmetto-bmc model with Cadence GEM
  2016-03-23  8:03 [RFC PATCH openbmc v3 0/8] Add palmetto target to runqemu, with networking Andrew Jeffery
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 1/8] meta-openbmc-bsp: Add qemu git recipe Andrew Jeffery
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 2/8] runqemu: Add palmetto target Andrew Jeffery
@ 2016-03-23  8:03 ` Andrew Jeffery
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 4/8] linux-obmc: Allow processing of multiple device trees Andrew Jeffery
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 20+ messages in thread
From: Andrew Jeffery @ 2016-03-23  8:03 UTC (permalink / raw)
  To: OpenBMC

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb b/meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb
index 97667ba..4787a89 100644
--- a/meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb
+++ b/meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb
@@ -5,7 +5,7 @@
 
 require qemu.inc
 
-SRCREV = "d1f8764099022bc1173f2413331b26d4ff609a0c"
+SRCREV = "0217fbd91faa9acd434d8726555ae35c0bd1f68b"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
                     file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [RFC PATCH openbmc v3 4/8] linux-obmc: Allow processing of multiple device trees
  2016-03-23  8:03 [RFC PATCH openbmc v3 0/8] Add palmetto target to runqemu, with networking Andrew Jeffery
                   ` (2 preceding siblings ...)
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 3/8] qemu_git.bb: Update to palmetto-bmc model with Cadence GEM Andrew Jeffery
@ 2016-03-23  8:03 ` Andrew Jeffery
  2016-05-16 20:18   ` Patrick Williams
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 5/8] linux-obmc: Add a devicetree for QEMU palmetto-bmc machine Andrew Jeffery
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Andrew Jeffery @ 2016-03-23  8:03 UTC (permalink / raw)
  To: OpenBMC

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.3.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.3.bb b/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.3.bb
index 3e74f7c..05dff55 100644
--- a/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.3.bb
+++ b/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.3.bb
@@ -20,7 +20,7 @@ inherit kernel
 require recipes-kernel/linux/linux-yocto.inc
 
 do_patch_append() {
-        for DTB in "${KERNEL_DEVICETREE}"; do
+        for DTB in ${KERNEL_DEVICETREE}; do
 		DT=`basename ${DTB} .dtb`
                 if [ -r "${WORKDIR}/${DT}.dts" ]; then
                         cp ${WORKDIR}/${DT}.dts \
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [RFC PATCH openbmc v3 5/8] linux-obmc: Add a devicetree for QEMU palmetto-bmc machine
  2016-03-23  8:03 [RFC PATCH openbmc v3 0/8] Add palmetto target to runqemu, with networking Andrew Jeffery
                   ` (3 preceding siblings ...)
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 4/8] linux-obmc: Allow processing of multiple device trees Andrew Jeffery
@ 2016-03-23  8:03 ` Andrew Jeffery
  2016-03-24  2:55   ` Joel Stanley
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 6/8] palmetto: Configure macb driver into kernel Andrew Jeffery
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Andrew Jeffery @ 2016-03-23  8:03 UTC (permalink / raw)
  To: OpenBMC

The patch adds a separate devicetree file specifically for QEMU,
integrating the Cadence GEM device which is configured with the MMIO
base and IRQ for what would be MAC2.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 ...d-qemupalmetto-dts-with-Cadence-GEM-suppo.patch | 43 ++++++++++++++++++++++
 .../recipes-kernel/linux/linux-obmc_%.bbappend     |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/recipes-kernel/linux/linux-obmc/0001-arch-arm-Add-qemupalmetto-dts-with-Cadence-GEM-suppo.patch

diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/recipes-kernel/linux/linux-obmc/0001-arch-arm-Add-qemupalmetto-dts-with-Cadence-GEM-suppo.patch b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/recipes-kernel/linux/linux-obmc/0001-arch-arm-Add-qemupalmetto-dts-with-Cadence-GEM-suppo.patch
new file mode 100644
index 0000000..3734bb0
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/recipes-kernel/linux/linux-obmc/0001-arch-arm-Add-qemupalmetto-dts-with-Cadence-GEM-suppo.patch
@@ -0,0 +1,43 @@
+From 70f44f3fa819e2c13726895a2c1e3c5e8fa51eef Mon Sep 17 00:00:00 2001
+From: Andrew Jeffery <andrew@aj.id.au>
+Date: Mon, 21 Mar 2016 13:49:47 +1030
+Subject: [PATCH] arch/arm: Add qemupalmetto dts with Cadence GEM support
+
+Describes a machine that is as similar to the Palmetto BMC, primarily for
+running under QEMU. Relaxing the constraint of booting the exact Palmetto
+BMC hardware in QEMU allows us to integrate existing device models to expand
+the machine's capability without huge effort.
+
+In this case, the Cadence GEM controller is integrated to provide networking.
+
+Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
+---
+ arch/arm/boot/dts/aspeed-bmc-opp-qemupalmetto.dts | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+ create mode 100644 arch/arm/boot/dts/aspeed-bmc-opp-qemupalmetto.dts
+
+diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-qemupalmetto.dts b/arch/arm/boot/dts/aspeed-bmc-opp-qemupalmetto.dts
+new file mode 100644
+index 0000000..b0915cd
+--- /dev/null
++++ b/arch/arm/boot/dts/aspeed-bmc-opp-qemupalmetto.dts
+@@ -0,0 +1,16 @@
++#include "aspeed-bmc-opp-palmetto.dts"
++
++/ {
++	ahb {
++		mac1: ethernet@1e680000 {
++			compatible = "cdns,gem";
++			reg = <0x1e680000 0x1000>;
++			interrupts = <3>;
++			clock-names = "pclk", "hclk", "tx_clk";
++			clocks = <&clk_apb>, <&clk_apb>, <&clk_apb>;
++			status = "okay";
++			#address-cells = <1>;
++			#size-cells = <0>;
++		};
++	};
++};
+-- 
+2.5.0
+
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/recipes-kernel/linux/linux-obmc_%.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/recipes-kernel/linux/linux-obmc_%.bbappend
index a49c239..a56c34c 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/recipes-kernel/linux/linux-obmc_%.bbappend
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/recipes-kernel/linux/linux-obmc_%.bbappend
@@ -1,2 +1,3 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/linux-obmc:"
 SRC_URI += "file://palmetto.cfg"
+SRC_URI += "file://0001-arch-arm-Add-qemupalmetto-dts-with-Cadence-GEM-suppo.patch"
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [RFC PATCH openbmc v3 6/8] palmetto: Configure macb driver into kernel
  2016-03-23  8:03 [RFC PATCH openbmc v3 0/8] Add palmetto target to runqemu, with networking Andrew Jeffery
                   ` (4 preceding siblings ...)
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 5/8] linux-obmc: Add a devicetree for QEMU palmetto-bmc machine Andrew Jeffery
@ 2016-03-23  8:03 ` Andrew Jeffery
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 7/8] palmetto: Build devicetrees for hardware and QEMU Andrew Jeffery
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 20+ messages in thread
From: Andrew Jeffery @ 2016-03-23  8:03 UTC (permalink / raw)
  To: OpenBMC

macb is drives the Cadence GEM device.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 .../meta-ibm/meta-palmetto/recipes-kernel/linux/linux-obmc/palmetto.cfg | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/recipes-kernel/linux/linux-obmc/palmetto.cfg b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/recipes-kernel/linux/linux-obmc/palmetto.cfg
index 2594dec..e134903 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/recipes-kernel/linux/linux-obmc/palmetto.cfg
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/recipes-kernel/linux/linux-obmc/palmetto.cfg
@@ -2,3 +2,5 @@ CONFIG_HWMON=y
 CONFIG_SENSORS_NCT7904=y
 CONFIG_EEPROM_AT24=y
 CONFIG_SENSORS_TMP421=y
+CONFIG_NET_CADENCE=y
+CONFIG_MACB=y
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [RFC PATCH openbmc v3 7/8] palmetto: Build devicetrees for hardware and QEMU
  2016-03-23  8:03 [RFC PATCH openbmc v3 0/8] Add palmetto target to runqemu, with networking Andrew Jeffery
                   ` (5 preceding siblings ...)
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 6/8] palmetto: Configure macb driver into kernel Andrew Jeffery
@ 2016-03-23  8:03 ` Andrew Jeffery
  2016-05-16 20:19   ` Patrick Williams
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 8/8] runqemu-internal: Configure tun/tap network for palmetto-bmc Andrew Jeffery
  2016-03-24  2:53 ` [RFC PATCH openbmc v3 0/8] Add palmetto target to runqemu, with networking Joel Stanley
  8 siblings, 1 reply; 20+ messages in thread
From: Andrew Jeffery @ 2016-03-23  8:03 UTC (permalink / raw)
  To: OpenBMC

Using a separate devicetree for QEMU allows us to integrate existing
models for hardware features, compromising on accuracy but hopefully
providing a net benefit by reducing development time.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 .../meta-openpower/meta-ibm/meta-palmetto/conf/machine/palmetto.conf   | 1 +
 yocto-poky/scripts/runqemu-internal                                    | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/machine/palmetto.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/machine/palmetto.conf
index f6256a7..d41127d 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/machine/palmetto.conf
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/machine/palmetto.conf
@@ -1,5 +1,6 @@
 KMACHINE = "aspeed"
 KERNEL_DEVICETREE = "${KMACHINE}-bmc-opp-${MACHINE}.dtb"
+KERNEL_DEVICETREE += "${KMACHINE}-bmc-opp-qemu${MACHINE}.dtb"
 
 require conf/machine/include/ast2400.inc
 require conf/machine/include/obmc-bsp-common.inc
diff --git a/yocto-poky/scripts/runqemu-internal b/yocto-poky/scripts/runqemu-internal
index 479d61c..f461e9f 100755
--- a/yocto-poky/scripts/runqemu-internal
+++ b/yocto-poky/scripts/runqemu-internal
@@ -393,7 +393,8 @@ if [ "$MACHINE" = "palmetto" ]; then
     MACHINE_SUBTYPE=palmetto-bmc
     export QEMU_AUDIO_DRV="none"
     KERNCMDLINE="console=ttyS4"
-    QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} -initrd $ROOTFS -no-reboot -nographic"
+    KERNELDTB=${DEPLOY_DIR_IMAGE}/${PALMETTO_DEFAULT_KERNEL}-aspeed-bmc-opp-qemu${MACHINE}.dtb
+    QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} -dtb $KERNELDTB -initrd $ROOTFS -no-reboot -nographic"
 fi
 
 if [ "$MACHINE" = "qemuarm64" ]; then
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [RFC PATCH openbmc v3 8/8] runqemu-internal: Configure tun/tap network for palmetto-bmc
  2016-03-23  8:03 [RFC PATCH openbmc v3 0/8] Add palmetto target to runqemu, with networking Andrew Jeffery
                   ` (6 preceding siblings ...)
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 7/8] palmetto: Build devicetrees for hardware and QEMU Andrew Jeffery
@ 2016-03-23  8:03 ` Andrew Jeffery
  2016-05-16 20:20   ` Patrick Williams
  2016-03-24  2:53 ` [RFC PATCH openbmc v3 0/8] Add palmetto target to runqemu, with networking Joel Stanley
  8 siblings, 1 reply; 20+ messages in thread
From: Andrew Jeffery @ 2016-03-23  8:03 UTC (permalink / raw)
  To: OpenBMC

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 yocto-poky/scripts/runqemu-internal | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/yocto-poky/scripts/runqemu-internal b/yocto-poky/scripts/runqemu-internal
index f461e9f..bdaea01 100755
--- a/yocto-poky/scripts/runqemu-internal
+++ b/yocto-poky/scripts/runqemu-internal
@@ -392,7 +392,10 @@ if [ "$MACHINE" = "palmetto" ]; then
     QEMU=qemu-system-arm
     MACHINE_SUBTYPE=palmetto-bmc
     export QEMU_AUDIO_DRV="none"
-    KERNCMDLINE="console=ttyS4"
+    if [ "$SLIRP_ENABLED" != "yes" ]; then
+        KERNEL_NETWORK_CMD=${KERNEL_NETWORK_CMD}"::eth0"
+    fi
+    KERNCMDLINE="console=ttyS4 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY highres=off"
     KERNELDTB=${DEPLOY_DIR_IMAGE}/${PALMETTO_DEFAULT_KERNEL}-aspeed-bmc-opp-qemu${MACHINE}.dtb
     QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} -dtb $KERNELDTB -initrd $ROOTFS -no-reboot -nographic"
 fi
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [RFC PATCH openbmc v3 0/8] Add palmetto target to runqemu, with networking
  2016-03-23  8:03 [RFC PATCH openbmc v3 0/8] Add palmetto target to runqemu, with networking Andrew Jeffery
                   ` (7 preceding siblings ...)
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 8/8] runqemu-internal: Configure tun/tap network for palmetto-bmc Andrew Jeffery
@ 2016-03-24  2:53 ` Joel Stanley
  8 siblings, 0 replies; 20+ messages in thread
From: Joel Stanley @ 2016-03-24  2:53 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: OpenBMC

LGTM, lets merge it.


On Wed, Mar 23, 2016 at 6:33 PM, Andrew Jeffery <andrew@aj.id.au> 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 an 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.
>
> This revision includes support for slirp and tun/tap networking: The machine
> will come up at either 10.0.2.15 or 192.168.7.2 respectively. Note that the
> network controller modelled is a Cadence GEM and not the ftgmac device, which
> is a little inaccurate but means we can have networking sooner rather than
> later.
>
> The patches are also available on Github:
>
>   https://github.com/amboar/openbmc/commits/runqemu-palmetto
>
> I'd appreciate some testing and comments. I'm not sure about the approach of
> baking in the Cadence driver for both environments (hardware, qemu) for
> instance. Maybe we should use a different bitbake target altogether?
>
> Cheers,
>
> Andrew
>
> Andrew Jeffery (8):
>   meta-openbmc-bsp: Add qemu git recipe
>   runqemu: Add palmetto target
>   qemu_git.bb: Update to palmetto-bmc model with Cadence GEM
>   linux-obmc: Allow processing of multiple device trees
>   linux-obmc: Add a devicetree for QEMU palmetto-bmc machine
>   palmetto: Configure macb driver into kernel
>   palmetto: Build devicetrees for hardware and QEMU
>   runqemu-internal: Configure tun/tap network for palmetto-bmc
>
>  meta-openbmc-bsp/conf/layer.conf                   |   8 ++
>  .../recipes-devtools/qemu/qemu-targets.inc         |  22 ++++
>  meta-openbmc-bsp/recipes-devtools/qemu/qemu.inc    | 125 +++++++++++++++++++++
>  meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb |  21 ++++
>  .../meta-palmetto/conf/bblayers.conf.sample        |   1 +
>  .../meta-ibm/meta-palmetto/conf/conf-notes.txt     |   3 +
>  .../meta-palmetto/conf/machine/palmetto.conf       |   1 +
>  ...d-qemupalmetto-dts-with-Cadence-GEM-suppo.patch |  43 +++++++
>  .../recipes-kernel/linux/linux-obmc/palmetto.cfg   |   2 +
>  .../recipes-kernel/linux/linux-obmc_%.bbappend     |   1 +
>  .../meta-barreleye/conf/bblayers.conf.sample       |   1 +
>  .../common/recipes-kernel/linux/linux-obmc_4.3.bb  |   2 +-
>  yocto-poky/scripts/runqemu                         |   9 +-
>  yocto-poky/scripts/runqemu-internal                |  16 +++
>  14 files changed, 251 insertions(+), 4 deletions(-)
>  create mode 100644 meta-openbmc-bsp/conf/layer.conf
>  create mode 100644 meta-openbmc-bsp/recipes-devtools/qemu/qemu-targets.inc
>  create mode 100644 meta-openbmc-bsp/recipes-devtools/qemu/qemu.inc
>  create mode 100644 meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb
>  create mode 100644 meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/recipes-kernel/linux/linux-obmc/0001-arch-arm-Add-qemupalmetto-dts-with-Cadence-GEM-suppo.patch
>
> --
> 2.5.0
>
> _______________________________________________
> openbmc mailing list
> openbmc@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC PATCH openbmc v3 5/8] linux-obmc: Add a devicetree for QEMU palmetto-bmc machine
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 5/8] linux-obmc: Add a devicetree for QEMU palmetto-bmc machine Andrew Jeffery
@ 2016-03-24  2:55   ` Joel Stanley
  0 siblings, 0 replies; 20+ messages in thread
From: Joel Stanley @ 2016-03-24  2:55 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: OpenBMC

On Wed, Mar 23, 2016 at 6:33 PM, Andrew Jeffery <andrew@aj.id.au> wrote:
> The patch adds a separate devicetree file specifically for QEMU,
> integrating the Cadence GEM device which is configured with the MMIO
> base and IRQ for what would be MAC2.

How about we put this in the kernel tree instead?

Cheers,

Joel

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC PATCH openbmc v3 2/8] runqemu: Add palmetto target
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 2/8] runqemu: Add palmetto target Andrew Jeffery
@ 2016-03-24  2:56   ` Joel Stanley
  2016-05-16 20:17   ` Patrick Williams
  1 sibling, 0 replies; 20+ messages in thread
From: Joel Stanley @ 2016-03-24  2:56 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: OpenBMC

On Wed, Mar 23, 2016 at 6:33 PM, Andrew Jeffery <andrew@aj.id.au> wrote:
> Example use:
>
>     $ bitbake obmc-phosphor-image
>     $ runqemu palmetto slirp

I like how easy to use this is.

Is there any way we can keep this patch out of meta-poky?

Joel

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC PATCH openbmc v3 1/8] meta-openbmc-bsp: Add qemu git recipe
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 1/8] meta-openbmc-bsp: Add qemu git recipe Andrew Jeffery
@ 2016-05-16 20:14   ` Patrick Williams
  2016-05-17  0:19     ` Andrew Jeffery
  0 siblings, 1 reply; 20+ messages in thread
From: Patrick Williams @ 2016-05-16 20:14 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: OpenBMC

[-- Attachment #1: Type: text/plain, Size: 2935 bytes --]

On Wed, Mar 23, 2016 at 06:33:28PM +1030, Andrew Jeffery wrote:
...
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
>  meta-openbmc-bsp/conf/layer.conf                   |   8 ++

>  .../recipes-devtools/qemu/qemu-targets.inc         |  22 ++++
>  meta-openbmc-bsp/recipes-devtools/qemu/qemu.inc    | 125 +++++++++++++++++++++

These files are originally in meta/recipes-devtools/qemu.  We should
be able to continue to use those.

>  meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb |  21 ++++

I would prefer this under
meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp , since it is the
2400 specific qemu tree.

I think you can avoid the layer.conf and bblayers.conf changes if you
use the (already supported) meta-ast2400 tree as well.

>  .../meta-palmetto/conf/bblayers.conf.sample        |   1 +
>  .../meta-barreleye/conf/bblayers.conf.sample       |   1 +

> diff --git a/meta-openbmc-bsp/conf/layer.conf b/meta-openbmc-bsp/conf/layer.conf
> new file mode 100644
> index 0000000..7f07802
> --- /dev/null
> +++ b/meta-openbmc-bsp/conf/layer.conf
> @@ -0,0 +1,8 @@
> +# We have a conf and classes directory, add to BBPATH
> +BBPATH .= ":${LAYERDIR}"
> +# We have a recipes directory containing .bb and .bbappend files, add to BBFILES
> +BBFILES := "${BBFILES} ${LAYERDIR}/recipes*/*/*.bb \ ${LAYERDIR}/recipes*/*/*.bbappend"
> +
> +BBFILE_COLLECTIONS += "openbmc-bsp"
> +BBFILE_PATTERN_openbmc-bsp = ""
> +BBFILE_PRIORITY = "1"

I think we can remove this by moving to meta-ast2400.  Not sure I
understand why this was required.

> diff --git a/meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb b/meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb
> new file mode 100644
> index 0000000..97667ba
> --- /dev/null
> +++ b/meta-openbmc-bsp/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

I don't think you need to say this.  This doesn't look that much
different from qemu_2.4.0.bb except for the SRCREV / SRC_URI / S
variables and those are really standard with other of our recipes.

> +
> +require qemu.inc
> +
> +SRCREV = "d1f8764099022bc1173f2413331b26d4ff609a0c"
> +
> +LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
> +                    file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
> +
> +SRC_URI = "git://github.com/openbmc/qemu.git;protocol=https"
> +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
> +}

-- 
Patrick Williams

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC PATCH openbmc v3 2/8] runqemu: Add palmetto target
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 2/8] runqemu: Add palmetto target Andrew Jeffery
  2016-03-24  2:56   ` Joel Stanley
@ 2016-05-16 20:17   ` Patrick Williams
  2016-05-17  0:20     ` Andrew Jeffery
  1 sibling, 1 reply; 20+ messages in thread
From: Patrick Williams @ 2016-05-16 20:17 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: OpenBMC

[-- Attachment #1: Type: text/plain, Size: 4903 bytes --]

We need to find a way to do this without adding new machines to
scripts/runqemu each time.

On Wed, Mar 23, 2016 at 06:33:29PM +1030, Andrew Jeffery wrote:
> Example use:
> 
>     $ bitbake obmc-phosphor-image
>     $ runqemu palmetto slirp
> 
> Specifying slirp avoids needing root to configure network, which won't
> work (yet). 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 both on the hardware and in QEMU.
> 
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
>  .../meta-ibm/meta-palmetto/conf/conf-notes.txt               |  3 +++
>  yocto-poky/scripts/runqemu                                   |  9 ++++++---
>  yocto-poky/scripts/runqemu-internal                          | 12 ++++++++++++
>  3 files changed, 21 insertions(+), 3 deletions(-)
> 
> diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/conf-notes.txt b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/conf-notes.txt
> index 9b3c01a..24bfffe 100644
> --- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/conf-notes.txt
> +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/conf-notes.txt
> @@ -1,2 +1,5 @@
>  Common targets are:
>       obmc-phosphor-image
> +
> +You can also run generated images with qemu:
> +     runqemu palmetto
> 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
> 
> _______________________________________________
> 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] 20+ messages in thread

* Re: [RFC PATCH openbmc v3 4/8] linux-obmc: Allow processing of multiple device trees
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 4/8] linux-obmc: Allow processing of multiple device trees Andrew Jeffery
@ 2016-05-16 20:18   ` Patrick Williams
  0 siblings, 0 replies; 20+ messages in thread
From: Patrick Williams @ 2016-05-16 20:18 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: OpenBMC

[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]

Suggest submitting this upstream to yocto.

On Wed, Mar 23, 2016 at 06:33:31PM +1030, Andrew Jeffery wrote:
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
>  meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.3.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.3.bb b/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.3.bb
> index 3e74f7c..05dff55 100644
> --- a/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.3.bb
> +++ b/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.3.bb
> @@ -20,7 +20,7 @@ inherit kernel
>  require recipes-kernel/linux/linux-yocto.inc
>  
>  do_patch_append() {
> -        for DTB in "${KERNEL_DEVICETREE}"; do
> +        for DTB in ${KERNEL_DEVICETREE}; do
>  		DT=`basename ${DTB} .dtb`
>                  if [ -r "${WORKDIR}/${DT}.dts" ]; then
>                          cp ${WORKDIR}/${DT}.dts \
> -- 
> 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] 20+ messages in thread

* Re: [RFC PATCH openbmc v3 7/8] palmetto: Build devicetrees for hardware and QEMU
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 7/8] palmetto: Build devicetrees for hardware and QEMU Andrew Jeffery
@ 2016-05-16 20:19   ` Patrick Williams
  0 siblings, 0 replies; 20+ messages in thread
From: Patrick Williams @ 2016-05-16 20:19 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: OpenBMC

[-- Attachment #1: Type: text/plain, Size: 2239 bytes --]

On Wed, Mar 23, 2016 at 06:33:34PM +1030, Andrew Jeffery wrote:
> Using a separate devicetree for QEMU allows us to integrate existing
> models for hardware features, compromising on accuracy but hopefully
> providing a net benefit by reducing development time.
> 
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
>  .../meta-openpower/meta-ibm/meta-palmetto/conf/machine/palmetto.conf   | 1 +
>  yocto-poky/scripts/runqemu-internal                                    | 3 ++-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/machine/palmetto.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/machine/palmetto.conf
> index f6256a7..d41127d 100644
> --- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/machine/palmetto.conf
> +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf/machine/palmetto.conf
> @@ -1,5 +1,6 @@
>  KMACHINE = "aspeed"
>  KERNEL_DEVICETREE = "${KMACHINE}-bmc-opp-${MACHINE}.dtb"
> +KERNEL_DEVICETREE += "${KMACHINE}-bmc-opp-qemu${MACHINE}.dtb"
>  
>  require conf/machine/include/ast2400.inc
>  require conf/machine/include/obmc-bsp-common.inc
> diff --git a/yocto-poky/scripts/runqemu-internal b/yocto-poky/scripts/runqemu-internal
> index 479d61c..f461e9f 100755
> --- a/yocto-poky/scripts/runqemu-internal
> +++ b/yocto-poky/scripts/runqemu-internal
> @@ -393,7 +393,8 @@ if [ "$MACHINE" = "palmetto" ]; then
>      MACHINE_SUBTYPE=palmetto-bmc
>      export QEMU_AUDIO_DRV="none"
>      KERNCMDLINE="console=ttyS4"
> -    QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} -initrd $ROOTFS -no-reboot -nographic"
> +    KERNELDTB=${DEPLOY_DIR_IMAGE}/${PALMETTO_DEFAULT_KERNEL}-aspeed-bmc-opp-qemu${MACHINE}.dtb
> +    QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} -dtb $KERNELDTB -initrd $ROOTFS -no-reboot -nographic"

Need to find a way to do this generically as well.

>  fi
>  
>  if [ "$MACHINE" = "qemuarm64" ]; then
> -- 
> 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] 20+ messages in thread

* Re: [RFC PATCH openbmc v3 8/8] runqemu-internal: Configure tun/tap network for palmetto-bmc
  2016-03-23  8:03 ` [RFC PATCH openbmc v3 8/8] runqemu-internal: Configure tun/tap network for palmetto-bmc Andrew Jeffery
@ 2016-05-16 20:20   ` Patrick Williams
  2016-05-17  0:32     ` Andrew Jeffery
  0 siblings, 1 reply; 20+ messages in thread
From: Patrick Williams @ 2016-05-16 20:20 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: OpenBMC

[-- Attachment #1: Type: text/plain, Size: 1448 bytes --]

On Wed, Mar 23, 2016 at 06:33:35PM +1030, Andrew Jeffery wrote:
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
>  yocto-poky/scripts/runqemu-internal | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/yocto-poky/scripts/runqemu-internal b/yocto-poky/scripts/runqemu-internal
> index f461e9f..bdaea01 100755
> --- a/yocto-poky/scripts/runqemu-internal
> +++ b/yocto-poky/scripts/runqemu-internal
> @@ -392,7 +392,10 @@ if [ "$MACHINE" = "palmetto" ]; then
>      QEMU=qemu-system-arm
>      MACHINE_SUBTYPE=palmetto-bmc
>      export QEMU_AUDIO_DRV="none"
> -    KERNCMDLINE="console=ttyS4"
> +    if [ "$SLIRP_ENABLED" != "yes" ]; then
> +        KERNEL_NETWORK_CMD=${KERNEL_NETWORK_CMD}"::eth0"
> +    fi
> +    KERNCMDLINE="console=ttyS4 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY highres=off"

Lots of stuff that is "palmetto" specific shoved in to the
runqemu-internal.  I think we need to propose a way to upstream to add
machine-specific gorp in here from the meta layer.

>      KERNELDTB=${DEPLOY_DIR_IMAGE}/${PALMETTO_DEFAULT_KERNEL}-aspeed-bmc-opp-qemu${MACHINE}.dtb
>      QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} -dtb $KERNELDTB -initrd $ROOTFS -no-reboot -nographic"
>  fi
> -- 
> 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] 20+ messages in thread

* Re: [RFC PATCH openbmc v3 1/8] meta-openbmc-bsp: Add qemu git recipe
  2016-05-16 20:14   ` Patrick Williams
@ 2016-05-17  0:19     ` Andrew Jeffery
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew Jeffery @ 2016-05-17  0:19 UTC (permalink / raw)
  To: Patrick Williams; +Cc: OpenBMC

[-- Attachment #1: Type: text/plain, Size: 4235 bytes --]

Hi Patrick,

Thanks for the feedback.

On Mon, 2016-05-16 at 15:14 -0500, Patrick Williams wrote:
> On Wed, Mar 23, 2016 at 06:33:28PM +1030, Andrew Jeffery wrote:
> ...
> > 
> > Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> > ---
> >  meta-openbmc-bsp/conf/layer.conf                   |   8 ++
> > 
> >  .../recipes-devtools/qemu/qemu-targets.inc         |  22 ++++
> >  meta-openbmc-bsp/recipes-devtools/qemu/qemu.inc    | 125 +++++++++++++++++++++
> These files are originally in meta/recipes-devtools/qemu.  We should
> be able to continue to use those.

As pointed out in my comment on the pull-req[1] qemu.inc isn't a bit-
for-bit copy, I've changed (removed) some parts. However it's likely
there is a better approach than deleting parts of the configuration.

qemu-targets.inc was a straight copy, but I don't know of a way to
reference it from the new qemu recipe. Removing it doesn't make the new
recipe find it in the old recipe's directory...

> 
> > 
> >  meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb |  21 ++++
> I would prefer this under
> meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp , since it is the
> 2400 specific qemu tree.
> 
> I think you can avoid the layer.conf and bblayers.conf changes if you
> use the (already supported) meta-ast2400 tree as well.

Yeah, happy to do that. I asked where people prefer I put it (can't
remember where I asked though) and got no feedback, so for the patch I
put it here on the basis that if people disagreed they'd have an
opinion :)

> 
> > 
> >  .../meta-palmetto/conf/bblayers.conf.sample        |   1 +
> >  .../meta-barreleye/conf/bblayers.conf.sample       |   1 +
> > 
> > diff --git a/meta-openbmc-bsp/conf/layer.conf b/meta-openbmc-bsp/conf/layer.conf
> > new file mode 100644
> > index 0000000..7f07802
> > --- /dev/null
> > +++ b/meta-openbmc-bsp/conf/layer.conf
> > @@ -0,0 +1,8 @@
> > +# We have a conf and classes directory, add to BBPATH
> > +BBPATH .= ":${LAYERDIR}"
> > +# We have a recipes directory containing .bb and .bbappend files, add to BBFILES
> > +BBFILES := "${BBFILES} ${LAYERDIR}/recipes*/*/*.bb \ ${LAYERDIR}/recipes*/*/*.bbappend"
> > +
> > +BBFILE_COLLECTIONS += "openbmc-bsp"
> > +BBFILE_PATTERN_openbmc-bsp = ""
> > +BBFILE_PRIORITY = "1"
> I think we can remove this by moving to meta-ast2400.  Not sure I
> understand why this was required.

Yeah it's likely we can remove it. It was an experiment that I don't
think is required and shouldn't have made it into the pull-req.

> 
> > 
> > diff --git a/meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb b/meta-openbmc-bsp/recipes-devtools/qemu/qemu_git.bb
> > new file mode 100644
> > index 0000000..97667ba
> > --- /dev/null
> > +++ b/meta-openbmc-bsp/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
> I don't think you need to say this.  This doesn't look that much
> different from qemu_2.4.0.bb except for the SRCREV / SRC_URI / S
> variables and those are really standard with other of our recipes.
> 

Yeah I'll strip it out. Initially it looked more like the linked
content, but I stripped it back as I went.

> > 
> > +
> > +require qemu.inc
> > +
> > +SRCREV = "d1f8764099022bc1173f2413331b26d4ff609a0c"
> > +
> > +LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
> > +                    file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
> > +
> > +SRC_URI = "git://github.com/openbmc/qemu.git;protocol=https"
> > +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
> > +}

[1] https://github.com/openbmc/openbmc/pull/230#issuecomment-212228955

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC PATCH openbmc v3 2/8] runqemu: Add palmetto target
  2016-05-16 20:17   ` Patrick Williams
@ 2016-05-17  0:20     ` Andrew Jeffery
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew Jeffery @ 2016-05-17  0:20 UTC (permalink / raw)
  To: Patrick Williams; +Cc: OpenBMC

[-- Attachment #1: Type: text/plain, Size: 284 bytes --]

On Mon, 2016-05-16 at 15:17 -0500, Patrick Williams wrote:
> We need to find a way to do this without adding new machines to
> scripts/runqemu each time.

Okay, given that I'll close the pull-req and start a discussion with
upstream about how to approach the problem.

Andrew

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [RFC PATCH openbmc v3 8/8] runqemu-internal: Configure tun/tap network for palmetto-bmc
  2016-05-16 20:20   ` Patrick Williams
@ 2016-05-17  0:32     ` Andrew Jeffery
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew Jeffery @ 2016-05-17  0:32 UTC (permalink / raw)
  To: Patrick Williams; +Cc: OpenBMC

[-- Attachment #1: Type: text/plain, Size: 1306 bytes --]

On Mon, 2016-05-16 at 15:20 -0500, Patrick Williams wrote:
> On Wed, Mar 23, 2016 at 06:33:35PM +1030, Andrew Jeffery wrote:
> > 
> > Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> > ---
> >  yocto-poky/scripts/runqemu-internal | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/yocto-poky/scripts/runqemu-internal b/yocto-poky/scripts/runqemu-internal
> > index f461e9f..bdaea01 100755
> > --- a/yocto-poky/scripts/runqemu-internal
> > +++ b/yocto-poky/scripts/runqemu-internal
> > @@ -392,7 +392,10 @@ if [ "$MACHINE" = "palmetto" ]; then
> >      QEMU=qemu-system-arm
> >      MACHINE_SUBTYPE=palmetto-bmc
> >      export QEMU_AUDIO_DRV="none"
> > -    KERNCMDLINE="console=ttyS4"
> > +    if [ "$SLIRP_ENABLED" != "yes" ]; then
> > +        KERNEL_NETWORK_CMD=${KERNEL_NETWORK_CMD}"::eth0"
> > +    fi
> > +    KERNCMDLINE="console=ttyS4 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY highres=off"
> Lots of stuff that is "palmetto" specific shoved in to the
> runqemu-internal.  I think we need to propose a way to upstream to add
> machine-specific gorp in here from the meta layer.

Yep, as mentioned in another reply I'll close the pull-req and start a
conversation with upstream.

Cheers,

Andrew

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2016-05-17  0:32 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-23  8:03 [RFC PATCH openbmc v3 0/8] Add palmetto target to runqemu, with networking Andrew Jeffery
2016-03-23  8:03 ` [RFC PATCH openbmc v3 1/8] meta-openbmc-bsp: Add qemu git recipe Andrew Jeffery
2016-05-16 20:14   ` Patrick Williams
2016-05-17  0:19     ` Andrew Jeffery
2016-03-23  8:03 ` [RFC PATCH openbmc v3 2/8] runqemu: Add palmetto target Andrew Jeffery
2016-03-24  2:56   ` Joel Stanley
2016-05-16 20:17   ` Patrick Williams
2016-05-17  0:20     ` Andrew Jeffery
2016-03-23  8:03 ` [RFC PATCH openbmc v3 3/8] qemu_git.bb: Update to palmetto-bmc model with Cadence GEM Andrew Jeffery
2016-03-23  8:03 ` [RFC PATCH openbmc v3 4/8] linux-obmc: Allow processing of multiple device trees Andrew Jeffery
2016-05-16 20:18   ` Patrick Williams
2016-03-23  8:03 ` [RFC PATCH openbmc v3 5/8] linux-obmc: Add a devicetree for QEMU palmetto-bmc machine Andrew Jeffery
2016-03-24  2:55   ` Joel Stanley
2016-03-23  8:03 ` [RFC PATCH openbmc v3 6/8] palmetto: Configure macb driver into kernel Andrew Jeffery
2016-03-23  8:03 ` [RFC PATCH openbmc v3 7/8] palmetto: Build devicetrees for hardware and QEMU Andrew Jeffery
2016-05-16 20:19   ` Patrick Williams
2016-03-23  8:03 ` [RFC PATCH openbmc v3 8/8] runqemu-internal: Configure tun/tap network for palmetto-bmc Andrew Jeffery
2016-05-16 20:20   ` Patrick Williams
2016-05-17  0:32     ` Andrew Jeffery
2016-03-24  2:53 ` [RFC PATCH openbmc v3 0/8] Add palmetto target to runqemu, with networking Joel Stanley

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.