Software: Open Embedded archive and extensions

Everything about software tools, new software development and toolchains. For developers, mostly.

Moderator: marcelr

Re: Software: Open Embedded archive and extensions

Postby RomMon » Sat Oct 01, 2016 1:13 am

Created a startup script for x11vnc.
The script will test for the existence of a symlink from /.vnc, and the existence of the password file /.vnc/passwd.

Starting x11vnc from the command line the password file is located at ~/.vnc/passwd, but starting it from /etc/init.d/ it is looking for the password file at /.vnc/passwd
(there are other solutions, just didn't look further. Probably the one of the many parameters can solve this too: http://www.karlrunge.com/x11vnc/x11vnc_opts.html )

Create a symlink to /root/.vnc
Code: Select all
ln -s /root/.vnc /.vnc


Place the following script in /etc/init.d/ and make it executable.
Code: Select all
#!/bin/sh
#
# Start the server, with ssl support, VeNCrypt, and standard VNC password authentication.
# Accept multiple clients simultaneously. Run quietly, in the background.
#
# http://www.karlrunge.com/x11vnc/x11vnc_opts.html
#
# add to startup sequence with:    /usr/sbin/update-rc.d -v x11vnc start 60 5 . stop 60 0 1 6 .


DAEMON=/usr/bin/x11vnc-bin
DAEMON_NAME=x11vnc-bin
PasswDir=/.vnc
PasswFile=/.vnc/passwd
test -x $DAEMON || exit 0

start_x11vnc () {
        if [ -L $PasswDir ] && [ -d $PasswDir ]; then
                if [ -e $PasswFile ]; then
                        $DAEMON -shared \
                                -rawfb map:/dev/fb0@800x480x32 \
                                -forever \
                                -pipeinput UINPUT:touch,touch_always=1,abs,pressure=128,tslib_cal=/etc/pointercal,direct_abs=/dev/input/event0,direct_btn=/dev/input/event0,direct_rel=/dev/input/event0,direct_key=/dev/input/event0,nouinput \
                                -cursor arrow \
                                -ssl SAVE -vencrypt nodh:plain:support -usepw \
                                -quiet -bg
                else
                        echo -e \n
                        echo "The password file doesn't exist yet. Create one before using the startup script."
                fi
        else
                echo -e \n
                echo "a symlink from /.vnc to /root/.vnc seems to be missing. Add it with 'ln -s /root/.vnc /.vnc' "
        fi
}

stop_x11vnc () {
        killall $DAEMON_NAME
}

case "$1" in
start)
        echo -n "Starting x11vnc"
        start_x11vnc
        ;;

stop)
        echo -n "Stopping x11vnc"
        stop_x11vnc
        ;;

restart)
        $0 stop
        sleep 1
        $0 start
        ;;

*)
        echo "Usage: $0 {start|stop|restart}" >&2
        exit 1
        ;;
esac

exit 0


Make it executable
Code: Select all
chmod +x /etc/init.d/x11vnc


Start it on bootup while entering init 5
Code: Select all
/usr/sbin/update-rc.d -v x11vnc start 60 5 . stop 60 0 1 6 .


To test the script you can start/stop it manually from the command line:
Code: Select all
/etc/init.d/x11vnc {start|stop|restart}
e.g:
/etc/init.d/x11vnc start


If you you extent the scrip with your own code you can test it with:
Code: Select all
sh -x /etc/init.d/x11vnc {start|stop|restart}

The result of each step is than displayed, hopefully identifying any issues.


Note:
If the toon gets stuck while booting up, it is probably waiting for a password to be entered via the console.
Dropbear should have started already, so you can correct this by removing the startup of the scrip with:
Code: Select all
/usr/sbin/update-rc.d -v -f x11vnc remove

and reboot.
RomMon
Starting Member
Starting Member
 
Posts: 39
Joined: August 2016

Re: Software: Open Embedded archive and extensions

Postby QuasaR » Wed Feb 08, 2017 12:13 pm

I have installed the OE toolchain in CentOS 6.8 like described in the 'tutorial' from RomMon.

I want to install MC (Midnight Commander) on the rooted Toon.
I am able to create a package with bitbake but I can't install it.

I get to following error.
Code: Select all
eneco-xxx-xxxxxx: opkg install mc_4.8.18-r0_qb2.ipk
Installing mc (4.8.18-r0) to root...
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for mc:
*      ncurses-libncursesw (>= 5.7+20110115) *         glib-2.0 (>= 2.28.0) *
* opkg_install_cmd: Cannot install package mc.
eneco-xxx-xxxxxx:~#


So I tried to create a package of mc 4.7.5.2 but that one won't 'bake':
Code: Select all
[quby@quby qb2]$ bitbake mc
NOTE: Handling BitBake files: / (7337/7337) [100 %]
Parsing of 7337 .bb files complete (6900 cached, 437 parsed). 7628 targets, 350 skipped, 2 masked, 0 errors.

Build Configuration:
BB_VERSION        = "1.10.2"
METADATA_BRANCH   = "<unknown>"
METADATA_REVISION = "<unknown>"
TARGET_ARCH       = "arm"
TARGET_OS         = "linux-gnueabi"
MACHINE           = "quby2"
DISTRO            = "hae"
DISTRO_VERSION    = "20170208"
TARGET_FPU        = "soft"

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing runqueue
NOTE: Running task 411 of 689 (ID: 9, /home/quby/toon/oe/homeautomationeurope/recipes/mc/mc_4.7.5.2.bb, do_setscene)
NOTE: package mc-4.7.5.2-r3: task do_setscene: Started
--2017-02-08 11:54:24--  http://www.midnight-commander.org/downloads/mc-4.7.5.2.tar.bz2
Resolving www.midnight-commander.org... 140.211.15.12
Connecting to www.midnight-commander.org|140.211.15.12|:80... NOTE: package mc-4.7.5.2-r3: task do_setscene: Succeeded
connected.
HTTP request sent, awaiting response... NOTE: Running task 412 of 689 (ID: 7, /home/quby/toon/oe/homeautomationeurope/recipes/mc/mc_4.7.5.2.bb, do_fetch)
NOTE: package mc-4.7.5.2-r3: task do_fetch: Started
301 Moved Permanently
Location: http://midnight-commander.org/downloads/mc-4.7.5.2.tar.bz2 [following]
--2017-02-08 11:54:25--  http://midnight-commander.org/downloads/mc-4.7.5.2.tar.bz2
Resolving midnight-commander.org... 140.211.15.12
Reusing existing connection to www.midnight-commander.org:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://ftp.midnight-commander.org/mc-4.7.5.2.tar.bz2 [following]
--2017-02-08 11:54:25--  http://ftp.midnight-commander.org/mc-4.7.5.2.tar.bz2
Resolving ftp.midnight-commander.org... NOTE: fetch http://www.midnight-commander.org/downloads/mc-4.7.5.2.tar.bz2
64.50.233.100, 64.50.236.52, 140.211.166.134, ...
Connecting to ftp.midnight-commander.org|64.50.233.100|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2627485 (2.5M) [application/x-bzip2]
Saving to: “/home/quby/toon/oe/sources/mc-4.7.5.2.tar.bz2”

     0K .......... .......... .......... .......... ..........  1%  281K 9s
    50K .......... .......... .......... .......... ..........  3%  587K 6s
   100K .......... .......... .......... .......... ..........  5% 6.42M 4s
   150K .......... .......... .......... .......... ..........  7%  592K 4s
   200K .......... .......... .......... .......... ..........  9% 11.6M 3s
   250K .......... .......... .......... .......... .......... 11%  570K 3s
   300K .......... .......... .......... .......... .......... 13% 11.4M 3s
   350K .......... .......... .......... .......... .......... 15% 2.46M 3s
   400K .......... .......... .......... .......... .......... 17%  745K 3s
   450K .......... .......... .......... .......... .......... 19% 7.34M 2s
   500K .......... .......... .......... .......... .......... 21% 14.4M 2s
   550K .......... .......... .......... .......... .......... 23%  910K 2s
   600K .......... .......... .......... .......... .......... 25% 2.07M 2s
   650K .......... .......... .......... .......... .......... 27% 11.1M 2s
   700K .......... .......... .......... .......... .......... 29% 11.5M 2s
   750K .......... .......... .......... .......... .......... 31% 11.4M 1s
   800K .......... .......... .......... .......... .......... 33%  503K 1s
   850K .......... .......... .......... .......... .......... 35% 31.5M 1s
   900K .......... .......... .......... .......... .......... 37% 43.5M 1s
   950K .......... .......... .......... .......... .......... 38% 39.6M 1s
  1000K .......... .......... .......... .......... .......... 40% 32.2M 1s
  1050K .......... .......... .......... .......... .......... 42%  650K 1s
  1100K .......... .......... .......... .......... .......... 44% 32.4M 1s
  1150K .......... .......... .......... .......... .......... 46% 5.92M 1s
  1200K .......... .......... .......... .......... .......... 48% 7.17M 1s
  1250K .......... .......... .......... .......... .......... 50% 9.55M 1s
  1300K .......... .......... .......... .......... .......... 52% 12.5M 1s
  1350K .......... .......... .......... .......... .......... 54%  820K 1s
  1400K .......... .......... .......... .......... .......... 56% 9.68M 1s
  1450K .......... .......... .......... .......... .......... 58% 10.9M 1s
  1500K .......... .......... .......... .......... .......... 60% 10.6M 1s
  1550K .......... .......... .......... .......... .......... 62%  510K 1s
  1600K .......... .......... .......... .......... .......... 64% 17.4M 1s
  1650K .......... .......... .......... .......... .......... 66% 17.6M 1s
  1700K .......... .......... .......... .......... .......... 68% 11.7M 0s
  1750K .......... .......... .......... .......... .......... 70% 6.55M 0s
  1800K .......... .......... .......... .......... .......... 72% 20.5M 0s
  1850K .......... .......... .......... .......... .......... 74% 22.3M 0s
  1900K .......... .......... .......... .......... .......... 75% 25.4M 0s
  1950K .......... .......... .......... .......... .......... 77% 30.5M 0s
  2000K .......... .......... .......... .......... .......... 79%  739K 0s
  2050K .......... .......... .......... .......... .......... 81% 10.5M 0s
  2100K .......... .......... .......... .......... .......... 83% 26.7M 0s
  2150K .......... .......... .......... .......... .......... 85% 27.1M 0s
  2200K .......... .......... .......... .......... .......... 87% 30.7M 0s
  2250K .......... .......... .......... .......... .......... 89% 44.8M 0s
  2300K .......... .......... .......... .......... .......... 91% 28.2M 0s
  2350K .......... .......... .......... .......... .......... 93% 24.6M 0s
  2400K .......... .......... .......... .......... .......... 95% 11.9M 0s
  2450K .......... .......... .......... .......... .......... 97% 1.01M 0s
  2500K .......... .......... .......... .......... .......... 99% 5.61M 0s
  2550K .......... .....                                      100% 3.06M=1.2s

