Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add docker support to all projects #4273

Closed
wants to merge 3 commits into from
Closed

[WIP] Add docker support to all projects #4273

wants to merge 3 commits into from

Conversation

sony2
Copy link
Contributor

@sony2 sony2 commented Aug 11, 2015

#4256

Add support for all projects:

  • Generic (OE 6.0)
  • Nvidia_Legacy (OE 6.0)
  • RPi
  • RPi2
  • WeTek_Play - old kernel
  • imx6 - old kernel

@sony2
Copy link
Contributor Author

sony2 commented Aug 23, 2015

For run docker I need libdevmapper:

PKG_NAME="LVM2"
PKG_VERSION="2.02.127"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://redhat.com"
PKG_URL="ftp://sources.redhat.com/pub/lvm2/LVM2.$PKG_VERSION.tgz"
PKG_SOURCE_DIR="LVM2.$PKG_VERSION"
PKG_PRIORITY="optional"
PKG_SECTION="system"
PKG_SHORTDESC="device mapper."
PKG_LONGDESC="device mapper."

PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"

pre_configure_target() {
export CFLAGS="$CFLAGS -fPIC -DPIC"
}

make_target() {
make device-mapper
}

makeinstall_target() {
make install_device-mapper
}

But when I build I receive this error:

/tmp/cc7ttLBw.ltrans1.ltrans.o::function _display_info.lto_priv.52: error: undefined reference to 'dm_task_get_info'
/tmp/cc7ttLBw.ltrans1.ltrans.o::function _display_info.lto_priv.52: error: undefined reference to 'dm_task_get_info'
/tmp/cc7ttLBw.ltrans5.ltrans.o::function _mangle.lto_priv.30: error: undefined reference to 'dm_task_get_info'
/tmp/cc7ttLBw.ltrans5.ltrans.o::function _stats_create.lto_priv.51: error: undefined reference to 'dm_task_get_info'
collect2: error: ld returned 1 exit status

Any suggestion?

@lrusak
Copy link
Contributor

lrusak commented Aug 23, 2015

I got it to build using this, http://sprunge.us/KINL

However I am not really into having LVM in OpenELEC. So you should try to package it as an add-on.

@sony2
Copy link
Contributor Author

sony2 commented Aug 23, 2015

Thanks @lrusak, it works. I'm testing with RPi2.

@sony2
Copy link
Contributor Author

sony2 commented Aug 24, 2015

@lrusak for intel platform there is no need of this dependency, I´m trying to build the docker version for RPi and it need some patches (i will remove libdevmapper dependency).

@sony2 sony2 closed this Sep 4, 2015
@sony2 sony2 reopened this Sep 5, 2015
@sony2
Copy link
Contributor Author

sony2 commented Sep 5, 2015

I have already tested the changes in all the devices I have (Generic, Nvidia_Legacy and RPi2). Now, about the rest of platforms I don't have, do you have any suggestions on how to test them? How do you usually manage to try them all?

@sraue
Copy link
Contributor

sraue commented Sep 7, 2015

simply enable/change all kernel config options like on the other projects so the changes are similiar

@popcornmix
Copy link

@sony2 are you sure all the config options are required?
We added docker support to the default Pi kernel here: raspberrypi/linux#1027
Some options like CONFIG_MEMCG_SWAP will affect performance and I'm reluctant to risk making OpenELEC slower for everyone for a feature that very few will make use of.

Can you check if the options in raspberrypi/linux#1027 give the features you need?

@sraue
Copy link
Contributor

sraue commented Sep 17, 2015

do we really need all this kernel config changes? if MEMCG is not needed and bad on RPi, do we need this for our x86 projects?

@sony2
Copy link
Contributor Author

sony2 commented Sep 29, 2015

Sorry about the late reply, I was on holiday.

It´s better to have MEMCG active, but the performance in RPi is bad by the moment.

@ghost
Copy link

ghost commented Oct 9, 2015

@sony2 I can help with testing on imx6

@lrusak
Copy link
Contributor

lrusak commented Oct 15, 2015

@sony2 After looking into this I have some findings.

Initially support should only be brought to the Generic, Generic_legacy, RPi, and RPi2 platforms. The imx6 and WeTek_Play use too old of kernels to use overlayfs (which is the easiest to setup because OpenELEC uses ext4 filesystem).

Take a look at my branch where I have docker compiling as an add-on for OE.
master...lrusak:docker

If you have any questions please ask. I have tested on Generic and RPi2 with success.

Using the docker provided tool here I adjusted the RPi2 kernel config. I have MEMCG but no MEMCG_SWAP or MEMCG_KMEM. Maybe @popcornmix can take a look at this on my branch as well.

You can drop the changes to systemd-addon-wrapper, they are not needed.

So for now please focus on Generic_Legacy, RPi and RPi2. Please rebase, squash and cleanup your commits.

@ghost
Copy link

ghost commented Oct 16, 2015

@lrusak @sony2 can we possibly add a similar patch (just without overlayfs) to support the generic LXC or systemd-nspawn (my actual use case) on imx6? That is, until the kernel is updated?

@lrusak
Copy link
Contributor

lrusak commented Oct 16, 2015

@vaskas yes I can, I have already built lxc and can make it an addon, might be able to package systemd-nspawn as well. Please ping me on IRC or email me so we can take the discussion off github.

@sony2
Copy link
Contributor Author

sony2 commented Oct 17, 2015

Sorry, the last few weeks have been very busy.

I have studied imx6 and WeTek_Play and effectively the kernel is too old.
This weekend I will rebase, squash and cleanup my commits.

@sony2
Copy link
Contributor Author

sony2 commented Oct 18, 2015

@lrusak Is now the code ok to merge?

@lrusak
Copy link
Contributor

lrusak commented Oct 19, 2015

Looks fine to me. @sraue it's up to you.

@mrmachine
Copy link
Contributor

I'd love to try this on the nvidia_legacy project. Is there any nightly test build I can try before this is merged in?

@MilhouseVH
Copy link
Contributor

All of the Nvidia_Legacy kernel options added here appear to be in master and OE 6 already, most likely as defaults with the 4.3 kernel, so try OE6.

This PR needs rebasing, or closing (the RPi/RPi2 kernel options might need rebasing).

@sony2
Copy link
Contributor Author

sony2 commented Nov 8, 2015

I need to check the master and then I will rebase the options needed.

@sony2 sony2 closed this Nov 14, 2015
@mrmachine
Copy link
Contributor

Why is this closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants