diff options
| author | Manuel Traut <manut@linutronix.de> | 2014-08-29 15:59:09 +0200 |
|---|---|---|
| committer | Manuel Traut <manut@linutronix.de> | 2014-08-29 15:59:09 +0200 |
| commit | 9503b79cb0ba13b40eb193961efe04f0408469cc (patch) | |
| tree | 9789e59ea4f33bff7d606976e5720e9f64b84f0f /distribution/yocto-advanced/poky | |
| parent | 9b96af402f8ed256c5db1e8c48da6c1d5f5f92d8 (diff) | |
yocto: add more recipe examples
Signed-off-by: Manuel Traut <manut@linutronix.de>
Diffstat (limited to 'distribution/yocto-advanced/poky')
13 files changed, 139 insertions, 4 deletions
diff --git a/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hello/files/hello.c b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hello/files/hello.c index b182eef..f202e2f 100644 --- a/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hello/files/hello.c +++ b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hello/files/hello.c @@ -2,7 +2,7 @@ int main (int argc, char **argv) { - printf("Hello World - DEUTA\n"); + printf ("hello yocto world\n"); return 0; } diff --git a/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hello/hello.bb b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hello/hello.bb index 0fa88f6..6969b44 100644 --- a/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hello/hello.bb +++ b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hello/hello.bb @@ -9,10 +9,10 @@ SRC_URI = "file://hello.c" S = "${WORKDIR}" do_compile() { - ${CC} hello.c -o hello + ${CC} hello.c -o hello } do_install() { - install -d ${D}${bindir} - install -m 0755 hello ${D}${bindir} + install -d ${D}${bindir} + install -m 0755 hello ${D}${bindir} } diff --git a/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hellocm/files/hellocm-0.1.tar.bz2 b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hellocm/files/hellocm-0.1.tar.bz2 Binary files differnew file mode 100644 index 0000000..1292ea5 --- /dev/null +++ b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hellocm/files/hellocm-0.1.tar.bz2 diff --git a/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hellocm/files/hellocm-0.1/CMakeLists.txt b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hellocm/files/hellocm-0.1/CMakeLists.txt new file mode 100644 index 0000000..a811deb --- /dev/null +++ b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hellocm/files/hellocm-0.1/CMakeLists.txt @@ -0,0 +1,7 @@ +CMAKE_MINIMUM_REQUIRED (VERSION 2.6) +PROJECT (hellocm) +SET (CPACK_PACKAGE_VERSION_MAJOR "0") +SET (CPACK_PACKAGE_VERSION_MINOR "1") +SET (src ${CMAKE_CURRENT_SOURCE_DIR}/hello.c) +ADD_EXECUTABLE (hellocm ${src}) +INSTALL(TARGETS hellocm RUNTIME DESTINATION bin LIBRARY DESTINATION lib) diff --git a/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hellocm/files/hellocm-0.1/hello.c b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hellocm/files/hellocm-0.1/hello.c new file mode 100644 index 0000000..f202e2f --- /dev/null +++ b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hellocm/files/hellocm-0.1/hello.c @@ -0,0 +1,8 @@ +#include <stdio.h> + +int main (int argc, char **argv) +{ + printf ("hello yocto world\n"); + + return 0; +} diff --git a/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hellocm/hellocm_0.1.bb b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hellocm/hellocm_0.1.bb new file mode 100644 index 0000000..49c8627 --- /dev/null +++ b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/hellocm/hellocm_0.1.bb @@ -0,0 +1,10 @@ +DESCRIPTION = "hellocm cmake example" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +SECTION = "examples" +SRC_URI = "file://${BPN}-${PV}.tar.bz2" +inherit cmake + +#export EXTRA_OECMAKE = '-DBLUBB="bla" + +FILES_{PN} = "${bindir}/hellocm" diff --git a/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0.tar.bz2 b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0.tar.bz2 Binary files differnew file mode 100644 index 0000000..4ac91e9 --- /dev/null +++ b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0.tar.bz2 diff --git a/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0/helloqt.pro b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0/helloqt.pro new file mode 100644 index 0000000..c3cfcc0 --- /dev/null +++ b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0/helloqt.pro @@ -0,0 +1,25 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2013-06-04T20:56:37 +# +#------------------------------------------------- + +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = helloqt +TEMPLATE = app + + +SOURCES += main.cpp\ + mainwindow.cpp + +HEADERS += mainwindow.h + +FORMS += mainwindow.ui + +target.path = /opt/helloqt +target.files = helloqt + +INSTALLS += target diff --git a/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0/main.cpp b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0/main.cpp new file mode 100644 index 0000000..9e2d83c --- /dev/null +++ b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0/main.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" +#include <QApplication> + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + + return a.exec(); +} diff --git a/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0/mainwindow.cpp b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0/mainwindow.cpp new file mode 100644 index 0000000..49d64fc --- /dev/null +++ b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0/mainwindow.h b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0/mainwindow.h new file mode 100644 index 0000000..112fda1 --- /dev/null +++ b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include <QMainWindow> + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0/mainwindow.ui b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0/mainwindow.ui new file mode 100644 index 0000000..6050363 --- /dev/null +++ b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/files/helloqt-1.0/mainwindow.ui @@ -0,0 +1,24 @@ +<ui version="4.0"> + <class>MainWindow</class> + <widget class="QMainWindow" name="MainWindow" > + <property name="geometry" > + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>300</height> + </rect> + </property> + <property name="windowTitle" > + <string>MainWindow</string> + </property> + <widget class="QMenuBar" name="menuBar" /> + <widget class="QToolBar" name="mainToolBar" /> + <widget class="QWidget" name="centralWidget" /> + <widget class="QStatusBar" name="statusBar" /> + </widget> + <layoutDefault spacing="6" margin="11" /> + <pixmapfunction></pixmapfunction> + <resources/> + <connections/> +</ui> diff --git a/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/helloqt_1.0.bb b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/helloqt_1.0.bb new file mode 100644 index 0000000..e9d7b90 --- /dev/null +++ b/distribution/yocto-advanced/poky/meta-linutronix/recipes-hello/helloqt/helloqt_1.0.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "helloqt QT example" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +SECTION = "examples" +SRC_URI = "file://${BPN}-${PV}.tar.bz2" + +inherit qt4e + +PR = "r4" + +do_install() { + install -d ${D}${bindir} + install -m 0755 helloqt ${D}${bindir} +} |