2017-02-08 11:54:26 (2.10 MB/s) - “/home/quby/toon/oe/sources/mc-4.7.5.2.tar.bz2” saved [2627485/2627485]

NOTE: package mc-4.7.5.2-r3: task do_fetch: Succeeded
NOTE: Running task 413 of 689 (ID: 0, /home/quby/toon/oe/homeautomationeurope/recipes/mc/mc_4.7.5.2.bb, do_unpack)
NOTE: package mc-4.7.5.2-r3: task do_unpack: Started
NOTE: Unpacking ../sources/mc-4.7.5.2.tar.bz2 to tmp/work/qb2-hae-linux-gnueabi/mc-4.7.5.2-r3/
FATAL: [Errno 2] No such file or directory: '/home/quby/toon/oe/homeautomationeurope/recipes/mc/./mc-CTRL.patch'
ERROR: Error in executing python function in: /home/quby/toon/oe/homeautomationeurope/recipes/mc/mc_4.7.5.2.bb
ERROR: Exception:<type 'exceptions.SystemExit'> Message:1
ERROR: Printing the environment of the function
ERROR: Function patch_do_patch failed
ERROR: TaskFailed event exception, aborting
ERROR: Build of /home/quby/toon/oe/homeautomationeurope/recipes/mc/mc_4.7.5.2.bb do_patch failed
NOTE: package mc-4.7.5.2-r3: task do_unpack: Succeeded
ERROR: Task 1 (/home/quby/toon/oe/homeautomationeurope/recipes/mc/mc_4.7.5.2.bb, do_patch) failed with 256
ERROR: '/home/quby/toon/oe/homeautomationeurope/recipes/mc/mc_4.7.5.2.bb' failed
NOTE: Running task 437 of 689 (ID: 1, /home/quby/toon/oe/homeautomationeurope/recipes/mc/mc_4.7.5.2.bb, do_patch)
NOTE: package mc-4.7.5.2-r3: task do_patch: Started
NOTE: Applying patch 'mc-CTRL.patch' (../homeautomationeurope/recipes/mc/mc-CTRL.patch)
FATAL: [Errno 2] No such file or directory: '/home/quby/toon/oe/homeautomationeurope/recipes/mc/./mc-CTRL.patch'
ERROR: '/home/quby/toon/oe/homeautomationeurope/recipes/mc/mc_4.7.5.2.bb' failed


Can anyone help me to get either one of the packages working ?

p.s. I got the recipes from https://layers.openembedded.org/layerin ... dded-core/

*edit*

I was able to retrieve the missing file for 4.7.5.2 and was able to bake it.
It's giving me the same error when installing.

Code: Select all
eneco-xxx-xxxxxx:~# opkg install mc_4.7.5.2-r3_qb2.ipk
Installing mc (4.7.5.2-r3) to root...
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for mc:
*      ncurses-libncursesw (>= 5.7+20110115) *         glib-2.0 (>= 2.28.0) *
* opkg_install_cmd: Cannot install package mc.
eneco-xxx-xxxxxx:~#
QuasaR
Starting Member
Starting Member
 
Posts: 18
Joined: February 2017

Re: Software: Open Embedded archive and extensions

Postby QuasaR » Fri Feb 10, 2017 11:15 am

marcelr wrote:To build kernel modules, you don't have to build all images again.

What I did was the following: extract the kernel package to a separate directory,
execute: make menuconfig

(for this step, probably your cross compilation toolchain needs to be in your $PATH)

configure the kernel the way you want it. Copy the .config file to the oe tree ( <oe_root>/oe/homeautomationeurope/recipes/linux/linux-quby2/ with the right name: defconfig-2.6.36-<whatever version of the kernel you need> )

edit linux-quby2-2.6.36-R07.bb and its included files to point to your config file AND reflect the kernel version of your toon.

bitbake linux-quby2

and a new kernel + modules are built and packaged, a lot faster than rebuilding everything from scratch.

For most modules or extra features, you will need a new kernel, since toon by default has module versioning switched on. This means that you can only add modules that are part of the original kernel configuration of toon. For features outside this configuration, switch module versioning off, configure your kernel according to your needs, build it, and install. If you give it the same version number as the current kernel version, there's a strong possibility that you can use the newer zwave and wifi drivers as supplied by quby, with your homebrew kernel (haven't tried this yet).

good luck,

marcelr


Where did you get the kernel sources from ?
I have kernel 2.6.36-R10-h25 which isn't in the package from Quby (it only has R07 files).
QuasaR
Starting Member
Starting Member
 
Posts: 18
Joined: February 2017

Re: Software: Open Embedded archive and extensions

Postby Tom » Fri Feb 10, 2017 3:03 pm

As far as I can see from the installation errors you are missing the following packages on your Toon;
ncurses-libncursesw (>= 5.7+20110115)
glib-2.0 (>= 2.28.0)

You probably have to bake them too and install before mc.
Tom
Starting Member
Starting Member
 
Posts: 25
Joined: May 2016

Re: Software: Open Embedded archive and extensions

Postby marcelr » Fri Feb 10, 2017 8:04 pm

Where did you get the kernel sources from ?

From the openembedded tree. It's the old source, with a new name.
marcelr
Advanced Member
Advanced Member
 
Posts: 925
Joined: May 2012
Location: Ehv

Re: Software: Open Embedded archive and extensions

Postby QuasaR » Mon Feb 13, 2017 4:56 pm

marcelr wrote:
Where did you get the kernel sources from ?

From the openembedded tree. It's the old source, with a new name.

Do you pherhaps have a link for me ?
I searched the whole site (openembedded.org) but couldn't find a download.
QuasaR
Starting Member
Starting Member
 
Posts: 18
Joined: February 2017

Re: Software: Open Embedded archive and extensions

Postby QuasaR » Mon Feb 13, 2017 4:57 pm

Tom wrote:As far as I can see from the installation errors you are missing the following packages on your Toon;
ncurses-libncursesw (>= 5.7+20110115)
glib-2.0 (>= 2.28.0)

You probably have to bake them too and install before mc.


Yes, you are right. I baked the packages and installed them and after that I could install the MC package.
Thank you for the help.
QuasaR
Starting Member
Starting Member
 
Posts: 18
Joined: February 2017

Re: Software: Open Embedded archive and extensions

Postby marcelr » Mon Feb 13, 2017 7:34 pm

QuasaR wrote:Do you pherhaps have a link for me ?


this one:
http://quby.com/static/openembedded-qb2 ... r1.tar.bz2

Maybe this one needs some more explanation: I used the kernel sources as published in this openembedded tree, and chnaged the bitbake recipes an config files to reflect the kernel version as present in my toon.
This enables the loading of module versioning-labeled modules into the running kernel. This only works for modules that have been defined in the kernel at compile time. To circumvent this, you will need to build a brand new kernel, with module versioning switched off. The good News is that the newer modules for zwave interface and wifi interface will work with the older kernel code in that case. With module versioning switched off, you can add modules to your liking.
marcelr
Advanced Member
Advanced Member
 
Posts: 925
Joined: May 2012
Location: Ehv

Re: Software: Open Embedded archive and extensions

Postby QuasaR » Mon Feb 13, 2017 7:57 pm

marcelr wrote:
QuasaR wrote:Do you pherhaps have a link for me ?


this one:
http://quby.com/static/openembedded-qb2 ... r1.tar.bz2

Maybe this one needs some more explanation: I used the kernel sources as published in this openembedded tree, and chnaged the bitbake recipes an config files to reflect the kernel version as present in my toon.
This enables the loading of module versioning-labeled modules into the running kernel. This only works for modules that have been defined in the kernel at compile time. To circumvent this, you will need to build a brand new kernel, with module versioning switched off. The good News is that the newer modules for zwave interface and wifi interface will work with the older kernel code in that case. With module versioning switched off, you can add modules to your liking.


Ok, I have all the sources then but from what folder did you run the make menuconfig then ?
I am able to create a kernel for my Toon ( bitbake linux-quby2 gives new kernel for my version) but I can't enable / disable anything if I can't run make menuconfig.
QuasaR
Starting Member
Starting Member
 
Posts: 18
Joined: February 2017

Re: Software: Open Embedded archive and extensions

Postby marcelr » Mon Feb 13, 2017 8:08 pm

I unpacked the kernel code in a separate directory, edited the top-level Makefile to use the cross-compiler for toon, and from then on, you can configure whatever you want. The resulting .config file is renamed to an appropriate name for the kernel version you want. The bitbake recipe needs some editing to reflect the right configuration file, then run bitbake, and you end up with a bunch of modules and a kernel package ready for installation.
marcelr
Advanced Member
Advanced Member
 
Posts: 925
Joined: May 2012
Location: Ehv

Re: Software: Open Embedded archive and extensions

Postby Rudolf » Wed May 09, 2018 1:54 pm

RomMon wrote:"Guide"


This guide still works, with minor changes:

* I used this CentOS-iso: http://mirror.nsc.liu.se/centos-store/6 ... inimal.iso
* I skipped the epel install, because 5 is no longer available on fedoradownloads and was unable to find another mirror.
Unsure if a newer version could break anything and since epel seems unused anyway.
* I replaced 'wget http://developer.digitalstrom.org/downl ... 3_.tar.gz' with
'http://sources.angstrom-distribution.org/trunk_opkg.googlecode.com_.svn_633_.tar.gz'
* I was unable to download DirectFB from the bitbake-recipe location;
* Quby tarball has been relocated to: http://web.archive.org/web/201704120019 ... r1.tar.bz2

Changed the recipe to download this:
https://src.fedoraproject.org/lookaside ... e5b51ad2d/

Recipe contents:
Code: Select all
require directfb.inc

RV = "1.2-0"
PR = "${INC_PR}.0"

DEPENDS += "sysfsutils"

#http://directfb.org/downloads/Core/DirectFB-1.2/DirectFB-${PV}.tar.gz \

SRC_URI += " \
    http://src.fedoraproject.org/lookaside/extras/directfb/DirectFB-1.2.8.tar.gz/ac13d21682aa368df4e177ae5b51ad2d/DirectFB-1.2.8.tar.gz \
    file://directfb-1.2.x-fix-pkgconfig-cflags.patch \
    file://mkdfiff.patch \
    file://dont-use-linux-config.patch \
    file://ts_lib_autotools.patch \
"

EXTRA_OECONF = "\
  --enable-freetype=yes \
  --enable-zlib \
  --with-gfxdrivers=none \
  --disable-libmpeg3 \
  --disable-sdl \
  --disable-vnc \
  --disable-x11 \
"

LEAD_SONAME = "libdirectfb-1.2.so.0"

SRC_URI[md5sum] = "ac13d21682aa368df4e177ae5b51ad2d"
SRC_URI[sha256sum] = "cbf94eb10e9c305c81b24e298e55c7825df5ab9060d82443f7b9734f760f859d"



Shit, it failed due to a lack of diskspace; apparently 35GiB is not enough. :(
Let's try again...
Rudolf
Member
Member
 
Posts: 94
Joined: December 2017

Re: Software: Open Embedded archive and extensions

Postby marcelr » Wed May 09, 2018 3:25 pm

??

What are you trying to do?
marcelr
Advanced Member
Advanced Member
 
Posts: 925
Joined: May 2012
Location: Ehv

Re: Software: Open Embedded archive and extensions

Postby Rudolf » Wed May 09, 2018 6:13 pm

Setting up my own buildenv so I can create custom packages.

My goal is to compile socat, so I can access z-wave over the network from i.e. Home Assistant.
http://cgit.openembedded.org/openembedd ... b?h=master
Rudolf
Member
Member
 
Posts: 94
Joined: December 2017

Previous

Return to Toon software development

Who is online

Users browsing this forum: No registered users and 0 guests