Skip to content

Conversation

@tlaurion
Copy link
Collaborator

@tlaurion tlaurion commented Sep 11, 2024

Upstream merged lib/jpeg chosen fixes, more elegant then increasing the HEAP_SIZE:

This replaces pending patches (Dasharo fork not needing HEAP_SIZE changes in configs in master since based on coreboot prior of https://review.coreboot.org/c/coreboot/+/78271 which introduced wuff for jpeg parser)


Repro:

rm patches/coreboot-24.02.01/0001* patches/coreboot-24.02.01/0002*
git fetch https://review.coreboot.org/coreboot refs/changes/94/83894/2 && git format-patch -1 --stdout FETCH_HEAD > patches/coreboot-24.02.01/0001-vc_wuffs-upgrade-to-Wuffs_0.4.0-alpha.8.patch
git fetch https://review.coreboot.org/coreboot refs/changes/95/83895/3 && git format-patch -1 --stdout FETCH_HEAD > patches/coreboot-24.02.01/0002-lib_jpeg-avoidcalling-malloc-and-free.patch
sed -i 's/CONFIG_HEAP_SIZE=0x400000/CONFIG_HEAP_SIZE=0x100000/g' config/coreboot-*

@JonathonHall-Purism (Purism fork needs the change too)

Tested working under qemu.

@tlaurion tlaurion force-pushed the remove_heap_increase_patch_and_config_changes branch from b1fda3b to cca34f1 Compare September 11, 2024 22:20
@tlaurion tlaurion changed the title coreboot patches: remove lib/jpeg patches for heap increase and alloc failure. Add https://review.coreboot.org/c/coreboot/+/83895 coreboot patches: replaced lib/jpeg patches for heap increase and alloc failure with upstreamed merged ones Sep 11, 2024
@tlaurion
Copy link
Collaborator Author

tlaurion commented Oct 2, 2024

@JonathonHall-Purism ping! :)

@tlaurion tlaurion added the release cycle - 2025-01-30 (originally targeted 2024-11-20) label Oct 7, 2024
@JonathonHall-Purism
Copy link
Collaborator

@tlaurion Please cherry-pick this change to coreboot-purism: d67ffae

This updates the Purism coreboot with the JPEG decoder improvements, which is needed to revert their coreboot Kconfigs (already done in the PR).

I'll test once we get a CI build.

@tlaurion tlaurion force-pushed the remove_heap_increase_patch_and_config_changes branch from cd0b43c to 3a07b09 Compare October 19, 2024 13:31
@tlaurion
Copy link
Collaborator Author

@JonathonHall-Purism sorry for the delay: roms built for 3a07b09

@tlaurion
Copy link
Collaborator Author

@JonathonHall-Purism ping :)

Copy link
Collaborator

@JonathonHall-Purism JonathonHall-Purism left a comment

Choose a reason for hiding this comment

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

Tested Librem 14, works. LGTM 👍

@tlaurion
Copy link
Collaborator Author

tlaurion commented Oct 29, 2024 via email

tlaurion and others added 4 commits October 30, 2024 10:00
… failure. Add https://review.coreboot.org/c/coreboot/+/83895

Repro:
rm patches/coreboot-24.02.01/0001* patches/coreboot-24.02.01/0002*
git fetch https://review.coreboot.org/coreboot refs/changes/94/83894/2 && git format-patch -1 --stdout FETCH_HEAD > patches/coreboot-24.02.01/0001-vc_wuffs-upgrade-to-Wuffs_0.4.0-alpha.8.patch
git fetch https://review.coreboot.org/coreboot refs/changes/95/83895/3 && git format-patch -1 --stdout FETCH_HEAD > patches/coreboot-24.02.01/0002-lib_jpeg-avoidcalling-malloc-and-free.patch
sed -i 's/CONFIG_HEAP_SIZE=0x400000/CONFIG_HEAP_SIZE=0x100000/g' config/coreboot-*

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
Instead of requesting additional ramstage heap, cherry-pick patches for
newer JPEG decoder that does not require heap allocation.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
…place

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
…e to fix CONFIG_HEAP_SIZE

Did for TXT/non-TXT boards:
docker run -e DISPLAY=$DISPLAY --network host --rm -ti -v $(pwd):$(pwd) -w $(pwd) tlaurion/heads-dev-env:latest -- make BOARD=optiplex-7010_9010*-hotp-maximized coreboot.modify_and_save_oldconfig_in_place

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
@tlaurion tlaurion force-pushed the remove_heap_increase_patch_and_config_changes branch from d271254 to ccfb4c1 Compare October 30, 2024 14:01
@tlaurion tlaurion merged commit ee6e05b into linuxboot:master Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release cycle - 2025-01-30 (originally targeted 2024-11-20)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants