support Connect Tech Photon

Hi @acostach,

Trough this way i would like to discuss the best option to support the Connect Tech Photon board. Because Connect Tech provides BSP sources this would be a fairly straightforward job by patching linux-tegra-4.9. This is the approach we took for our own Yocto distribution and could work for Balena as well.

One of the reasons we choose for the Photon carrier board is that it both supports Nano & NX. Although NX will be supported from JetPack 4.4 onwards it also requires it’s own BSP for Photon which has to be released by Connect Tech.

Basically this means we need to add following MACHINE (photon-nano, photon-nx) to balena-jetson in which the photon-nano can be supported allready.

If you agree with the above we could prepare a PR. Basically it’s a decision by either providing DTB directly or compile from source.

Hi @remsol, for now you can provide the DTB directly in the PR if that’s all there’s needed for it to work.

Check, that’s the easiest solution. Please see following PR.

Seems fine, but it needs to be split so that it adheres to the commit guidelines. I’ve answered in github with an example PR.

Done. Small thing i noticed when performing a clean build.

ERROR: openvpn-2.4.7-r0 do_package_qa: QA Issue: /etc/openvpn-misc/upscript.sh contained in package openvpn requires /bin/bash, but no providers found in RDEPENDS_openvpn? [file-rdeps]
ERROR: openvpn-2.4.7-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: openvpn-2.4.7-r0 do_package_qa: 
ERROR: openvpn-2.4.7-r0 do_package_qa: Function failed: do_package_qa

Build finishes successfully when started a second time.

I did a build for the first time from your PR just now and didn’t see the error your encountered:

[000001578][LOG]Build for photon-nano suceeded.
[000001578][LOG]If build for photon-nano succeeded, final image should have been generated here:
[000001578][LOG]   photon-nano/tmp/deploy/images/photon-nano/resin-image-photon-nano.resinos-img
[000001578][LOG]Done.

I suspect what you saw was caused by a problem or glitch in your sstate cache or similar. To avoid and fix this sort of issues it can help doing

git submodule update --init --recursive

whenever you switch or pull branches, and also performing ‘bitbake -c cleansstate’ for packages that are modified by you or by branch updates, before re-building.

That’s weird, i still get the OpenVPN error while building v2.49.0+rev1 from master from a clean Ubuntu 18.04 server.

Another thing I noticed are following warnings;

WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_IP_NF_TARGET_LOG=m in the kernel configs failed for misc.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_USB_SERIAL_GENERIC=m in the kernel configs failed for usb-serial.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_CRYPTO_LZO=m in the kernel configs failed for zram.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NF_TABLES_INET=y in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NFT_OSF=m in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NF_TABLES_IPV4=y in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NFT_FIB_IPV4=m in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NF_TABLES_IPV6=y in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NF_TABLES_ARP=y in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NFT_FIB=m in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NFT_CONNLIMIT=m in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NF_SOCKET_IPV6=m in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NFT_FIB_NETDEV=m in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NFT_TPROXY=m in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NF_TABLES_NETDEV=y in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NF_SOCKET_IPV4=m in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NFT_TUNNEL=m in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NFT_FIB_INET=m in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NF_TPROXY_IPV6=m in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NF_TABLES_SET=m in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NFT_OBJREF=m in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NFT_SOCKET=m in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NF_TPROXY_IPV4=m in the kernel configs failed for nf_tables.
WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_NFT_FIB_IPV6=m in the kernel configs failed for nf_tables.
    WARNING: linux-tegra-4.9+gitAUTOINC+47e7e1cb0b-r0 do_kernel_resin_checkconfig: Checking for CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y in the kernel configs failed for debug_kmemleak.

Anyway, I’ve flashed the Photon Nano and is onboarded in staging UUID=7d7a7a6238f398a927902891eb1e2710. With the SD card functionality working the board is ready for production.

Hi @remsol

If you modify meta-balena/meta-balena-common/recipes-connectivity/openvpn/openvpn_%.bbappend
to add bash like so to this line:
RDEPENDS_${PN} += "resin-vars bash"
do you still see the problem with a new build, done without sstate or on a new computer?

For the checkconfig warnings I’ve raised https://github.com/balena-os/balena-jetson/issues/64 to track fixing.

BalenaOS 2.49 has just been released and devices testing is not done yet. For the production release do you want BalenaOS v2.49.0 or the v2.48.0 which was tested?

Hi @acostach,

I can confirm that adding bash to RDEPENDS solves the issue and successfully builds out of clean state. Should this be a PR to meta-balena?

Let’s release the board with BalenaOS v2.49.0 as this also includes PR 63.

Hi

A PR to meta-balena does make sense since we have it working with this fix

Also, 2.48+rev5 does include PR 63. For new releases, we do the testing on the hardware itself, so 2.49 will take some days to be ready for a release.

@anujdeshpande, I’ve created following PR in meta-balena.

If PR63 is also included in 2.48+rev5 then that’s fine by me. Do you actually test on a physical Photon equipped with Nano in house?

Hi @remsol

Great, thanks for the PR!

With regard to your question: No, for community boards, it’s the user who submitted the community board support PR who is in charge of supporting and testing their board further. We only test the BalenaOS release on the jetson nano devkit carrier board, so we know a specific BalenaOS runs fine on the standard setup.

Kind regards
Alida