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

meta-qcom: initial u-boot support #651

Merged
merged 4 commits into from
Sep 20, 2024
Merged

Conversation

Scott31393
Copy link
Contributor

@Scott31393 Scott31393 commented Sep 13, 2024

Hi,

This patchset add the initial support for u-boot-qcom.
This has been tested on rb3gen2 board:

Flashing the image using fastboot:

fastboot flash uefi_a ./u-boot-qcs6490-rb3gen2.mbn

Below some logs from the test.

U-Boot 2024.10-rc4-00620-ga61af132fb90 (Sep 09 2024 - 10:00:06 +0000)

Model: Qualcomm Technologies, Inc. Robotics RB3gen2
DRAM:  6 GiB (effective 5.9 GiB)
serial_msm_geni serial@994000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
serial_msm_geni serial@994000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
Core:  57 devices, 28 uclasses, devicetree: board

Loading Environment from nowhere... OK
In:    serial,button-kbd
Out:   serial,vidconsole
Err:   serial,vidconsole
qcom-ufshcd ufs@1d84000: Qcom UFS HC version: 4.3.0
qcom-ufshcd ufs@1d84000: [RX, TX]: gear=[3, 3], lane[2, 2], pwr[FAST MODE, FAST MODE], rate = 2
QCOM-FMP: Failed to find boot partition
Net:   No ethernet found.

scanning bus for devices...
  Device 0: (0:0) Vendor: SAMSUNG Prod.: KM2L9001CM-B518 Rev: 0700
            Type: Hard Disk
            Capacity: 118871.9 MB = 116.0 GB (30431231 x 4096)
  Device 1: (0:1) Vendor: SAMSUNG Prod.: KM2L9001CM-B518 Rev: 0700
            Type: Hard Disk
            Capacity: 7.9 MB = 0.0 GB (2047 x 4096)
  Device 2: (0:2) Vendor: SAMSUNG Prod.: KM2L9001CM-B518 Rev: 0700
            Type: Hard Disk
            Capacity: 7.9 MB = 0.0 GB (2047 x 4096)
  Device 3: (0:3) Vendor: SAMSUNG Prod.: KM2L9001CM-B518 Rev: 0700
            Type: Hard Disk
            Capacity: 31.9 MB = 0.0 GB (8191 x 4096)
  Device 4: (0:4) Vendor: SAMSUNG Prod.: KM2L9001CM-B518 Rev: 0700
            Type: Hard Disk
            Capacity: 3071.9 MB = 2.9 GB (786431 x 4096)
  Device 5: (0:5) Vendor: SAMSUNG Prod.: KM2L9001CM-B518 Rev: 0700
            Type: Hard Disk
            Capacity: 31.9 MB = 0.0 GB (8191 x 4096)
starting USB...
Bus usb@a600000: Register 2000340 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@a600000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0 
=> <INTERRUPT>

Some references:

Thanks & Regards,
Tommaso

@Scott31393 Scott31393 force-pushed the sas/master/u-boot branch 2 times, most recently from 89c6f9b to bbd2fda Compare September 13, 2024 23:35
@lumag
Copy link
Collaborator

lumag commented Sep 14, 2024

@calebccff, could you please take a look?


UBOOT_CONFIG ??= "qcs6490-rb3gen2 sdm845-db845c"
UBOOT_CONFIG[qcs6490-rb3gen2] = "qcm6490_defconfig"
UBOOT_CONFIG[sdm845-db845c] = "qcom_defconfig"
Copy link

@calebccff calebccff Sep 14, 2024

Choose a reason for hiding this comment

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

you don't seem to do anything with this, should this support rb3 as well?

Choose a reason for hiding this comment

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

fixed my typo, meant to ask if db845c should be included here or not since I don't see support for generating a boot image or building a modified xbl image.

@calebccff
Copy link

overall looks pretty good! excited to see this support being added :D

@Scott31393
Copy link
Contributor Author

Scott31393 commented Sep 14, 2024

Thanks for your work! @calebccff :)

recipes-bsp/u-boot/u-boot-qcom_git.bb Outdated Show resolved Hide resolved
Add qtestsign tool.this is necessary to sign the u-boot for rb3gen2 board.

qtestsign is a simple tool to "sign" ELF Qualcomm firmware
images using a dummy certificate chain ("test keys").
It partially implements the image format described in Qualcomm's
whitepaper "Secure Boot and Image Authentication"
(both v1.0 and v2.0) by extending ELF images with a
Qualcomm-specific "hash segment", consisting of:

References:
 - https://www.linaro.org/blog/initial-u-boot-release-for-qualcomm-platforms/

Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
Add u-boot-qcom recipe. This fetch from Linaro repo and build the
u-boot-qcs6490-rb3gen2.mbn ready to be flashed into rb3gen2 board
usind fastboot:

fastboot flash uefi_a ./u-boot-qcs6490-rb3gen2.mbn

Some logs:

U-Boot 2024.10-rc4-00620-ga61af132fb90 (Sep 09 2024 - 10:00:06 +0000)

Model: Qualcomm Technologies, Inc. Robotics RB3gen2
DRAM:  6 GiB (effective 5.9 GiB)
serial_msm_geni serial@994000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
serial_msm_geni serial@994000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
Core:  57 devices, 28 uclasses, devicetree: board

Loading Environment from nowhere... OK
In:    serial,button-kbd
Out:   serial,vidconsole
Err:   serial,vidconsole
qcom-ufshcd ufs@1d84000: Qcom UFS HC version: 4.3.0
qcom-ufshcd ufs@1d84000: [RX, TX]: gear=[3, 3], lane[2, 2], pwr[FAST MODE, FAST MODE], rate = 2
QCOM-FMP: Failed to find boot partition
Net:   No ethernet found.

scanning bus for devices...
  Device 0: (0:0) Vendor: SAMSUNG Prod.: KM2L9001CM-B518 Rev: 0700
            Type: Hard Disk
            Capacity: 118871.9 MB = 116.0 GB (30431231 x 4096)
  Device 1: (0:1) Vendor: SAMSUNG Prod.: KM2L9001CM-B518 Rev: 0700
            Type: Hard Disk
            Capacity: 7.9 MB = 0.0 GB (2047 x 4096)
  Device 2: (0:2) Vendor: SAMSUNG Prod.: KM2L9001CM-B518 Rev: 0700
            Type: Hard Disk
            Capacity: 7.9 MB = 0.0 GB (2047 x 4096)
  Device 3: (0:3) Vendor: SAMSUNG Prod.: KM2L9001CM-B518 Rev: 0700
            Type: Hard Disk
            Capacity: 31.9 MB = 0.0 GB (8191 x 4096)
  Device 4: (0:4) Vendor: SAMSUNG Prod.: KM2L9001CM-B518 Rev: 0700
            Type: Hard Disk
            Capacity: 3071.9 MB = 2.9 GB (786431 x 4096)
  Device 5: (0:5) Vendor: SAMSUNG Prod.: KM2L9001CM-B518 Rev: 0700
            Type: Hard Disk
            Capacity: 31.9 MB = 0.0 GB (8191 x 4096)
starting USB...
Bus usb@a600000: Register 2000340 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@a600000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0
=> <INTERRUPT>

Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
Set u-boot-qcom as preferred virtual/bootloader.

Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
Add qcs6490-rb3gen2/sdm845-db845c u-boot configs to build boot
configurations using qcom-armv8a machine.

Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
Copy link

@quaresmajose quaresmajose left a comment

Choose a reason for hiding this comment

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

Thanks @Scott31393
LGTM

@lumag lumag merged commit 46d8b33 into Linaro:master Sep 20, 2024
2 checks passed
@lumag
Copy link
Collaborator

lumag commented Sep 20, 2024

@Scott31393 thank you for your contribution and for your patience through the review process!

@Scott31393
Copy link
Contributor Author

Hi @lumag nice!
Nothing to thanks!

@quaresmajose Thanks you all for the reviews and comments.
@calebccff Can't wait to see eth support at u-boot level and weston.

If I have some time I will try to take look on that into the next months ;)

@calebccff
Copy link

@calebccff Can't wait to see eth support at u-boot level and weston.

If I have some time I will try to take look on that into the next months ;)

ethernet works nicely on the rb1/2/5, its unfortunate that the rb3 and rb3gen2 use pcie hubs, but I'm working on it :p

@Scott31393
Copy link
Contributor Author

@calebccff Can't wait to see eth support at u-boot level and weston.
If I have some time I will try to take look on that into the next months ;)

ethernet works nicely on the rb1/2/5, its unfortunate that the rb3 and rb3gen2 use pcie hubs, but I'm working on it :p

Nice! Thanks for your work
pcie2usb :) Can't wait ;) I will try to take a look also on my side.
nfs + tftp :Q____

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