* [Buildroot] Xorg libs and proto
From: Bernd Kuhls @ 2017-05-07 20:27 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1494183428.953970867@f205.i.mail.ru>
Am Sun, 07 May 2017 21:57:08 +0300 schrieb ONE TWO:
> What libraries and proto depend for xorg-server! Write these names of
> libs and proto! :D
Hi,
the packages xserver_xorg-server depends on are selected by the package:
https://git.buildroot.net/buildroot/tree/package/x11r7/xserver_xorg-
server/Config.in
Regards, Bernd
^ permalink raw reply
* [Buildroot] [PATCH v1] qt5base: fix examples compile with disabled gui module
From: Thomas Petazzoni @ 2017-05-07 20:18 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20170427210150.1838-1-ps.report@gmx.net>
Hello,
On Thu, 27 Apr 2017 23:01:50 +0200, Peter Seiderer wrote:
> Fixes [1]:
>
> Project ERROR: Could not find feature opengl.
>
> [1] http://autobuild.buildroot.net/results/040/040ab283dbbec623fe5ff4eaece754d9701fafc5
>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> ...4-examples-fix-compile-without-gui-module.patch | 42 ++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
> create mode 100644 package/qt5/qt5base/5.8.0/0004-examples-fix-compile-without-gui-module.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [git commit] qt5base: fix examples compile with disabled gui module
From: Thomas Petazzoni @ 2017-05-07 20:18 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=4860e05a63bf01156466a1a8007de38e2839501a
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Fixes [1]:
Project ERROR: Could not find feature opengl.
[1] http://autobuild.buildroot.net/results/040/040ab283dbbec623fe5ff4eaece754d9701fafc5
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
...4-examples-fix-compile-without-gui-module.patch | 42 ++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/package/qt5/qt5base/5.8.0/0004-examples-fix-compile-without-gui-module.patch b/package/qt5/qt5base/5.8.0/0004-examples-fix-compile-without-gui-module.patch
new file mode 100644
index 0000000..148ced8
--- /dev/null
+++ b/package/qt5/qt5base/5.8.0/0004-examples-fix-compile-without-gui-module.patch
@@ -0,0 +1,42 @@
+From fe8a9bacf781fcf290e04a08f2b8e37d881d58bb Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Thu, 27 Apr 2017 22:41:28 +0200
+Subject: [PATCH] examples: fix compile without gui module
+
+Fixes:
+
+ Project ERROR: Could not find feature opengl.
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ examples/gui/gui.pro | 2 +-
+ examples/widgets/widgets.pro | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/examples/gui/gui.pro b/examples/gui/gui.pro
+index a4d960d3f5..b8080c2075 100644
+--- a/examples/gui/gui.pro
++++ b/examples/gui/gui.pro
+@@ -6,5 +6,5 @@ CONFIG += no_docs_target
+
+ SUBDIRS += analogclock
+ SUBDIRS += rasterwindow
+-qtConfig(opengl): \
++qtHaveModule(gui):qtConfig(opengl): \
+ SUBDIRS += openglwindow
+diff --git a/examples/widgets/widgets.pro b/examples/widgets/widgets.pro
+index 513ddc91f2..cef4936d32 100644
+--- a/examples/widgets/widgets.pro
++++ b/examples/widgets/widgets.pro
+@@ -22,7 +22,7 @@ SUBDIRS = \
+ tutorials \
+ widgets
+
+-qtConfig(opengl): \
++qtHaveModule(gui):qtConfig(opengl): \
+ SUBDIRS += windowcontainer
+
+ contains(DEFINES, QT_NO_CURSOR): SUBDIRS -= mainwindows
+--
+2.11.0
+
^ permalink raw reply related
* [Buildroot] [PATCH v2 1/1] package/cwiid: add optional dependency to bluez5_utils
From: Thomas Petazzoni @ 2017-05-07 20:16 UTC (permalink / raw)
To: buildroot
In-Reply-To: <16e63a8d-e200-457d-bd74-01176c67d4fe@mind.be>
Hello,
On Tue, 21 Mar 2017 09:36:23 +0100, Arnout Vandecappelle wrote:
> >> - select BR2_PACKAGE_BLUEZ_UTILS
> >> + select BR2_PACKAGE_BLUEZ5_UTILS if !BR2_PACKAGE_BLUEZ_UTILS
> >
> > You need to add missing bluez5_utils dependencies
> > (BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4, BR2_TOOLCHAIN_HAS_SYNC_4). Changing
> > bluez_utils to bluez5_utils in the comments above would also be nice.
>
> Darn, this is getting complicated... We would want to keep the dependencies as
> they are, and use bluez_utils in case bluez5_utils are not available. But that
> would mean something like:
>
> select BR2_PACKAGE_BLUEZ5_UTILS if !BR2_PACKAGE_BLUEZ_UTILS \
> && BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 \
> && BR2_TOOLCHAIN_HAS_SYNC_4
> select BR2_PACKAGE_BLUEZ_UTILS if !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 \
> || !BR2_TOOLCHAIN_HAS_SYNC_4
>
> Yuk...
>
> Perhaps a BR2_PACKAGE_BLUEZ5_UTILS_ARCH_SUPPORTS would help?
Perhaps it's a case where we need to use a "depends on" dependency
rather than a "select" dependency, i.e do:
depends on BR2_PACKAGE_BLUEZ5_UTILS || BR2_PACKAGE_BLUEZ_UTILS
Bernd, could you resubmit your patch with this idea? Don't forget to
remove the "depends on" on toolchain/architecture features that are no
longer needed.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [PATCH] Revert "toolchain-external: CodeSourcery NiosII 2015.11 affected by PR19405"
From: Thomas Petazzoni @ 2017-05-07 20:09 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20170506135420.12274-1-romain.naour@gmail.com>
Hello,
On Sat, 6 May 2017 15:54:20 +0200, Romain Naour wrote:
> An autobuilder exception has been added to avoid testing qt gui module
> with the CodeSourcery NiosII toolchain. This allow to remove the
> BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 symbol.
>
> This reverts commit 5dce3c05b5ea38539f6ee6efc24c13db936260dc.
>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> ---
> package/opencv/Config.in | 7 -------
> package/opencv3/Config.in | 5 ++---
> package/pinentry/Config.in | 4 ----
> package/poppler/Config.in | 4 ----
> package/qt/Config.in | 7 -------
> package/qwt/Config.in | 6 +-----
> toolchain/toolchain-common.in | 4 ----
> .../toolchain-external-codesourcery-niosII/Config.in | 1 -
> 8 files changed, 3 insertions(+), 35 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [git commit] Revert "toolchain-external: CodeSourcery NiosII 2015.11 affected by PR19405"
From: Thomas Petazzoni @ 2017-05-07 20:09 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=519b96ad8726843cbae5be5b52cdeb395ca9c7e2
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
An autobuilder exception has been added to avoid testing qt gui module
with the CodeSourcery NiosII toolchain. This allow to remove the
BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 symbol.
This reverts commit 5dce3c05b5ea38539f6ee6efc24c13db936260dc.
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/opencv/Config.in | 7 -------
package/opencv3/Config.in | 5 ++---
package/pinentry/Config.in | 4 ----
package/poppler/Config.in | 4 ----
package/qt/Config.in | 7 -------
package/qwt/Config.in | 6 +-----
toolchain/toolchain-common.in | 4 ----
.../toolchain-external-codesourcery-niosII/Config.in | 1 -
8 files changed, 3 insertions(+), 35 deletions(-)
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 0260851..742ae3e 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -51,7 +51,6 @@ config BR2_PACKAGE_OPENCV_LIB_FLANN
config BR2_PACKAGE_OPENCV_LIB_GPU
bool "gpu"
- depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # opencv libphoto
depends on !BR2_STATIC_LIBS
select BR2_PACKAGE_OPENCV_LIB_CALIB3D
select BR2_PACKAGE_OPENCV_LIB_IMGPROC
@@ -114,7 +113,6 @@ config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
config BR2_PACKAGE_OPENCV_LIB_PHOTO
bool "photo"
default y
- depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Binutils 2.25 nios2 issue
select BR2_PACKAGE_OPENCV_LIB_IMGPROC
help
Include opencv_photo module into the OpenCV build.
@@ -162,7 +160,6 @@ config BR2_PACKAGE_OPENCV_LIB_VIDEO
config BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB
bool "videostab"
default y
- depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # opencv libphoto
select BR2_PACKAGE_OPENCV_LIB_CALIB3D
select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
select BR2_PACKAGE_OPENCV_LIB_HIGHGUI
@@ -272,7 +269,6 @@ config BR2_PACKAGE_OPENCV_WITH_QT
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_USE_MMU # qt
depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
- depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module
select BR2_PACKAGE_QT
select BR2_PACKAGE_QT_STL
select BR2_PACKAGE_QT_GUI_MODULE
@@ -280,9 +276,6 @@ config BR2_PACKAGE_OPENCV_WITH_QT
help
Use Qt with QtTest module and STL support
-comment "qt backend support needs a toolchain not affected by Binutils bug 19405"
- depends on BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405
-
config BR2_PACKAGE_OPENCV_WITH_TIFF
bool "tiff support"
select BR2_PACKAGE_TIFF
diff --git a/package/opencv3/Config.in b/package/opencv3/Config.in
index 3b0a9d6..2214ee8 100644
--- a/package/opencv3/Config.in
+++ b/package/opencv3/Config.in
@@ -85,16 +85,15 @@ comment "gtk3 support needs libgtk3"
config BR2_PACKAGE_OPENCV3_WITH_QT
bool "qt4"
depends on BR2_PACKAGE_QT
- depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module
select BR2_PACKAGE_QT_STL
select BR2_PACKAGE_QT_GUI_MODULE
select BR2_PACKAGE_QT_TEST
help
Use Qt4 with QtTest and QtGui modules and STL support, as GUI toolkit.
-comment "qt4 support needs qt and a toolchain not affected by Binutils bug 19405"
+comment "qt4 support needs qt"
depends on BR2_USE_MMU # qt
- depends on (!BR2_PACKAGE_QT && !BR2_PACKAGE_QT5) || BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405
+ depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
config BR2_PACKAGE_OPENCV3_WITH_QT5
bool "qt5"
diff --git a/package/pinentry/Config.in b/package/pinentry/Config.in
index 682af9f..f5a8159 100644
--- a/package/pinentry/Config.in
+++ b/package/pinentry/Config.in
@@ -40,15 +40,11 @@ config BR2_PACKAGE_PINENTRY_QT4
depends on BR2_USE_MMU # fork
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_TOOLCHAIN_HAS_THREADS
- depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module
select BR2_PACKAGE_QT
select BR2_PACKAGE_QT_GUI_MODULE
help
The pinentry-qt4 tool
-comment "pinentry-qt4 support needs a toolchain not affected by Binutils bug 19405"
- depends on BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405
-
comment "pinentry-qt4 needs a toolchain w/ C++, threads"
depends on BR2_USE_MMU
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/poppler/Config.in b/package/poppler/Config.in
index d741f65..79078a8 100644
--- a/package/poppler/Config.in
+++ b/package/poppler/Config.in
@@ -15,15 +15,11 @@ if BR2_PACKAGE_POPPLER
config BR2_PACKAGE_POPPLER_QT
bool "Qt support"
depends on BR2_PACKAGE_QT
- depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module
select BR2_PACKAGE_QT_GUI_MODULE
select BR2_PACKAGE_QT_XML
help
Build Qt support into the Poppler library
-comment "poppler Qt support needs a toolchain not affected by Binutils bug 19405"
- depends on BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405
-
config BR2_PACKAGE_POPPLER_QT5
bool "Qt5 support"
depends on BR2_PACKAGE_QT5
diff --git a/package/qt/Config.in b/package/qt/Config.in
index 5e9f898..fe0b0e9 100644
--- a/package/qt/Config.in
+++ b/package/qt/Config.in
@@ -33,7 +33,6 @@ comment "Qt standard (X11) not available (need X.org)"
config BR2_PACKAGE_QT_X11
bool "Qt standard (X11)"
depends on BR2_PACKAGE_XORG7
- depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module
select BR2_PACKAGE_FONTCONFIG
select BR2_PACKAGE_XLIB_LIBXI
select BR2_PACKAGE_XLIB_LIBX11
@@ -57,7 +56,6 @@ config BR2_PACKAGE_QT_DEBUG
config BR2_PACKAGE_QT_DEMOS
bool "Compile and install Qt demos (with code)"
- depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module
select BR2_PACKAGE_QT_GUI_MODULE
help
If unsure, say N.
@@ -71,7 +69,6 @@ config BR2_PACKAGE_QT_TRANSLATION_FILES
config BR2_PACKAGE_QT_EXAMPLES
bool "Compile and install Qt examples (with code)"
- depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module
select BR2_PACKAGE_QT_GUI_MODULE
help
If unsure, say N.
@@ -124,15 +121,11 @@ config BR2_PACKAGE_QT_QT3SUPPORT
config BR2_PACKAGE_QT_GUI_MODULE
bool "Gui Module"
default y
- depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # nios2 Binutils 2.25.1 bug
select BR2_PACKAGE_QT_NETWORK
help
Turns on support for Gui applications. If your board doesn't have
video output, or you don't require Qt GUI, say n.
-comment "Qt Gui Module needs a toolchain not affected by Binutils bug 19405"
- depends on BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405
-
if BR2_PACKAGE_QT_GUI_MODULE
if BR2_PACKAGE_QT_EMBEDDED
diff --git a/package/qwt/Config.in b/package/qwt/Config.in
index a678637..041c2d1 100644
--- a/package/qwt/Config.in
+++ b/package/qwt/Config.in
@@ -1,10 +1,6 @@
-comment "qwt needs a toolchain not affected by Binutils bug 19405"
- depends on BR2_PACKAGE_QT && BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405
-
config BR2_PACKAGE_QWT
bool "qwt"
- depends on (BR2_PACKAGE_QT && !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405) || \
- BR2_PACKAGE_QT5
+ depends on BR2_PACKAGE_QT || BR2_PACKAGE_QT5
select BR2_PACKAGE_QT_GUI_MODULE if BR2_PACKAGE_QT
select BR2_PACKAGE_QT5BASE_GUI if BR2_PACKAGE_QT5
select BR2_PACKAGE_QT5BASE_WIDGETS if BR2_PACKAGE_QT5 # printsupport
diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index 37079fa..76c0e7c 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -18,10 +18,6 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
default y if BR2_ARM_CPU_ARMV5
default y if BR2_sparc_v8
-# https://sourceware.org/bugzilla/show_bug.cgi?id=19405
-config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405
- bool
-
config BR2_TOOLCHAIN_HAS_NATIVE_RPC
bool
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in
index 6bb376b..341bc2a 100644
--- a/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in
@@ -10,7 +10,6 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
select BR2_HOSTARCH_NEEDS_IA32_LIBS
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
select BR2_TOOLCHAIN_GCC_AT_LEAST_6
- select BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # based-on binutils-2.26
help
Sourcery CodeBench toolchain for the Nios-II architecture,
from Mentor Graphics. It uses gcc 6.3, binutils 2.26,
^ permalink raw reply related
* [Buildroot] [PATCH v3 0/5] Runtime testing infrastructure
From: Thomas Petazzoni @ 2017-05-07 20:09 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1490042214-6762-1-git-send-email-thomas.petazzoni@free-electrons.com>
Hello,
On Mon, 20 Mar 2017 21:36:49 +0100, Thomas Petazzoni wrote:
> Thomas Petazzoni (5):
> support/testing: core testing infrastructure
> support/testing: add core tests
> support/testing: add fs tests
> support/testing: add package tests
> support/testing: add toolchain tests
Since this has been around for a long time, I've finally applied this
series.
I know Luca, Ricardo and Thomas DS had some comments, but I believe it
would be easier to address them as follow-up patches. So Luca, Ricardo,
Thomas, your patches to improve this testing infrastructure are more
than welcome. I'm sure it needs to be extended and improved in many
different ways to test more Buildroot functionalities.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [git commit] support/testing: add fs tests
From: Thomas Petazzoni @ 2017-05-07 20:04 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=bf4a6490e4ee70f0a46e588602995ba34e6c872a
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
This commit adds a number of test cases for various filesystem formats:
ext2/3/4, iso9660, jffs2, squashfs, ubi/ubifs and yaffs2. All of them
except yaffs2 are runtime tested. The iso9660 set of test cases is
particularly rich, testing the proper operation of the iso9660 support
with all of grub, grub2 and isolinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
| 20 +++
support/testing/conf/grub2.cfg | 7 +
support/testing/conf/isolinux.cfg | 5 +
.../testing/conf/minimal-x86-qemu-kernel.config | 23 +++
support/testing/tests/fs/__init__.py | 0
support/testing/tests/fs/test_ext.py | 119 +++++++++++++++
support/testing/tests/fs/test_iso9660.py | 162 +++++++++++++++++++++
support/testing/tests/fs/test_jffs2.py | 45 ++++++
support/testing/tests/fs/test_squashfs.py | 37 +++++
support/testing/tests/fs/test_ubi.py | 39 +++++
support/testing/tests/fs/test_yaffs2.py | 12 ++
11 files changed, 469 insertions(+)
--git a/support/testing/conf/grub-menu.lst b/support/testing/conf/grub-menu.lst
new file mode 100644
index 0000000..6143d80
--- /dev/null
+++ b/support/testing/conf/grub-menu.lst
@@ -0,0 +1,20 @@
+default 0
+timeout 1
+
+# Used when no splashimage is used
+color cyan/blue white/blue
+
+# Gets enabled/disabled depending on Grub support for splashimage
+splashimage /boot/grub/splash.xpm.gz
+
+# Used when a splashimage is enabled
+foreground 000000
+background cccccc
+
+title Buildroot ISO9660 image
+kernel __KERNEL_PATH__ root=/dev/sr0 console=ttyS0,115200
+initrd __INITRD_PATH__
+
+title Hard Drive (first partition)
+rootnoverify (hd0)
+chainloader +1
diff --git a/support/testing/conf/grub2.cfg b/support/testing/conf/grub2.cfg
new file mode 100644
index 0000000..a982d0b
--- /dev/null
+++ b/support/testing/conf/grub2.cfg
@@ -0,0 +1,7 @@
+set default="0"
+set timeout="1"
+
+menuentry "Buildroot" {
+ linux __KERNEL_PATH__ root=/dev/sr0 console=ttyS0,115200
+ initrd __INITRD_PATH__
+}
diff --git a/support/testing/conf/isolinux.cfg b/support/testing/conf/isolinux.cfg
new file mode 100644
index 0000000..ba031a6
--- /dev/null
+++ b/support/testing/conf/isolinux.cfg
@@ -0,0 +1,5 @@
+default 1
+label 1
+ kernel __KERNEL_PATH__
+ initrd __INITRD_PATH__
+ append root=/dev/sr0 console=ttyS0,115200
diff --git a/support/testing/conf/minimal-x86-qemu-kernel.config b/support/testing/conf/minimal-x86-qemu-kernel.config
new file mode 100644
index 0000000..8f6ceef
--- /dev/null
+++ b/support/testing/conf/minimal-x86-qemu-kernel.config
@@ -0,0 +1,23 @@
+# CONFIG_64BIT is not set
+CONFIG_SYSVIPC=y
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_SUSPEND is not set
+# CONFIG_ACPI is not set
+CONFIG_CPU_IDLE=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_ATA=y
+CONFIG_ATA_PIIX=y
+CONFIG_INPUT_EVDEV=y
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_THERMAL=y
+CONFIG_EXT4_FS=y
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+# CONFIG_VIRTUALIZATION is not set
diff --git a/support/testing/tests/fs/__init__.py b/support/testing/tests/fs/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/support/testing/tests/fs/test_ext.py b/support/testing/tests/fs/test_ext.py
new file mode 100644
index 0000000..f7e2e85
--- /dev/null
+++ b/support/testing/tests/fs/test_ext.py
@@ -0,0 +1,119 @@
+import os
+import subprocess
+
+import infra.basetest
+
+VOLNAME_PROP = "Filesystem volume name"
+REVISION_PROP = "Filesystem revision #"
+FEATURES_PROP = "Filesystem features"
+BLOCKCNT_PROP = "Block count"
+INODECNT_PROP = "Inode count"
+RESBLKCNT_PROP = "Reserved block count"
+
+CHECK_FS_TYPE_CMD = "mount | grep '/dev/root on / type {}'"
+
+def dumpe2fs_run(builddir, image):
+ cmd = ["host/usr/sbin/dumpe2fs", os.path.join("images", image)]
+ ret = subprocess.check_output(cmd,
+ stderr=open(os.devnull, "w"),
+ cwd=builddir,
+ env={"LANG": "C"})
+ return ret.strip().splitlines()
+
+def dumpe2fs_getprop(out, prop):
+ for lines in out:
+ lines = lines.split(": ")
+ if lines[0] == prop:
+ return lines[1].strip()
+
+def boot_img_and_check_fs_type(emulator, builddir, fs_type):
+ img = os.path.join(builddir, "images", "rootfs.{}".format(fs_type))
+ emulator.boot(arch="armv7",
+ kernel="builtin",
+ kernel_cmdline=["root=/dev/mmcblk0",
+ "rootfstype={}".format(fs_type)],
+ options=["-drive", "file={},if=sd".format(img)])
+ emulator.login()
+ _, exit_code = emulator.run(CHECK_FS_TYPE_CMD.format(fs_type))
+ return exit_code
+
+class TestExt2(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+"""
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_2r0=y
+BR2_TARGET_ROOTFS_EXT2_LABEL="foobaz"
+# BR2_TARGET_ROOTFS_TAR is not set
+"""
+
+ def test_run(self):
+ out = dumpe2fs_run(self.builddir, "rootfs.ext2")
+ self.assertEqual(dumpe2fs_getprop(out, VOLNAME_PROP), "foobaz")
+ self.assertEqual(dumpe2fs_getprop(out, REVISION_PROP), "0 (original)")
+
+ exit_code = boot_img_and_check_fs_type(self.emulator,
+ self.builddir, "ext2")
+ self.assertEqual(exit_code, 0)
+
+class TestExt2r1(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+"""
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_2r1=y
+BR2_TARGET_ROOTFS_EXT2_LABEL="foobar"
+# BR2_TARGET_ROOTFS_TAR is not set
+"""
+
+ def test_run(self):
+ out = dumpe2fs_run(self.builddir, "rootfs.ext2")
+ self.assertEqual(dumpe2fs_getprop(out, VOLNAME_PROP), "foobar")
+ self.assertEqual(dumpe2fs_getprop(out, REVISION_PROP), "1 (dynamic)")
+ self.assertNotIn("has_journal", dumpe2fs_getprop(out, FEATURES_PROP))
+
+ exit_code = boot_img_and_check_fs_type(self.emulator,
+ self.builddir, "ext2")
+ self.assertEqual(exit_code, 0)
+
+class TestExt3(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+"""
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_3=y
+# BR2_TARGET_ROOTFS_TAR is not set
+"""
+
+ def test_run(self):
+ out = dumpe2fs_run(self.builddir, "rootfs.ext3")
+ self.assertEqual(dumpe2fs_getprop(out, REVISION_PROP), "1 (dynamic)")
+ self.assertIn("has_journal", dumpe2fs_getprop(out, FEATURES_PROP))
+
+ exit_code = boot_img_and_check_fs_type(self.emulator,
+ self.builddir, "ext3")
+ self.assertEqual(exit_code, 0)
+
+class TestExt4(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+"""
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_BLOCKS=16384
+BR2_TARGET_ROOTFS_EXT2_INODES=3000
+BR2_TARGET_ROOTFS_EXT2_RESBLKS=10
+# BR2_TARGET_ROOTFS_TAR is not set
+"""
+
+ def test_run(self):
+ out = dumpe2fs_run(self.builddir, "rootfs.ext4")
+ self.assertEqual(dumpe2fs_getprop(out, REVISION_PROP), "1 (dynamic)")
+ self.assertEqual(dumpe2fs_getprop(out, BLOCKCNT_PROP), "16384")
+ # Yes there are 8 more inodes than requested
+ self.assertEqual(dumpe2fs_getprop(out, INODECNT_PROP), "3008")
+ self.assertEqual(dumpe2fs_getprop(out, RESBLKCNT_PROP), "1638")
+ self.assertIn("has_journal", dumpe2fs_getprop(out, FEATURES_PROP))
+ self.assertIn("extent", dumpe2fs_getprop(out, FEATURES_PROP))
+
+ exit_code = boot_img_and_check_fs_type(self.emulator,
+ self.builddir, "ext4")
+ self.assertEqual(exit_code, 0)
+
+
diff --git a/support/testing/tests/fs/test_iso9660.py b/support/testing/tests/fs/test_iso9660.py
new file mode 100644
index 0000000..eec6e89
--- /dev/null
+++ b/support/testing/tests/fs/test_iso9660.py
@@ -0,0 +1,162 @@
+import os
+
+import infra.basetest
+
+BASIC_CONFIG = \
+"""
+BR2_x86_pentium4=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
+BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
+BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-i386-pentium4-full-2015.05-496-g85945aa.tar.bz2"
+BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
+BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_2=y
+BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
+# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
+BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y
+BR2_TOOLCHAIN_EXTERNAL_CXX=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.0"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="{}"
+# BR2_TARGET_ROOTFS_TAR is not set
+""".format(infra.filepath("conf/minimal-x86-qemu-kernel.config"))
+
+def test_mount_internal_external(emulator, builddir, internal=True):
+ img = os.path.join(builddir, "images", "rootfs.iso9660")
+ emulator.boot(arch="i386", options=["-cdrom", img])
+ emulator.login()
+
+ if internal:
+ cmd = "mount | grep 'rootfs on / type rootfs'"
+ else:
+ cmd = "mount | grep '/dev/root on / type iso9660'"
+
+ _, exit_code = emulator.run(cmd)
+ return exit_code
+
+def test_touch_file(emulator):
+ _, exit_code = emulator.run("touch test")
+ return exit_code
+
+#
+# Grub 2
+#
+
+class TestIso9660Grub2External(infra.basetest.BRTest):
+ config = BASIC_CONFIG + \
+"""
+BR2_TARGET_ROOTFS_ISO9660=y
+# BR2_TARGET_ROOTFS_ISO9660_INITRD is not set
+BR2_TARGET_GRUB2=y
+BR2_TARGET_GRUB2_BOOT_PARTITION="cd"
+BR2_TARGET_GRUB2_BUILTIN_MODULES="boot linux ext2 fat part_msdos part_gpt normal biosdisk iso9660"
+BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}"
+""".format(infra.filepath("conf/grub2.cfg"))
+
+ def test_run(self):
+ exit_code = test_mount_internal_external(self.emulator,
+ self.builddir, internal=False)
+ self.assertEqual(exit_code, 0)
+
+ exit_code = test_touch_file(self.emulator)
+ self.assertEqual(exit_code, 1)
+
+class TestIso9660Grub2Internal(infra.basetest.BRTest):
+ config = BASIC_CONFIG + \
+"""
+BR2_TARGET_ROOTFS_ISO9660=y
+BR2_TARGET_ROOTFS_ISO9660_INITRD=y
+BR2_TARGET_GRUB2=y
+BR2_TARGET_GRUB2_BOOT_PARTITION="cd"
+BR2_TARGET_GRUB2_BUILTIN_MODULES="boot linux ext2 fat part_msdos part_gpt normal biosdisk iso9660"
+BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}"
+""".format(infra.filepath("conf/grub2.cfg"))
+
+ def test_run(self):
+ exit_code = test_mount_internal_external(self.emulator,
+ self.builddir, internal=True)
+ self.assertEqual(exit_code, 0)
+
+ exit_code = test_touch_file(self.emulator)
+ self.assertEqual(exit_code, 0)
+
+#
+# Grub
+#
+
+class TestIso9660GrubExternal(infra.basetest.BRTest):
+ config = BASIC_CONFIG + \
+"""
+BR2_TARGET_ROOTFS_ISO9660=y
+# BR2_TARGET_ROOTFS_ISO9660_INITRD is not set
+BR2_TARGET_GRUB=y
+BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}"
+""".format(infra.filepath("conf/grub-menu.lst"))
+
+ def test_run(self):
+ exit_code = test_mount_internal_external(self.emulator,
+ self.builddir, internal=False)
+ self.assertEqual(exit_code, 0)
+
+ exit_code = test_touch_file(self.emulator)
+ self.assertEqual(exit_code, 1)
+
+class TestIso9660GrubInternal(infra.basetest.BRTest):
+ config = BASIC_CONFIG + \
+"""
+BR2_TARGET_ROOTFS_ISO9660=y
+BR2_TARGET_GRUB=y
+BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}"
+""".format(infra.filepath("conf/grub-menu.lst"))
+
+ def test_run(self):
+ exit_code = test_mount_internal_external(self.emulator,
+ self.builddir, internal=True)
+ self.assertEqual(exit_code, 0)
+
+ exit_code = test_touch_file(self.emulator)
+ self.assertEqual(exit_code, 0)
+
+#
+# Syslinux
+#
+
+class TestIso9660SyslinuxExternal(infra.basetest.BRTest):
+ config = BASIC_CONFIG + \
+"""
+BR2_TARGET_ROOTFS_ISO9660=y
+# BR2_TARGET_ROOTFS_ISO9660_INITRD is not set
+BR2_TARGET_ROOTFS_ISO9660_HYBRID=y
+BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}"
+BR2_TARGET_SYSLINUX=y
+""".format(infra.filepath("conf/isolinux.cfg"))
+
+ def test_run(self):
+ exit_code = test_mount_internal_external(self.emulator,
+ self.builddir, internal=False)
+ self.assertEqual(exit_code, 0)
+
+ exit_code = test_touch_file(self.emulator)
+ self.assertEqual(exit_code, 1)
+
+class TestIso9660SyslinuxInternal(infra.basetest.BRTest):
+ config = BASIC_CONFIG + \
+"""
+BR2_TARGET_ROOTFS_ISO9660=y
+BR2_TARGET_ROOTFS_ISO9660_INITRD=y
+BR2_TARGET_ROOTFS_ISO9660_HYBRID=y
+BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}"
+BR2_TARGET_SYSLINUX=y
+""".format(infra.filepath("conf/isolinux.cfg"))
+
+ def test_run(self):
+ exit_code = test_mount_internal_external(self.emulator,
+ self.builddir, internal=True)
+ self.assertEqual(exit_code, 0)
+
+ exit_code = test_touch_file(self.emulator)
+ self.assertEqual(exit_code, 0)
diff --git a/support/testing/tests/fs/test_jffs2.py b/support/testing/tests/fs/test_jffs2.py
new file mode 100644
index 0000000..0d45af2
--- /dev/null
+++ b/support/testing/tests/fs/test_jffs2.py
@@ -0,0 +1,45 @@
+import os
+import subprocess
+
+import infra.basetest
+
+def jffs2dump_find_file(files_list, fname):
+ for file_name in files_list:
+ file_name = file_name.strip()
+ if file_name.startswith("Dirent") and file_name.endswith(fname):
+ return True
+ return False
+
+class TestJffs2(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+"""
+BR2_TARGET_ROOTFS_JFFS2=y
+BR2_TARGET_ROOTFS_JFFS2_CUSTOM=y
+BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE=0x80000
+BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER=y
+BR2_TARGET_ROOTFS_JFFS2_PAD=y
+BR2_TARGET_ROOTFS_JFFS2_PADSIZE=0x4000000
+# BR2_TARGET_ROOTFS_TAR is not set
+"""
+
+ # TODO: there are some scary JFFS2 messages when one starts to
+ # write files in the rootfs: "jffs2: Newly-erased block contained
+ # word 0x0 at offset 0x046c0000". To be investigated.
+
+ def test_run(self):
+ img = os.path.join(self.builddir, "images", "rootfs.jffs2")
+ out = subprocess.check_output(["host/usr/sbin/jffs2dump", "-c", img],
+ cwd=self.builddir,
+ env={"LANG": "C"})
+ out = out.splitlines()
+ self.assertTrue(jffs2dump_find_file(out, "busybox"))
+
+ self.emulator.boot(arch="armv7",
+ kernel="builtin",
+ kernel_cmdline=["root=/dev/mtdblock0",
+ "rootfstype=jffs2"],
+ options=["-drive", "file={},if=pflash".format(img)])
+ self.emulator.login()
+ cmd = "mount | grep '/dev/root on / type jffs2'"
+ _, exit_code = self.emulator.run(cmd)
+ self.assertEqual(exit_code, 0)
diff --git a/support/testing/tests/fs/test_squashfs.py b/support/testing/tests/fs/test_squashfs.py
new file mode 100644
index 0000000..edaa087
--- /dev/null
+++ b/support/testing/tests/fs/test_squashfs.py
@@ -0,0 +1,37 @@
+import os
+import subprocess
+
+import infra.basetest
+
+class TestSquashfs(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+"""
+BR2_TARGET_ROOTFS_SQUASHFS=y
+# BR2_TARGET_ROOTFS_SQUASHFS4_GZIP is not set
+BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y
+# BR2_TARGET_ROOTFS_TAR is not set
+"""
+
+ def test_run(self):
+ unsquashfs_cmd = ["host/usr/bin/unsquashfs", "-s", "images/rootfs.squashfs"]
+ out = subprocess.check_output(unsquashfs_cmd,
+ cwd=self.builddir,
+ env={"LANG": "C"})
+ out = out.splitlines()
+ self.assertEqual(out[0],
+ "Found a valid SQUASHFS 4:0 superblock on images/rootfs.squashfs.")
+ self.assertEqual(out[3], "Compression lz4")
+
+ img = os.path.join(self.builddir, "images", "rootfs.squashfs")
+ subprocess.call(["truncate", "-s", "%1M", img])
+
+ self.emulator.boot(arch="armv7",
+ kernel="builtin",
+ kernel_cmdline=["root=/dev/mmcblk0",
+ "rootfstype=squashfs"],
+ options=["-drive", "file={},if=sd,format=raw".format(img)])
+ self.emulator.login()
+
+ cmd = "mount | grep '/dev/root on / type squashfs'"
+ _, exit_code = self.emulator.run(cmd)
+ self.assertEqual(exit_code, 0)
diff --git a/support/testing/tests/fs/test_ubi.py b/support/testing/tests/fs/test_ubi.py
new file mode 100644
index 0000000..ede4999
--- /dev/null
+++ b/support/testing/tests/fs/test_ubi.py
@@ -0,0 +1,39 @@
+import subprocess
+import os
+
+import infra.basetest
+
+class TestUbi(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+"""
+BR2_TARGET_ROOTFS_UBIFS=y
+BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x7ff80
+BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x1
+BR2_TARGET_ROOTFS_UBI=y
+BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x80000
+BR2_TARGET_ROOTFS_UBI_SUBSIZE=1
+"""
+
+ # TODO: if you boot Qemu twice on the same UBI image, it fails to
+ # attach the image the second time, with "ubi0 error:
+ # ubi_read_volume_table: the layout volume was not found".
+ # To be investigated.
+ def test_run(self):
+ img = os.path.join(self.builddir, "images", "rootfs.ubi")
+ out = subprocess.check_output(["file", img],
+ cwd=self.builddir,
+ env={"LANG": "C"})
+ out = out.splitlines()
+
+ subprocess.call(["truncate", "-s 128M", img])
+
+ self.emulator.boot(arch="armv7",
+ kernel="builtin",
+ kernel_cmdline=["root=ubi0:rootfs",
+ "ubi.mtd=0",
+ "rootfstype=ubifs"],
+ options=["-drive", "file={},if=pflash".format(img)])
+ self.emulator.login()
+ cmd = "mount | grep 'ubi0:rootfs on / type ubifs'"
+ _, exit_code = self.emulator.run(cmd)
+ self.assertEqual(exit_code, 0)
diff --git a/support/testing/tests/fs/test_yaffs2.py b/support/testing/tests/fs/test_yaffs2.py
new file mode 100644
index 0000000..0ffb758
--- /dev/null
+++ b/support/testing/tests/fs/test_yaffs2.py
@@ -0,0 +1,12 @@
+import os
+
+import infra.basetest
+
+class TestYaffs2(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+ infra.basetest.MINIMAL_CONFIG + \
+ "BR2_TARGET_ROOTFS_YAFFS2=y"
+
+ def test_run(self):
+ img = os.path.join(self.builddir, "images", "rootfs.yaffs2")
+ self.assertTrue(os.path.exists(img))
^ permalink raw reply related
* [Buildroot] [git commit] support/testing: add toolchain tests
From: Thomas Petazzoni @ 2017-05-07 20:04 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=fb71372d5f59de5ae3eaece431fcfb007b264008
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
This commit adds an initial toolchain test case, testing the ARM
CodeSourcery toolchain, just checking that the proper sysroot is used,
and that a minimal Linux system boots fine under Qemu.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
support/testing/tests/toolchain/__init__.py | 0
support/testing/tests/toolchain/test_external.py | 156 +++++++++++++++++++++++
2 files changed, 156 insertions(+)
diff --git a/support/testing/tests/toolchain/__init__.py b/support/testing/tests/toolchain/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/support/testing/tests/toolchain/test_external.py b/support/testing/tests/toolchain/test_external.py
new file mode 100644
index 0000000..1fbf81f
--- /dev/null
+++ b/support/testing/tests/toolchain/test_external.py
@@ -0,0 +1,156 @@
+import os
+import infra
+
+BASIC_CONFIG = \
+"""
+BR2_TARGET_ROOTFS_CPIO=y
+# BR2_TARGET_ROOTFS_TAR is not set
+"""
+
+def check_broken_links(path):
+ for root, dirs, files in os.walk(path):
+ for f in files:
+ fpath = os.path.join(root, f)
+ if not os.path.exists(fpath):
+ return True
+ return False
+
+class TestExternalToolchain(infra.basetest.BRTest):
+ def common_check(self):
+ # Check for broken symlinks
+ for d in ["lib", "usr/lib"]:
+ path = os.path.join(self.builddir, "staging", d)
+ self.assertFalse(check_broken_links(path))
+ path = os.path.join(self.builddir, "target", d)
+ self.assertFalse(check_broken_links(path))
+
+ interp = infra.get_elf_prog_interpreter(self.builddir,
+ self.toolchain_prefix,
+ "bin/busybox")
+ interp_path = os.path.join(self.builddir, "target", interp[1:])
+ self.assertTrue(os.path.exists(interp_path))
+
+class TestExternalToolchainSourceryArmv4(TestExternalToolchain):
+ config = BASIC_CONFIG + \
+"""
+BR2_arm=y
+BR2_arm920t=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM=y
+"""
+ toolchain_prefix = "arm-none-linux-gnueabi"
+
+ def test_run(self):
+ TestExternalToolchain.common_check(self)
+
+ # Check the architecture variant
+ arch = infra.get_file_arch(self.builddir,
+ self.toolchain_prefix,
+ "lib/libc.so.6")
+ self.assertEqual(arch, "v4T")
+
+ # Check the sysroot symlink
+ symlink = os.path.join(self.builddir, "staging", "armv4t")
+ self.assertTrue(os.path.exists(symlink))
+ self.assertEqual(os.readlink(symlink), "./")
+
+ # Boot the system
+ img = os.path.join(self.builddir, "images", "rootfs.cpio")
+ self.emulator.boot(arch="armv5",
+ kernel="builtin",
+ options=["-initrd", img])
+ self.emulator.login()
+
+class TestExternalToolchainSourceryArmv5(TestExternalToolchain):
+ config = BASIC_CONFIG + \
+"""
+BR2_arm=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM=y
+"""
+ toolchain_prefix = "arm-none-linux-gnueabi"
+
+ def test_run(self):
+ TestExternalToolchain.common_check(self)
+
+ # Check the architecture variant
+ arch = infra.get_file_arch(self.builddir,
+ self.toolchain_prefix,
+ "lib/libc.so.6")
+ self.assertEqual(arch, "v5TE")
+
+ # Boot the system
+ img = os.path.join(self.builddir, "images", "rootfs.cpio")
+ self.emulator.boot(arch="armv5",
+ kernel="builtin",
+ options=["-initrd", img])
+ self.emulator.login()
+
+class TestExternalToolchainSourceryArmv7(TestExternalToolchain):
+ config = BASIC_CONFIG + \
+"""
+BR2_arm=y
+BR2_cortex_a8=y
+BR2_ARM_EABI=y
+BR2_ARM_INSTRUCTIONS_THUMB2=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM=y
+"""
+ toolchain_prefix = "arm-none-linux-gnueabi"
+
+ def test_run(self):
+ TestExternalToolchain.common_check(self)
+
+ # Check the architecture variant
+ arch = infra.get_file_arch(self.builddir,
+ self.toolchain_prefix,
+ "lib/libc.so.6")
+ self.assertEqual(arch, "v7")
+ isa = infra.get_elf_arch_tag(self.builddir,
+ self.toolchain_prefix,
+ "lib/libc.so.6",
+ "Tag_THUMB_ISA_use")
+ self.assertEqual(isa, "Thumb-2")
+
+ # Check we have the sysroot symlink
+ symlink = os.path.join(self.builddir, "staging", "thumb2")
+ self.assertTrue(os.path.exists(symlink))
+ self.assertEqual(os.readlink(symlink), "./")
+
+ # Boot the system
+ img = os.path.join(self.builddir, "images", "rootfs.cpio")
+ self.emulator.boot(arch="armv7",
+ kernel="builtin",
+ options=["-initrd", img])
+ self.emulator.login()
+
+class TestExternalToolchainLinaroArm(TestExternalToolchain):
+ config = BASIC_CONFIG + \
+"""
+BR2_arm=y
+BR2_cortex_a8=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM=y
+"""
+ toolchain_prefix = "arm-linux-gnueabihf"
+
+ def test_run(self):
+ TestExternalToolchain.common_check(self)
+
+ # Check the architecture variant
+ arch = infra.get_file_arch(self.builddir,
+ self.toolchain_prefix,
+ "lib/libc.so.6")
+ self.assertEqual(arch, "v7")
+ isa = infra.get_elf_arch_tag(self.builddir,
+ self.toolchain_prefix,
+ "lib/libc.so.6",
+ "Tag_THUMB_ISA_use")
+ self.assertEqual(isa, "Thumb-2")
+
+ # Boot the system
+ img = os.path.join(self.builddir, "images", "rootfs.cpio")
+ self.emulator.boot(arch="armv7",
+ kernel="builtin",
+ options=["-initrd", img])
+ self.emulator.login()
^ permalink raw reply related
* [Buildroot] [git commit] support/testing: core testing infrastructure
From: Thomas Petazzoni @ 2017-05-07 20:04 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=a732fb222b8a60076a93d490834d459b0a1c1d6b
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
This commit adds the core of a new testing infrastructure that allows to
perform runtime testing of Buildroot generated systems. This
infrastructure uses the Python unittest logic as its foundation.
This core infrastructure commit includes the following aspects:
- A base test class, called BRTest, defined in
support/testing/infra/basetest.py. This base test class inherited
from the Python provided unittest.TestCase, and must be subclassed by
all Buildroot test cases.
Its main purpose is to provide the Python unittest setUp() and
tearDown() methods. In our case, setUp() takes care of building the
Buildroot system described in the test case, and instantiate the
Emulator object in case runtime testing is needed. The tearDown()
method simply cleans things up (stop the emulator, remove the output
directory).
- A Builder class, defined in support/testing/infra/builder.py, simply
responsible for building the Buildroot system in each test case.
- An Emulator class, defined in support/testing/infra/emulator.py,
responsible for running the generated system under Qemu, allowing
each test case to run arbitrary commands inside the emulated system.
- A run-tests script, which is the entry point to start the tests.
Even though I wrote the original version of this small infrastructure, a
huge amount of rework and improvement has been done by Maxime
Hadjinlian, and squashed into this patch. So many thanks to Maxime for
cleaning up and improving my Python code!
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
support/testing/conf/unittest.cfg | 6 ++
support/testing/infra/__init__.py | 89 +++++++++++++++++++++++++
support/testing/infra/basetest.py | 66 +++++++++++++++++++
support/testing/infra/builder.py | 49 ++++++++++++++
support/testing/infra/emulator.py | 135 ++++++++++++++++++++++++++++++++++++++
support/testing/run-tests | 83 +++++++++++++++++++++++
support/testing/tests/__init__.py | 0
7 files changed, 428 insertions(+)
diff --git a/support/testing/conf/unittest.cfg b/support/testing/conf/unittest.cfg
new file mode 100644
index 0000000..6eaa234
--- /dev/null
+++ b/support/testing/conf/unittest.cfg
@@ -0,0 +1,6 @@
+[unittest]
+plugins = nose2.plugins.mp
+
+[multiprocess]
+processes = 1
+always-on = True
diff --git a/support/testing/infra/__init__.py b/support/testing/infra/__init__.py
new file mode 100644
index 0000000..c3f645c
--- /dev/null
+++ b/support/testing/infra/__init__.py
@@ -0,0 +1,89 @@
+import contextlib
+import os
+import re
+import sys
+import tempfile
+import subprocess
+from urllib2 import urlopen, HTTPError, URLError
+
+ARTIFACTS_URL = "http://autobuild.buildroot.net/artefacts/"
+
+ at contextlib.contextmanager
+def smart_open(filename=None):
+ """
+ Return a file-like object that can be written to using the 'with'
+ keyword, as in the example:
+ with infra.smart_open("test.log") as outfile:
+ outfile.write("Hello, world!\n")
+ """
+ if filename and filename != '-':
+ fhandle = open(filename, 'a+')
+ else:
+ fhandle = sys.stdout
+
+ try:
+ yield fhandle
+ finally:
+ if fhandle is not sys.stdout:
+ fhandle.close()
+
+def filepath(relpath):
+ return os.path.join(os.getcwd(), "support/testing", relpath)
+
+def download(dldir, filename):
+ finalpath = os.path.join(dldir, filename)
+ if os.path.exists(finalpath):
+ return finalpath
+
+ if not os.path.exists(dldir):
+ os.makedirs(dldir)
+
+ tmpfile = tempfile.mktemp(dir=dldir)
+ print "Downloading to {}".format(tmpfile)
+
+ try:
+ url_fh = urlopen(os.path.join(ARTIFACTS_URL, filename))
+ with open(tmpfile, "w+") as tmpfile_fh:
+ tmpfile_fh.write(url_fh.read())
+ except (HTTPError, URLError), err:
+ os.unlink(tmpfile)
+ raise err
+
+ print "Renaming from %s to %s" % (tmpfile, finalpath)
+ os.rename(tmpfile, finalpath)
+ return finalpath
+
+def get_elf_arch_tag(builddir, prefix, fpath, tag):
+ """
+ Runs the cross readelf on 'fpath', then extracts the value of tag 'tag'.
+ Example:
+ >>> get_elf_arch_tag('output', 'arm-none-linux-gnueabi-',
+ 'bin/busybox', 'Tag_CPU_arch')
+ v5TEJ
+ >>>
+ """
+ cmd = ["host/usr/bin/{}-readelf".format(prefix),
+ "-A", os.path.join("target", fpath)]
+ out = subprocess.check_output(cmd, cwd=builddir, env={"LANG": "C"})
+ regexp = re.compile("^ {}: (.*)$".format(tag))
+ for line in out.splitlines():
+ m = regexp.match(line)
+ if not m:
+ continue
+ return m.group(1)
+ return None
+
+def get_file_arch(builddir, prefix, fpath):
+ return get_elf_arch_tag(builddir, prefix, fpath, "Tag_CPU_arch")
+
+def get_elf_prog_interpreter(builddir, prefix, fpath):
+ cmd = ["host/usr/bin/{}-readelf".format(prefix),
+ "-l", os.path.join("target", fpath)]
+ out = subprocess.check_output(cmd, cwd=builddir, env={"LANG": "C"})
+ regexp = re.compile("^ *\[Requesting program interpreter: (.*)\]$")
+ for line in out.splitlines():
+ m = regexp.match(line)
+ if not m:
+ continue
+ return m.group(1)
+ return None
diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py
new file mode 100644
index 0000000..eb9da90
--- /dev/null
+++ b/support/testing/infra/basetest.py
@@ -0,0 +1,66 @@
+import unittest
+import os
+import datetime
+
+from infra.builder import Builder
+from infra.emulator import Emulator
+
+BASIC_TOOLCHAIN_CONFIG = \
+"""
+BR2_arm=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
+BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
+BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2015.05-1190-g4a48479.tar.bz2"
+BR2_TOOLCHAIN_EXTERNAL_GCC_4_7=y
+BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
+BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
+# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
+BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y
+BR2_TOOLCHAIN_EXTERNAL_CXX=y
+"""
+
+MINIMAL_CONFIG = \
+"""
+BR2_INIT_NONE=y
+BR2_SYSTEM_BIN_SH_NONE=y
+# BR2_PACKAGE_BUSYBOX is not set
+# BR2_TARGET_ROOTFS_TAR is not set
+"""
+
+class BRTest(unittest.TestCase):
+ config = None
+ downloaddir = None
+ outputdir = None
+ logtofile = True
+ keepbuilds = False
+
+ def show_msg(self, msg):
+ print "[%s/%s/%s] %s" % (os.path.basename(self.__class__.outputdir),
+ self.testname,
+ datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
+ msg)
+ def setUp(self):
+ self.testname = self.__class__.__name__
+ self.builddir = os.path.join(self.__class__.outputdir, self.testname)
+ self.runlog = self.builddir + "-run.log"
+ self.emulator = None
+ self.show_msg("Starting")
+ self.b = Builder(self.__class__.config, self.builddir, self.logtofile)
+
+ if not self.keepbuilds:
+ self.b.delete()
+
+ if not self.b.is_finished():
+ self.show_msg("Building")
+ self.b.build()
+ self.show_msg("Building done")
+
+ self.emulator = Emulator(self.builddir, self.downloaddir, self.logtofile)
+
+ def tearDown(self):
+ self.show_msg("Cleaning up")
+ if self.emulator:
+ self.emulator.stop()
+ if self.b and not self.keepbuilds:
+ self.b.delete()
diff --git a/support/testing/infra/builder.py b/support/testing/infra/builder.py
new file mode 100644
index 0000000..105da01
--- /dev/null
+++ b/support/testing/infra/builder.py
@@ -0,0 +1,49 @@
+import os
+import shutil
+import subprocess
+
+import infra
+
+class Builder(object):
+ def __init__(self, config, builddir, logtofile):
+ self.config = config
+ self.builddir = builddir
+ self.logtofile = logtofile
+
+ def build(self):
+ if not os.path.isdir(self.builddir):
+ os.makedirs(self.builddir)
+
+ log = "{}-build.log".format(self.builddir)
+ if not self.logtofile:
+ log = None
+
+ config_file = os.path.join(self.builddir, ".config")
+ with open(config_file, "w+") as cf:
+ cf.write(self.config)
+
+ cmd = ["make",
+ "O={}".format(self.builddir),
+ "olddefconfig"]
+ with infra.smart_open(log) as log_fh:
+ ret = subprocess.call(cmd, stdout=log_fh, stderr=log_fh)
+ if ret != 0:
+ raise SystemError("Cannot olddefconfig")
+
+ cmd = ["make", "-C", self.builddir]
+ with infra.smart_open(log) as log_fh:
+ ret = subprocess.call(cmd, stdout=log_fh, stderr=log_fh)
+ if ret != 0:
+ raise SystemError("Build failed")
+
+ open(self.stamp_path(), 'a').close()
+
+ def stamp_path(self):
+ return os.path.join(self.builddir, "build-done")
+
+ def is_finished(self):
+ return os.path.exists(self.stamp_path())
+
+ def delete(self):
+ if os.path.exists(self.builddir):
+ shutil.rmtree(self.builddir)
diff --git a/support/testing/infra/emulator.py b/support/testing/infra/emulator.py
new file mode 100644
index 0000000..7c476cb
--- /dev/null
+++ b/support/testing/infra/emulator.py
@@ -0,0 +1,135 @@
+import socket
+import subprocess
+import telnetlib
+
+import infra
+import infra.basetest
+
+# TODO: Most of the telnet stuff need to be replaced by stdio/pexpect to discuss
+# with the qemu machine.
+class Emulator(object):
+
+ def __init__(self, builddir, downloaddir, logtofile):
+ self.qemu = None
+ self.__tn = None
+ self.downloaddir = downloaddir
+ self.log = ""
+ self.log_file = "{}-run.log".format(builddir)
+ if logtofile is None:
+ self.log_file = None
+
+ # Start Qemu to boot the system
+ #
+ # arch: Qemu architecture to use
+ #
+ # kernel: path to the kernel image, or the special string
+ # 'builtin'. 'builtin' means a pre-built kernel image will be
+ # downloaded from ARTEFACTS_URL and suitable options are
+ # automatically passed to qemu and added to the kernel cmdline. So
+ # far only armv5, armv7 and i386 builtin kernels are available.
+ # If None, then no kernel is used, and we assume a bootable device
+ # will be specified.
+ #
+ # kernel_cmdline: array of kernel arguments to pass to Qemu -append option
+ #
+ # options: array of command line options to pass to Qemu
+ #
+ def boot(self, arch, kernel=None, kernel_cmdline=None, options=None):
+ if arch in ["armv7", "armv5"]:
+ qemu_arch = "arm"
+ else:
+ qemu_arch = arch
+
+ qemu_cmd = ["qemu-system-{}".format(qemu_arch),
+ "-serial", "telnet::1234,server",
+ "-display", "none"]
+
+ if options:
+ qemu_cmd += options
+
+ if kernel_cmdline is None:
+ kernel_cmdline = []
+
+ if kernel:
+ if kernel == "builtin":
+ if arch in ["armv7", "armv5"]:
+ kernel_cmdline.append("console=ttyAMA0")
+
+ if arch == "armv7":
+ kernel = infra.download(self.downloaddir,
+ "kernel-vexpress")
+ dtb = infra.download(self.downloaddir,
+ "vexpress-v2p-ca9.dtb")
+ qemu_cmd += ["-dtb", dtb]
+ qemu_cmd += ["-M", "vexpress-a9"]
+ elif arch == "armv5":
+ kernel = infra.download(self.downloaddir,
+ "kernel-versatile")
+ qemu_cmd += ["-M", "versatilepb"]
+
+ qemu_cmd += ["-kernel", kernel]
+
+ if kernel_cmdline:
+ qemu_cmd += ["-append", " ".join(kernel_cmdline)]
+
+ with infra.smart_open(self.log_file) as lfh:
+ lfh.write("> starting qemu with '%s'\n" % " ".join(qemu_cmd))
+ self.qemu = subprocess.Popen(qemu_cmd, stdout=lfh, stderr=lfh)
+
+ # Wait for the telnet port to appear and connect to it.
+ while True:
+ try:
+ self.__tn = telnetlib.Telnet("localhost", 1234)
+ if self.__tn:
+ break
+ except socket.error:
+ continue
+
+ def __read_until(self, waitstr, timeout=5):
+ data = self.__tn.read_until(waitstr, timeout)
+ self.log += data
+ with infra.smart_open(self.log_file) as lfh:
+ lfh.write(data)
+ return data
+
+ def __write(self, wstr):
+ self.__tn.write(wstr)
+
+ # Wait for the login prompt to appear, and then login as root with
+ # the provided password, or no password if not specified.
+ def login(self, password=None):
+ self.__read_until("buildroot login:", 10)
+ if "buildroot login:" not in self.log:
+ with infra.smart_open(self.log_file) as lfh:
+ lfh.write("==> System does not boot")
+ raise SystemError("System does not boot")
+
+ self.__write("root\n")
+ if password:
+ self.__read_until("Password:")
+ self.__write(password + "\n")
+ self.__read_until("# ")
+ if "# " not in self.log:
+ raise SystemError("Cannot login")
+ self.run("dmesg -n 1")
+
+ # Run the given 'cmd' on the target
+ # return a tuple (output, exit_code)
+ def run(self, cmd):
+ self.__write(cmd + "\n")
+ output = self.__read_until("# ")
+ output = output.strip().splitlines()
+ output = output[1:len(output)-1]
+
+ self.__write("echo $?\n")
+ exit_code = self.__read_until("# ")
+ exit_code = exit_code.strip().splitlines()[1]
+ exit_code = int(exit_code)
+
+ return output, exit_code
+
+ def stop(self):
+ if self.qemu is None:
+ return
+ self.qemu.terminate()
+ self.qemu.kill()
diff --git a/support/testing/run-tests b/support/testing/run-tests
new file mode 100755
index 0000000..339bb66
--- /dev/null
+++ b/support/testing/run-tests
@@ -0,0 +1,83 @@
+#!/usr/bin/env python2
+import argparse
+import sys
+import os
+import nose2
+
+from infra.basetest import BRTest
+
+def main():
+ parser = argparse.ArgumentParser(description='Run Buildroot tests')
+ parser.add_argument('testname', nargs='*',
+ help='list of test cases to execute')
+ parser.add_argument('--list', '-l', action='store_true',
+ help='list of available test cases')
+ parser.add_argument('--all', '-a', action='store_true',
+ help='execute all test cases')
+ parser.add_argument('--stdout', '-s', action='store_true',
+ help='log everything to stdout')
+ parser.add_argument('--output', '-o',
+ help='output directory')
+ parser.add_argument('--download', '-d',
+ help='download directory')
+ parser.add_argument('--keep', '-k',
+ help='keep build directories',
+ action='store_true')
+
+ args = parser.parse_args()
+
+ script_path = os.path.realpath(__file__)
+ test_dir = os.path.dirname(script_path)
+
+ if args.stdout:
+ BRTest.logtofile = False
+
+ if args.list:
+ print "List of tests"
+ nose2.discover(argv=[script_path,
+ "-s", test_dir,
+ "-v",
+ "--collect-only"],
+ plugins=["nose2.plugins.collect"])
+ return 0
+
+ if args.download is None:
+ args.download = os.getenv("BR2_DL_DIR")
+ if args.download is None:
+ print "Missing download directory, please use -d/--download"
+ print ""
+ parser.print_help()
+ return 1
+
+ BRTest.downloaddir = os.path.abspath(args.download)
+
+ if args.output is None:
+ print "Missing output directory, please use -o/--output"
+ print ""
+ parser.print_help()
+ return 1
+
+ if not os.path.exists(args.output):
+ os.mkdir(args.output)
+
+ BRTest.outputdir = os.path.abspath(args.output)
+
+ if args.all is False and len(args.testname) == 0:
+ print "No test selected"
+ print ""
+ parser.print_help()
+ return 1
+
+ BRTest.keepbuilds = args.keep
+
+ nose2_args = ["-v",
+ "-s", "support/testing",
+ "-c", "support/testing/conf/unittest.cfg"]
+
+ if len(args.testname) != 0:
+ nose2_args += args.testname
+
+ nose2.discover(argv=nose2_args)
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/support/testing/tests/__init__.py b/support/testing/tests/__init__.py
new file mode 100644
index 0000000..e69de29
^ permalink raw reply related
* [Buildroot] [git commit] support/testing: add core tests
From: Thomas Petazzoni @ 2017-05-07 20:04 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=96e21b617d72fc94445e18b6fb1e653850e0885e
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
This commit adds a few Buildroot "core" tests, testing functionalities
such as:
- post-build and post-image scripts
- root filesystem overlays
- timezone support
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
support/testing/tests/core/__init__.py | 0
support/testing/tests/core/post-build.sh | 12 ++++
support/testing/tests/core/post-image.sh | 12 ++++
.../testing/tests/core/rootfs-overlay1/test-file1 | 1 +
.../tests/core/rootfs-overlay2/etc/test-file2 | 1 +
support/testing/tests/core/test_post_scripts.py | 40 +++++++++++++
support/testing/tests/core/test_rootfs_overlay.py | 27 +++++++++
support/testing/tests/core/test_timezone.py | 66 ++++++++++++++++++++++
8 files changed, 159 insertions(+)
diff --git a/support/testing/tests/core/__init__.py b/support/testing/tests/core/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/support/testing/tests/core/post-build.sh b/support/testing/tests/core/post-build.sh
new file mode 100755
index 0000000..b1fb834
--- /dev/null
+++ b/support/testing/tests/core/post-build.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+(
+printf "arg1,%s\n" "${1}"
+printf "arg2,%s\n" "${2}"
+printf "arg3,%s\n" "${3}"
+printf "TARGET_DIR,%s\n" "${TARGET_DIR}"
+printf "BUILD_DIR,%s\n" "${BUILD_DIR}"
+printf "HOST_DIR,%s\n" "${HOST_DIR}"
+printf "STAGING_DIR,%s\n" "${STAGING_DIR}"
+printf "BINARIES_DIR,%s\n" "${BINARIES_DIR}"
+printf "BR2_CONFIG,%s\n" "${BR2_CONFIG}"
+) > ${BUILD_DIR}/post-build.log
diff --git a/support/testing/tests/core/post-image.sh b/support/testing/tests/core/post-image.sh
new file mode 100755
index 0000000..1c2a0f2
--- /dev/null
+++ b/support/testing/tests/core/post-image.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+(
+printf "arg1,%s\n" "${1}"
+printf "arg2,%s\n" "${2}"
+printf "arg3,%s\n" "${3}"
+printf "TARGET_DIR,%s\n" "${TARGET_DIR}"
+printf "BUILD_DIR,%s\n" "${BUILD_DIR}"
+printf "HOST_DIR,%s\n" "${HOST_DIR}"
+printf "STAGING_DIR,%s\n" "${STAGING_DIR}"
+printf "BINARIES_DIR,%s\n" "${BINARIES_DIR}"
+printf "BR2_CONFIG,%s\n" "${BR2_CONFIG}"
+) > ${BUILD_DIR}/post-image.log
diff --git a/support/testing/tests/core/rootfs-overlay1/test-file1 b/support/testing/tests/core/rootfs-overlay1/test-file1
new file mode 100644
index 0000000..323fae0
--- /dev/null
+++ b/support/testing/tests/core/rootfs-overlay1/test-file1
@@ -0,0 +1 @@
+foobar
diff --git a/support/testing/tests/core/rootfs-overlay2/etc/test-file2 b/support/testing/tests/core/rootfs-overlay2/etc/test-file2
new file mode 100644
index 0000000..34a3ec2
--- /dev/null
+++ b/support/testing/tests/core/rootfs-overlay2/etc/test-file2
@@ -0,0 +1 @@
+barfoo
diff --git a/support/testing/tests/core/test_post_scripts.py b/support/testing/tests/core/test_post_scripts.py
new file mode 100644
index 0000000..d2a0be1
--- /dev/null
+++ b/support/testing/tests/core/test_post_scripts.py
@@ -0,0 +1,40 @@
+import os
+import csv
+
+import infra.basetest
+
+class TestPostScripts(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+"""
+BR2_INIT_NONE=y
+BR2_SYSTEM_BIN_SH_NONE=y
+# BR2_PACKAGE_BUSYBOX is not set
+BR2_ROOTFS_POST_BUILD_SCRIPT="{}"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="{}"
+BR2_ROOTFS_POST_SCRIPT_ARGS="foobar baz"
+""".format(infra.filepath("tests/core/post-build.sh"),
+ infra.filepath("tests/core/post-image.sh"))
+
+ def check_post_log_file(self, path, what):
+ lines = {}
+ with open(path, 'rb') as csvfile:
+ r = csv.reader(csvfile, delimiter=',')
+ for row in r:
+ lines[row[0]] = row[1]
+
+ self.assertEqual(lines["arg1"], os.path.join(self.builddir, what))
+ self.assertEqual(lines["arg2"], "foobar")
+ self.assertEqual(lines["arg3"], "baz")
+ self.assertEqual(lines["TARGET_DIR"], os.path.join(self.builddir, "target"))
+ self.assertEqual(lines["BUILD_DIR"], os.path.join(self.builddir, "build"))
+ self.assertEqual(lines["HOST_DIR"], os.path.join(self.builddir, "host"))
+ staging = os.readlink(os.path.join(self.builddir, "staging"))
+ self.assertEqual(lines["STAGING_DIR"], staging)
+ self.assertEqual(lines["BINARIES_DIR"], os.path.join(self.builddir, "images"))
+ self.assertEqual(lines["BR2_CONFIG"], os.path.join(self.builddir, ".config"))
+
+ def test_run(self):
+ f = os.path.join(self.builddir, "build", "post-build.log")
+ self.check_post_log_file(f, "target")
+ f = os.path.join(self.builddir, "build", "post-image.log")
+ self.check_post_log_file(f, "images")
diff --git a/support/testing/tests/core/test_rootfs_overlay.py b/support/testing/tests/core/test_rootfs_overlay.py
new file mode 100644
index 0000000..42d890b
--- /dev/null
+++ b/support/testing/tests/core/test_rootfs_overlay.py
@@ -0,0 +1,27 @@
+import os
+import subprocess
+
+import infra.basetest
+
+def compare_file(file1, file2):
+ return subprocess.call(["cmp", file1, file2])
+
+class TestRootfsOverlay(infra.basetest.BRTest):
+
+ rootfs_overlay_path = infra.filepath("tests/core/rootfs-overlay")
+ rootfs_overlay = "BR2_ROOTFS_OVERLAY=\"{0}1 {0}2\"".format(rootfs_overlay_path)
+
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+ infra.basetest.MINIMAL_CONFIG + \
+ rootfs_overlay
+
+ def test_run(self):
+ target_file = os.path.join(self.builddir, "target", "test-file1")
+ overlay_file = "{}1/test-file1".format(self.rootfs_overlay_path)
+ ret = compare_file(overlay_file, target_file)
+ self.assertEqual(ret, 0)
+
+ target_file = os.path.join(self.builddir, "target", "etc", "test-file2")
+ overlay_file = "{}2/etc/test-file2".format(self.rootfs_overlay_path)
+ ret = compare_file(overlay_file, target_file)
+ self.assertEqual(ret, 0)
diff --git a/support/testing/tests/core/test_timezone.py b/support/testing/tests/core/test_timezone.py
new file mode 100644
index 0000000..9776b4b
--- /dev/null
+++ b/support/testing/tests/core/test_timezone.py
@@ -0,0 +1,66 @@
+import os
+
+import infra.basetest
+
+def boot_armv5_cpio(emulator, builddir):
+ img = os.path.join(builddir, "images", "rootfs.cpio")
+ emulator.boot(arch="armv5", kernel="builtin",
+ options=["-initrd", img])
+ emulator.login()
+
+class TestNoTimezone(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+ """
+# BR2_TARGET_TZ_INFO is not set
+BR2_TARGET_ROOTFS_CPIO=y
+# BR2_TARGET_ROOTFS_TAR is not set
+"""
+
+ def test_run(self):
+ boot_armv5_cpio(self.emulator, self.builddir)
+ tz, _ = self.emulator.run("TZ=UTC date +%Z")
+ self.assertEqual(tz[0].strip(), "UTC")
+ tz, _ = self.emulator.run("TZ=America/Los_Angeles date +%Z")
+ self.assertEqual(tz[0].strip(), "UTC")
+
+class TestGlibcAllTimezone(infra.basetest.BRTest):
+ config = """
+BR2_arm=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TARGET_TZ_INFO=y
+BR2_TARGET_ROOTFS_CPIO=y
+# BR2_TARGET_ROOTFS_TAR is not set
+"""
+
+ def test_run(self):
+ boot_armv5_cpio(self.emulator, self.builddir)
+ tz, _ = self.emulator.run("date +%Z")
+ self.assertEqual(tz[0].strip(), "UTC")
+ tz, _ = self.emulator.run("TZ=UTC date +%Z")
+ self.assertEqual(tz[0].strip(), "UTC")
+ tz, _ = self.emulator.run("TZ=America/Los_Angeles date +%Z")
+ self.assertEqual(tz[0].strip(), "PST")
+ tz, _ = self.emulator.run("TZ=Europe/Paris date +%Z")
+ self.assertEqual(tz[0].strip(), "CET")
+
+class TestGlibcNonDefaultLimitedTimezone(infra.basetest.BRTest):
+ config = """
+BR2_arm=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TARGET_TZ_INFO=y
+BR2_TARGET_TZ_ZONELIST="northamerica"
+BR2_TARGET_LOCALTIME="America/New_York"
+BR2_TARGET_ROOTFS_CPIO=y
+# BR2_TARGET_ROOTFS_TAR is not set
+"""
+
+ def test_run(self):
+ boot_armv5_cpio(self.emulator, self.builddir)
+ tz, _ = self.emulator.run("date +%Z")
+ self.assertEqual(tz[0].strip(), "EST")
+ tz, _ = self.emulator.run("TZ=UTC date +%Z")
+ self.assertEqual(tz[0].strip(), "UTC")
+ tz, _ = self.emulator.run("TZ=America/Los_Angeles date +%Z")
+ self.assertEqual(tz[0].strip(), "PST")
+ tz, _ = self.emulator.run("TZ=Europe/Paris date +%Z")
+ self.assertEqual(tz[0].strip(), "Europe")
^ permalink raw reply related
* [Buildroot] [git commit] support/testing: add package tests
From: Thomas Petazzoni @ 2017-05-07 20:04 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=8db88df8c9488b6aacb21d4af87b39653e2154e7
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
This commit adds some basic tests for two Buildroot packages: python and
dropbear. These tests are by no mean meant to be exhaustive, but mainly
to serve as initial examples for other tests.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
support/testing/tests/package/__init__.py | 0
support/testing/tests/package/test_dropbear.py | 28 +++++++++++++++++++++
support/testing/tests/package/test_python.py | 35 ++++++++++++++++++++++++++
3 files changed, 63 insertions(+)
diff --git a/support/testing/tests/package/__init__.py b/support/testing/tests/package/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/support/testing/tests/package/test_dropbear.py b/support/testing/tests/package/test_dropbear.py
new file mode 100644
index 0000000..a64b782
--- /dev/null
+++ b/support/testing/tests/package/test_dropbear.py
@@ -0,0 +1,28 @@
+import os
+
+import infra.basetest
+
+class TestDropbear(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+"""
+BR2_TARGET_GENERIC_ROOT_PASSWD="testpwd"
+BR2_SYSTEM_DHCP="eth0"
+BR2_PACKAGE_DROPBEAR=y
+BR2_TARGET_ROOTFS_CPIO=y
+# BR2_TARGET_ROOTFS_TAR is not set
+"""
+
+ def test_run(self):
+ img = os.path.join(self.builddir, "images", "rootfs.cpio")
+ self.emulator.boot(arch="armv5",
+ kernel="builtin",
+ options=["-initrd", img,
+ "-net", "nic",
+ "-net", "user,hostfwd=tcp::2222-:22"])
+ self.emulator.login("testpwd")
+ cmd = "netstat -ltn 2>/dev/null | grep 0.0.0.0:22"
+ _, exit_code = self.emulator.run(cmd)
+ self.assertEqual(exit_code, 0)
+ # Would be useful to try to login through SSH here, through
+ # localhost:2222, though it is not easy to pass the ssh
+ # password on the command line.
diff --git a/support/testing/tests/package/test_python.py b/support/testing/tests/package/test_python.py
new file mode 100644
index 0000000..5532fb5
--- /dev/null
+++ b/support/testing/tests/package/test_python.py
@@ -0,0 +1,35 @@
+import os
+
+import infra.basetest
+
+class TestPythonBase(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+"""
+BR2_PACKAGE_PYTHON=y
+BR2_TARGET_ROOTFS_CPIO=y
+# BR2_TARGET_ROOTFS_TAR is not set
+"""
+
+ def test_run(self):
+ cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+ self.emulator.boot(arch="armv5",
+ kernel="builtin",
+ options=["-initrd", cpio_file])
+ self.emulator.login()
+ cmd = "python --version 2>&1 | grep '^Python 2'"
+ _, exit_code = self.emulator.run(cmd)
+ self.assertEqual(exit_code, 0)
+
+ cmd = "python -c 'import math; math.floor(12.3)'"
+ _, exit_code = self.emulator.run(cmd)
+ self.assertEqual(exit_code, 0)
+
+ cmd = "python -c 'import ctypes;"
+ cmd += "libc = ctypes.cdll.LoadLibrary(\"libc.so.1\");"
+ cmd += "print libc.time(None)'"
+ _, exit_code = self.emulator.run(cmd)
+ self.assertEqual(exit_code, 0)
+
+ cmd = "python -c 'import zlib'"
+ _, exit_code = self.emulator.run(cmd)
+ self.assertEqual(exit_code, 1)
^ permalink raw reply related
* [Buildroot] [WIP] package/gcc: add support for gcc 7
From: Romain Naour @ 2017-05-07 19:55 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20170507143021.GD11446@waldemar-brodkorb.de>
Hi Waldemar,
Le 07/05/2017 ? 16:30, Waldemar Brodkorb a ?crit :
> Hi Romain,
>
> can you try attached patch?
> It is for uClibc-ng.
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Tested-by: Romain Naour <romain.naour@gmail.com>
efl, enlightenment, lugaru, supertux, minetest, supertuxkart, all the system
complied with gcc 7 and uclibc + your patch runtime tested successfully :)
I'll keep this setting for further runtime testing with uClibc-ng on real
hardware (x86_64 PC target).
Best regards,
Romain
>
> best regards
> Waldemar
>
^ permalink raw reply
* [Buildroot] [git commit] rpi-firmware: extend vcdbg architecture dependency comment
From: Peter Korsgaard @ 2017-05-07 19:53 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=04829295c78bd49f4d6238f2ffdb03d744202932
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
The main reason why vcdbg is only available on ARM is the fact that this is
a prebuilt ARM binary rather than the rpi-userland dependency, so adjust the
comment to clarify.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
package/rpi-firmware/Config.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/rpi-firmware/Config.in b/package/rpi-firmware/Config.in
index a7fa1c3..da32b8e 100644
--- a/package/rpi-firmware/Config.in
+++ b/package/rpi-firmware/Config.in
@@ -67,7 +67,7 @@ config BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS
config BR2_PACKAGE_RPI_FIRMWARE_INSTALL_VCDBG
bool "vcdbg"
- depends on BR2_arm # rpi-userland
+ depends on BR2_arm # prebuilt arm binary, rpi-userland
depends on BR2_TOOLCHAIN_USES_GLIBC
depends on BR2_INSTALL_LIBSTDCPP # rpi-userland
select BR2_PACKAGE_RPI_USERLAND
^ permalink raw reply related
* [Buildroot] [PATCH] package/cmake: propagate libuv dependencies
From: Peter Korsgaard @ 2017-05-07 19:48 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20170506210155.13171-1-yann.morin.1998@free.fr>
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> In c2c06a6de02, cmake version was bumped and a new dependency on libuv
> was added, but it did not propagate all the dependencies of libuv,
> missing sync_4 (probably because sync_4 was added after the patch was
> sent on the list, but before it was applied to the tree).
> Fix that, which fixes unmet dependencies.
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply
* [Buildroot] [PATCH] package/rpi-firmware: fix unmet dependencies
From: Peter Korsgaard @ 2017-05-07 19:43 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20170506212617.27587-1-yann.morin.1998@free.fr>
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> Currently, vcdbg is only supported in 32-bit mode. Furthermore, vcdbg
> needs rpi-userland, which we currently only support in 32-bit mode.
> Add a dependency on BR2_arm.
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
I was wondering if these were just missing when the || BR2_aarch64 logic
was added, but rpi-userland really doesn't build in 64bit mode:
/home/peko/source/buildroot/output-rpi64/build/rpi-userland-f0642e3b58d8a140a3f7621630c15fbfa794b19d/build/inc/interface/vcos/vcos_assert.h:303:69: error: size of array ?vcos_static_assert? is negative
#define vcos_static_assert(cond) __attribute__((unused)) extern int vcos_static_assert[(cond)?1:-1]
^
/home/peko/source/buildroot/output-rpi64/build/rpi-userland-f0642e3b58d8a140a3f7621630c15fbfa794b19d/interface/khronos/common/khrn_client_check_types.h:72:1: note: in expansion of macro ?vcos_static_assert?
vcos_static_assert(sizeof(GLsizeiptr) == 4);
> ---
> package/rpi-firmware/Config.in | 2 ++
> 1 file changed, 2 insertions(+)
> diff --git a/package/rpi-firmware/Config.in b/package/rpi-firmware/Config.in
> index 4efef8691e..a7fa1c3b33 100644
> --- a/package/rpi-firmware/Config.in
> +++ b/package/rpi-firmware/Config.in
> @@ -67,6 +67,7 @@ config BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS
> config BR2_PACKAGE_RPI_FIRMWARE_INSTALL_VCDBG
> bool "vcdbg"
> + depends on BR2_arm # rpi-userland
> depends on BR2_TOOLCHAIN_USES_GLIBC
> depends on BR2_INSTALL_LIBSTDCPP # rpi-userland
> select BR2_PACKAGE_RPI_USERLAND
What is even more important than the rpi-userland dependency is the fact
that vcdgb is a prebuilt arm binary. You could argue that it perhaps
should have used 'depends on' instead of 'select' for rpi-userland, as
the dependency afaik is:
It doesn't make sense to debug the GPU communication if you don't use
the GPU driver.
Rather than any strong direct rpi-userland dependency by this binary,
but ok.
Committed after adjusting the comment, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply
* [Buildroot] [PATCH] package/cmake: propagate libuv dependencies
From: Thomas Petazzoni @ 2017-05-07 19:43 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20170506210155.13171-1-yann.morin.1998@free.fr>
Hello,
On Sat, 6 May 2017 23:01:55 +0200, Yann E. MORIN wrote:
> In c2c06a6de02, cmake version was bumped and a new dependency on libuv
> was added, but it did not propagate all the dependencies of libuv,
> missing sync_4 (probably because sync_4 was added after the patch was
> sent on the list, but before it was applied to the tree).
>
> Fix that, which fixes unmet dependencies.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> package/cmake/Config.in | 2 ++
> 1 file changed, 2 insertions(+)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [git commit] package/cmake: propagate libuv dependencies
From: Thomas Petazzoni @ 2017-05-07 19:43 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=882373c497ca015a1e845b433b662738ea22671f
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
In c2c06a6de02, cmake version was bumped and a new dependency on libuv
was added, but it did not propagate all the dependencies of libuv,
missing sync_4 (probably because sync_4 was added after the patch was
sent on the list, but before it was applied to the tree).
Fix that, which fixes unmet dependencies.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/cmake/Config.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/cmake/Config.in b/package/cmake/Config.in
index 1c95d71..64ab154 100644
--- a/package/cmake/Config.in
+++ b/package/cmake/Config.in
@@ -19,6 +19,7 @@ config BR2_PACKAGE_CMAKE_CTEST
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
depends on BR2_USE_MMU # libuv
+ depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv
select BR2_PACKAGE_CMAKE
select BR2_PACKAGE_ZLIB
select BR2_PACKAGE_JSONCPP
@@ -40,6 +41,7 @@ config BR2_PACKAGE_CMAKE_CTEST
comment "ctest needs a toolchain w/ C++, wchar, dynamic library, gcc >= 4.7, NPTL"
depends on BR2_PACKAGE_CMAKE_ARCH_SUPPORTS
depends on BR2_USE_MMU
+ depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || \
!BR2_TOOLCHAIN_HAS_THREADS_NPTL
^ permalink raw reply related
* [Buildroot] [PATCH] package/rpi-firmware: fix unmet dependencies
From: Thomas Petazzoni @ 2017-05-07 19:42 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20170506212617.27587-1-yann.morin.1998@free.fr>
Hello,
On Sat, 6 May 2017 23:26:17 +0200, Yann E. MORIN wrote:
> Currently, vcdbg is only supported in 32-bit mode. Furthermore, vcdbg
> needs rpi-userland, which we currently only support in 32-bit mode.
>
> Add a dependency on BR2_arm.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> ---
> package/rpi-firmware/Config.in | 2 ++
> 1 file changed, 2 insertions(+)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [git commit] package/rpi-firmware: fix unmet dependencies
From: Thomas Petazzoni @ 2017-05-07 19:41 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=db4c811b9e2cc47523aac75db7ed0282382a87c5
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Currently, vcdbg is only supported in 32-bit mode. Furthermore, vcdbg
needs rpi-userland, which we currently only support in 32-bit mode.
Add a dependency on BR2_arm.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/rpi-firmware/Config.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/rpi-firmware/Config.in b/package/rpi-firmware/Config.in
index 4efef86..a7fa1c3 100644
--- a/package/rpi-firmware/Config.in
+++ b/package/rpi-firmware/Config.in
@@ -67,6 +67,7 @@ config BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS
config BR2_PACKAGE_RPI_FIRMWARE_INSTALL_VCDBG
bool "vcdbg"
+ depends on BR2_arm # rpi-userland
depends on BR2_TOOLCHAIN_USES_GLIBC
depends on BR2_INSTALL_LIBSTDCPP # rpi-userland
select BR2_PACKAGE_RPI_USERLAND
@@ -74,6 +75,7 @@ config BR2_PACKAGE_RPI_FIRMWARE_INSTALL_VCDBG
Install vcdbg, to help debug communication with the GPU.
comment "vcdbg needs a glibc toolchain w/ C++"
+ depends on BR2_arm
depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP
endif # BR2_PACKAGE_RPI_FIRMWARE
^ permalink raw reply related
* [Buildroot] [PATCH] mpir: fix ARM, PowerPC and mips builds failure
From: Thomas Petazzoni @ 2017-05-07 19:38 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1494178984-19821-2-git-send-email-semenak94@mail.ru>
Hello,
On Sun, 7 May 2017 20:43:04 +0300, Semyon Kolganov wrote:
> +# Prefer generic build
> +MPIR_CONF_ENV += MPN_PATH=generic
I think this is really wrong, because it will use in all cases the
non-optimized generic code, instead of the more optimized assembly code
available for a number of architectures:
$ ls mpn/
alpha arm asm-defs.m4 cpp-ccas generic ia64 m4-ccas Makeasm.am Makefile.am Makefile.in mips32 mips64 powerpc32 powerpc64 README sparc32 sparc64 x86 x86_64 x86_64w x86w
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [Bug 9846] musl libc not installed correctly in target folder
From: bugzilla at busybox.net @ 2017-05-07 19:34 UTC (permalink / raw)
To: buildroot
In-Reply-To: <bug-9846-163@https.bugs.busybox.net/>
https://bugs.busybox.net/show_bug.cgi?id=9846
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WORKSFORME
Status|NEW |RESOLVED
--- Comment #1 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> ---
Thanks for your report. Unfortunately, I'm not able to reproduce. The musl
system produced by your defconfig looks OK to me:
$ ls -l target/lib/libc.so
-rwxr-xr-x 1 test test 587296 May 7 15:29 target/lib/libc.so
And it boots just fine (tested under Qemu):
Welcome to TEST
test login:
Welcome to TEST
test login:
So, a few options:
1. Something has been fixed since then, but I don't recall any fix related to
this being applied recently.
2. Something is different on your build machine.
3. You did not clean up the build completely.
I'll mark the bug as WORKSFORME for now. If you manage to reproduce again with
the latest Buildroot, could you try to preview a simpler defconfig that
exhibits the issue so that we can try to narrow down the issue ?
Keeping the full build log would also be useful.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply
* [Buildroot] [PATCH] connman: update musl incompatibility reason
From: Peter Korsgaard @ 2017-05-07 19:27 UTC (permalink / raw)
To: buildroot
In-Reply-To: <37435abb853673f385d36cb7a54f71dc0b69d526.1494179640.git.baruch@tkos.co.il>
>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:
> connman no longer triggers a conflict of userspace and kernel headers since
> commit 69ced96355 (musl: workaround kernel if_ether.h header conflict). The
> real blocker for musl build (besides a few missing includes here and there)
> is the missing res_ninit() implementation. Update the comment accordingly.
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply
* [Buildroot] [git commit] connman: update musl incompatibility reason
From: Peter Korsgaard @ 2017-05-07 19:27 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=9e97afdf0a684aa97ce1ce7a1c47ef3c1649b36f
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
connman no longer triggers a conflict of userspace and kernel headers since
commit 69ced96355 (musl: workaround kernel if_ether.h header conflict). The
real blocker for musl build (besides a few missing includes here and there)
is the missing res_ninit() implementation. Update the comment accordingly.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
package/connman/Config.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/connman/Config.in b/package/connman/Config.in
index 39a81ee..28cf168 100644
--- a/package/connman/Config.in
+++ b/package/connman/Config.in
@@ -5,7 +5,7 @@ config BR2_PACKAGE_CONNMAN
depends on BR2_USE_MMU # dbus, libglib2
depends on !BR2_STATIC_LIBS # needs dlopen()
depends on BR2_TOOLCHAIN_HAS_SYNC_4
- depends on !BR2_TOOLCHAIN_USES_MUSL # mixes userspace and kernel headers
+ depends on !BR2_TOOLCHAIN_USES_MUSL # missing res_ninit()
select BR2_PACKAGE_DBUS
select BR2_PACKAGE_LIBGLIB2
select BR2_PACKAGE_IPTABLES
^ permalink raw reply related
* [Buildroot] Buildroot defconfig failures
From: Peter Korsgaard @ 2017-05-07 19:24 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20170507153843.529dc316@free-electrons.com>
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Hi,
> Cloning from http:// also fails:
>>>> linux rel_imx_4.1.15_2.0.0_ga Downloading
> Doing shallow clone
> Cloning into 'linux-rel_imx_4.1.15_2.0.0_ga'...
> fatal: dumb http transport does not support --depth
> Shallow clone failed, falling back to doing a full clone
> Doing full clone
> Cloning into 'linux-rel_imx_4.1.15_2.0.0_ga'...
> Checking connectivity... done.
> warning: remote HEAD refers to nonexistent ref, unable to checkout.
> Could not fetch special ref 'rel_imx_4.1.15_2.0.0_ga'; assuming it is not special.
> While the tag rel_imx_4.1.15_2.0.0_ga clearly exists in
> http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/.
> Peter: as a temporary fix, could you put
> http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/snapshot/linux-imx-rel_imx_4.1.15_2.0.0_ga.tar.gz
> in http://sources.buildroot.net ? Thanks!
Done! (earlier today).
--
Bye, Peter Korsgaard
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox