Changes for armhf cross compilation build (instead of using qemu) th…#52
Changes for armhf cross compilation build (instead of using qemu) th…#52gregshpit wants to merge 3 commits into
Conversation
|
|
||
| PACKAGE_PRE_NAME := mrvlprestera | ||
| ifeq ($(CROSS_BUILD_ENVIRON), y) | ||
| KVERSION ?= 4.19.0-12-2-armmp |
There was a problem hiding this comment.
Is it possible to use variables from rules/kernel.mk instead hard coding
| mkdir -p $BUILDINFO_VERSION_PATH | ||
|
|
||
| if [[ $CROSS_BUILD_ENVIRON == y ]]; then | ||
| # Copy pre-compiled (cross-compiled) python wheels used in dockers |
There was a problem hiding this comment.
need to intend the if/fi block
| DOCKERFILE_PATH=$(dirname "$DOCKERFILE_TARGE") | ||
| BUILDINFO_PATH="${DOCKERFILE_PATH}/buildinfo" | ||
| BUILDINFO_VERSION_PATH="${BUILDINFO_PATH}/versions" | ||
| if [[ $CROSS_BUILD_ENVIRON == y ]]; then |
There was a problem hiding this comment.
indent the if/fi blck
|
|
||
| COPY ./cross-build-arm-python-reqirements.sh ./ | ||
| # Cross-compile the heaviest python packages for arm | ||
| RUN PATH=/python_virtualenv/env2/bin/:/python_virtualenv/env3/bin/:$PATH CC=$CROSS_CC /bin/bash -c ./cross-build-arm-python-reqirements.sh && ls -l TARGET |
There was a problem hiding this comment.
Rename TARGET to PRE_BIN_TARGET_$(CONFIGUREAD_ARCH) or something which is readable instead more generic
| @@ -0,0 +1,35 @@ | |||
| #!/bin/bash | |||
|
|
|||
| declare -a pkgs=("grpcio==1.38.0" "grpcio-tools==1.20.0" "m2crypto==0.36.0" "bitarray==1.5.3" "lxml==4.6.3") | |||
There was a problem hiding this comment.
where and how you got the versions numbers?
Is there any way it can maintained some where common?
| if [ $count != 0 ] | ||
| then | ||
| tar xvf wheel-download/*.gz -C wheel-download/sources | ||
| cd wheel-download/sources/* && CC=$CC LDSHARED="$CC -shared" python3 -u -c "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\ri\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" --verbose bdist_wheel --plat-name linux_armv7l -d ../../../TARGET && cd ../../../ |
There was a problem hiding this comment.
You can use pushdand popd , instead of cd
| sed -i "s/doc\/manpages/build\/doc\/manpages/g" debian/frr.manpages | ||
| sed -i "s/doc\/user\/_build\/texinfo/build\/doc\/user\/_build\/texinfo/g" debian/frr-doc.info | ||
|
|
||
| CFLAGS="-I $$CROSS_PKGS_LIB_PATH/perl/5.28.1/CORE/" LDFLAGS=" -L $$CROSS_PKGS_LIB_PATH" CONFIG_SITE=/etc/dpkg-cross/cross-config.$(CONFIGURED_ARCH) LD_LIBRARY_PATH=$(CROSS_LIB_PATH) dpkg-buildpackage -rfakeroot -b -d -us -uc -Ppkg.frr.nortrlib -a$(CONFIGURED_ARCH) -Pcross,nocheck -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR) |
There was a problem hiding this comment.
Plrease check perl version can be kept at common place..
| $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | ||
| # Build the package | ||
| pushd ./frr | ||
| ifeq ($(CROSS_BUILD_ENVIRON), y) |
There was a problem hiding this comment.
Why do you need this for cross?
| override_dh_auto_build: | ||
| override_dh_auto_install: | ||
| ifeq ($(CROSS_BUILD_ENVIRON), y) | ||
| make CROSS_COMPILE=$(CROSS_COMPILE) CC=$(CROSS_CC) LD_LIBRARY_PATH=$(CROSS_LIB_PATH) systemd-sonic-generator |
There was a problem hiding this comment.
Why dont you define "CROSS_COMPILE=$(CROSS_COMPILE) CC=$(CROSS_CC) LD_LIBRARY_PATH=$(CROSS_LIB_PATH)" as a make CROSS_FLAGS variable and then
add use it in all debian rules.. without if checks?
… sonic-mgmt-framework module
antony-rheneus
left a comment
There was a problem hiding this comment.
Please fix indentation of if/endif blocks
Also update README.md on cross build usage
…at reduced building time to about 6 hours
Why I did it
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
Description for the changelog
A picture of a cute animal (not mandatory but encouraged)