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

Add beagleplay support take 4 build branch #686

Merged
merged 13 commits into from
Sep 19, 2024

Conversation

delhiryder
Copy link
Collaborator

Re-opened the PR branch (after a successful force push)

@resin-jenkins
Copy link

Can one of the admins verify this patch?

@acostach acostach enabled auto-merge July 18, 2024 15:06
@acostach acostach requested a review from floion July 18, 2024 15:06
@acostach
Copy link
Contributor

@resin-jenkins test this please

@@ -6,3 +6,6 @@ IMAGE_ROOTFS_SIZE:beaglebone-ai64 = "733184"
IMAGE_INSTALL:append:beaglebone = " bb-org-overlays fix-mmc-bbb bb-wl18xx-bluetooth bb-wl18xx-wlan0"
IMAGE_INSTALL:append:beaglebone-ai64 = " mmc-utils vxd-dec-fw"
IMAGE_INSTALL:append:beaglebone-pocket = " boot-scripts"
IMAGE_INSTALL:append:beagleplay = " mmc-utils"

IMAGE_ROOTFS_SIZE:beagleplay = "1966080"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Root partitions are way too large, 733184 would be more appropriate

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Alexandru, please refer to this thread from zulip. @floion and I have already gone down the path of trying to reduce the size of the root partition, but not had any success. Here's the original post from Alex (from last September).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @delhiryder , the links you shared take me to the extlinux discussions, I don't see anything about the boot and root partitions sizes. The problem with this is that the flasher image cannot be archived using zip due to the 4GB limit for zip files. cc @floion

@@ -2,6 +2,8 @@ IMAGE_FSTYPES:append:beaglebone = " balenaos-img balenaos-img.bmap"
IMAGE_FSTYPES:append:beaglebone-pocket = " balenaos-img"
IMAGE_FSTYPES:append:beagleboard-xm = " balenaos-img"

BALENA_BOOT_SIZE:beagleplay = "327680"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, ~100MB should be more than sufficient for the boot partition

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the comment above.

@@ -0,0 +1,18 @@
FILESEXTRAPATHS:append := ":${THISDIR}/${PN}"
Copy link
Contributor

@acostach acostach Jul 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should leave a note here too on the reason for disabling the watchdog

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have already added a line to the commit message: fc7769e (reproduced below):

"Also, disabled the hardware watchdog (due an ongoing open issue, whose fix is currently being tested). Add the "test_watchdog" package to the kernel package (for easy verification of the patch, when it become available)."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't hurt to leave a comment in the file because it's quicker for someone investigating a problem and looking at this file on a remote device to understand the reason behind the configuration. Otherwise he would have to go find the device integration repository, search for the yocto package as well as for the layer which provides/modifies it then look in the git history for it, to finally understand why. cc @floion

@floion
Copy link
Collaborator

floion commented Jul 22, 2024

@resin-jenkins test this please

@acostach
Copy link
Contributor

@resin-jenkins retest this please

2 similar comments
@acostach
Copy link
Contributor

@resin-jenkins retest this please

@rcooke-warwick
Copy link
Contributor

@resin-jenkins retest this please

Added a new 'beagleplay' device type coffee script. Also updated the "#Supported Machines" sections of the local.conf.sample to make the 'beagleplay' machine target available for building via bitbake.

Signed-off-by: Sidd Gupta <[email protected]>
For the beagleplay MC targets, change this to "u-boot-bb.org" (this is maintained by the bb/ti team). Explicity set the UBOOT_GIT_URI to the one from git.beagleboard.org. Also specified the release version and SRCREV.
Added an extlinux.conf file, to ensure that the OS boots up properly. Added patches suggested by the beagleboard discord community - these were needed to get the wlcore startup errors being encountered during initial bootup.

Signed-off-by: Sidd Gupta <[email protected]>
Add kernel wlan_en regulator patch as suggested by Nishanth Menon (of TI). Also, disabled the hardware watchdog (due an ongoing open issue, whose fix is currently being tested). Add the "test_watchdog" package to the kernel package (for easiy verification of the patch, when it become available).

Signed-off-by: Sidd Gupta <[email protected]>
Added appropriate variables and append/remove packages and packagegroups to the balena-image* recipes. Had to increase the IMAGE_ROOTFS_SIZE to 1966080 to enable the recipe to run to completion.

Signed-off-by: Sidd Gupta <[email protected]>
Updated the balena-image-flasher and associated dependent recipes to support building a balena-image-flasher image for the beagleplay device.

