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

Rebase dasharo/coreboot to 24.12 #1241

Open
macpijan opened this issue Feb 17, 2025 · 7 comments
Open

Rebase dasharo/coreboot to 24.12 #1241

macpijan opened this issue Feb 17, 2025 · 7 comments
Assignees

Comments

@macpijan
Copy link
Contributor

macpijan commented Feb 17, 2025

Create a new branch, starting from 24.12 release, applying our unmerged commits on top of that.

In the process we might try to squash some related commits - in that case, we should leave some notes there, or in commit message (or both).

We can use this issue as a general discussion of this process.

As for branch naming: we can always rename, we may consider dev/24.12 as we're discussing this flow elsewhere, and perhaps we will adopt some of it in the end.

Additional task, that could be done during rebase: TBD

  • patches classification - inspired by: https://docs.yoctoproject.org/contributor-guide/recipe-style-guide.html#patch-upstream-status
  • add Upstream-Status tag to indicate whether the patch is Pending (to be submitted upstream), or Inappropriate [dasharo-specific] (not planned to upstream), or something else
  • TBD - link to the process description in docs.dasharo
    • this process is still in discussion, but we have agreed that some form of classification whether we plan to upstream certain patches, or not, would be useful

I will replace this with link to the actual documentation once in place.

@tlaurion
Copy link

tlaurion commented Feb 17, 2025

Just an input on my side using 24.12 on which libreboot last release depends on and on which t480 community effort was based on at linuxboot/heads#1906

I foolishly just tried to reuse that branch+patches (and without patches) to build all other old boards and those all fail with messages similar to for buillding x230-hotp-maximized:
coreboot-24.12_older_boards_bump.log

Excerpt:

    GCC        ramstage/libgfxinit/common/dyncpu/hw-gfx-gma-config.o
/home/user/heads/build/x86/coreboot-2412/util/crossgcc/xgcc/bin/i386-elf-gcc --RTS=x230-hotp-maximized/libgnat-x86_32/ -gnatp -Wuninitialized -Wall -Werror -pipe -g -nostdinc -Wstrict-aliasing -Wshadow -fno-common -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-pie -gnatwa.eeD.HHTU.U.W.Y -gnatyN -Os -m32  -fuse-ld=bfd -fno-stack-protector -Wl,--build-id=none -I3rdparty/libgfxinit/common/ -I3rdparty/libgfxinit/common/dyncpu/ -I3rdparty/libgfxinit/common/ironlake/ -I3rdparty/libhwbase/ada/dynamic_mmio/ -I3rdparty/libhwbase/common/ -I3rdparty/libhwbase/common/direct/ -I3rdparty/libhwbase/debug/ -Isrc/console/ -Isrc/drivers/intel/gma/ -Isrc/drivers/intel/gma/hires_fb/ -Isrc/lib/ -Isrc/mainboard/lenovo/x230/variants/x230/ -Ix230-hotp-maximized/libgfxinit/common/ -Ix230-hotp-maximized/libhwbase/common/ -Ix230-hotp-maximized/ramstage/ -D__RAMSTAGE__ -c -o x230-hotp-maximized/ramstage/libgfxinit/common/dyncpu/hw-gfx-gma-config.o 3rdparty/libgfxinit/common/dyncpu/hw-gfx-gma-config.adb
compilation abandoned
{standard input}: Assembler messages:
{standard input}:1: Error: no such instruction: `fatal error,run-time library not installed correctly'
{standard input}:2: Error: no such instruction: `cannot locate file system.ads'
make[1]: *** [Makefile:430: x230-hotp-maximized/ramstage/libgfxinit/common/dyncpu/hw-gfx-gma-config.o] Error 1
make[1]: Leaving directory '/home/user/heads/build/x86/coreboot-2412'
tail /home/user/heads/build/x86/log/coreboot-2412.log
-----
printf "    GENERATE   libgfxinit/common/hw-gfx-gma-config.ads\n"
    GENERATE   libgfxinit/common/hw-gfx-gma-config.ads
sed -e's/<<GEN>>/Ironlake/' -e's/<<PCH>>/Cougar_Point/' -e's/<<PANEL_1_PORT>>/LVDS/' -e's/<<PANEL_2_PORT>>/Disabled/' -e's/<<ANALOG_I2C_PORT>>/PCH_DAC/' -e's/<<DEFAULT_MMIO_BASE>>/0 /' -e's/<<IGNORE_STRAPS>>/False/'  \
    -e'/constant Gen_CPU/d' \
    -e's/<genbool>/constant Boolean/' \
     -e's/<\(g45\(...\)*\)bool>/<\1var> Boolean/'  -e's/<\(ilk\(...\)*\)bool>/<\1var> Boolean/'  -e's/<\(hsw\(...\)*\)bool>/<\1var> Boolean/'  -e's/<\(skl\(...\)*\)bool>/<\1var> Boolean/'  -e's/<\(tgl\(...\)*\)bool>/<\1var> Boolean/' \
    -e's/<\(...\)*ilk\(...\)*var>/<cpufunc>/' \
     -e's/<g45\(...\)*var>/<cpufunc> /'  -e's/<ilk\(...\)*var>/<cpufunc> /'  -e's/<hsw\(...\)*var>/<cpufunc> /'  -e's/<skl\(...\)*var>/<cpufunc> /'  -e's/<tgl\(...\)*var>/<cpufunc> /' \
    -e's/\(.*: *<cpufunc>.*:=\) *\(.*\);/\1\n     (\2);/' \
    -e's/\([^ ][^ ]*\) *: *<cpufunc>  *\([^ ]*\) *:=/function \1 return \2 is/' \
    -e's/<cpunull>//' \
    3rdparty/libgfxinit/common/hw-gfx-gma-config.ads.template >x230-hotp-maximized/libgfxinit/common/hw-gfx-gma-config.ads
    GCC        ramstage/libgfxinit/common/dyncpu/hw-gfx-gma-config.o
/home/user/heads/build/x86/coreboot-2412/util/crossgcc/xgcc/bin/i386-elf-gcc --RTS=x230-hotp-maximized/libgnat-x86_32/ -gnatp -Wuninitialized -Wall -Werror -pipe -g -nostdinc -Wstrict-aliasing -Wshadow -fno-common -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-pie -gnatwa.eeD.HHTU.U.W.Y -gnatyN -Os -m32  -fuse-ld=bfd -fno-stack-protector -Wl,--build-id=none -I3rdparty/libgfxinit/common/ -I3rdparty/libgfxinit/common/dyncpu/ -I3rdparty/libgfxinit/common/ironlake/ -I3rdparty/libhwbase/ada/dynamic_mmio/ -I3rdparty/libhwbase/common/ -I3rdparty/libhwbase/common/direct/ -I3rdparty/libhwbase/debug/ -Isrc/console/ -Isrc/drivers/intel/gma/ -Isrc/drivers/intel/gma/hires_fb/ -Isrc/lib/ -Isrc/mainboard/lenovo/x230/variants/x230/ -Ix230-hotp-maximized/libgfxinit/common/ -Ix230-hotp-maximized/libhwbase/common/ -Ix230-hotp-maximized/ramstage/ -D__RAMSTAGE__ -c -o x230-hotp-maximized/ramstage/libgfxinit/common/dyncpu/hw-gfx-gma-config.o 3rdparty/libgfxinit/common/dyncpu/hw-gfx-gma-config.adb
compilation abandoned
{standard input}: Assembler messages:
{standard input}:1: Error: no such instruction: `fatal error,run-time library not installed correctly'
{standard input}:2: Error: no such instruction: `cannot locate file system.ads'
make[1]: *** [Makefile:430: x230-hotp-maximized/ramstage/libgfxinit/common/dyncpu/hw-gfx-gma-config.o] Error 1
make[1]: Leaving directory '/home/user/heads/build/x86/coreboot-2412'
make: *** [Makefile:570: /home/user/heads/build/x86/coreboot-2412/x230-hotp-maximized/.build] Error 1

(Meaning Heads cannot use 24.12 without patching it...)

@macpijan
Copy link
Contributor Author

Attaching very much incomplete Dasharo patches review list: https://paste.dasharo.com/?df2a581113227e19#Aao6uQy1VAWBtWhAfHBEXA7uNHBawWzHLTh4v8QjWhMW

and branch: https://github.com/Dasharo/coreboot/commits/pq-test/

I made some review a couple of months ago in a burst of inspiration. Maybe it will be somehow useful, maybe not at all.

@mkopec
Copy link
Member

mkopec commented Feb 17, 2025

Keep in mind that Dasharo EC got merged upstream, so we will need to switch novacustom boards from System76 to Dasharo EC. We also have a lot of patches that weren't sent upstream yet, like the EC update code.

Also note that NovaCustom V5x0TU was sent as novacustom/mtl-h instead of clevo/mtl-h which is how it's currently called in our fork, so we'll need to adapt all patches to the new path :\

I think this is a chance to clean up the Dasharo EC and NovaCustom patches and send as much as possible upstream

@macpijan
Copy link
Contributor Author

@mkopec

I think this is a chance to clean up the Dasharo EC and NovaCustom patches and send as much as possible upstream

Do you want to contribute there?

@macpijan
Copy link
Contributor Author

Also note that NovaCustom V5x0TU was sent as novacustom/mtl-h instead of clevo/mtl-h which is how it's currently called in our fork, so we'll need to adapt all patches to the new path :\

Which naming scheme do we want to commit to stay consistent?

@SergiiDmytruk
Copy link
Member

In the process we might try to squash some related commits - in that case, we should leave some notes there, or in commit message (or both).

What kind of notes? Which original commits are being squashed? Non-squashed commits won't have any such references though.

Additional task, that could be done during rebase

Rather after commits are rebased. It doesn't work well to change things while rebasing them.

I foolishly just tried to reuse that branch+patches (and without patches) to build all other old boards and those all fail with messages similar to for buillding x230-hotp-maximized:

Not sure we'll hit that Ada issue.

Also note that NovaCustom V5x0TU was sent as novacustom/mtl-h instead of clevo/mtl-h which is how it's currently called in our fork, so we'll need to adapt all patches to the new path :\

Not necessarily. git detects renames well enough provided that files didn't change too much. I even had to suppress this behaviour when rebasing EDK because it found non-existing renames and applied changes to wrong files :)

Attaching very much incomplete Dasharo patches review list:

Thanks, will use after rebasing and on conflicts.

@mkopec
Copy link
Member

mkopec commented Feb 18, 2025

Which naming scheme do we want to commit to stay consistent?

novacustom/mtl-h

Do you want to contribute there?

I meant upstream coreboot, I'm not sure if we have anything worth cotributing to System76 EC, it's mostly board specific changes and fixes / hacks for our own issues

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

No branches or pull requests

4 participants