Skip to content

Improved support for stm32mp1-disco#306

Merged
ricardosalveti merged 8 commits intofoundriesio:masterfrom
ricardosalveti:master-dev
Apr 9, 2021
Merged

Improved support for stm32mp1-disco#306
ricardosalveti merged 8 commits intofoundriesio:masterfrom
ricardosalveti:master-dev

Conversation

@ricardosalveti
Copy link
Copy Markdown
Member

  • Switch to wic image format
  • Use kernel config fragments from our main kernel meta tree
  • Support for u-boot env and image update/rollback

Copy link
Copy Markdown
Contributor

@Tim-Anderson Tim-Anderson left a comment

Choose a reason for hiding this comment

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

just the one comment. all else LGTM

Comment on lines +13 to +15
part fsbl1 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl1 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-stm32mp157c-dk2-trusted.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K --align 17
part fsbl2 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl2 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-stm32mp157c-dk2-trusted.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
part ssbl --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=ssbl --sourceparams="file=${DEPLOY_DIR_IMAGE}/bootloader/u-boot-stm32mp157c-dk2-trusted.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 2048K
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are they all suppose to be ext4? I thought that boot partition was fat/vfat/

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In this wks we don't have a vfat partition (for boot), these are special partitions for atf and u-boot (since this is gpt, they don't use an offset).

I didn't try if other fstypes would work the same way as I just copied that logic from https://github.com/STMicroelectronics/meta-st-stm32mp/blob/dunfell/wic/sdcard-stm32mp157c-dk2-trusted-vendorfs-1GB.wks.in.

Relevant changes:
- 94ab2bee bsp: stm32mp1-disco: cleanup config (remove duplicates)
- 3c17ce48 bsp: stm32mp1-disco: enable CONFIG_EFI_PARTITION

Signed-off-by: Ricardo Salveti <[email protected]>
fw_env files for mmc, nand and nor are installed by default, but without
a standard link the fw_* tools won't work without additional parameters.

As we know disco uses mmc by default, create the appropriate link.

Signed-off-by: Ricardo Salveti <[email protected]>
Provide lmp u-boot config fragment for disco, containing the required
configuration settings and bootcommand (which includes support for
update and rollback).

boot.itb won't be required later on (boot firmware upgrade), so make the
boot command logic as part of the default u-boot environment via boot
command for now (this allows us to drop the vfat partition requirement).

Signed-off-by: Ricardo Salveti <[email protected]>
wks file for stm32mp1-disco with sota support.

Signed-off-by: Ricardo Salveti <[email protected]>
The preferred kernel fitimage class is kernel-lmp-fitimage.

Signed-off-by: Ricardo Salveti <[email protected]>
Prefer standard wic image format instead of flashlayout.

Signed-off-by: Ricardo Salveti <[email protected]>
Not required as initrd can be loaded and consumed from the default
address used when loading the kernel fitimage.

Signed-off-by: Ricardo Salveti <[email protected]>
Now that the u-boot environment is working correctly from u-boot and
userspace, enable the sota ubootenv feature so it can be manipulated by
aktualizr-lite during an update (for update and rollback support).

Signed-off-by: Ricardo Salveti <[email protected]>
Copy link
Copy Markdown
Contributor

@angolini angolini left a comment

Choose a reason for hiding this comment

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

LGTM. nothing to comment

@ricardosalveti ricardosalveti merged commit e302d8c into foundriesio:master Apr 9, 2021
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.

3 participants