Changelog-entry: Add beagleplay support
Signed-off-by: Sidd Gupta <[email protected]>
Make sure to get the wl18xx-conf.bin file from the `beagleboard` repo (instead of the git.ti.com one). This is needed (in conjunction with the 6.1.80 kernel) to make sure the wifi interface comes up properly.

Signed-off-by: Sidd Gupta <[email protected]>
    Updated the balena-image-flasher and associated dependent recipes to support bootup using an extlinux.conf file. This had been removed accidentally.

    Changelog-entry: Add beagleplay support
    Signed-off-by: Sidd Gupta <[email protected]>
@acostach acostach force-pushed the add_beagleplay_support_take_4_build_branch branch from ad66aed to 3fdf35e Compare August 20, 2024 06:23
@acostach
Copy link
Contributor

@resin-jenkins retest this please

This is needed for u-boot to be loaded from sd-card, and
also alows us to drop the extlinux.conf and kernel image
from the boot partition, and use the embedded u-boot
scripts to load the kernel and dtb from the rootfs instead.

Signed-off-by: Alexandru Costache <[email protected]>
We drop using the extlinux completely, and switch to
using boot scripts to load the kernel and dtb
from the appropriate boot medium root filesystem.

We also add the mandatory CRC32 checks.

Signed-off-by: Alexandru Costache <[email protected]>
@acostach
Copy link
Contributor

Relies on balena-os/meta-balena#3494 being merged for booting the flasher image from the sd-card. Since the autokit cannot control the USR and RST buttons, having u-boot already present on the eMMC is sufficient for the autokit

Copy link
Contributor

@acostach acostach Aug 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@delhiryder do you know why this recipe was needed? It seems the device works with the linux-firmware provided by meta-balena. Unless there is a specific reason for it, we can drop this and thus decrease partitions and the total image size

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @delhiryder please delete this recipe as it was tested by Alex that it does not seem to be needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK @floion

@acostach
Copy link
Contributor

@resin-jenkins test this please

2 similar comments
@acostach
Copy link
Contributor

@resin-jenkins test this please

@acostach
Copy link
Contributor

@resin-jenkins test this please

@floion floion force-pushed the add_beagleplay_support_take_4_build_branch branch 2 times, most recently from 9f2c59c to 78a5976 Compare August 29, 2024 10:11
@floion floion force-pushed the add_beagleplay_support_take_4_build_branch branch from 78a5976 to 2a088d1 Compare August 29, 2024 10:27
@@ -2,6 +2,10 @@ include balena-image.inc

BALENA_BOOT_PARTITION_FILES:append:beaglebone = " uEnv.txt_internal:"

BALENA_BOOT_PARTITION_FILES:append:beagleplay = " \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @delhiryder this commit can be removed completely since @acostach worked out in 1eae4da that we can skip using extlinux.conf

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK @floion

@@ -0,0 +1,24 @@
From 1920d52d6f37b57d43f9adf533fd40045fe3132b Mon Sep 17 00:00:00 2001
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch is not being applied and also tested that without it the wifi does not have issues so it can be deleted from here @delhiryder

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK @floion

@floion floion force-pushed the add_beagleplay_support_take_4_build_branch branch from 2a088d1 to 008935d Compare August 30, 2024 07:47
The old partition sizes were generating an 8GB
image, which is more than what can be compressed
in a zip. Dropping the custom linux-firmware recipe
as well as the kernel from the boot partition
allows us to use the standard balenaOS recipe and
to also use the same partitions sizes as the beagle-ai64

Signed-off-by: Alexandru Costache <[email protected]>
The device boots, has functional usb, hdmi, ethernet
ports as well as the wifi is working without this custom
recipe. Unless it is necessary for a particular reason,
it can be dropped.

Signed-off-by: Alexandru Costache <[email protected]>
@acostach acostach force-pushed the add_beagleplay_support_take_4_build_branch branch from 008935d to 231984b Compare September 16, 2024 15:01
Changelog-entry: layers/meta-balena: Update to v6.0.24
Signed-off-by: Alexandru Costache <[email protected]>
@acostach acostach force-pushed the add_beagleplay_support_take_4_build_branch branch from 231984b to 6166bf2 Compare September 16, 2024 15:28
@acostach
Copy link
Contributor

@resin-jenkins test this please

@acostach acostach merged commit b826c36 into master Sep 19, 2024
51 checks passed
@acostach acostach deleted the add_beagleplay_support_take_4_build_branch branch September 19, 2024 10:04
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.

5 participants