Skip to content

Add eMMC installer#30

Merged
pamolloy merged 2 commits into
mainfrom
add-emmc-installer
Jul 13, 2026
Merged

Add eMMC installer#30
pamolloy merged 2 commits into
mainfrom
add-emmc-installer

Conversation

@katiaTsaruk

Copy link
Copy Markdown
Contributor

Added eMMC installer step to the bootstrap init script. After flashing U-Boot
to SPI, the installer downloads and writes a compressed system image to eMMC.

The image is served compressed (.gz) as a temporary workaround for a suspected
race condition in the SC598 MMC kernel driver that causes a crash under memory
pressure when streaming the raw 7.6 GB image. This will be reverted once the
driver bug is fixed.

@katiaTsaruk katiaTsaruk self-assigned this Jun 25, 2026
@katiaTsaruk katiaTsaruk added this to ADSP Jun 25, 2026
@katiaTsaruk katiaTsaruk linked an issue Jun 25, 2026 that may be closed by this pull request
2 tasks
@pamolloy pamolloy moved this to In Development in ADSP Jun 25, 2026
@pamolloy

Copy link
Copy Markdown
Contributor
2026-06-25T12:25:05.3801308Z >>>   Executing post-image script /home/runner/_work/br2-external/br2-external/board/adi/ev-sc598-som/post-image.sh
2026-06-25T12:25:05.3806411Z /bin/sh: line 1: /home/runner/_work/br2-external/br2-external/board/adi/ev-sc598-som/post-image.sh: Permission denied
2026-06-25T12:25:05.3807694Z make[1]: *** [Makefile:834: target-post-image] Error 126
2026-06-25T12:25:05.4024498Z make: *** [Makefile:83: _all] Error 2
2026-06-25T12:25:05.4052616Z ##[error]Process completed with exit code 2.

@pamolloy pamolloy requested review from a team and removed request for gastmaier, ozan956 and pamolloy June 25, 2026 14:18
Comment thread board/adi/ev-sc598-som/bootstrap/overlay/init Outdated
Comment thread readme.md Outdated
Comment thread board/adi/ev-sc598-som/post-image.sh
Comment thread board/adi/ev-sc598-som/bootstrap/overlay/init Outdated
Comment thread board/adi/ev-sc598-som/bootstrap/overlay/init Outdated
Comment thread board/adi/ev-sc598-som/bootstrap/overlay/init
Comment thread board/adi/ev-sc598-som/bootstrap/post-build.sh Outdated
Comment thread configs/debug.fragment Outdated
Comment thread configs/debug.fragment Outdated
Comment thread board/adi/ev-sc598-som/bootstrap/overlay/init Outdated
Comment thread board/adi/ev-sc598-som/bootstrap/overlay/init Outdated
Comment thread board/adi/ev-sc598-som/bootstrap/overlay/init Outdated

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.

I think it would be good to make the provisioning flow a bit more explicit here.

The board supports both SPI and eMMC boot paths in U-Boot (sfboot and emmcboot). This bootstrap script currently installs SPI first, then optionally writes the full eMMC image. I think it would be safer if SPI installation and eMMC installation were separate prompts/actions, so the user can choose which storage target they want to program.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Also, not every board has an eMMC, the older boards like the sc594 and sc589 don't. We should either have the user explicitly choose to program the eMMC or more preferably have the script automatically give the option based on which board it is programming.

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.

But since this script is listed under adi/ev-sc598-som, I think there is no harm to be sc598 specific 😄

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

So is the future plan for each board to have its own overlay script base on its available hardware?

Comment thread board/adi/ev-sc598-som/bootstrap/overlay/init
Add eMMC installation step to the bootstrap init script. This implements
a hybrid boot architecture where:
- SPI flash stores the bootloader (U-Boot SPL + U-Boot)
- eMMC stores the full system image (kernel + root filesystem)

The installer flow:
1. Programs U-Boot SPL and U-Boot to SPI flash
2. Downloads emmc.img.gz from PC over HTTP
3. Writes image to eMMC
4. Waits for user to switch S1 to position 1 (SPI boot mode)
5. Reboots and boots U-Boot from SPI, which then loads Linux from eMMC

Signed-off-by: Kateryna Tsaruk <kateryna.tsaruk@analog.com>
Add post-image.sh to compress emmc.img to emmc.img.gz during debug
image build. This is a temporary workaround for a suspected SC598 MMC
driver race condition that crashes under memory pressure.

The compressed image reduces download size and is decompressed during
eMMC write by the bootstrap installer.

Signed-off-by: Kateryna Tsaruk <kateryna.tsaruk@analog.com>
Comment thread board/adi/ev-sc598-som/bootstrap/overlay/init

@ozan956 ozan956 left a comment

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.

Note for me: We need to update the bootstrap test in hw-test repo to align with the new bootstrap flow. We can also consider to ignore the eMMC part of bootstrapping and wait until #28 comes.

@pamolloy pamolloy merged commit db168fe into main Jul 13, 2026
9 checks passed
@pamolloy pamolloy deleted the add-emmc-installer branch July 13, 2026 07:30
@github-project-automation github-project-automation Bot moved this from In Development to Done in ADSP Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Bootstrap eMMC with Kernel and RFS

6 participants