Let me clarify a bit more, as i can see that this still may be confusing: 1) VPP is using cmake to build binaries and packages, all cmake related stuff is in src/.
2) there is build-root/Makefile and files in build-data/* which are part of old build system called ebuild - ebuild is very complex set of make scripts which have similar functionality like buildroot, it was able to build kernel, toolchain , userspace tools and libraries - today we don't use much of ebuild, it is just used to run VPP cmake prioject in the right directory with he right set of command line arguments 3) Other Makefiles - top level makefile - external deps makefiles in build/external/ My comment bellow is that only 1) is really needed to build VPP, people can decide to use own build system like buildroot or yocto and invoke cmake directly, and completely ignore 2) and 3). In such case selected build system also needs to take care for dependencies like DPDK. ebuild 2) have excellent cross compilation support for building target images when those images contain everything from kernel and libraries to vpp but it is not appropriate tool for creating distribution packages, i.e. creating Centos ARM rpms on Ubuntu x86 machine. That is the reason why i tried to see if we can use docker instead to be able to build cross-arch, cross-distro or cross-distro-version (or all 3 together) packages. While my patch is incomplete, it looks to me like this approach will work. My patch does native compilation only if TARGET_QUAD is equal to HOST_QUAD, where QUAD is: - distro name (ubuntu, centos) - distro version (18.04, 7.3) - arch (x86_64, aarch64, ...) - platform (generic, thunderx, ….) it also support multiple build_types (release, debug, gcov, … ) At this point it is just early draft, but it shows some basic mechanics used to produce both native and cross packages. > On 31 Oct 2019, at 20:32, Damjan Marion via Lists.Fd.Io > <dmarion=me....@lists.fd.io> wrote: > > I have similar scheme on my mind, where you can have platform specific mk > files loaded…. > >> On 31 Oct 2019, at 20:23, Nitin Saxena <nsax...@marvell.com> wrote: >> >> Hi, >> >>>> cmake /path/to/vpp/src [your favorite xcompile args] cmake —build . >> Instead of having a shell script to pass cmake commands, I really liked the >> idea of passing vpp_cmake_args from build-data/platforms/*.mk >> (https://gerrit.fd.io/r/#/c/vpp/+/21035/23/build-data/platforms/native.mk@42). >> Any comment of taking those changes? >> >> Thanks, >> Nitin >> >>> -----Original Message----- >>> From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Damjan >>> Marion via Lists.Fd.Io >>> Sent: Friday, November 1, 2019 12:15 AM >>> To: Christian Hopps <cho...@chopps.org> >>> Cc: vpp-dev@lists.fd.io >>> Subject: [EXT] Re: [vpp-dev] cross-compilation support >>> >>> External Email >>> >>> ---------------------------------------------------------------------- >>> >>> Nobody requires you to use docker, you are free to pass right arguments >>> straight to the cmake. >>> >>> All the stuff in build-data, build-root, build/ is optional, and it is >>> there to help >>> developers to stage workspace and create packages but VPP can be built as >>> simple as: >>> >>> mkdir build >>> cd build >>> cmake /path/to/vpp/src [your favorite xcompile args] cmake —build . >>> >>> >>> >>>> On 31 Oct 2019, at 19:39, Christian Hopps <cho...@chopps.org> wrote: >>>> >>>> I mean to call out the use of docker/qemu. In order to allow for this the >>> user has to have extra privileges. >>>> >>>> As I mentioned, locally we use docker for building, I like it, it's a nice >>>> tool; >>> however, my personal opinion is that it seems wrong to require docker >>> and/or qemu for compiling an open source project. >>>> >>>> Important in holding this opinion is that it's seems possible to make this >>> work w/o docker/qemu/root, I think someone just has to find the time to >>> make an acceptable to the project working patch. >>>> >>>> I asked internally and it seems that our changes to support x-compile do >>> not go as far as producing debian/ubuntu packages, so they aren't ready for >>> upstreaming, unfortunately. >>>> >>>> Thanks, >>>> Chris. >>>> >>>>> On Oct 31, 2019, at 2:23 PM, Damjan Marion <dmar...@me.com> wrote: >>>>> >>>>> >>>>> That is just copy paste from Ben’s command line. >>>>> >>>>> As. i wrote, this is just about presenting the concept... >>>>> >>>>>> On 31 Oct 2019, at 18:39, Christian Hopps <cho...@chopps.org> wrote: >>>>>> >>>>>> Requiring root privileges for building software is pretty atypical and >>> limiting, even for x-compiling. >>>>>> >>>>>> Thanks, >>>>>> Chris. >>>>>> >>>>>>> On Oct 31, 2019, at 12:45 PM, Damjan Marion via Lists.Fd.Io >>> <dmarion=me....@lists.fd.io> wrote: >>>>>>> >>>>>>> >>>>>>> So what people think about following approach for cross-compilation: >>>>>>> >>>>>>> Patch: >>>>>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__gerrit.fd.io_r >>>>>>> _c_vpp_- >>> 2B_23153&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=S4H7jibYAtA5YO >>>>>>> >>> vfL3IkGduCfk9LbZMPOAecQGDzWV0&m=G81bDw8Lj77hbqAq7cdeDRXZev- >>> ZVMwh0n_ >>>>>>> oePUFrlQ&s=Lk5OD0CVQuGPdj-h0TfK-m8NMJj0Zci0EhjBcQxYn2E&e= >>>>>>> >>>>>>> At the moment this is just to show idea, so it works only for >>>>>>> x86-to-x86 and between ubuntu versions only but it can be easily >>> extended to scenarios like build vpp packages for AArch64 centos7 on >>> ubuntu x86 host. >>>>>>> >>>>>>> export CROSS_DISTRO_NAME=ubuntu >>>>>>> exprot CROSS_DISTRO_VER=18.04 >>>>>>> export CROSS_ARCH=x86_64 >>>>>>> export CROSS_TARGET=release >>>>>>> >>>>>>> $ make cross-env-init >>>>>>> >>>>>>> this is executed once, it creates docker container named "vpp-dev-env- >>> ubuntu-18.04-x86_64”, install all dependencies including DPDK and other >>> libs” >>>>>>> >>>>>>> $ make cross-env-update >>>>>>> >>>>>>> updates cross-env to latest packages and ext-deps >>>>>>> >>>>>>> $ make cross-shell >>>>>>> >>>>>>> starts shell inside cross-env >>>>>>> >>>>>>> $ make cross-package >>>>>>> >>>>>>> builds VPP and creates packages: >>>>>>> >>>>>>> ls -la build/ubuntu-18.04-x86_64-release total 11716 >>>>>>> drwxr-xr-x 3 root root 4096 Oct 31 17:30 . >>>>>>> drwxrwxr-x 4 damarion damarion 4096 Oct 31 17:36 .. >>>>>>> drwxr-xr-x 22 root root 4096 Oct 31 17:30 build >>>>>>> -rw-r--r-- 1 root root 190124 Oct 31 17:30 libvppinfra_20.01- >>> rc0~555-g7f980bcfe_amd64.deb >>>>>>> -rw-r--r-- 1 root root 145056 Oct 31 17:30 >>>>>>> libvppinfra-dev_20.01- >>> rc0~555-g7f980bcfe_amd64.deb >>>>>>> -rw-r--r-- 1 root root 23140 Oct 31 17:30 >>>>>>> python3-vpp-api_20.01- >>> rc0~555-g7f980bcfe_amd64.deb >>>>>>> -rw-r--r-- 1 root root 8815 Oct 31 17:30 vpp_20.01-rc0~555- >>> g7f980bcfe_amd64.buildinfo >>>>>>> -rw-r--r-- 1 root root 4147 Oct 31 17:30 vpp_20.01-rc0~555- >>> g7f980bcfe_amd64.changes >>>>>>> -rw-r--r-- 1 root root 3674024 Oct 31 17:30 vpp_20.01-rc0~555- >>> g7f980bcfe_amd64.deb >>>>>>> -rw-r--r-- 1 root root 23104 Oct 31 17:30 >>>>>>> vpp-api-python_20.01- >>> rc0~555-g7f980bcfe_amd64.deb >>>>>>> -rw-r--r-- 1 root root 719712 Oct 31 17:30 >>>>>>> vpp-dbg_20.01-rc0~555- >>> g7f980bcfe_amd64.deb >>>>>>> -rw-r--r-- 1 root root 915744 Oct 31 17:30 >>>>>>> vpp-dev_20.01-rc0~555- >>> g7f980bcfe_amd64.deb >>>>>>> -rw-r--r-- 1 root root 3113820 Oct 31 17:30 >>>>>>> vpp-plugin-core_20.01- >>> rc0~555-g7f980bcfe_amd64.deb >>>>>>> -rw-r--r-- 1 root root 3144784 Oct 31 17:30 >>>>>>> vpp-plugin-dpdk_20.01- >>> rc0~555-g7f980bcfe_amd64.deb >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -=-=-=-=-=-=-=-=-=-=-=- >>>>>>> Links: You receive all messages sent to this group. >>>>>>> >>>>>>> View/Reply Online (#14428): >>>>>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.fd.io_g_ >>>>>>> vpp- >>> 2Ddev_message_14428&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=S4H7ji >>> b >>>>>>> >>> YAtA5YOvfL3IkGduCfk9LbZMPOAecQGDzWV0&m=G81bDw8Lj77hbqAq7cdeD >>> RXZev-Z >>>>>>> VMwh0n_oePUFrlQ&s=iBMmIxh4KnS1Ig6WteL2- >>> 14ET0OV4oviKkohF5pvnKI&e= >>>>>>> Mute This Topic: >>>>>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.fd.io_mt >>>>>>> >>> _40199795_1826170&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=S4H7jibY >>> AtA5Y >>>>>>> >>> OvfL3IkGduCfk9LbZMPOAecQGDzWV0&m=G81bDw8Lj77hbqAq7cdeDRXZev- >>> ZVMwh0n >>>>>>> _oePUFrlQ&s=MfbIY3-EEVgV9eXT0IgUFliXj2yF4LQ5C8SDZWKqEIA&e= >>>>>>> Group Owner: vpp-dev+ow...@lists.fd.io >>>>>>> Unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https- >>> 3A__lists.fd.io_g_vpp- >>> 2Ddev_unsub&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=S4H7jibYAtA5YO >>> vfL3IkGduCfk9LbZMPOAecQGDzWV0&m=G81bDw8Lj77hbqAq7cdeDRXZev- >>> ZVMwh0n_oePUFrlQ&s=WBlsVcHNJGCJ9xYyS9QwicssF0GaRcoS8m- >>> 2KINBAQ0&e= [cho...@chopps.org] >>>>>>> -=-=-=-=-=-=-=-=-=-=-=- >>>>>> >>>>> >>>> >>>> -=-=-=-=-=-=-=-=-=-=-=- >>>> Links: You receive all messages sent to this group. >>>> >>>> View/Reply Online (#14434): >>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.fd.io_g_vpp >>>> - >>> 2Ddev_message_14434&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=S4H7ji >>> bYAtA5Y >>>> >>> OvfL3IkGduCfk9LbZMPOAecQGDzWV0&m=G81bDw8Lj77hbqAq7cdeDRXZev- >>> ZVMwh0n_oe >>>> PUFrlQ&s=oJ64M8FgFtN93xTTErLxt85eClgNdxMohhu2Fk8vCuU&e= >>>> Mute This Topic: >>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.fd.io_mt_40 >>>> >>> 199795_675642&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=S4H7jibYAtA5Y >>> OvfL3Ik >>>> GduCfk9LbZMPOAecQGDzWV0&m=G81bDw8Lj77hbqAq7cdeDRXZev- >>> ZVMwh0n_oePUFrlQ& >>>> s=Yrx16m5FpMJvTAPtftp7qv-ZWXW8XvQxTpFyAblkNJc&e= >>>> Group Owner: vpp-dev+ow...@lists.fd.io >>>> Unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https- >>> 3A__lists.fd.io_g_vpp- >>> 2Ddev_unsub&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=S4H7jibYAtA5YO >>> vfL3IkGduCfk9LbZMPOAecQGDzWV0&m=G81bDw8Lj77hbqAq7cdeDRXZev- >>> ZVMwh0n_oePUFrlQ&s=WBlsVcHNJGCJ9xYyS9QwicssF0GaRcoS8m- >>> 2KINBAQ0&e= [dmar...@me.com] >>>> -=-=-=-=-=-=-=-=-=-=-=- >> > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > > View/Reply Online (#14440): https://lists.fd.io/g/vpp-dev/message/14440 > Mute This Topic: https://lists.fd.io/mt/40237995/675642 > Group Owner: vpp-dev+ow...@lists.fd.io > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [dmar...@me.com] > -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14441): https://lists.fd.io/g/vpp-dev/message/14441 Mute This Topic: https://lists.fd.io/mt/40243741/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-