Compare commits

..

18 Commits

Author SHA1 Message Date
Leah Rowe e1df640578 uboot: delete blobs, based on blobs.list file
and with that, censored-libreboot is now complete, ready
for a first release :)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-10 01:52:45 +01:00
Leah Rowe 9202ffa85a uboot: add blobs.list file under resources/
(i'll actually add deblobbing logic in the next revision)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-10 01:44:09 +01:00
Leah Rowe b5afcdaa04 rename project to censored-libreboot
it was called c-libreboot

make it clear what c means

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-10 00:54:03 +01:00
Leah Rowe fb30ec87ed coreboot/default: update blobs.list
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-10 00:53:24 +01:00
Leah Rowe d3d0288bd0 coreboot/cros: update blobs.list
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-10 00:46:27 +01:00
Leah Rowe f6a3190a4e coreboot/fam15h: update kfsn4-dre configs
i overlooked these in the previous revision

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 22:36:32 +01:00
Leah Rowe 3f8a243d84 coreboot/fam15h: update configs for 4.11_branch
The configs were made for 4.11, and several new changes
were required for 4.11_branch. Without these changes, the
builds are not automated because coreboot's build system
asks for user input on certain configuration.

This patch makes everything smooth as silk.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 22:27:49 +01:00
Leah Rowe cb4a1ec4d1 coreboot/fam15h: use 4.11_branch (fixes build)
This fixes build errors on KGPE-D16.

I can now build them on the latest Debian Sid,
as of 9 July 2023.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 22:01:06 +01:00
Leah Rowe 1ab8514882 coreboot/fam15h: fix acpica build on newer hostcc
Changes made to acpica/iasl in crossgcc, for
coreboot trees fam15h_udimm and fam15h_rdimm:

remove superfluous YYSTYPE declaration

make LuxBuffer variables static, to avoid warnings
treated as errors about multiple definitions

AcpiGbl_DbOpt_NoRegionSupport - remove this definition
in source/tools/acpiexec/aemain.c because it's already
re-defined by acpiexec. otherwise the linker complains
about multiple definitions

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 19:42:42 +01:00
Leah Rowe b55cc19f41 coreboot: AMD Fam10/15: don't build GCC-GNAT
do this with board.cfg option:

crossgcc_ada="n"

add this environmental variable when building
crossgcc, if crossgcc_ada="n":

BUILD_LANGUAGES=c

This avoids building the GNAT/Ada compiler in GCC.
Coreboot 4.11 is only used for some AGESA boards
that don't need Ada (their video init is the old
style, written in C, it's not libgfxinit)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 11:20:56 +01:00
Leah Rowe b7d22a9c36 coreboot/fam15h: patch binutils 2.32 for new gcc
tested on debian sid, as of 9 july 2023

implicit string declaration

easy stuff. now binutils 2.32 compiles. coreboot 4.11
uses this older binutils version.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 04:57:36 +01:00
Leah Rowe 41757a3b25 coreboot/fam15h: support distclean on cbfstool
lbmk uses distclean on cbfstool, which newer cbfstool
supports, but this old version (in coreboot 4.11) does
not. fix that.

it just runs make-clean

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 04:16:11 +01:00
Leah Rowe 77d9d94997 grub: flip the bootsplash background 180 degrees
c-libreboot, and GNU Boot, is a 180 U-turn versus
current libreboot policy, as seen here:

https://libreboot.org/news/policy.html

Therefore, rotate the bootsplash pic 180 degrees, for
comical effect.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 03:39:27 +01:00
Leah Rowe 947eb446f9 coreboot/fam15h: re-add kgpe-d16 and kcma-d8
also kfsn4-dre

this is still based on the old coreboot 4.11 version.

i have on todo to adapt dasharo coreboot for use in the master
branch of lbmk, for mainline libreboot releases.

since i'm doing c-libreboot for the GNU project, namely GNU Boot,
and since GNU Boot has dre/d8/d16 in their tree, re-add it here
for them.

i literally just copied this from them, who in turn copied it from
libreboot in an older revision anyway.

but there is one fix:

src/vendorcode/cavium/bdk/libbdk-hal/if/bdk-if-phy-vetesse.c

^ this blob wasn't being deleted by gnuboot, nor by libreboot
in the older revision that it forked from. an oversight. i decided
to audit the deblobbing and found this one was overlooked, out of
about 900 files picked up by deblob-check.

so this re-addition of dre/d8/d16 support is actually even better
deblobbed than gnuboot, or old-libreboot.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-09 03:18:43 +01:00
Leah Rowe 0f09c0d72b download/coreboot: re-add book-burning support
see:

https://en.wikipedia.org/wiki/Book_burning

i'll actually update blobs.list for each coreboot rev
in a subsequent commit. this logic was taken from an
old libreboot revision, which uses different coreboot
revisions. as i write this, i'm running deblob-check
from linux-libre deblob scripts.

my process is: i just check each file and decide whether
it's a blob, or like, test data. in some cases it flags
other false positives, like... a C source file that has
a bunch of magic numbers in it for things (not a blob)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-08 23:45:57 +01:00
Leah Rowe 2bbb4c839a remove blobutil and boards/utils needing/for blobs
delete all blobs. TODO: actually deblob coreboot/uboot
when downloading. i'll that in a little while, in an
upcoming commit.

yes.

purge it all, in fsf style. censor what the fsf doesn't like.

so that they can feel good about having less, because
ideological purity is better than helping more people
use coreboot, yes?

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-08 22:09:58 +01:00
Leah Rowe 6bc619db90 rename project to c-libreboot (c = censored)
because that's what fsdg policy is: censorship

fsf will censor any existence of less-than-pure hardware
from coreboot, despite the fact that coreboot provides
more freedom for the user than fully proprietary firmware,
even in cases where blobs are needed. i criticise that here:

https://libreboot.org/news/policy.html

FSF's fork of libreboot, formerly libreboot.at and now
named GNU Boot*, is still based on old lbmk from october
2022, they haven't written *any* code since December 2022
when they supposedly first started working on the fork

i'm doing a gnuboot for them, purely for fun, called
c-libreboot. c-libreboot is essentially the same as old
libreboot, prior to the osboot merge, but i'm including
all the new things such as dell latitude e6400 or gru
chromebooks, all of which are suitable under the old
libreboot policy and, by extension, GNU Boot policy

*URL: https://savannah.gnu.org/projects/gnuboot/
(it actually is a GNU project, though the FSF has
not yet announced it officially, as I write this)

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-08 21:00:05 +01:00
Leah Rowe cc30a1c6fa coreboot: never add microcode update to ROM image
this way, default psdg libreboot roms that enable microcode
can be used in fsdg libreboot, unmodified.

these configs enable microcode, but this change to the
coreboot build system avoids adding them regardless of
configuration

this saves hours of work that would otherwise be required,
to reconfigure all of the coreboot images, and will allow
gnuboot to use the same configs as libreboot

fsf makes such a fuss over this, when it's really quite
simple.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-07-08 20:47:40 +01:00
651 changed files with 80242 additions and 37492 deletions
Executable
+82
View File
@@ -0,0 +1,82 @@
#!/usr/bin/env sh
# SPDX-FileCopyrightText: 2022 Caleb La Grange <thonkpeasant@protonmail.com>
# SPDX-FileCopyrightText: 2023 Leah Rowe <leah@libreboot.org>
# SPDX-License-Identifier: GPL-3.0-only
git_name="lbmkplaceholder"
git_email="placeholder@lbmkplaceholder.com"
main()
{
if [ $# -gt 0 ]; then
if [ "${1}" = "clean" ]; then
clean > /dev/null 2> /dev/null
else
printf "%s: Unsupported argument\n" $0
exit 1
fi
else
set_placeholders > /dev/null 2> /dev/null
fi
}
set_placeholders()
{
set_git_credentials
# Check coreboot as well to prevent errors during building
if [ ! -d coreboot ]; then
return
fi
for x in coreboot/*; do
if [ ! -d "${x}" ]; then
continue
fi
(
cd "${x}"
set_git_credentials
)
done
}
set_git_credentials()
{
# Check if username and or email is set.
if ! git config user.name || git config user.email ; then
git config user.name \
|| git config user.name "${git_name}"
git config user.email \
|| git config user.email "${git_email}"
fi
}
clean()
{
unset_placeholders
if [ ! -d coreboot ]; then
return
fi
for x in coreboot/*; do
if [ ! -d "${x}" ]; then
continue
fi
(
cd "${x}"
unset_placeholders
)
done
}
unset_placeholders()
{
if [ "$(git config user.name)" = "${git_name}" ]; then
git config --unset user.name
fi
if [ "$(git config user.email)" = "${git_email}" ]; then
git config --unset user.email
fi
}
main $@
+23 -27
View File
@@ -1,15 +1,19 @@
*~ *~
*.o *.o
/cache/
/lbmk.err.log /lbmk.err.log
/repo/ /cbutils/
/docs/
/pciroms/ /pciroms/
/util/dell-flash-unlock/dell_flash_unlock /util/e6400-flash-unlock/e6400_flash_unlock
/util/ich9utils/*.bin
/util/ich9utils/demefactory
/util/ich9utils/ich9deblob
/util/ich9utils/ich9show
/util/ich9utils/ich9gen
/TODO /TODO
/ec/ /bios_extract/
/tmp/ /tmp/
/elf/ /payload/
/me_cleaner/
*.s[a-w]? *.s[a-w]?
*.vim *.vim
/*.elf /*.elf
@@ -17,30 +21,22 @@
/*.rom /*.rom
/build_error /build_error
/TODO/ /TODO/
/config/*/*/seen /docs/version
/bucts/
/coreboot/
/crossgcc/
/depthcharge/
/flashrom/
/resources/coreboot/*/seen
/grub/
/memtest86plus/
/seabios/
/u-boot/
/bin/ /bin/
/release/ /release/
/descriptors/
/*.bin /*.bin
/push /push
/version /version
/versiondate /versiondate
/.version /util/nvmutil/nvm
/.versiondate
/vendorfiles/
*me.bin
*sch5545ec.bin
/mrc/
/src/
/CHANGELOG
/todo.txt
/lock
/hash/
/dump/
/qrun*.sh
*.tar.*
/m
/f
/r
/e
/xbmkpath/
/xbmkwd/
-6
View File
@@ -1,9 +1,3 @@
NOTE: This applies to lwmk.git, a fork of LibreBook MaKe (lbmk).
The Libreboot build system was used as a base, to produce the
new LibreWolf build system. This file was just "COPYING" in the
original lbmk, as that build system was largely provided under
the following, terrible license:
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007 Version 3, 29 June 2007
+86
View File
@@ -0,0 +1,86 @@
#
# Makefile for meme purposes
# You can use this, but it just runs lbmk commands.
#
# See docs/maintain/ and docs/git/ for information about the build system:
# https://libreboot.org/docs/maintain/
# https://libreboot.org/docs/build/
#
# Copyright (C) 2020, 2021, 2023 Leah Rowe <info@minifree.org>
# Copyright (C) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
.POSIX:
#.PHONY: all check download modules ich9m-descriptors payloads roms release \
# clean crossgcc-clean install-dependencies-ubuntu \
# install-dependencies-debian install-dependencies-arch \
# install-dependencies-void install-dependencies-fedora38 \
# install-dependencies-parabola
all: roms
download:
./download all
modules:
./build module all
ich9m-descriptors:
./build descriptors ich9m
payloads:
./build payload all
roms:
./build boot roms all
release:
./build release src
./build release roms
clean:
./build clean cbutils
./build clean flashrom
./build clean ich9utils
./build clean payloads
./build clean seabios
./build clean grub
./build clean memtest86plus
./build clean rom_images
./build clean u-boot
./build clean bios_extract
crossgcc-clean:
./build clean crossgcc
install-dependencies-ubuntu:
./build dependencies ubuntu2004
install-dependencies-debian:
./build dependencies debian
install-dependencies-arch:
./build dependencies arch
install-dependencies-void:
./build dependencies void
install-dependencies-fedora38:
./build dependencies fedora38
install-dependencies-parabola:
./build dependencies parabola
+123 -322
View File
@@ -1,322 +1,123 @@
<div align="center"> Libreboot
=========
![Librewolf Logo](./patches/pref-pane/category-librewolf.svg)
Find libreboot documentation at <https://libreboot.org/>
**THIS WILL BE REMOVED AT A LATER DATE.**
The `libreboot` project provides
It's a proof of concept showing early modifications of lbmk, turning it into [libre](https://libreboot.org/freedom-status.html) *boot
lwmk - LibreWolf MaKe, for building librewolf releases. I'm doing this for firmware* that initializes the hardware (e.g. memory controller, CPU,
fun, to replace LibreWolf's source.git and bsys6.git build systems. Most peripherals) on specific Intel/AMD x86 and ARM targets, which
features not added yet, but lbmk's "mkhelper" feature can (and will) be used then starts a bootloader for your operating system. Linux/BSD are
to implement custom logic e.g. interacting with the mach build system in well-supported. It replaces proprietary BIOS/UEFI firmware. Help is available
firefox. This will be a unified package manager for building *many* firefox via [\#libreboot IRC](https://web.libera.chat/#libreboot)
derivatives, starting with LibreWolf, with the aim that all of the mozilla on [Libera](https://libera.chat/) IRC.
forks later use it, and perhaps work more closely with each other. I will
publish this on a separate website when it's ready. **You are looking at Why use Libreboot?
an old version of it. I'm much further ahead locally. I will release it ==================
when it's finished!"
Why should you use *libreboot*?
# LibreWolf ----------------------------
This repository contains all the patches and theming that make up LibreWolf, Libreboot gives you freedoms that you otherwise can't get with most other
as well as the LibreWolf preferences (in [settings/](./settings)) and the boot firmware. It's extremely powerful and configurable for many use cases.
scripts and Makefile to build LibreWolf.
You have rights. The right to privacy, freedom of thought, freedom of speech
This is a re-design of the LibreWolf build system, called LibreWolf MaKe, or and the right to read. In this context, Libreboot gives you these rights.
just lwmk for short. It is a fork of the LibreBoot MaKe (lbmk) build system, Your freedom matters.
which Libreboot uses to build coreboot images. It was decided that this design [Right to repair](https://vid.puffyan.us/watch?v=Npd_xDuNi9k) matters.
is beneficial for LibreWolf, as it offers advanced features by comparison, such Many people use proprietary (non-libre)
as: boot firmware, even if they use [a libre OS](https://www.openbsd.org/).
Proprietary firmware often contains backdoors (more info on the FAQ), and it
* Automatic caching of sources when downloading (Git repositories are used) and can be buggy. The libreboot project was founded in in December 2013,
* Redundant repository links are possible, for reliability in the future with the express purpose of making coreboot firmware accessible for
* Ability to declare custom git submodules, regardless of whether a project non-technical users.
uses them; actual git submodules are unused. The lwmk design allows
systematic patching and revision resets on submodules. The `libreboot` project uses [coreboot](https://www.coreboot.org/) for [hardware
* Ability to download files as submodules as well, hash-checking everything. initialisation](https://doc.coreboot.org/getting_started/architecture.html).
Both git repositories and files are checked relentlessly, even when using Coreboot is notoriously difficult to install for most non-technical users; it
local cache, to ensure integrity and general reproducibility. handles only basic initialization and jumps to a separate
* Multi-tree design: projects like firefox can be build single- or multi-tree. [payload](https://doc.coreboot.org/payloads.html) program (e.g.
In lwmk nomenclature, this means that a given project can have multiple [GRUB](https://www.gnu.org/software/grub/),
targets, or just build one target. Multi-tree is preferred, where feasible; [Tianocore](https://www.tianocore.org/)), which must also be configured.
in lwmk, you can specify multiple revisions of Firefox, and multiple targets *The libreboot software solves this problem*; it is a *coreboot distribution* with
off of each tree name on the given revision. An application for this might an automated build system (named *lbmk*) that builds complete *ROM images*, for
be providing LibreWolf along with variants like LibreWolf-Hellfire, or more robust installation. Documentation is provided.
more opiniated forks of LibreWolf that mostly just change a few configs.
* Completely generalised design. The `mk` script and `include/` directory do How does Libreboot differ from coreboot?
not generally contain project-specific build logic. Each project can use ========================================
mkhelpers to specify custom steps e.g. pre-configure, post-build, and so on,
much like on a BSD ports system. This design is reminiscent of a Linux distro, In the same way that *Debian* is a GNU+Linux distribution, `libreboot` is
because indeed it was first implemented for Libreboot which is a coreboot a *coreboot distribution*. If you want to build a ROM image from scratch, you
distro; this design generalises the downloading, patching and building otherwise have to perform expert-level configuration of coreboot, GRUB and
of any source tree. It is highly flexible and configurable. whatever other software you need, to prepare the ROM image. With *libreboot*,
* Ease of use. Despite high configurability, the overarching philosophy is you can literally download from Git or a source archive, and run `make`, and it
like that for OpenBSD: Knobs are for nobs. We want everything to be as simple will build entire ROM images. An automated build system, named `lbmk`
as possible for the user, with sane defaults for everything. The design (Libreboot MaKe), builds these ROM images automatically, without any user input
of the entire build system reflects this philosophy. or intervention required. Configuration has already been performed in advance.
The lwmk build system can generate binaries on the spot, and it does so If you were to build regular coreboot, without using libreboot's automated
using out-of-tree building. It can also generate clean source tarballs of build system, it would require a lot more intervention and decent technical
sources e.g. Firefox sources. knowledge to produce a working configuration.
The multi-tree nature of LibreWolf MaKe mean that you can support any number Regular binary releases of `libreboot` provide these
of actual Firefox derivatives. This build system is designed for use with ROM images pre-compiled, and you can simply install them, with no special
the LibreWolf project, but it is intended that this design be used on every knowledge or skill except the ability to follow installation instructions
other Firefox fork; perhaps the projects can even work with each other, or and run commands BSD/Linux.
there can be another project that uses this design and generalises all of
the Mozilla forks. This might be useful for Linux distros, which can then Project goals
just do something like: =============
./mk -b firefox - *Support as much hardware as possible!* Libreboot aims to eventually
have *maintainers* for every board supported by coreboot, at every
This would build every variant of Firefox in lwmk. Every defined tree, at each point in time.
defined revision, for each target defined referencing each tree. The best - *Make coreboot easy to use*. Coreboot is notoriously difficult
part: because it uses the same design from the Libreboot build system, there to install, due to an overall lack of user-focused documentation
are *no make files* in the tree, until you run `./mk -f`. and support. Most people will simply give up before attempting to
install coreboot. Libreboot's automated build system and user-friendly
One caveat: this is a very much Linux- and BSD-brained build system. It is installation instructions solves this problem.
NOT designed to run on others like Windows or Mac. That being said, it can
generate source tarballs of Firefox and its variants such as LibreWolf. These Libreboot attempts to bridge this divide by providing a build system
tarballs are cross-platform, and that will always be the case. automating much of the coreboot image creation and customization.
Secondly, the project produces documentation aimed at non-technical users.
</div> Thirdly, the project attempts to provide excellent user support via IRC.
## Infra Libreboot already comes with a payload (GRUB), flashrom and other
needed parts. Everything is fully integrated, in a way where most of
### Overview the complicated steps that are otherwise required, are instead done
for the user in advance.
```mermaid
graph LR You can download ROM images for your libreboot system and install
FFSRC(Firefox Source) them without having to build anything from source. If, however, you are
interested in building your own image, the build system makes it relatively
FFSRC--Tarball--->Source easy to do so.
subgraph LibreWolf/ Not a coreboot fork!
Website(Website<br><br>- Documentation<br>- FAQ) --------------------
subgraph Browser/
Source(Source<br><br>- Patches<br>- Theming<br>- Settings<br>- Weblate<br>- Build scripts) Libreboot is not a fork of coreboot. Every so often, the project
bsys6(bsys6<br><br>New Docker building<br>repository) re-bases on the latest version of coreboot, with the number of custom
AppImage patches in use minimized. Tested, *stable* (static) releases are then provided
ArchGentoo["Arch / Gentoo"] in Libreboot, based on specific coreboot revisions.
end
end How to help
Website-->librewolf.net ===========
Source--"Source tarball"-->bsys6
AppImage--".appimage"-->librewolf.net You can check bugs listed on
bsys6--"Windows setup.exe"--->librewolf.net the [bug tracker](https://codeberg.org/libreboot/lbmk/issues).
bsys6--"Windows portable.zip"--->librewolf.net
bsys6--"Windows .msix"--->MS("Microsoft Store") If you spot a bug and have a fix, the website has instructions for how to send
bsys6--"Windows .nupkg"--->Chocolatey patches, and you can also report it. Also, this entire website is
bsys6--"Linux binary tarball"--->Flathub written in Markdown and hosted in a [separate
bsys6--"Linux binary tarball"--> AppImage repository](https://codeberg.org/libreboot/lbwww) where you can send patches.
bsys6--"Linux .deb"--->repo.librewolf.net
bsys6--"Linux .rpm"--->repo.librewolf.net Any and all development discussion and user support are all done on the IRC
bsys6--"Linux binary tarball<br>for 'librewolf-bin'"--> ArchGentoo channel. More information is on the contact page of libreboot.org.
Source--"Source tarball<br>for 'librewolf'"-->ArchGentoo
ArchGentoo-->AUR_Overlay["AUR / Overlay"] LICENSE FOR THIS README
``` =======================
### Packages It's just a README file. This README file is released under the terms of the
Creative Commons Zero license, version 1.0 of the license, which you can
These are the locations where people have their repositories and build artifacts. read here:
Active: <https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt>
- [Arch](https://archlinux.org/packages/extra/x86_64/librewolf/) - Arch Linux package
- [BSYS6](https://librewolf.dev/librewolf/bsys6) - Linux Mint, Fedora,
Ubuntu, MacOS, portable and setup for Windows
- [Gentoo](https://codeberg.org/librewolf/gentoo) - Gentoo GNU/Linux package
Downstream:
- [Alpine Linux](https://pkgs.alpinelinux.org/packages?name=librewolf&arch=)
### Forks
Previous:
- [CachyOS Browser](https://github.com/cachyos/cachyos-browser-settings)
- [FireDragon Browser](https://github.com/dr460nf1r3/firedragon-browser)
## Build
There are two ways to build LibreWolf.
You can either use the source tarball
or compile directly with this repository.
### Build: Tarball
1. Let's **[download the latest tarball](https://librewolf.dev/librewolf/source/releases)**.
This tarball is the latest produced by the [CI](https://librewolf.dev/librewolf/source/actions?workflow=source-release.yaml).
You can also check the `sha256sum` of the tarball there:
```bash
tar xf <tarball>
cd <folder>
```
2. Then, you have to bootstrap your system to be able to build LibreWolf.
You only have to do this one time.
It is done by running the following command:
```bash
./mach --no-interactive bootstrap --application-choice=browser
```
3. Build LibreWolf and then package or run it with the following commands:
```bash
./mach build && ./mach package
# or
./mach build && ./mach run
```
> [!NOTE]
>
> To get all parameters of `./mach`, use:
>
> ```bash
> ./mach configure -- --help | less
> ```
### Build: Repository
1. Clone this repository with Git:
```bash
git clone --recursive git@librewolf.dev:librewolf/source.git librewolf-source --depth=1 && cd librewolf-source
```
2. Build LibreWolf source code,
also you have to bootstrap your system to be able to build LibreWolf.
You only have to do this one time.
```bash
make dir && make bootstrap
```
3. Package LibreWolf or run it with the following commands:
```bash
make build && make package
# or
make build && make run
```
## Translations
We use Weblate to localize all LibreWolf-specific strings.
You can help us by translating LibreWolf into your language at
<https://translate.codeberg.org/engage/librewolf>.
Here is the current translation status:
<a href="https://translate.codeberg.org/engage/librewolf/">
<img src="https://translate.codeberg.org/widget/librewolf/multi-auto.svg" alt="Translation status"/>
</a>
## Development
### Development: Creating a patch
The easiest way to make patches is to go to the LibreWolf source folder:
```bash
cd librewolf-$(cat version)
git init
git add <path_to_file_you_changed>
git commit -am initial-commit
git diff > ../mypatch.patch
```
We have Gitter / Matrix rooms,
and on the website we have links to the various issue trackers.
### Development: Existing patches
The easiest way to make patches is to go to the LibreWolf source folder:
```bash
make fetch
./scripts/git-patchtree.sh patches/sed-patches/disable-pocket.patch
```
Now change the source tree the way you want,
keeping in mind to `git add` new files.
When done, you can create the new patch with:
```bash
cd firefox-<version>
git diff 4b825dc642cb6eb9a060e54bf8d69288fbee4904 HEAD > ../my-patch-name.patch
```
This ID is the hash value of the first commit, which is called `initial`.
Don't forget to commit changes before doing this diff,
or the patch will be incomplete.
### Development: Creating a patch for problems in Mozilla's [Bugzilla](https://bugzilla.mozilla.org)
Well, first of all:
- [Create an account](https://bugzilla.mozilla.org/createaccount.cgi).
- Handy link: [Bugs Filed Today](https://bugzilla.mozilla.org/buglist.cgi?cmdtype=dorem&remaction=run&namedcmd=Bugs%20Filed%20Today&sharer_id=1&list_id=15939480).
- The essential: [Firefox Source Tree Documentation](https://firefox-source-docs.mozilla.org/).
Now that you have a patch in LibreWolf, that's not enough to upload to Mozilla.
See, Mozilla only accepts patches against Nightly.
So here is how to do that:
1. If you have not done so already,
create the `mozilla-unified` folder and build Firefox with it:
```bash
hg clone https://hg.mozilla.org/mozilla-unified && cd mozilla-unified
hg update
MOZBUILD_STATE_PATH=$HOME/.mozbuild ./mach --no-interactive bootstrap --application-choice=browser
./mach build
./mach run
```
2. If you skipped the previous step, you could ensure that you're up to date with:
```bash
cd mozilla-unified
hg pull && hg update
```
3. Now you can apply your patch to Nightly:
```bash
patch -p1 -i ../mypatch.patch
```
4. Now, let Mercurial create the patch:
```bash
hg diff > ../my-nightly-patch.patch
```
5. After this, it can be uploaded to Bugzilla.
#### Development: Contributing
Time to start hacking! You should join us on [Matrix](https://chat.mozilla.org),
say hello in the [Introduction channel](https://chat.mozilla.org/#/room/#introduction:mozilla.org),
and [find a bug to start working on](https://codetribute.mozilla.org).
See the [Firefox Contributors' Quick Reference](https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html#firefox-contributors-quick-reference)
to learn how to test your changes,
send patches to Mozilla,
update your source code locally, and more.
## MacOS and Windows
We understand, life isn't always fair 😺.
The same steps as above apply you will just have to walk through
the beginning part of the guides for:
- [MacOS](https://firefox-source-docs.mozilla.org/setup/macos_build.html):
The cross-compiled Mac `.dmg` files are somewhat new.
They should work, perhaps with the exception of the `make setup-wasi` step.
- [Windows](https://firefox-source-docs.mozilla.org/setup/windows_build.html):
Building on Windows is not very well tested.
Help with testing these targets is always welcome.
Symlink
+1
View File
@@ -0,0 +1 @@
lbmk
-3
View File
@@ -1,3 +0,0 @@
bsdtar
bsdunzip
bsdcpio
-3
View File
@@ -1,3 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-or-later
premake="autoreconf -fiv src/libarchive"
-7
View File
@@ -1,7 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-or-later
pkg_add="apt-get install --no-install-recommends $reinstall"
pkglist=" \
mercurial python3 python3-dev python3-pip curl wget dpkg-sig libssl-dev zstd \
libxml2-dev
"
-7
View File
@@ -1,7 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-or-later
pkg_add="dnf ${reinstall}install"
pkglist=" \
python3 curl wget zstd python3-devel python3-pip mercurial openssl-devel \
libxml2-devel
"
@@ -1,25 +0,0 @@
From 2a476bafca96f7a44e5ca07adcf637cc3b340a45 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:09:05 +0100
Subject: [PATCH 01/52] add-mojeek.patch
---
services/settings/dumps/main/moz.build | 2 ++
1 file changed, 2 insertions(+)
diff --git a/services/settings/dumps/main/moz.build b/services/settings/dumps/main/moz.build
index ee5e57c5b4e3..34e72bb608a1 100644
--- a/services/settings/dumps/main/moz.build
+++ b/services/settings/dumps/main/moz.build
@@ -62,6 +62,8 @@ if CONFIG["MOZ_BUILD_APP"] == "browser":
"search-config-icons/25de0352-aabb-d31f-15f7-bf9299fb004c.meta.json",
"search-config-icons/2bbe48f4-d3b8-c9e0-86e3-a54c37ec3335",
"search-config-icons/2bbe48f4-d3b8-c9e0-86e3-a54c37ec3335.meta.json",
+ "search-config-icons/2c4b8834-030c-4097-a887-c7506689095c",
+ "search-config-icons/2c4b8834-030c-4097-a887-c7506689095c.meta.json",
"search-config-icons/2e835b0e-9709-d1bb-9725-87f59f3445ca",
"search-config-icons/2e835b0e-9709-d1bb-9725-87f59f3445ca.meta.json",
"search-config-icons/32d26d19-aeb0-5c01-32e8-f8970be9246f",
--
2.47.3
@@ -1,24 +0,0 @@
From 285c02a31e60bbe6e5eb98d1b449439126768f41 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:09:09 +0100
Subject: [PATCH 02/52] always-fetch-latest-toolchain-artifact.patch
---
python/mozbuild/mozbuild/artifact_commands.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/python/mozbuild/mozbuild/artifact_commands.py b/python/mozbuild/mozbuild/artifact_commands.py
index 928227d2cb5f..af3d58c6505b 100644
--- a/python/mozbuild/mozbuild/artifact_commands.py
+++ b/python/mozbuild/mozbuild/artifact_commands.py
@@ -10,6 +10,7 @@ import logging
import os
import pathlib
import shutil
+import requests
from collections import OrderedDict
import mozversioncontrol
--
2.47.3
@@ -1,34 +0,0 @@
From 62e68c8db9275d65df47179a770126c667e00399 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:09:13 +0100
Subject: [PATCH 03/52] autoconfig-setEnv.patch
---
extensions/pref/autoconfig/src/prefcalls.js | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/extensions/pref/autoconfig/src/prefcalls.js b/extensions/pref/autoconfig/src/prefcalls.js
index 47eb92982c97..78dd0ee5473a 100644
--- a/extensions/pref/autoconfig/src/prefcalls.js
+++ b/extensions/pref/autoconfig/src/prefcalls.js
@@ -205,7 +205,17 @@ function getenv(name) {
return undefined;
}
+function setEnv(name, value) {
+ try {
+ return Services.env.set(name, value);
+ } catch (e) {
+ displayError("getEnvironment", e);
+ }
+ return undefined;
+}
+
var APIs = {
+ setEnv,
pref,
defaultPref,
lockPref,
--
2.47.3
@@ -1,25 +0,0 @@
From 50902dac61f2447168c46115d6ae8023908eb00e Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:09:16 +0100
Subject: [PATCH 04/52] bootstrap.patch
---
python/mozversioncontrol/mozversioncontrol/repo/source.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/mozversioncontrol/mozversioncontrol/repo/source.py b/python/mozversioncontrol/mozversioncontrol/repo/source.py
index 85048fafce91..71904adc1657 100644
--- a/python/mozversioncontrol/mozversioncontrol/repo/source.py
+++ b/python/mozversioncontrol/mozversioncontrol/repo/source.py
@@ -111,7 +111,7 @@ class SrcRepository(Repository):
for root, dirs, files in os.walk(self.path):
base = os.path.relpath(root, self.path)
for name in files:
- res.append(os.path.join(base, name))
+ res.append(os.path.join(base, name).replace("\\", "/"))
return res
def get_tracked_files_finder(self, path):
--
2.47.3
@@ -1,164 +0,0 @@
From e0a864992baea169d5f20b366ecdbe918ce1bcba Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:09:20 +0100
Subject: [PATCH 05/52] canvas-permission.patch
---
browser/modules/SitePermissions.sys.mjs | 98 ++++++++++++++++++-
.../resistfingerprinting/RFPHelper.sys.mjs | 10 +-
2 files changed, 105 insertions(+), 3 deletions(-)
diff --git a/browser/modules/SitePermissions.sys.mjs b/browser/modules/SitePermissions.sys.mjs
index 3cf23c809c23..b112014e0d49 100644
--- a/browser/modules/SitePermissions.sys.mjs
+++ b/browser/modules/SitePermissions.sys.mjs
@@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
+import { RFPHelper } from "resource://gre/modules/RFPHelper.sys.mjs";
var gStringBundle = Services.strings.createBundle(
"chrome://browser/locale/sitePermissions.properties"
@@ -807,6 +808,67 @@ export var SitePermissions = {
return null;
}
},
+
+ /**
+ * Computes whether the canvas image extraction prompt is enabled
+ * based on Baseline/FPP settings and their respective overrides.
+ *
+ * @returns {boolean} true if CanvasImageExtractionPrompt/AllTargets is active
+ */
+ _computeCanvasImageExtractionEnabled() {
+ const fppEnabled = this.fingerprintingProtectionEnabled;
+ const baselineEnabled = this.baselineFingerprintingProtectionEnabled;
+
+ if (fppEnabled) {
+ const defaults = RFPHelper.getTargetDefaults();
+ const active = new Set(defaults);
+ const overrides = this.fingerprintingProtectionOverrides;
+ this._applyOverrides(active, overrides);
+ if (active.has("CanvasImageExtractionPrompt")) {
+ return true;
+ }
+ }
+
+ if (baselineEnabled) {
+ const defaults = RFPHelper.getTargetDefaultsBaseline();
+ const active = new Set(defaults);
+ const overrides = this.baselineFingerprintingProtectionOverrides;
+ this._applyOverrides(active, overrides);
+ if (active.has("CanvasImageExtractionPrompt")) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ /**
+ * Applies override flags to an active set of targets.
+ *
+ * @param {Set} active - The active targets set
+ * @param {string} overridesString - The override string (e.g., "+CanvasImageExtractionPrompt,+AllTargets")
+ */
+ _applyOverrides(active, overridesString) {
+ for (const flag of overridesString.split(",").filter(Boolean)) {
+ if (flag.startsWith("+")) {
+ const target = flag.slice(1);
+ if (
+ target === "AllTargets" ||
+ target === "CanvasImageExtractionPrompt"
+ ) {
+ active.add("CanvasImageExtractionPrompt");
+ }
+ } else if (flag.startsWith("-")) {
+ const target = flag.slice(1);
+ if (
+ target === "AllTargets" ||
+ target === "CanvasImageExtractionPrompt"
+ ) {
+ active.delete("CanvasImageExtractionPrompt");
+ }
+ }
+ }
+ },
};
let gPermissions = {
@@ -1069,7 +1131,10 @@ let gPermissions = {
canvas: {
get disabled() {
- return !SitePermissions.resistFingerprinting;
+ return (
+ !SitePermissions.resistFingerprinting &&
+ !SitePermissions._computeCanvasImageExtractionEnabled()
+ );
},
},
@@ -1133,6 +1198,37 @@ XPCOMUtils.defineLazyPreferenceGetter(
false,
SitePermissions.invalidatePermissionList.bind(SitePermissions)
);
+XPCOMUtils.defineLazyPreferenceGetter(
+ SitePermissions,
+ "fingerprintingProtectionEnabled",
+ "privacy.fingerprintingProtection",
+ false,
+ SitePermissions.invalidatePermissionList.bind(SitePermissions)
+);
+
+XPCOMUtils.defineLazyPreferenceGetter(
+ SitePermissions,
+ "fingerprintingProtectionOverrides",
+ "privacy.fingerprintingProtection.overrides",
+ "",
+ SitePermissions.invalidatePermissionList.bind(SitePermissions)
+);
+
+XPCOMUtils.defineLazyPreferenceGetter(
+ SitePermissions,
+ "baselineFingerprintingProtectionEnabled",
+ "privacy.baselineFingerprintingProtection",
+ false,
+ SitePermissions.invalidatePermissionList.bind(SitePermissions)
+);
+
+XPCOMUtils.defineLazyPreferenceGetter(
+ SitePermissions,
+ "baselineFingerprintingProtectionOverrides",
+ "privacy.baselineFingerprintingProtection.overrides",
+ "",
+ SitePermissions.invalidatePermissionList.bind(SitePermissions)
+);
XPCOMUtils.defineLazyPreferenceGetter(
SitePermissions,
diff --git a/toolkit/components/resistfingerprinting/RFPHelper.sys.mjs b/toolkit/components/resistfingerprinting/RFPHelper.sys.mjs
index f82d7309e129..d11f8a011fac 100644
--- a/toolkit/components/resistfingerprinting/RFPHelper.sys.mjs
+++ b/toolkit/components/resistfingerprinting/RFPHelper.sys.mjs
@@ -208,8 +208,14 @@ class _RFPHelper {
return;
}
- let loadContext = notificationCallbacks.getInterface(Ci.nsILoadContext);
- if (!loadContext || !loadContext.isContent) {
+ let loadContext;
+ try {
+ loadContext = notificationCallbacks.getInterface(Ci.nsILoadContext);
+ } catch (e) {
+ return;
+ }
+
+ if (!loadContext.isContent) {
return;
}
--
2.47.3
@@ -1,40 +0,0 @@
From 9d67e4bd2a45975b777a1f798a2b05cd0e7a9d6e Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:09:24 +0100
Subject: [PATCH 06/52] custom-ubo-assets-bootstrap-location.patch
---
.../components/extensions/parent/ext-storage.js | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/toolkit/components/extensions/parent/ext-storage.js b/toolkit/components/extensions/parent/ext-storage.js
index 0d6109c25019..3dce60b6d5ec 100644
--- a/toolkit/components/extensions/parent/ext-storage.js
+++ b/toolkit/components/extensions/parent/ext-storage.js
@@ -411,6 +411,23 @@ this.storage = class extends ExtensionAPIPersistent {
managed: {
async get(keys) {
enforceNoTemporaryAddon(extension.id);
+ const assetsBootstrapLocation = Services.prefs.getStringPref(
+ "librewolf.uBO.assetsBootstrapLocation",
+ undefined
+ );
+ if (extension.id == "uBlock0@raymondhill.net" && assetsBootstrapLocation) {
+ let data = {};
+ try {
+ let manifestData = await getManagedStorageManifestData(extension, context);
+ data = await ExtensionStorage._filterProperties(extension.id, manifestData, keys);
+ } catch (e) {
+ // no managed manifest
+ }
+ return {
+ ...data,
+ adminSettings: { ...(data.adminSettings || {}), assetsBootstrapLocation },
+ };
+ }
let data = await getManagedStorageManifestData(extension, context);
return ExtensionStorage._filterProperties(extension.id, data, keys);
},
--
2.47.3
@@ -1,83 +0,0 @@
From 4dcc900e125ca963cd141185588de161e444e836 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:09:28 +0100
Subject: [PATCH 07/52] dbus_name.patch
---
toolkit/components/remote/nsDBusRemoteClient.cpp | 6 +++---
toolkit/components/remote/nsDBusRemoteServer.cpp | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/toolkit/components/remote/nsDBusRemoteClient.cpp b/toolkit/components/remote/nsDBusRemoteClient.cpp
index bd1fe5f9cffd..bb68321ba95a 100644
--- a/toolkit/components/remote/nsDBusRemoteClient.cpp
+++ b/toolkit/components/remote/nsDBusRemoteClient.cpp
@@ -73,14 +73,14 @@ bool nsDBusRemoteClient::GetRemoteDestinationName(const char* aProgram,
mozilla::XREAppData::SanitizeNameForDBus(profileName);
aDestinationName =
- nsPrintfCString("org.mozilla.%s.%s", aProgram, profileName.get());
+ nsPrintfCString("io.gitlab.%s.%s", aProgram, profileName.get());
if (aDestinationName.Length() > DBUS_MAXIMUM_NAME_LENGTH)
aDestinationName.Truncate(DBUS_MAXIMUM_NAME_LENGTH);
if (!g_dbus_is_name(aDestinationName.get())) {
// We don't have a valid busName yet - try to create a default one.
aDestinationName =
- nsPrintfCString("org.mozilla.%s.%s", aProgram, "default");
+ nsPrintfCString("io.gitlab.%s.%s", aProgram, "default");
if (!g_dbus_is_name(aDestinationName.get())) {
// We failed completely to get a valid bus name - just quit.
LOG(" failed to validate profile DBus name");
@@ -118,7 +118,7 @@ nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProfile,
}
nsAutoCString remoteInterfaceName;
- remoteInterfaceName = nsPrintfCString("org.mozilla.%s", appName.get());
+ remoteInterfaceName = nsPrintfCString("io.gitlab.%s", appName.get());
LOG(" DBus destination: %s\n", destinationName.get());
LOG(" DBus path: %s\n", pathName.get());
diff --git a/toolkit/components/remote/nsDBusRemoteServer.cpp b/toolkit/components/remote/nsDBusRemoteServer.cpp
index 226b2dc52874..f2477798aeca 100644
--- a/toolkit/components/remote/nsDBusRemoteServer.cpp
+++ b/toolkit/components/remote/nsDBusRemoteServer.cpp
@@ -25,7 +25,7 @@ static const char* introspect_template =
"1.0//EN\"\n"
"\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n"
"<node>\n"
- " <interface name=\"org.mozilla.%s\">\n"
+ " <interface name=\"io.gitlab.%s\">\n"
" <method name=\"OpenURL\">\n"
" <arg name=\"url\" direction=\"in\" type=\"ay\"/>\n"
" </method>\n"
@@ -35,7 +35,7 @@ static const char* introspect_template =
bool nsDBusRemoteServer::HandleOpenURL(const gchar* aInterfaceName,
const gchar* aMethodName,
Span<const gchar> aParam) {
- nsPrintfCString ourInterfaceName("org.mozilla.%s", mAppName.get());
+ nsPrintfCString ourInterfaceName("io.gitlab.%s", mAppName.get());
if ((strcmp("OpenURL", aMethodName) != 0) ||
(strcmp(ourInterfaceName.get(), aInterfaceName) != 0)) {
@@ -199,7 +199,7 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName,
mozilla::XREAppData::SanitizeNameForDBus(profileName);
- nsPrintfCString busName("org.mozilla.%s.%s", mAppName.get(),
+ nsPrintfCString busName("io.gitlab.%s.%s", mAppName.get(),
profileName.get());
if (busName.Length() > DBUS_MAXIMUM_NAME_LENGTH) {
busName.Truncate(DBUS_MAXIMUM_NAME_LENGTH);
@@ -207,7 +207,7 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName,
// We don't have a valid busName yet - try to create a default one.
if (!g_dbus_is_name(busName.get())) {
- busName = nsPrintfCString("org.mozilla.%s.%s", mAppName.get(), "default");
+ busName = nsPrintfCString("io.gitlab.%s.%s", mAppName.get(), "default");
if (!g_dbus_is_name(busName.get())) {
// We failed completely to get a valid bus name - just quit.
g_warning("nsDBusRemoteServer: couldn't get a valid bus name!");
--
2.47.3
@@ -1,42 +0,0 @@
From c34c0143ee4dd38902c9a8a3defaae42f74020c6 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:09:31 +0100
Subject: [PATCH 08/52] delete-cookie-permission.patch
---
browser/components/ProfileDataUpgrader.sys.mjs | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/browser/components/ProfileDataUpgrader.sys.mjs b/browser/components/ProfileDataUpgrader.sys.mjs
index 6b0e2251f0eb..c859bf8db8e0 100644
--- a/browser/components/ProfileDataUpgrader.sys.mjs
+++ b/browser/components/ProfileDataUpgrader.sys.mjs
@@ -1030,6 +1030,9 @@ export let ProfileDataUpgrader = {
// Only migrate durable, user-set permissions. Anything that expires
// (session/time) or is re-applied from an enterprise policy on every
// startup (EXPIRE_POLICY) must not be persisted as a regular permission.
+
+ const toDelete = [];
+
Services.perms.getAllByTypes(["cookie"]).forEach(p => {
if (p.expireType != Services.perms.EXPIRE_NEVER) {
return;
@@ -1040,8 +1043,15 @@ export let ProfileDataUpgrader = {
"persist-data-on-shutdown",
Ci.nsICookiePermission.ACCESS_ALLOW
);
+ toDelete.push(p);
}
});
+
+ toDelete.forEach(p => {
+ Services.perms.removePermission(p);
+ });
+
+ Services.perms.removeOrphanedInteractionRecords();
}
if (
--
2.47.3
@@ -1,61 +0,0 @@
From 4890972bf672fd70b7d114eef185f5ab9efbf82d Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:09:36 +0100
Subject: [PATCH 09/52] devtools-bypass.patch
---
devtools/server/actors/thread.js | 5 ++++-
devtools/server/actors/webconsole/listeners/console-api.js | 3 ++-
devtools/shared/flags.js | 2 ++
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/devtools/server/actors/thread.js b/devtools/server/actors/thread.js
index e0ceee32c625..b7b90d476ead 100644
--- a/devtools/server/actors/thread.js
+++ b/devtools/server/actors/thread.js
@@ -8,6 +8,7 @@
// error packets.
/* eslint-disable no-throw-literal */
+var flags = require("resource://devtools/shared/flags.js");
const { Actor } = require("resource://devtools/shared/protocol/Actor.js");
const { Pool } = require("resource://devtools/shared/protocol/Pool.js");
const { threadSpec } = require("resource://devtools/shared/specs/thread.js");
@@ -390,7 +391,9 @@ class ThreadActor extends Actor {
attach(options) {
// Note that the client avoids trying to call attach if already attached.
// But just in case, avoid any possible duplicate call to attach.
- if (this.alreadyAttached) {
+ let forceDetach = flags.lwDetach;
+
+ if (this.alreadyAttached || forceDetach) {
return;
}
diff --git a/devtools/server/actors/webconsole/listeners/console-api.js b/devtools/server/actors/webconsole/listeners/console-api.js
index cdf6a841a8de..ccdd19e95a0d 100644
--- a/devtools/server/actors/webconsole/listeners/console-api.js
+++ b/devtools/server/actors/webconsole/listeners/console-api.js
@@ -98,7 +98,8 @@ class ConsoleAPIListener {
* The message object receives from the ConsoleAPIStorage service.
*/
onConsoleAPILogEvent(message) {
- if (!this.handler) {
+ let disableConsole = Services.prefs.getBoolPref("librewolf.console.logging_disabled", false);
+ if (!this.handler || disableConsole) {
return;
}
diff --git a/devtools/shared/flags.js b/devtools/shared/flags.js
index 95b1be41d20b..562b5591037d 100644
--- a/devtools/shared/flags.js
+++ b/devtools/shared/flags.js
@@ -60,3 +60,5 @@ makePrefTrackedFlag(exports, "wantLogging", "devtools.debugger.log");
* behaviors typically enable easier testing or enhanced debugging features.
*/
makePrefTrackedFlag(exports, "testing", "devtools.testing");
+
+makePrefTrackedFlag(exports, "lwDetach", "librewolf.debugger.force_detach");
--
2.47.3
@@ -1,169 +0,0 @@
From 86537762694f63b6e4ce3c06c11444a726b08958 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:09:43 +0100
Subject: [PATCH 10/52] disable-data-reporting-at-compile-time.patch
---
browser/components/tabbrowser/content/tabbrowser.js | 6 ------
browser/moz.configure | 4 ++--
python/mach/mach/telemetry.py | 5 +----
python/sites/mach.txt | 2 +-
third_party/rust/glean-core/src/core/mod.rs | 3 ++-
third_party/rust/glean-core/src/lib.rs | 3 +++
toolkit/components/telemetry/core/Telemetry.cpp | 6 +++---
toolkit/library/rust/gkrust-features.mozbuild | 2 +-
8 files changed, 13 insertions(+), 18 deletions(-)
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index 43180487a2fa..b60919e238be 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -3390,10 +3390,6 @@
);
}
- if (!UserInteraction.running("browser.tabs.opening", window)) {
- UserInteraction.start("browser.tabs.opening", "initting", window);
- }
-
// If we're opening a foreground tab, set the owner by default.
ownerTab ??= inBackground ? null : this.selectedTab;
@@ -4239,8 +4235,6 @@
0,
this.tabContainer
);
- } else {
- UserInteraction.update("browser.tabs.opening", "animated", window);
}
return t;
diff --git a/browser/moz.configure b/browser/moz.configure
index 3ea3d88b9360..c55951b8debf 100644
--- a/browser/moz.configure
+++ b/browser/moz.configure
@@ -3,11 +3,11 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
imply_option("MOZ_PLACES", True)
-imply_option("MOZ_SERVICES_HEALTHREPORT", True)
+imply_option("MOZ_SERVICES_HEALTHREPORT", False)
imply_option("MOZ_SERVICES_SYNC", True)
imply_option("MOZ_DEDICATED_PROFILES", True)
imply_option("MOZ_BLOCK_PROFILE_DOWNGRADE", True)
-imply_option("MOZ_NORMANDY", True)
+imply_option("MOZ_NORMANDY", False)
imply_option("MOZ_PROFILE_MIGRATOR", True)
diff --git a/python/mach/mach/telemetry.py b/python/mach/mach/telemetry.py
index 2b70b3f75a2d..b111dacc764e 100644
--- a/python/mach/mach/telemetry.py
+++ b/python/mach/mach/telemetry.py
@@ -82,10 +82,7 @@ def is_applicable_telemetry_environment():
def is_telemetry_enabled(settings):
- if os.environ.get("DISABLE_TELEMETRY") == "1":
- return False
-
- return settings.mach_telemetry.is_enabled
+ return False
def arcrc_path():
diff --git a/python/sites/mach.txt b/python/sites/mach.txt
index d5cdce88869a..f4f38c1f9b78 100644
--- a/python/sites/mach.txt
+++ b/python/sites/mach.txt
@@ -58,7 +58,7 @@ pth:xpcom/geckoprocesstypes_generator
pth:xpcom/idl-parser
# glean-sdk may not be installable if a wheel isn't available
# and it has to be built from source.
-pypi-optional:glean-sdk==68.0.1:telemetry will not be collected
+# pypi-optional:glean-sdk==68.0.1:telemetry will not be collected
pypi-optional:orjson>=3.10:json operations will be slower in various tools
# Mach gracefully handles the case where `psutil` is unavailable.
# We aren't (yet) able to pin packages in automation, so we have to
diff --git a/third_party/rust/glean-core/src/core/mod.rs b/third_party/rust/glean-core/src/core/mod.rs
index 013064660410..1f68b9ef3d4c 100644
--- a/third_party/rust/glean-core/src/core/mod.rs
+++ b/third_party/rust/glean-core/src/core/mod.rs
@@ -813,7 +813,8 @@ impl Glean {
///
/// When upload is disabled, no data will be recorded.
pub fn is_upload_enabled(&self) -> bool {
- self.upload_enabled
+ _ = self.upload_enabled;
+ false
}
/// Check if a ping is enabled.
diff --git a/third_party/rust/glean-core/src/lib.rs b/third_party/rust/glean-core/src/lib.rs
index c401c3dafef9..2a52db7d9f83 100644
--- a/third_party/rust/glean-core/src/lib.rs
+++ b/third_party/rust/glean-core/src/lib.rs
@@ -916,6 +916,7 @@ pub extern "C" fn glean_enable_logging() {
/// **DEPRECATION NOTICE**:
/// This API is deprecated. Use `set_collection_enabled` instead.
pub fn glean_set_upload_enabled(enabled: bool) {
+ let enabled = false;
if !was_initialize_called() {
return;
}
@@ -951,6 +952,8 @@ pub fn glean_set_upload_enabled(enabled: bool) {
///
/// This replaces `set_upload_enabled`.
pub fn glean_set_collection_enabled(enabled: bool) {
+ // Redundant currently
+ let enabled = false;
glean_set_upload_enabled(enabled)
}
diff --git a/toolkit/components/telemetry/core/Telemetry.cpp b/toolkit/components/telemetry/core/Telemetry.cpp
index 1e83d34cd007..474bc5c50bf3 100644
--- a/toolkit/components/telemetry/core/Telemetry.cpp
+++ b/toolkit/components/telemetry/core/Telemetry.cpp
@@ -693,7 +693,7 @@ TelemetryImpl::GetCanRecordBase(bool* ret) {
NS_IMETHODIMP
TelemetryImpl::SetCanRecordBase(bool canRecord) {
-#ifndef FUZZING
+#if false
if (canRecord != mCanRecordBase) {
TelemetryHistogram::SetCanRecordBase(canRecord);
TelemetryScalar::SetCanRecordBase(canRecord);
@@ -719,7 +719,7 @@ TelemetryImpl::GetCanRecordExtended(bool* ret) {
NS_IMETHODIMP
TelemetryImpl::SetCanRecordExtended(bool canRecord) {
-#ifndef FUZZING
+#if false
if (canRecord != mCanRecordExtended) {
TelemetryHistogram::SetCanRecordExtended(canRecord);
TelemetryScalar::SetCanRecordExtended(canRecord);
@@ -762,7 +762,7 @@ already_AddRefed<nsITelemetry> TelemetryImpl::CreateTelemetryInstance() {
}
bool useTelemetry = false;
-#ifndef FUZZING
+#if false
if (XRE_IsParentProcess() || XRE_IsContentProcess() || XRE_IsGPUProcess() ||
XRE_IsRDDProcess() || XRE_IsSocketProcess() || XRE_IsUtilityProcess()) {
useTelemetry = true;
diff --git a/toolkit/library/rust/gkrust-features.mozbuild b/toolkit/library/rust/gkrust-features.mozbuild
index 59535dd585aa..4d32a3062134 100644
--- a/toolkit/library/rust/gkrust-features.mozbuild
+++ b/toolkit/library/rust/gkrust-features.mozbuild
@@ -57,7 +57,7 @@ if CONFIG["MOZ_WEBRTC"]:
# We need to tell Glean it is being built with Gecko.
gkrust_features += ["glean_with_gecko"]
-if not CONFIG["MOZILLA_OFFICIAL"]:
+if CONFIG["MOZILLA_OFFICIAL"]:
gkrust_features += ["glean_disable_upload"]
if CONFIG["MOZ_ENABLE_DBUS"]:
--
2.47.3
@@ -1,207 +0,0 @@
From 82f46ce61c0eeaa4a41bdb3441003a307767e017 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:09:47 +0100
Subject: [PATCH 11/52] eme-permission.patch
---
.../ContentPermissionPrompt.sys.mjs | 4 +
browser/modules/EMEPermissionPrompt.sys.mjs | 111 ++++++++++++++++++
dom/media/eme/MediaKeySystemAccessManager.cpp | 23 +++-
3 files changed, 132 insertions(+), 6 deletions(-)
create mode 100644 browser/modules/EMEPermissionPrompt.sys.mjs
diff --git a/browser/components/permissions/ContentPermissionPrompt.sys.mjs b/browser/components/permissions/ContentPermissionPrompt.sys.mjs
index fc3c64110c37..032010493054 100644
--- a/browser/components/permissions/ContentPermissionPrompt.sys.mjs
+++ b/browser/components/permissions/ContentPermissionPrompt.sys.mjs
@@ -7,6 +7,7 @@ const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
Integration: "resource://gre/modules/Integration.sys.mjs",
PermissionUI: "resource:///modules/PermissionUI.sys.mjs",
+ EMEPermissionPrompt: "moz-src:///browser/modules/EMEPermissionPrompt.sys.mjs",
});
/**
* ContentPermissionIntegration is responsible for showing the user
@@ -40,6 +41,9 @@ const ContentPermissionIntegration = {
*/
createPermissionPrompt(type, request) {
switch (type) {
+ case "media-key-system-access": {
+ return new lazy.EMEPermissionPrompt(request);
+ }
case "geolocation": {
return new lazy.PermissionUI.GeolocationPermissionPrompt(request);
}
diff --git a/browser/modules/EMEPermissionPrompt.sys.mjs b/browser/modules/EMEPermissionPrompt.sys.mjs
new file mode 100644
index 000000000000..4e0d8eeec3f3
--- /dev/null
+++ b/browser/modules/EMEPermissionPrompt.sys.mjs
@@ -0,0 +1,111 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
+
+const lazy = {};
+
+ChromeUtils.defineESModuleGetters(lazy, {
+ PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
+ SitePermissions: "resource:///modules/SitePermissions.sys.mjs",
+});
+
+ChromeUtils.defineLazyGetter(lazy, "gBrowserBundle", function () {
+ return Services.strings.createBundle(
+ "chrome://browser/locale/browser.properties"
+ );
+});
+
+const { PermissionUI } = ChromeUtils.importESModule(
+ "resource:///modules/PermissionUI.sys.mjs"
+);
+
+/**
+ * Creates a PermissionPrompt for a nsIContentPermissionRequest for
+ * EME (Encrypted Media Extensions).
+ *
+ * @param request (nsIContentPermissionRequest)
+ * The request for a permission from content.
+ */
+export class EMEPermissionPrompt extends PermissionUI.PermissionPromptForRequest {
+ constructor(request) {
+ super();
+ this.request = request;
+ }
+
+ get type() {
+ return "media-key-system-access";
+ }
+
+ get permissionKey() {
+ return "media-key-system-access";
+ }
+
+ get popupOptions() {
+ let options = {
+ learnMoreURL: Services.urlFormatter.formatURLPref("librewolf.eme.warning.infoURL"),
+ displayURI: false,
+ name: this.getPrincipalName(),
+ };
+
+ // Don't offer "always remember" action in PB mode
+ options.checkbox = {
+ show: !lazy.PrivateBrowsingUtils.isWindowPrivate(
+ this.browser.documentGlobal
+ ),
+ };
+
+ if (options.checkbox.show) {
+ options.checkbox.label =
+ lazy.gBrowserBundle.GetStringFromName("eme.remember2");
+ }
+
+ return options;
+ }
+
+ get notificationID() {
+ return "media-key-system-access";
+ }
+
+ get anchorID() {
+ return "eme-notification-icon";
+ }
+
+ get message() {
+ return lazy.gBrowserBundle.formatStringFromName("eme.siteprompt2", [
+ "<>",
+ ]);
+ }
+
+ get promptActions() {
+ return [
+ {
+ label: lazy.gBrowserBundle.GetStringFromName("eme.allow2"),
+ accessKey: lazy.gBrowserBundle.GetStringFromName("eme.allow2.accesskey"),
+ action: lazy.SitePermissions.ALLOW,
+ },
+ {
+ label: lazy.gBrowserBundle.GetStringFromName("eme.block"),
+ accessKey: lazy.gBrowserBundle.GetStringFromName("eme.block.accesskey"),
+ action: lazy.SitePermissions.BLOCK,
+ },
+ ];
+ }
+
+ get principal() {
+ // The standard/superclass method of getDelegatePrincipal (1) appears to return a null principal here
+ // So we're overriding it to use topLevelPrincipal instead, as that's what GeckoView uses (2)
+ // 1: https://searchfox.org/firefox-main/rev/e28b34ab/browser/modules/PermissionUI.sys.mjs#762
+ // 2: https://searchfox.org/firefox-main/rev/e28b34ab/mobile/shared/components/geckoview/GeckoViewPermission.sys.mjs#124
+ return this.request.topLevelPrincipal;
+ }
+
+ prompt() {
+ // If the EME UI is disabled, we can't/shouldn't prompt users - so just cancel the request
+ if (!Services.prefs.getBoolPref("browser.eme.ui.enabled")) {
+ this.cancel();
+ } else {
+ super.prompt();
+ }
+ return;
+ }
+}
diff --git a/dom/media/eme/MediaKeySystemAccessManager.cpp b/dom/media/eme/MediaKeySystemAccessManager.cpp
index aaa3ff25b64f..56724a03ac24 100644
--- a/dom/media/eme/MediaKeySystemAccessManager.cpp
+++ b/dom/media/eme/MediaKeySystemAccessManager.cpp
@@ -364,9 +364,11 @@ void MediaKeySystemAccessManager::OnDoesAppAllowProtectedMedia(
aIsAllowed ? "true" : "false",
NS_ConvertUTF16toUTF8(aRequest->mKeySystem).get());
if (!aIsAllowed) {
- aRequest->RejectPromiseWithNotSupportedError(
- nsLiteralCString("The application embedding this user agent has "
- "blocked MediaKeySystemAccess"));
+ if (IsClearkeyKeySystem(aRequest->mKeySystem)) {
+ aRequest->RejectPromiseWithNotSupportedError("CDM is not installed"_ns);
+ } else {
+ aRequest->RejectPromiseWithNotSupportedError("EME has been preffed off"_ns);
+ }
return;
}
@@ -421,8 +423,8 @@ void MediaKeySystemAccessManager::RequestMediaKeySystemAccess(
return;
}
- if (!StaticPrefs::media_eme_enabled() &&
- !IsClearkeyKeySystem(aRequest->mKeySystem)) {
+ if (!StaticPrefs::media_eme_enabled()) {
+// !IsClearkeyKeySystem(aRequest->mKeySystem)) {
// EME disabled by user, send notification to chrome so UI can inform user.
// Clearkey is allowed even when EME is disabled because we want the pref
// "media.eme.enabled" only taking effect on proprietary DRMs.
@@ -431,12 +433,21 @@ void MediaKeySystemAccessManager::RequestMediaKeySystemAccess(
MediaKeySystemAccess::NotifyObservers(mWindow, aRequest->mKeySystem,
MediaKeySystemStatus::Api_disabled);
}
- aRequest->RejectPromiseWithNotSupportedError("EME has been preffed off"_ns);
+ if (IsClearkeyKeySystem(aRequest->mKeySystem)) {
+ aRequest->RejectPromiseWithNotSupportedError("CDM is not installed"_ns);
+ } else {
+ aRequest->RejectPromiseWithNotSupportedError("EME has been preffed off"_ns);
+ }
aRequest->mDiagnostics.StoreMediaKeySystemAccess(
mWindow->GetExtantDoc(), aRequest->mKeySystem, false, __func__);
return;
}
+ if (IsClearkeyKeySystem(aRequest->mKeySystem) && !Preferences::GetBool("librewolf.eme.gmp-clearkey.enabled", false)) {
+ aRequest->RejectPromiseWithNotSupportedError("CDM is not installed"_ns);
+ return;
+ }
+
nsAutoCString message;
MediaKeySystemStatus status =
MediaKeySystemAccess::GetKeySystemStatus(*aRequest, message);
--
2.47.3
@@ -1,25 +0,0 @@
From 8533ae5958adc2514498427967a2bcd97fa1506a Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:09:51 +0100
Subject: [PATCH 12/52] extensions-setUninstallURL.patch
---
toolkit/components/extensions/parent/ext-runtime.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/toolkit/components/extensions/parent/ext-runtime.js b/toolkit/components/extensions/parent/ext-runtime.js
index abc30a2e1319..22f03e99a871 100644
--- a/toolkit/components/extensions/parent/ext-runtime.js
+++ b/toolkit/components/extensions/parent/ext-runtime.js
@@ -354,7 +354,7 @@ this.runtime = class extends ExtensionAPIPersistent {
},
setUninstallURL: function (url) {
- if (url === null || url.length === 0) {
+ if (true) {
extension.uninstallURL = null;
return Promise.resolve();
}
--
2.47.3
@@ -1,25 +0,0 @@
From 1279461064c89e354b68951077e4a893d9cb3ebf Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:09:54 +0100
Subject: [PATCH 13/52] firefox-in-ua.patch
---
toolkit/moz.configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
index e313d971ec33..a20a82fa6d06 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -26,7 +26,7 @@ project_flag(
project_flag(
env="MOZ_APP_UA_NAME",
- default="",
+ default="Firefox",
nargs=1,
help="Application name in the User Agent string",
)
--
2.47.3
@@ -1,105 +0,0 @@
From 09f40f3935428b5046ea866e09dfbf739684ce6f Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:09:59 +0100
Subject: [PATCH 14/52] fpp-canvas-fix.patch
---
dom/canvas/CanvasRenderingContext2D.cpp | 11 ++++++++---
dom/canvas/ClientWebGLContext.cpp | 10 +++++++---
.../components/resistfingerprinting/nsRFPService.cpp | 2 ++
3 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp
index 596eb44f3992..2018528600f7 100644
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -2288,7 +2288,9 @@ UniquePtr<uint8_t[]> CanvasRenderingContext2D::GetImageBuffer(
PrincipalOrNull(), ret.get(), out_imageSize->width,
out_imageSize->height,
out_imageSize->width * out_imageSize->height * 4);
- if (aExtractionBehavior == CanvasUtils::ImageExtraction::Randomize) {
+ if (aExtractionBehavior == CanvasUtils::ImageExtraction::Randomize ||
+ aExtractionBehavior ==
+ CanvasUtils::ImageExtraction::EfficientRandomize) {
nsRFPService::RandomizePixels(
GetCookieJarSettings(), PrincipalOrNull(), ret.get(),
out_imageSize->width, out_imageSize->height,
@@ -6682,7 +6684,8 @@ nsresult CanvasRenderingContext2D::GetImageDataArray(
//
// Note that we don't need to clone if we will use the place holder because
// the place holder doesn't use actual image data.
- if (extractionBehavior == CanvasUtils::ImageExtraction::Randomize) {
+ if (extractionBehavior == CanvasUtils::ImageExtraction::Randomize ||
+ extractionBehavior == CanvasUtils::ImageExtraction::EfficientRandomize) {
if (readback) {
readback = CreateDataSourceSurfaceByCloning(readback);
}
@@ -6704,7 +6707,9 @@ nsresult CanvasRenderingContext2D::GetImageDataArray(
// service) after we call JS_GetUint8ClampedArrayData, we will
// pre-generate the randomness required for GeneratePlaceholderCanvasData.
randomData = TryToGenerateRandomDataForPlaceholderCanvasData();
- } else if (extractionBehavior == CanvasUtils::ImageExtraction::Randomize) {
+ } else if (extractionBehavior == CanvasUtils::ImageExtraction::Randomize ||
+ extractionBehavior ==
+ CanvasUtils::ImageExtraction::EfficientRandomize) {
// Apply the random noises if canvan randomization is enabled. We don't
// need to calculate random noises if we are going to use the place
// holder.
diff --git a/dom/canvas/ClientWebGLContext.cpp b/dom/canvas/ClientWebGLContext.cpp
index f56f1107070e..afed0c39f23a 100644
--- a/dom/canvas/ClientWebGLContext.cpp
+++ b/dom/canvas/ClientWebGLContext.cpp
@@ -1367,7 +1367,8 @@ UniquePtr<uint8_t[]> ClientWebGLContext::GetImageBuffer(
*out_imageSize = dataSurface->GetSize();
nsRFPService::PotentiallyDumpImage(PrincipalOrNull(), dataSurface);
- if (aExtractionBehavior == CanvasUtils::ImageExtraction::Randomize) {
+ if (aExtractionBehavior == CanvasUtils::ImageExtraction::Randomize ||
+ aExtractionBehavior == CanvasUtils::ImageExtraction::EfficientRandomize) {
return gfxUtils::GetImageBufferWithRandomNoise(
dataSurface, premultAlpha, GetCookieJarSettings(), PrincipalOrNull(),
out_format);
@@ -3680,7 +3681,9 @@ void ClientWebGLContext::GetBufferSubData(GLenum target, GLintptr srcByteOffset,
if (extraction == CanvasUtils::ImageExtraction::Placeholder) {
dom::GeneratePlaceholderCanvasData(destView->size_bytes(),
destView->Elements());
- } else if (extraction == CanvasUtils::ImageExtraction::Randomize) {
+ } else if (extraction == CanvasUtils::ImageExtraction::Randomize ||
+ extraction ==
+ CanvasUtils::ImageExtraction::EfficientRandomize) {
// We have no idea what's in the buffer. So, we randomize it as if each
// elemSize bytes is a single element.
uint8_t elementsPerGroup = 1,
@@ -5455,7 +5458,8 @@ void ClientWebGLContext::ReadPixels(GLint x, GLint y, GLsizei width,
} else {
RecordCanvasUsage(CanvasExtractionAPI::ReadPixels,
CSSIntSize(width, height));
- if (extraction == CanvasUtils::ImageExtraction::Randomize) {
+ if (extraction == CanvasUtils::ImageExtraction::Randomize ||
+ extraction == CanvasUtils::ImageExtraction::EfficientRandomize) {
const auto pii = webgl::PackingInfoInfo::For(desc.pi);
// DoReadPixels() requres pii to be Some().
MOZ_ASSERT(pii.isSome());
diff --git a/toolkit/components/resistfingerprinting/nsRFPService.cpp b/toolkit/components/resistfingerprinting/nsRFPService.cpp
index ea47718beff8..ccc9f21c9bf2 100644
--- a/toolkit/components/resistfingerprinting/nsRFPService.cpp
+++ b/toolkit/components/resistfingerprinting/nsRFPService.cpp
@@ -1890,6 +1890,7 @@ nsresult nsRFPService::RandomizeElements(
return NS_OK;
}
+ /*
// Don't randomize if all groups are uniform.
const bool allGroupsMatch = [&]() {
auto itr = RangedPtr<const uint8_t>(aData, aSizeInBytes);
@@ -1904,6 +1905,7 @@ nsresult nsRFPService::RandomizeElements(
if (allGroupsMatch) {
return NS_OK;
}
+ */
auto timerId =
glean::fingerprinting_protection::canvas_noise_calculate_time_2.Start();
--
2.47.3
@@ -1,179 +0,0 @@
From 61b38ed69d7f2660775f702da1df6a1b9dd84a2a Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:10:05 +0100
Subject: [PATCH 15/52] fullpage-translations-customization.patch
---
browser/base/content/main-popupset.inc.xhtml | 2 +
browser/base/content/main-popupset.js | 3 ++
.../preferences/config/languages.mjs | 1 +
browser/components/preferences/main.inc.xhtml | 11 ++++-
browser/components/preferences/main.js | 43 ++++++++++---------
.../content/fullPageTranslationsPanel.js | 9 ++++
6 files changed, 47 insertions(+), 22 deletions(-)
diff --git a/browser/base/content/main-popupset.inc.xhtml b/browser/base/content/main-popupset.inc.xhtml
index 47603929dbad..459b7b426c4b 100644
--- a/browser/base/content/main-popupset.inc.xhtml
+++ b/browser/base/content/main-popupset.inc.xhtml
@@ -1005,6 +1005,8 @@
type="checkbox"
autocheck="false"
id="translations-panel-settings-never-translate-site"/>
+ <menuitem data-l10n-id="translations-panel-disable-translations"
+ id="translations-panel-disable-translations"/>
<menuseparator/>
<menuitem class="manage-languages-menuitem"
data-l10n-id="translations-panel-settings-manage-languages"
diff --git a/browser/base/content/main-popupset.js b/browser/base/content/main-popupset.js
index 1286fba14b0c..47cfc8b16858 100644
--- a/browser/base/content/main-popupset.js
+++ b/browser/base/content/main-popupset.js
@@ -438,6 +438,9 @@ document.addEventListener(
case "translations-panel-settings-never-translate-site":
FullPageTranslationsPanel.onNeverTranslateSite();
break;
+ case "translations-panel-disable-translations":
+ FullPageTranslationsPanel.openDisableTranslations();
+ break;
case "translations-panel-manage-languages":
FullPageTranslationsPanel.openManageLanguages();
break;
diff --git a/browser/components/preferences/config/languages.mjs b/browser/components/preferences/config/languages.mjs
index 7dd8ff65d59e..7123cb0f4639 100644
--- a/browser/components/preferences/config/languages.mjs
+++ b/browser/components/preferences/config/languages.mjs
@@ -20,6 +20,7 @@ Preferences.addAll([
{ id: "privacy.spoof_english", type: "int" },
{ id: "layout.spellcheckDefault", type: "int" },
{ id: "browser.translations.automaticallyPopup", type: "bool" },
+ { id: "browser.translations.enable", type: "bool" },
]);
/**
diff --git a/browser/components/preferences/main.inc.xhtml b/browser/components/preferences/main.inc.xhtml
index f6badc31b612..9ea6086f8b88 100644
--- a/browser/components/preferences/main.inc.xhtml
+++ b/browser/components/preferences/main.inc.xhtml
@@ -106,8 +106,16 @@
<!-- This Translations UI is the pre-settings-redesign UI and should be removed
when getting ready for the settings redesign to fully ship. -->
- <vbox id="translationsGroup" data-srd-groupid="translations" hidden="true" data-subcategory="translations">
+ <vbox id="translationsGroup" data-srd-groupid="translations" data-subcategory="translations">
<label><html:h2 data-l10n-id="translations-manage-header"/></label>
+ <checkbox id="translations-manage-enable"
+ data-l10n-id="translations-manage-enable"
+ preference="browser.translations.enable"
+ data-subcategory="translations-enable" />
+ <vbox id="innerTranslationsGroup" hidden="true">
+ <checkbox id="translations-manage-autopopup"
+ data-l10n-id="translations-manage-autopopup"
+ preference="browser.translations.automaticallyPopup" />
<hbox id="translations-manage-description" align="center">
<description flex="1" data-l10n-id="translations-manage-intro-2"/>
<button id="translations-manage-settings-button"
@@ -128,6 +136,7 @@
</html:div>
<description id="translations-manage-error" hidden="true"></description>
</vbox>
+ </vbox>
</vbox>
</groupbox>
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
index 5a56d348146c..d75d3c81cfa5 100644
--- a/browser/components/preferences/main.js
+++ b/browser/components/preferences/main.js
@@ -713,6 +713,10 @@ var gMainPane = {
window.addEventListener("unload", this);
// Notify observers that the UI is now ready
+ Preferences.addSyncFromPrefListener(
+ document.getElementById("translations-manage-enable"),
+ () => this.readEnableTranslations()
+ );
Services.obs.notifyObservers(window, "main-pane-loaded");
this.setInitialized();
},
@@ -813,39 +817,36 @@ var gMainPane = {
button.disabled = !preference.value;
return undefined;
},
+
+ readEnableTranslations(skipInit = false) {
+ const translationsEnabled = Preferences.get("browser.translations.enable").value;
+ document.getElementById("innerTranslationsGroup").hidden = !translationsEnabled;
+ if (!this._translationsInitialized && !skipInit)
+ this.initTranslations();
+ },
+
+ _translationsInitialized: false,
+
/**
* Initialize the translations view.
*/
async initTranslations() {
- let legacyTranslationsVisible = Preferences.getSetting(
- "legacyTranslationsVisible"
- );
+ this.readEnableTranslations(true);
+
+ if (!Services.prefs.getBoolPref("browser.translations.enable")) {
+ return;
+ }
+
+ this._translationsInitialized = true;
+
/**
* Which phase a language download is in.
*
* @typedef {"downloaded" | "loading" | "uninstalled"} DownloadPhase
*/
- let translationsGroup = document.getElementById("translationsGroup");
- let setTranslationsGroupVisbility = () => {
- // Immediately show the group so that the async load of the component does
- // not cause the layout to jump. The group will be empty initially.
- translationsGroup.hidden = !legacyTranslationsVisible.visible;
- translationsGroup.classList.toggle(
- "setting-hidden",
- translationsGroup.hidden
- );
- };
- setTranslationsGroupVisbility();
- legacyTranslationsVisible.on("change", setTranslationsGroupVisbility);
- window.addEventListener(
- "unload",
- () =>
- legacyTranslationsVisible.off("change", setTranslationsGroupVisbility),
- { once: true }
- );
class TranslationsState {
/**
diff --git a/browser/components/translations/content/fullPageTranslationsPanel.js b/browser/components/translations/content/fullPageTranslationsPanel.js
index 91666d6e513c..f65017583ef1 100644
--- a/browser/components/translations/content/fullPageTranslationsPanel.js
+++ b/browser/components/translations/content/fullPageTranslationsPanel.js
@@ -1342,6 +1342,15 @@ var FullPageTranslationsPanel = new (class {
);
}
+ openDisableTranslations() {
+ const window =
+ gBrowser.selectedBrowser.browsingContext.top.embedderElement.ownerGlobal;
+ window.openTrustedLinkIn(
+ "about:preferences#general-translations-enable",
+ "tab"
+ );
+ }
+
/**
* Redirect the user to about:preferences
*/
--
2.47.3
@@ -1,24 +0,0 @@
From 28d1d9f1d35be687c7caf9cf59d72fb2870a7639 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:10:09 +0100
Subject: [PATCH 16/52] languages.patch
---
browser/locales/shipped-locales | 1 +
1 file changed, 1 insertion(+)
diff --git a/browser/locales/shipped-locales b/browser/locales/shipped-locales
index 41ee3f73d91c..7f501f4c7391 100644
--- a/browser/locales/shipped-locales
+++ b/browser/locales/shipped-locales
@@ -57,6 +57,7 @@ kk
km
kn
ko
+ku
lij
lt
lv
--
2.47.3
@@ -1,65 +0,0 @@
From 26cad7aba0e8913d91fb1ea94d063295635e26d1 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:10:12 +0100
Subject: [PATCH 17/52] limit-access.patch
---
caps/nsScriptSecurityManager.cpp | 42 ++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/caps/nsScriptSecurityManager.cpp b/caps/nsScriptSecurityManager.cpp
index aaca13e98a07..5a320f3279af 100644
--- a/caps/nsScriptSecurityManager.cpp
+++ b/caps/nsScriptSecurityManager.cpp
@@ -1031,6 +1031,48 @@ nsresult nsScriptSecurityManager::CheckLoadURIFlags(
}
}
+ // Only allow some "about:" pages to have access to contentaccessible
+ // "chrome://branding/" assets. Otherwise web pages could easily and
+ // consistently detect the differences between channels when their
+ // branding differs. See tor-browser#43308 and tor-browser#42319.
+ // NOTE: The same assets under the alternative URI
+ // "resource:///chrome/browser/content/branding/" should already be
+ // inaccessible to web content, so we only add a condition for the chrome
+ // path.
+ if (targetScheme.EqualsLiteral("chrome")) {
+ nsAutoCString targetHost;
+ rv = aTargetBaseURI->GetHost(targetHost);
+ NS_ENSURE_SUCCESS(rv, rv);
+ if (targetHost.EqualsLiteral("branding")) {
+ // Disallow any Principal whose scheme is not "about", or is a
+ // contentaccessible "about" URI ("about:blank" or "about:srcdoc").
+ // NOTE: "about:blank" and "about:srcdoc" would be unexpected here
+ // since such a document spawned by a web document should inherit the
+ // same Principal URI. I.e. they would be "http:" or "https:" schemes.
+ // But we add this condition for extra assurances.
+ // NOTE: Documents with null Principals, like "about:blank" typed by
+ // the user, would also be excluded since the Principal URI would be
+ // "moz-nullprincipal:".
+ if (!aSourceBaseURI->SchemeIs("about") ||
+ NS_IsContentAccessibleAboutURI(aSourceBaseURI)) {
+ return NS_ERROR_DOM_BAD_URI;
+ }
+ // Also exclude "about:reader" from accessing branding assets. I.e. if
+ // a web page includes `<img src="chrome://branding/..." />` we do not
+ // want it to render within "about:reader" either.
+ // Though it is unknown whether the information within "about:reader"
+ // would be exploitable by a web page, we also want to exclude
+ // "about:reader" for consistency: if it does not display in the
+ // original web page, it should not display in "about:reader" either.
+ nsAutoCString sourcePath;
+ rv = aSourceBaseURI->GetFilePath(sourcePath);
+ NS_ENSURE_SUCCESS(rv, rv);
+ if (sourcePath.EqualsLiteral("reader")) {
+ return NS_ERROR_DOM_BAD_URI;
+ }
+ }
+ }
+
if (targetScheme.EqualsLiteral("resource")) {
if (StaticPrefs::security_all_resource_uri_content_accessible()) {
return NS_OK;
--
2.47.3
@@ -1,45 +0,0 @@
From 9410b040ecde531f6c10992f1f64af126b510ed5 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:10:16 +0100
Subject: [PATCH 18/52] link-preview.patch
---
.../preferences/config/tabs-browsing.mjs | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/browser/components/preferences/config/tabs-browsing.mjs b/browser/components/preferences/config/tabs-browsing.mjs
index 50fb55329067..7d4b5bec8b53 100644
--- a/browser/components/preferences/config/tabs-browsing.mjs
+++ b/browser/components/preferences/config/tabs-browsing.mjs
@@ -440,22 +440,20 @@ Preferences.addSetting({
Preferences.addSetting({
id: "linkPreviewEnabled",
pref: "browser.ml.linkPreview.enabled",
+});
+Preferences.addSetting({
+ id: "linkPreviewKeyPoints",
+ pref: "browser.ml.linkPreview.optin",
deps: ["aiControlDefault", "aiControlLinkPreviews"],
visible: ({ aiControlDefault, aiControlLinkPreviews }) => {
return (
window.canShowAiFeature(aiControlLinkPreviews, aiControlDefault) &&
+ // LinkPreview.canShowKeyPoints depends on the global genai pref.
// @ts-ignore bug 1996860
- lazy.LinkPreview.canShowPreferences
+ lazy.LinkPreview.canShowKeyPoints
);
},
});
-Preferences.addSetting({
- id: "linkPreviewKeyPoints",
- pref: "browser.ml.linkPreview.optin",
- // LinkPreview.canShowKeyPoints depends on the global genai pref.
- // @ts-ignore bug 1996860
- visible: () => lazy.LinkPreview.canShowKeyPoints,
-});
Preferences.addSetting({
id: "linkPreviewLongPress",
pref: "browser.ml.linkPreview.longPress",
--
2.47.3
@@ -1,277 +0,0 @@
From 62fca4b579e3ad49fa5b8ad09b04d9bec7640261 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:10:22 +0100
Subject: [PATCH 19/52] lw-permissions.patch
---
.../base/content/navigator-toolbox.inc.xhtml | 6 ++
.../preferences/config/permissions-data.mjs | 82 +++++++++++++++++++
.../preferences/dialogs/sitePermissions.js | 14 ++++
browser/modules/SitePermissions.sys.mjs | 51 ++++++++++++
browser/modules/moz.build | 2 +
browser/themes/shared/preferences/privacy.css | 8 ++
6 files changed, 163 insertions(+)
diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml
index da5ce8e0cfc5..f23d366e0b56 100644
--- a/browser/base/content/navigator-toolbox.inc.xhtml
+++ b/browser/base/content/navigator-toolbox.inc.xhtml
@@ -283,6 +283,10 @@
data-l10n-id="urlbar-autoplay-media-blocked"/>
<image data-permission-id="canvas" class="blocked-permission-icon canvas-icon" role="button"
data-l10n-id="urlbar-canvas-blocked"/>
+ <image data-permission-id="media-key-system-access" class="blocked-permission-icon drm-icon" role="button"
+ data-l10n-id="urlbar-eme-blocked"/>
+ <image data-permission-id="webgl" class="blocked-permission-icon webgl-icon" role="button"
+ data-l10n-id="urlbar-webgl-blocked"/>
<image data-permission-id="midi" class="blocked-permission-icon midi-icon" role="button"
data-l10n-id="urlbar-midi-blocked"/>
<image data-permission-id="serial" class="blocked-permission-icon serial-icon" role="button"
@@ -314,6 +318,8 @@
data-l10n-id="urlbar-addons-notification-anchor"/>
<image id="canvas-notification-icon" class="notification-anchor-icon" role="button"
data-l10n-id="urlbar-canvas-notification-anchor"/>
+ <image id="webgl-notification-icon" class="notification-anchor-icon" role="button"
+ data-l10n-id="urlbar-webgl-notification-anchor"/>
<image id="indexedDB-notification-icon" class="notification-anchor-icon indexedDB-icon" role="button"
data-l10n-id="urlbar-indexed-db-notification-anchor"/>
<image id="password-notification-icon" class="notification-anchor-icon" role="button"
diff --git a/browser/components/preferences/config/permissions-data.mjs b/browser/components/preferences/config/permissions-data.mjs
index 021036868962..e9f9ae828c2c 100644
--- a/browser/components/preferences/config/permissions-data.mjs
+++ b/browser/components/preferences/config/permissions-data.mjs
@@ -63,6 +63,11 @@ Preferences.addAll([
{ id: PREF_ADDON_RECOMMENDATIONS_ENABLED, type: "bool" },
{ id: PREF_UPLOAD_ENABLED, type: "bool" },
{ id: "datareporting.usage.uploadEnabled", type: "bool" },
+
+ { id: "browser.eme.ui.enabled", type: "bool" },
+ { id: "librewolf.webgl.prompt", type: "bool" },
+ { id: "media.eme.require-app-approval", type: "bool" },
+ { id: "webgl.disabled", type: "bool" },
]);
/**
@@ -498,6 +503,53 @@ Preferences.addSetting(
})
);
+Preferences.addSetting({
+ id: "emeEnabled",
+ pref: "media.eme.enabled",
+});
+Preferences.addSetting({
+ id: "emePermissionPromptEnabled",
+ pref: "media.eme.require-app-approval",
+});
+Preferences.addSetting({
+ id: "emeUIEnabled",
+ pref: "browser.eme.ui.enabled",
+});
+Preferences.addSetting({
+ id: "emeSettingsButton",
+ onUserClick: () => showPermissionExceptions({ permissionType: "media-key-system-access" }),
+ deps: ["emeEnabled", "emePermissionPromptEnabled", "emeUIEnabled"],
+ visible: deps => {
+ return deps.emeEnabled.value && deps.emePermissionPromptEnabled.value && deps.emeUIEnabled.value;
+ },
+});
+
+Preferences.addSetting({
+ id: "webglPermissionPromptEnabled",
+ pref: "librewolf.webgl.prompt",
+});
+Preferences.addSetting({
+ id: "webglDisabled",
+ pref: "webgl.disabled",
+});
+Preferences.addSetting({
+ id: "webglSettingsButton",
+ onUserClick: () => showPermissionExceptions({ permissionType: "webgl" }),
+ deps: ["webglPermissionPromptEnabled", "webglDisabled"],
+ visible: deps => {
+ return deps.webglPermissionPromptEnabled.value && !deps.webglDisabled.value;
+ },
+});
+
+Preferences.addSetting({
+ id: "canvasSettingsButton",
+ onUserClick: () => showPermissionExceptions({ permissionType: "canvas" }),
+ deps: ["resistFingerprinting"],
+ visible: deps => {
+ return deps.resistFingerprinting.value;
+ },
+});
+
SettingGroupManager.registerGroups({
permissions: {
id: "permissions",
@@ -607,6 +659,36 @@ SettingGroupManager.registerGroups({
"permissions-remove.label,permissions-remove-all.label,permissions-site-xr-window2.title,permissions-site-xr-desc,permissions-site-xr-disable-label,permissions-site-xr-disable-desc,",
},
},
+ {
+ id: "webglSettingsButton",
+ control: "moz-box-button",
+ l10nId: "permissions-webgl2",
+ controlAttrs: {
+ ".iconSrc": "chrome://browser/skin/notification-icons/webgl.svg",
+ "search-l10n-ids":
+ "permissions-remove.label,permissions-remove-all.label,permissions-site-webgl-window2.title,permissions-site-webgl-desc",
+ },
+ },
+ {
+ id: "canvasSettingsButton",
+ control: "moz-box-button",
+ l10nId: "permissions-canvas2",
+ controlAttrs: {
+ ".iconSrc": "chrome://browser/skin/canvas.svg",
+ "search-l10n-ids":
+ "permissions-remove.label,permissions-remove-all.label,permissions-site-canvas-window2.title,permissions-site-canvas-desc",
+ },
+ },
+ {
+ id: "emeSettingsButton",
+ control: "moz-box-button",
+ l10nId: "permissions-eme2",
+ controlAttrs: {
+ ".iconSrc": "chrome://browser/skin/drm-icon.svg",
+ "search-l10n-ids":
+ "permissions-remove.label,permissions-remove-all.label,permissions-site-eme-window2.title,permissions-site-eme-desc,permissions-site-eme-disable-label,permissions-site-eme-disable-desc",
+ },
+ },
],
},
{
diff --git a/browser/components/preferences/dialogs/sitePermissions.js b/browser/components/preferences/dialogs/sitePermissions.js
index 013c0df347bb..633b9f3e4512 100644
--- a/browser/components/preferences/dialogs/sitePermissions.js
+++ b/browser/components/preferences/dialogs/sitePermissions.js
@@ -40,6 +40,20 @@ const sitePermissionsL10n = {
disableLabel: "permissions-site-xr-disable-label",
disableDescription: "permissions-site-xr-disable-desc",
},
+ "media-key-system-access": {
+ window: "permissions-site-eme-window2",
+ description: "permissions-site-eme-desc",
+ disableLabel: "permissions-site-eme-disable-label",
+ disableDescription: "permissions-site-eme-disable-desc",
+ },
+ webgl: {
+ window: "permissions-site-webgl-window2",
+ description: "permissions-site-webgl-desc",
+ },
+ canvas: {
+ window: "permissions-site-canvas-window2",
+ description: "permissions-site-canvas-desc",
+ },
camera: {
window: "permissions-site-camera-window2",
description: "permissions-site-camera-desc",
diff --git a/browser/modules/SitePermissions.sys.mjs b/browser/modules/SitePermissions.sys.mjs
index b112014e0d49..9e2a36111674 100644
--- a/browser/modules/SitePermissions.sys.mjs
+++ b/browser/modules/SitePermissions.sys.mjs
@@ -1138,6 +1138,21 @@ let gPermissions = {
},
},
+ "media-key-system-access": {
+ labelID: "eme",
+ exactHostMatch: true,
+ get disabled() {
+ return !SitePermissions.emeEnabled || !SitePermissions.emePermissionPromptEnabled || !SitePermissions.emeUIEnabled;
+ },
+ },
+
+ webgl: {
+// exactHostMatch: true,
+ get disabled() {
+ return !SitePermissions.webglPermissionPromptEnabled || SitePermissions.webglDisabled;
+ },
+ },
+
midi: {
exactHostMatch: true,
get disabled() {
@@ -1171,6 +1186,42 @@ let gPermissions = {
},
};
+XPCOMUtils.defineLazyPreferenceGetter(
+ SitePermissions,
+ "emeEnabled",
+ "media.eme.enabled",
+ false,
+ SitePermissions.invalidatePermissionList.bind(SitePermissions)
+);
+XPCOMUtils.defineLazyPreferenceGetter(
+ SitePermissions,
+ "emePermissionPromptEnabled",
+ "media.eme.require-app-approval",
+ true,
+ SitePermissions.invalidatePermissionList.bind(SitePermissions)
+);
+XPCOMUtils.defineLazyPreferenceGetter(
+ SitePermissions,
+ "emeUIEnabled",
+ "browser.eme.ui.enabled",
+ true,
+ SitePermissions.invalidatePermissionList.bind(SitePermissions)
+);
+XPCOMUtils.defineLazyPreferenceGetter(
+ SitePermissions,
+ "webglPermissionPromptEnabled",
+ "librewolf.webgl.prompt",
+ true,
+ SitePermissions.invalidatePermissionList.bind(SitePermissions)
+);
+XPCOMUtils.defineLazyPreferenceGetter(
+ SitePermissions,
+ "webglDisabled",
+ "webgl.disabled",
+ false,
+ SitePermissions.invalidatePermissionList.bind(SitePermissions)
+);
+
SitePermissions.midiPermissionEnabled = Services.prefs.getBoolPref(
"dom.webmidi.enabled"
);
diff --git a/browser/modules/moz.build b/browser/modules/moz.build
index eebf824044aa..d8dfd195fc73 100644
--- a/browser/modules/moz.build
+++ b/browser/modules/moz.build
@@ -150,9 +150,11 @@ EXTRA_JS_MODULES += [
MOZ_SRC_FILES += [
"CanvasPermissionPromptHelper.sys.mjs",
"ContextId.sys.mjs",
+ "EMEPermissionPrompt.sys.mjs",
"ObserverForwarder.sys.mjs",
"PrivateBrowsingUI.sys.mjs",
"SerialDeviceSharingHelper.sys.mjs",
+ "WebGLPermissionPromptHelper.sys.mjs",
]
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
diff --git a/browser/themes/shared/preferences/privacy.css b/browser/themes/shared/preferences/privacy.css
index 896619be9a33..cbe70bc6455d 100644
--- a/browser/themes/shared/preferences/privacy.css
+++ b/browser/themes/shared/preferences/privacy.css
@@ -37,6 +37,14 @@
list-style-image: url(chrome://browser/skin/notification-icons/xr.svg);
}
+.drm-icon {
+ list-style-image: url(chrome://browser/skin/drm-icon.svg);
+}
+
+.webgl-icon {
+ list-style-image: url(chrome://browser/skin/notification-icons/webgl.svg);
+}
+
.camera-icon {
list-style-image: url(chrome://browser/skin/notification-icons/camera.svg);
}
--
2.47.3
@@ -1,32 +0,0 @@
From 1fa7b395367dfa3c3b42b35461fb9c0bba2930e0 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:10:25 +0100
Subject: [PATCH 20/52] moz-configure.patch
---
toolkit/moz.configure | 2 ++
1 file changed, 2 insertions(+)
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
index a20a82fa6d06..0290e89ec973 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -20,6 +20,7 @@ def check_moz_app_id(moz_app_id, build_project):
project_flag(
env="MOZ_APP_VENDOR",
+ default="LibreWolf",
nargs=1,
help='Used for application.ini\'s "Vendor" field, which also impacts profile location and user-visible fields',
)
@@ -33,6 +34,7 @@ project_flag(
project_flag(
"MOZ_APP_PROFILE",
+ default="librewolf",
nargs=1,
help='Used for application.ini\'s "Profile" field, which controls profile location',
)
--
2.47.3
@@ -1,171 +0,0 @@
From a7c5a02b1e5515e04e88068d9125b4078b5137a0 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:10:30 +0100
Subject: [PATCH 21/52] mozilla_dirs.patch
---
.../extensions/NativeManifests.sys.mjs | 2 +
toolkit/xre/nsXREDirProvider.cpp | 54 ++++++++-----------
xpcom/build/nsXULAppAPI.h | 2 +
3 files changed, 27 insertions(+), 31 deletions(-)
diff --git a/toolkit/components/extensions/NativeManifests.sys.mjs b/toolkit/components/extensions/NativeManifests.sys.mjs
index 48d7d50cdec3..fbf39fba0d3a 100644
--- a/toolkit/components/extensions/NativeManifests.sys.mjs
+++ b/toolkit/components/extensions/NativeManifests.sys.mjs
@@ -37,6 +37,8 @@ export var NativeManifests = {
let dirs = [
Services.dirsvc.get("XREUserNativeManifests", Ci.nsIFile).path,
Services.dirsvc.get("XRESysNativeManifests", Ci.nsIFile).path,
+ Services.dirsvc.get("XREMozUserNativeManifests", Ci.nsIFile).path,
+ Services.dirsvc.get("XREMozSysNativeManifests", Ci.nsIFile).path,
];
this._lookup = (type, name, context) =>
this._tryPaths(type, name, dirs, context);
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
index dcce3335e14f..004c767956f2 100644
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -332,23 +332,25 @@ nsresult nsXREDirProvider::GetBackgroundTasksProfilesRootDir(
* On Linux this is /usr/{lib,lib64}/mozilla
* (for 32- and 64-bit systems respsectively)
*/
-static nsresult GetSystemParentDirectory(nsIFile** aFile) {
+static nsresult GetSystemParentDirectory(nsIFile** aFile,
+ nsCString aName = "LibreWolf"_ns) {
nsresult rv;
nsCOMPtr<nsIFile> localDir;
# if defined(XP_MACOSX)
rv = GetOSXFolderType(kOnSystemDisk, kApplicationSupportFolderType,
getter_AddRefs(localDir));
if (NS_SUCCEEDED(rv)) {
- rv = localDir->AppendNative("Mozilla"_ns);
+ rv = localDir->AppendNative(aName);
}
# else
- constexpr auto dirname =
+ ToLowerCase(aName);
+ nsCString dirname =
# ifdef HAVE_USR_LIB64_DIR
- "/usr/lib64/mozilla"_ns
+ "/usr/lib64/"_ns + aName
# elif defined(__OpenBSD__) || defined(__FreeBSD__)
- "/usr/local/lib/mozilla"_ns
+ "/usr/local/lib/"_ns + aName
# else
- "/usr/lib/mozilla"_ns
+ "/usr/lib/"_ns + aName
# endif
;
rv = NS_NewNativeLocalFile(dirname, getter_AddRefs(localDir));
@@ -416,11 +418,21 @@ nsXREDirProvider::GetFile(const char* aProperty, bool* aPersistent,
#if defined(XP_UNIX) || defined(XP_MACOSX)
else if (!strcmp(aProperty, XRE_SYS_NATIVE_MANIFESTS)) {
rv = ::GetSystemParentDirectory(getter_AddRefs(file));
+ } else if (!strcmp(aProperty, XRE_MOZ_SYS_NATIVE_MANIFESTS)) {
+ rv = ::GetSystemParentDirectory(getter_AddRefs(file), "Mozilla"_ns);
} else if (!strcmp(aProperty, XRE_USER_NATIVE_MANIFESTS)) {
// Keep forcing the legacy path for compatibility
rv = GetUserDataDirectoryHome(getter_AddRefs(file), /* aLocal */ false,
/* aForceLegacy */ true);
NS_ENSURE_SUCCESS(rv, rv);
+# if defined(XP_MACOSX)
+ rv = file->AppendNative("LibreWolf"_ns);
+# else // defined(XP_MACOSX)
+ rv = file->AppendNative(".librewolf"_ns);
+# endif // defined(XP_MACOSX)
+ } else if (!strcmp(aProperty, XRE_MOZ_USER_NATIVE_MANIFESTS)) {
+ rv = GetUserDataDirectoryHome(getter_AddRefs(file), false, true);
+ NS_ENSURE_SUCCESS(rv, rv);
# if defined(XP_MACOSX)
rv = file->AppendNative("Mozilla"_ns);
# else // defined(XP_MACOSX)
@@ -454,9 +466,9 @@ nsXREDirProvider::GetFile(const char* aProperty, bool* aPersistent,
else if (!strcmp(aProperty, XRE_SYS_SHARE_EXTENSION_PARENT_DIR)) {
# ifdef ENABLE_SYSTEM_EXTENSION_DIRS
# if defined(__OpenBSD__) || defined(__FreeBSD__)
- static const char* const sysLExtDir = "/usr/local/share/mozilla/extensions";
+ static const char* const sysLExtDir = "/usr/local/share/librewolf/extensions";
# else
- static const char* const sysLExtDir = "/usr/share/mozilla/extensions";
+ static const char* const sysLExtDir = "/usr/share/librewolf/extensions";
# endif
rv = NS_NewNativeLocalFile(nsDependentCString(sysLExtDir),
getter_AddRefs(file));
@@ -980,13 +992,7 @@ nsresult nsXREDirProvider::GetUpdateRootDir(nsIFile** aResult,
}
appDirPath = Substring(appDirPath, 1, dotIndex - 1);
- bool hasVendor = GetAppVendor() && strlen(GetAppVendor()) != 0;
- if (hasVendor || GetAppName()) {
- if (NS_FAILED(localDir->AppendNative(
- nsDependentCString(hasVendor ? GetAppVendor() : GetAppName())))) {
- return NS_ERROR_FAILURE;
- }
- } else if (NS_FAILED(localDir->AppendNative("Mozilla"_ns))) {
+ if (NS_FAILED(localDir->AppendNative("LibreWolf"_ns))) {
return NS_ERROR_FAILURE;
}
@@ -1284,7 +1290,7 @@ nsresult nsXREDirProvider::AppendSysUserExtensionPath(nsIFile* aFile) {
#if defined(XP_MACOSX) || defined(XP_WIN)
- static const char* const sXR = "Mozilla";
+ static const char* const sXR = "LibreWolf";
rv = aFile->AppendNative(nsDependentCString(sXR));
NS_ENSURE_SUCCESS(rv, rv);
@@ -1294,7 +1300,7 @@ nsresult nsXREDirProvider::AppendSysUserExtensionPath(nsIFile* aFile) {
#elif defined(XP_UNIX)
- static const char* const sXR = ".mozilla";
+ static const char* const sXR = ".librewolf";
rv = aFile->AppendNative(nsDependentCString(sXR));
NS_ENSURE_SUCCESS(rv, rv);
@@ -1599,10 +1605,6 @@ nsresult nsXREDirProvider::AppendProfilePath(nsIFile* aFile, bool aLocal) {
if (!profile.IsEmpty()) {
rv = AppendProfileString(aFile, profile.get());
} else {
- if (!vendor.IsEmpty()) {
- rv = aFile->AppendNative(vendor);
- NS_ENSURE_SUCCESS(rv, rv);
- }
rv = aFile->AppendNative(appName);
}
NS_ENSURE_SUCCESS(rv, rv);
@@ -1640,16 +1642,6 @@ nsresult nsXREDirProvider::AppendProfilePath(nsIFile* aFile, bool aLocal) {
rv = AppendProfileString(aFile, folder.get());
} else {
- if (!vendor.IsEmpty()) {
- folder.Append(vendor);
- ToLowerCase(folder);
-
- rv = aFile->AppendNative(folder);
- NS_ENSURE_SUCCESS(rv, rv);
-
- folder.Truncate();
- }
-
// This can be the case in tests.
if (!appName.IsEmpty()) {
folder.Append(appName);
diff --git a/xpcom/build/nsXULAppAPI.h b/xpcom/build/nsXULAppAPI.h
index 8a09115312f2..f8c623b611d4 100644
--- a/xpcom/build/nsXULAppAPI.h
+++ b/xpcom/build/nsXULAppAPI.h
@@ -113,6 +113,8 @@ struct BootstrapConfig;
*/
# define XRE_SYS_NATIVE_MANIFESTS "XRESysNativeManifests"
# define XRE_USER_NATIVE_MANIFESTS "XREUserNativeManifests"
+# define XRE_MOZ_SYS_NATIVE_MANIFESTS "XREMozSysNativeManifests"
+# define XRE_MOZ_USER_NATIVE_MANIFESTS "XREMozUserNativeManifests"
#endif
/**
--
2.47.3
@@ -1,112 +0,0 @@
From 301f96eacf384fb2c83b29e75370f198f12dc21c Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:10:36 +0100
Subject: [PATCH 22/52] moz-official.patch
---
browser/base/content/browser-development-helpers.js | 6 ++++--
browser/base/content/browser-main.js | 4 +---
browser/base/jar.mn | 2 --
browser/components/BrowserComponents.manifest | 2 --
dom/media/gmp/ChromiumCDMAdapter.cpp | 4 ++--
media/gmp-clearkey/0.1/gmp-clearkey.cpp | 2 +-
6 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/browser/base/content/browser-development-helpers.js b/browser/base/content/browser-development-helpers.js
index 5155b280b8ff..8dea266fbde5 100644
--- a/browser/base/content/browser-development-helpers.js
+++ b/browser/base/content/browser-development-helpers.js
@@ -9,8 +9,10 @@
var DevelopmentHelpers = {
init() {
- this.quickRestart = this.quickRestart.bind(this);
- this.addRestartShortcut();
+ if (Services.prefs.getBoolPref("librewolf.devHelpers", false)) {
+ this.quickRestart = this.quickRestart.bind(this);
+ this.addRestartShortcut();
+ }
},
quickRestart() {
diff --git a/browser/base/content/browser-main.js b/browser/base/content/browser-main.js
index 1ff101aecefc..6b02e5acb177 100644
--- a/browser/base/content/browser-main.js
+++ b/browser/base/content/browser-main.js
@@ -11,9 +11,7 @@
if (AppConstants.MOZ_DATA_REPORTING) {
Services.scriptloader.loadSubScript("chrome://browser/content/browser-data-submission-info-bar.js", this);
}
- if (!AppConstants.MOZILLA_OFFICIAL) {
- Services.scriptloader.loadSubScript("chrome://browser/content/browser-development-helpers.js", this);
- }
+ Services.scriptloader.loadSubScript("chrome://browser/content/browser-development-helpers.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/browser-pageActions.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/sidebar/browser-sidebar.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/browser-customtitlebar.js", this);
diff --git a/browser/base/jar.mn b/browser/base/jar.mn
index 783c67d397a5..b280fc60f01b 100644
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -41,9 +41,7 @@ browser.jar:
content/browser/browser-context.js (content/browser-context.js)
content/browser/browser-customization.js (content/browser-customization.js)
content/browser/browser-data-submission-info-bar.js (content/browser-data-submission-info-bar.js)
-#ifndef MOZILLA_OFFICIAL
content/browser/browser-development-helpers.js (content/browser-development-helpers.js)
-#endif
content/browser/browser-fullScreenAndPointerLock.js (content/browser-fullScreenAndPointerLock.js)
content/browser/browser-gestureSupport.js (content/browser-gestureSupport.js)
content/browser/browser-init.js (content/browser-init.js)
diff --git a/browser/components/BrowserComponents.manifest b/browser/components/BrowserComponents.manifest
index 5fc75066310e..a184e735ce4b 100644
--- a/browser/components/BrowserComponents.manifest
+++ b/browser/components/BrowserComponents.manifest
@@ -86,9 +86,7 @@ category browser-window-delayed-startup chrome://browser/content/browser-fullScr
#ifdef MOZ_DATA_REPORTING
category browser-window-delayed-startup chrome://browser/content/browser-data-submission-info-bar.js gDataNotificationInfoBar.init
#endif
-#ifndef MOZILLA_OFFICIAL
category browser-window-delayed-startup chrome://browser/content/browser-development-helpers.js DevelopmentHelpers.init
-#endif
category browser-window-delayed-startup chrome://browser/content/browser-addons.js gExtensionsNotifications.init
category browser-window-delayed-startup chrome://browser/content/browser-captivePortal.js CaptivePortalWatcher.delayedStartup
diff --git a/dom/media/gmp/ChromiumCDMAdapter.cpp b/dom/media/gmp/ChromiumCDMAdapter.cpp
index 3afba39c6a92..0956a87b124f 100644
--- a/dom/media/gmp/ChromiumCDMAdapter.cpp
+++ b/dom/media/gmp/ChromiumCDMAdapter.cpp
@@ -68,7 +68,7 @@ void* ChromiumCdmHostCompat(int aHostInterfaceVersion, void* aUserData) {
return aUserData;
}
-#ifdef MOZILLA_OFFICIAL
+#if 0
static cdm::HostFile TakeToCDMHostFile(HostFileData& aHostFileData) {
return cdm::HostFile(aHostFileData.mBinary.Path().get(),
aHostFileData.mBinary.TakePlatformFile(),
@@ -84,7 +84,7 @@ GMPErr ChromiumCDMAdapter::GMPInit(const GMPPlatformAPI* aPlatformAPI) {
return GMPGenericErr;
}
-#ifdef MOZILLA_OFFICIAL
+#if 0
// Note: we must call the VerifyCdmHost_0 function if it's present before
// we call the initialize function.
auto verify = reinterpret_cast<decltype(::VerifyCdmHost_0)*>(
diff --git a/media/gmp-clearkey/0.1/gmp-clearkey.cpp b/media/gmp-clearkey/0.1/gmp-clearkey.cpp
index 95f8b1ff3f41..d30b13721fdc 100644
--- a/media/gmp-clearkey/0.1/gmp-clearkey.cpp
+++ b/media/gmp-clearkey/0.1/gmp-clearkey.cpp
@@ -72,7 +72,7 @@ void* CreateCdmInstance(int cdm_interface_version, const char* key_system,
return nullptr;
}
-#ifdef MOZILLA_OFFICIAL
+#if 0
// Test that we're able to read the host files.
if (!sCanReadHostVerificationFiles) {
return nullptr;
--
2.47.3
@@ -1,201 +0,0 @@
From 088c12ddd95935ad1f55c91723dcd34442b4d240 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:10:41 +0100
Subject: [PATCH 23/52] msix.patch
---
.../windows/msix/AppxManifest.xml.in | 19 +---
python/mozbuild/mozbuild/mach_commands.py | 4 +-
python/mozbuild/mozbuild/repackaging/msix.py | 97 +++----------------
3 files changed, 16 insertions(+), 104 deletions(-)
diff --git a/browser/installer/windows/msix/AppxManifest.xml.in b/browser/installer/windows/msix/AppxManifest.xml.in
index 246f15595dad..9a953b3d16d2 100644
--- a/browser/installer/windows/msix/AppxManifest.xml.in
+++ b/browser/installer/windows/msix/AppxManifest.xml.in
@@ -30,13 +30,14 @@
</Resources>
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.22621.1555" />
+ <PackageDependency Name="Microsoft.VCLibs.140.00.UWPDesktop" MinVersion="14.0.0.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
</Dependencies>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
<Applications>
<Application Id="App" Executable="VFS\ProgramFiles\@APPX_INSTDIR@\@MOZ_APP_NAME@.exe" EntryPoint="Windows.FullTrustApplication">
- <uap:VisualElements BackgroundColor="#20123A" DisplayName="@MOZ_APP_DISPLAYNAME@" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="@MOZ_APP_DISPLAYNAME@">
+ <uap:VisualElements BackgroundColor="#FFFFFF" DisplayName="@MOZ_APP_DISPLAYNAME@" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="@MOZ_APP_DISPLAYNAME@">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" Square310x310Logo="Assets\LargeTile.png" Square71x71Logo="Assets\SmallTile.png">
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo"/>
@@ -119,20 +120,4 @@
</Extensions>
</Application>
</Applications>
- <Extensions>
- <!-- These COM registrations allow Windows/MSAA to access Firefox accessibility features. -->
- <com:Extension Category="windows.comInterface">
- <com:ComInterface>
- <com:ProxyStub DisplayName="AccessibleMarshal"
- Id="1814ceeb-49e2-407f-af99-fa755a7d2607"
- Path="VFS\ProgramFiles\@APPX_INSTDIR@\AccessibleMarshal.dll" />
- <com:Interface Id="4e747be5-2052-4265-8af0-8ecad7aad1c0"
- ProxyStubClsid="1814ceeb-49e2-407f-af99-fa755a7d2607" />
- <com:Interface Id="1814ceeb-49e2-407f-af99-fa755a7d2607"
- ProxyStubClsid="1814ceeb-49e2-407f-af99-fa755a7d2607" />
- <com:Interface Id="0d68d6d0-d93d-4d08-a30d-f00dd1f45b24"
- ProxyStubClsid="1814ceeb-49e2-407f-af99-fa755a7d2607" />
- </com:ComInterface>
- </com:Extension>
- </Extensions>
</Package>
diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py
index c7b0d3d0f9bc..b4a9a14b342c 100644
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -3257,7 +3257,7 @@ def repackage_msi(
@CommandArgument(
"--vendor",
type=str,
- default="Mozilla",
+ default=None,
required=False,
help="The vendor to use in the Package/Identity/Name string to use in the App Manifest."
+ " Defaults to 'Mozilla'.",
@@ -3415,7 +3415,7 @@ def repackage_msix(
command_context.topsrcdir,
channel=channel,
arch=arch,
- displayname=identity_name,
+ identity=identity_name,
vendor=vendor,
publisher=publisher,
publisher_display_name=publisher_display_name,
diff --git a/python/mozbuild/mozbuild/repackaging/msix.py b/python/mozbuild/mozbuild/repackaging/msix.py
index 693b080c7ca5..77bf7153effb 100644
--- a/python/mozbuild/mozbuild/repackaging/msix.py
+++ b/python/mozbuild/mozbuild/repackaging/msix.py
@@ -106,68 +106,19 @@ def get_embedded_version(version, buildid):
the dotted quad to be identically 0, so we enforce that here.
"""
- # It's irritating to roll our own version parsing, but the tree doesn't seem
- # to contain exactly what we need at this time.
- version = version.rsplit("esr", 1)[0]
- alpha = "a" in version
-
- tail = None
- if "a" in version:
- head, tail = version.rsplit("a", 1)
- if tail != "1":
- # Disallow anything beyond `X.Ya1`.
- raise ValueError(
- f"Alpha version not of the form X.0a1 is not supported: {version}"
- )
- tail = buildid
- elif "b" in version:
- head, tail = version.rsplit("b", 1)
- if len(head.split(".")) > 2:
- raise ValueError(
- f"Beta version not of the form X.YbZ is not supported: {version}"
- )
- elif "rc" in version:
- head, tail = version.rsplit("rc", 1)
- if len(head.split(".")) > 2:
- raise ValueError(
- f"Release candidate version not of the form X.YrcZ is not supported: {version}"
- )
- else:
- head = version
-
- components = (head.split(".") + ["0", "0", "0"])[:3]
- if tail:
- components[2] = tail
-
- if alpha:
- # Nightly builds are all `X.0a1`, which isn't helpful. Include build ID
- # to disambiguate. But each part of the dotted quad is 16 bits, so we
- # have to squash.
- if components[1] != "0":
- # Disallow anything beyond `X.0a1`.
- raise ValueError(
- f"Alpha version not of the form X.0a1 is not supported: {version}"
- )
-
- # Last two digits only to save space. Nightly builds in 2066 and 2099
- # will be impacted, but future us can deal with that.
- year = buildid[2:4]
- if year[0] == "0":
- # Avoid leading zero, like `.0YMm`.
- year = year[1:]
- month = buildid[4:6]
- day = buildid[6:8]
- if day[0] == "0":
- # Avoid leading zero, like `.0DHh`.
- day = day[1:]
- hour = buildid[8:10]
-
- components[1] = "".join((year, month))
- components[2] = "".join((day, hour))
+ [ver, rel] = version.split("-")
- version = "{}.{}.{}.0".format(*components)
+ ver_parts = ver.split(".")
+ ver_parts += ["0"] * (3 - len(ver_parts))
- return version
+ return ".".join(
+ [
+ ver_parts[0],
+ str(100 * int(ver_parts[1]) + int(ver_parts[2])),
+ str(int(rel) * 100),
+ "0",
+ ]
+ )
def remove_single_line_comments(text):
@@ -410,21 +361,7 @@ def repackage_msix(
)
first = next(values)
- if not displayname:
- displayname = first
-
- # Release (official) and Beta share branding. Differentiate Beta a little bit.
- if channel == "beta":
- suffix = " Beta"
- if not displayname.endswith(suffix):
- displayname += suffix
-
- elif channel == "esr":
- # Release (official) and ESR share branding. Differentiate ESR a little bit.
- suffix = " ESR"
- if not displayname.endswith(suffix):
- displayname += suffix
-
+ displayname = displayname or first
second = next(values)
vendor = vendor or second
@@ -553,16 +490,6 @@ def repackage_msix(
# In local builds and unpacked MSIX directories, `p` is like "firefox.exe" already.
pp = p
- if pp.startswith("distribution"):
- # Treat any existing distribution as a distribution directory,
- # potentially with language packs. This makes it easy to repack
- # unpacked MSIXes.
- distribution_dir = mozpath.join(dir_or_package, "distribution")
- if distribution_dir not in distribution_dirs:
- distribution_dirs.append(distribution_dir)
-
- continue
-
copier.add(mozpath.normsep(mozpath.join("VFS", "ProgramFiles", instdir, pp)), f)
# Locales to declare as supported in `AppxManifest.xml`.
--
2.47.3
@@ -1,24 +0,0 @@
From 07c72fc57ef85abed9a80ad95e6572715016b946 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:10:44 +0100
Subject: [PATCH 24/52] newtab-fix.patch
---
browser/modules/AboutNewTab.sys.mjs | 1 -
1 file changed, 1 deletion(-)
diff --git a/browser/modules/AboutNewTab.sys.mjs b/browser/modules/AboutNewTab.sys.mjs
index 4d6b04e72b22..438a31c78f35 100644
--- a/browser/modules/AboutNewTab.sys.mjs
+++ b/browser/modules/AboutNewTab.sys.mjs
@@ -216,7 +216,6 @@ export const AboutNewTab = {
const [createdTimestamp] = await Promise.all([
profileCreatedAccessorReady,
- trainhopFeatureReady,
addonInitted,
]);
const createdInstant = createdTimestamp
--
2.47.3
@@ -1,55 +0,0 @@
From 00e1f2fb40434c9e7fcdb746ce72cd03cb07e3f2 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:10:48 +0100
Subject: [PATCH 25/52] pip-hide.patch
---
.../pictureinpicture/PictureInPicture.sys.mjs | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs b/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs
index 6aca1f73281c..5225e05e7a38 100644
--- a/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs
+++ b/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs
@@ -121,6 +121,15 @@ export class PictureInPictureToggleParent extends JSWindowActorParent {
if (!lazy.PIP_ENABLED || !lazy.PIP_WHEN_SWITCHING_TABS) {
break;
}
+
+ // Suppress auto-toggle if the user deliberately closed this PiP window
+ if (
+ PictureInPicture.weakAutoPipBrowserClosedDeliberately.has(browser)
+ ) {
+ PictureInPicture.weakAutoPipBrowserClosedDeliberately.delete(browser);
+ break;
+ }
+
// If the tab is still selected, then we can ignore this event
if (browser.documentGlobal.gBrowser.selectedBrowser == browser) {
break;
@@ -263,6 +272,8 @@ export var PictureInPicture = {
// Maps auto pip browser to PictureInPictureParent actor
weakAutoPipBrowserToParent: new WeakMap(),
+ weakAutoPipBrowserClosedDeliberately: new WeakSet(),
+
/**
* Returns the player window if one exists and if it hasn't yet been closed.
*
@@ -901,6 +912,13 @@ export var PictureInPicture = {
if (!win) {
return;
}
+
+ const browser = this.weakWinToBrowser.get(win);
+
+ if (reason === "CloseButton") {
+ PictureInPicture.weakAutoPipBrowserClosedDeliberately.add(browser);
+ }
+
this.removePiPBrowserFromWeakMap(this.weakWinToBrowser.get(win));
this.weakAutoPipBrowserToParent.delete(this.weakWinToBrowser.get(win));
--
2.47.3
@@ -1,120 +0,0 @@
From 3ec728b749444dc8960c6c521f472ea6be16997a Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:10:52 +0100
Subject: [PATCH 26/52] pip-hide-ui.patch
---
.../pictureinpicture/content/player.js | 6 ++++++
.../pictureinpicture/content/player.xhtml | 11 ++++++++++-
.../themes/shared/pictureinpicture/player.css | 17 +++++++++++++++++
3 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/toolkit/components/pictureinpicture/content/player.js b/toolkit/components/pictureinpicture/content/player.js
index 978c6be7dbd2..a26ba023d20a 100644
--- a/toolkit/components/pictureinpicture/content/player.js
+++ b/toolkit/components/pictureinpicture/content/player.js
@@ -257,6 +257,7 @@ let Player = {
let strId = this.isFullscreen
? `pictureinpicture-exit-fullscreen-btn2`
: `pictureinpicture-fullscreen-btn2`;
+ this.setupTooltip("piphide", "pictureinpicture-piphide-btn");
this.setupTooltip("fullscreen", strId, "fullscreenToggleShortcut");
// Set the specific remoteType and browsingContextGroupID to use for the
@@ -898,6 +899,11 @@ let Player = {
break;
}
+ case "piphide": {
+ this.onClose(true);
+ break;
+ }
+
case "playpause": {
if (!this.isPlaying) {
this.actor.sendAsyncMessage("PictureInPicture:Play");
diff --git a/toolkit/components/pictureinpicture/content/player.xhtml b/toolkit/components/pictureinpicture/content/player.xhtml
index a723bc582857..96a2c946a14e 100644
--- a/toolkit/components/pictureinpicture/content/player.xhtml
+++ b/toolkit/components/pictureinpicture/content/player.xhtml
@@ -51,13 +51,22 @@
tabindex="9"
#else
tabindex="10"
+#endif
+ />
+ <button id="piphide"
+ class="control-item control-button tooltip-under-controls" data-l10n-id="pictureinpicture-piphide-btn" data-l10n-attrs="tooltip"
+#ifdef XP_MACOSX
+ mac="true"
+ tabindex="10"
+#else
+ tabindex="11"
#endif
/>
<button id="unpip"
class="control-item control-button tooltip-under-controls" data-l10n-id="pictureinpicture-unpip-btn" data-l10n-attrs="tooltip"
#ifdef XP_MACOSX
mac="true"
- tabindex="10"
+ tabindex="11"
#else
tabindex="9"
#endif
diff --git a/toolkit/themes/shared/pictureinpicture/player.css b/toolkit/themes/shared/pictureinpicture/player.css
index 72b016f96263..7a5fd66d43c4 100644
--- a/toolkit/themes/shared/pictureinpicture/player.css
+++ b/toolkit/themes/shared/pictureinpicture/player.css
@@ -222,6 +222,8 @@ body:not(:fullscreen) #controls:hover .control-button:disabled {
bottom: -3em;
}
+#piphide:focus-visible::after,
+#piphide:hover::after,
#close:focus-visible::after,
#close:hover::after,
#unpip[mac="true"]:focus-visible::after,
@@ -230,6 +232,8 @@ body:not(:fullscreen) #controls:hover .control-button:disabled {
transform: translateX(1em);
}
+#piphide[mac="true"]:focus-visible::after,
+#piphide[mac="true"]:hover::after,
#unpip:focus-visible::after,
#unpip:hover::after,
#close[mac="true"]:focus-visible::after,
@@ -305,6 +309,7 @@ body:not(:fullscreen) #controls:hover #timestamp {
opacity: 1;
}
+#piphide,
#close,
#unpip {
background-color: rgba(255, 255, 255, 0.8);
@@ -312,11 +317,23 @@ body:not(:fullscreen) #controls:hover #timestamp {
fill: var(--close-btn-fill-color);
}
+#piphide:is(:hover, :focus-visible),
#close:is(:hover, :focus-visible),
#unpip:is(:hover, :focus-visible) {
background-color: rgba(255, 255, 255, 0.9);
}
+#piphide {
+ background-image: url("chrome://global/skin/icons/eye-slash.svg");
+ right: 50px;
+ top: 10px;
+}
+
+#piphide[mac="true"] {
+ right: auto;
+ left: 50px;
+}
+
#close {
background-image: url("chrome://global/skin/icons/close.svg");
right: 10px;
--
2.47.3
@@ -1,71 +0,0 @@
From 2d9a9c339498838aa373ea09383861eb7a84851a Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:10:56 +0100
Subject: [PATCH 27/52] profile-directory.patch
---
extensions/pref/autoconfig/src/prefcalls.js | 48 +++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/extensions/pref/autoconfig/src/prefcalls.js b/extensions/pref/autoconfig/src/prefcalls.js
index 78dd0ee5473a..4231262f29b8 100644
--- a/extensions/pref/autoconfig/src/prefcalls.js
+++ b/extensions/pref/autoconfig/src/prefcalls.js
@@ -9,6 +9,54 @@ const LDAPSyncQueryContractID = "@mozilla.org/ldapsyncquery;1";
var gIsUTF8;
+{
+ let profile_directory = null;
+ let defaults = Services.prefs.getDefaultBranch(null);
+
+ let supportsXDG = Services.prefs.getBoolPref("widget.support-xdg-config", false);
+
+ if (supportsXDG) {
+ let isLegacy = false;
+ {
+ let dirSvc = Cc["@mozilla.org/file/directory_service;1"]
+ .getService(Ci.nsIProperties || Ci.nsIDirectoryService);
+ let profDir = dirSvc.get("ProfD", Ci.nsIFile);
+ let path = profDir.path || "";
+ isLegacy = path.includes(".librewolf");
+ }
+
+ if (!isLegacy) {
+ let xdg = Services.env.get("XDG_CONFIG_HOME");
+ if (xdg) {
+ profile_directory = xdg;
+ } else {
+ let home = Services.env.get("HOME");
+ profile_directory = home ? (home + "/.config") : null;
+ }
+ if (profile_directory) {
+ defaults.setCharPref(
+ "autoadmin.global_config_url",
+ `file://${profile_directory}/librewolf/librewolf/librewolf.overrides.cfg`
+ );
+ }
+ } else {
+ if (profile_directory = Services.env.get("HOME")) {
+ defaults.setCharPref(
+ "autoadmin.global_config_url",
+ `file://${profile_directory}/.librewolf/librewolf.overrides.cfg`
+ );
+ }
+ }
+ } else {
+ if ((profile_directory = Services.env.get("USERPROFILE") || Services.env.get("HOME"))) {
+ defaults.setCharPref(
+ "autoadmin.global_config_url",
+ `file://${profile_directory}/.librewolf/librewolf.overrides.cfg`
+ );
+ }
+ }
+}
+
function getPrefBranch() {
return Services.prefs.getBranch(null);
}
--
2.47.3
@@ -1,33 +0,0 @@
From 045dddc201c0d52abccbbd47d7b69273a72abf4c Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:10:59 +0100
Subject: [PATCH 28/52] remove-language-packs.patch
---
browser/components/BrowserGlue.sys.mjs | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs
index 6339f3df60ab..202d238d56b9 100644
--- a/browser/components/BrowserGlue.sys.mjs
+++ b/browser/components/BrowserGlue.sys.mjs
@@ -403,6 +403,16 @@ BrowserGlue.prototype = {
// handle any UI migration
this._migrateUI();
+
+ const removeLangpacks = async () => {
+ for (const addon of await lazy.AddonManager.getAddonsByTypes(["locale"])) {
+ await addon.uninstall();
+ }
+ };
+
+ removeLangpacks().catch(err => {
+ console.error("Could not remove langpacks", err);
+ });
if (!Services.prefs.prefHasUserValue(PREF_PDFJS_ISDEFAULT_CACHE_STATE)) {
lazy.PdfJs.checkIsDefault(this._isNewProfile);
--
2.47.3
@@ -1,108 +0,0 @@
From f99c183cf16dd19665458d3713af1660aa08a6ee Mon Sep 17 00:00:00 2001
From: celenity <celenity@celenity.dev>
Date: Wed, 4 Feb 2026 04:27:07 +0000
Subject: [PATCH 29/52] fix: Remove OpenAI backend
Removes the OpenAI backend from Mozilla's ML (machine learning) component.
Signed-off-by: celenity <celenity@celenity.dev>
---
toolkit/components/aboutinference/content/aboutInference.js | 4 ++--
toolkit/components/ml/content/EngineProcess.sys.mjs | 2 +-
toolkit/components/ml/content/backends/Pipeline.mjs | 6 +++---
toolkit/components/ml/jar.mn | 4 ++--
toolkit/content/license.html | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/toolkit/components/aboutinference/content/aboutInference.js b/toolkit/components/aboutinference/content/aboutInference.js
index 6672be945f5b..585540f54cd8 100644
--- a/toolkit/components/aboutinference/content/aboutInference.js
+++ b/toolkit/components/aboutinference/content/aboutInference.js
@@ -379,7 +379,7 @@ const INFERENCE_PAD_PRESETS = {
device: "cpu",
backend: "onnx",
},
- openai: {
+/* openai: {
inputArgs: [
{
role: "system",
@@ -398,7 +398,7 @@ const INFERENCE_PAD_PRESETS = {
apiKey: "ollama",
baseURL: "http://localhost:11434/v1",
backend: "openai",
- },
+ }, */
};
const PREDEFINED = Object.keys(INFERENCE_PAD_PRESETS);
diff --git a/toolkit/components/ml/content/EngineProcess.sys.mjs b/toolkit/components/ml/content/EngineProcess.sys.mjs
index 03721443f7e0..d0ad4478acd4 100644
--- a/toolkit/components/ml/content/EngineProcess.sys.mjs
+++ b/toolkit/components/ml/content/EngineProcess.sys.mjs
@@ -34,7 +34,7 @@ export const BACKENDS = Object.freeze({
onnxNative: "onnx-native",
llamaCpp: "llama.cpp",
bestOnnx: "best-onnx",
- openai: "openai",
+// openai: "openai",
staticEmbeddings: "static-embeddings",
});
diff --git a/toolkit/components/ml/content/backends/Pipeline.mjs b/toolkit/components/ml/content/backends/Pipeline.mjs
index 1b913af2a39a..30a04a070442 100644
--- a/toolkit/components/ml/content/backends/Pipeline.mjs
+++ b/toolkit/components/ml/content/backends/Pipeline.mjs
@@ -13,7 +13,7 @@ ChromeUtils.defineESModuleGetters(
LlamaCppPipeline:
"chrome://global/content/ml/backends/LlamaCppPipeline.mjs",
PipelineOptions: "chrome://global/content/ml/EngineProcess.sys.mjs",
- OpenAIPipeline: "chrome://global/content/ml/backends/OpenAIPipeline.mjs",
+// OpenAIPipeline: "chrome://global/content/ml/backends/OpenAIPipeline.mjs",
StaticEmbeddingsPipeline:
"chrome://global/content/ml/backends/StaticEmbeddingsPipeline.mjs",
},
@@ -46,9 +46,9 @@ export async function getBackend(consumer, wasm, options) {
case "llama.cpp":
factory = lazy.LlamaCppPipeline.initialize;
break;
- case "openai":
+/* case "openai":
factory = lazy.OpenAIPipeline.initialize;
- break;
+ break; */
case "static-embeddings":
factory = lazy.StaticEmbeddingsPipeline.initialize;
break;
diff --git a/toolkit/components/ml/jar.mn b/toolkit/components/ml/jar.mn
index 143e4a0f0bb0..47ba236e18b1 100644
--- a/toolkit/components/ml/jar.mn
+++ b/toolkit/components/ml/jar.mn
@@ -23,9 +23,9 @@ toolkit.jar:
content/global/ml/transformers.js (vendor/transformers.js)
content/global/ml/ThomSample.mjs (content/ThomSample.mjs)
content/global/ml/backends/LlamaCppPipeline.mjs (content/backends/LlamaCppPipeline.mjs)
- content/global/ml/backends/OpenAIPipeline.mjs (content/backends/OpenAIPipeline.mjs)
+# content/global/ml/backends/OpenAIPipeline.mjs (content/backends/OpenAIPipeline.mjs)
content/global/ml/backends/StaticEmbeddingsPipeline.mjs (content/backends/StaticEmbeddingsPipeline.mjs)
- content/global/ml/openai.mjs (vendor/openai/dist/openai.mjs)
+# content/global/ml/openai.mjs (vendor/openai/dist/openai.mjs)
content/global/ml/MLTelemetry.sys.mjs (MLTelemetry.sys.mjs)
content/global/ml/security/ConditionEvaluator.sys.mjs (security/ConditionEvaluator.sys.mjs)
content/global/ml/security/DecisionTypes.sys.mjs (security/DecisionTypes.sys.mjs)
diff --git a/toolkit/content/license.html b/toolkit/content/license.html
index 75cc6317750f..a5a42a43479f 100644
--- a/toolkit/content/license.html
+++ b/toolkit/content/license.html
@@ -1533,7 +1533,7 @@ product.
<li><code>third_party/perfetto/</code></li>
#endif
<li><code>third_party/rust/calendrical_calculations</code></li>
- <li><code>toolkit/components/ml/vendor/openai/dist/openai.mjs</code></li>
+ <!-- <li><code>toolkit/components/ml/vendor/openai/dist/openai.mjs</code></li> -->
<li><code>toolkit/components/ml/vendor/transformers.js</code></li>
#ifdef NIGHTLY_BUILD
<li><code>toolkit/components/ml/vendor/transformers-dev.js</code></li>
--
2.47.3
@@ -1,105 +0,0 @@
From d776f452b45b6f61622fa57fae899ba51054e6b8 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:11:10 +0100
Subject: [PATCH 30/52] remove-pingsender.patch
---
browser/app/macbuild/Contents/MacOS-files.in | 1 -
browser/installer/package-manifest.in | 4 ----
browser/installer/windows/nsis/shared.nsh | 1 -
python/mozbuild/mozbuild/artifacts.py | 2 --
toolkit/components/telemetry/app/TelemetrySend.sys.mjs | 3 +++
toolkit/components/telemetry/moz.build | 4 ----
6 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/browser/app/macbuild/Contents/MacOS-files.in b/browser/app/macbuild/Contents/MacOS-files.in
index 2f420f773610..3551c6613d18 100644
--- a/browser/app/macbuild/Contents/MacOS-files.in
+++ b/browser/app/macbuild/Contents/MacOS-files.in
@@ -17,7 +17,6 @@
/crashhelper
#endif
/nmhproxy
-/pingsender
/pk12util
/ssltunnel
/xpcshell
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
index 9944fbec4022..605af7a29185 100644
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -408,10 +408,6 @@ bin/libfreebl_64int_3.so
@BINPATH@/crashhelper@BIN_SUFFIX@
#endif
-; [ Ping Sender ]
-;
-@BINPATH@/pingsender@BIN_SUFFIX@
-
; [ Native Messaging Host Proxy ]
;
#if defined(XP_WIN) || defined(XP_MACOSX)
diff --git a/browser/installer/windows/nsis/shared.nsh b/browser/installer/windows/nsis/shared.nsh
index b81c7ef59be0..4155c5264318 100755
--- a/browser/installer/windows/nsis/shared.nsh
+++ b/browser/installer/windows/nsis/shared.nsh
@@ -1411,7 +1411,6 @@ FunctionEnd
Push "crashreporter.exe"
Push "default-browser-agent.exe"
Push "nmhproxy.exe"
- Push "pingsender.exe"
Push "updater.exe"
Push "mozwer.dll"
Push "${FileMainEXE}"
diff --git a/python/mozbuild/mozbuild/artifacts.py b/python/mozbuild/mozbuild/artifacts.py
index 548b7786ee85..6b055486e029 100644
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -677,7 +677,6 @@ class LinuxArtifactJob(ArtifactJob):
"{product}/dependentlibs.list",
"{product}/{product}",
"{product}/{product}-bin",
- "{product}/pingsender",
"{product}/plugin-container",
"{product}/updater",
"{product}/gfxtest",
@@ -773,7 +772,6 @@ class MacArtifactJob(ArtifactJob):
"{product}-bin",
"*.dylib",
"nmhproxy",
- "pingsender",
"plugin-container.app/Contents/MacOS/plugin-container",
"updater.app/Contents/MacOS/org.mozilla.updater",
# 'xpcshell',
diff --git a/toolkit/components/telemetry/app/TelemetrySend.sys.mjs b/toolkit/components/telemetry/app/TelemetrySend.sys.mjs
index 2ebae13763c5..496880e402f2 100644
--- a/toolkit/components/telemetry/app/TelemetrySend.sys.mjs
+++ b/toolkit/components/telemetry/app/TelemetrySend.sys.mjs
@@ -1677,6 +1677,9 @@ export var TelemetrySendImpl = {
},
runPingSender(pings, observer) {
+ throw Components.Exception("", Cr.NS_ERROR_NOT_IMPLEMENTED);
+
+ /* eslint-disable-next-line no-unreachable */
if (AppConstants.platform === "android") {
throw Components.Exception("", Cr.NS_ERROR_NOT_IMPLEMENTED);
}
diff --git a/toolkit/components/telemetry/moz.build b/toolkit/components/telemetry/moz.build
index 91ae53839b69..de9f21c2b2b0 100644
--- a/toolkit/components/telemetry/moz.build
+++ b/toolkit/components/telemetry/moz.build
@@ -6,10 +6,6 @@ include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = "xul"
-DIRS = [
- "pingsender",
-]
-
DEFINES["MOZ_APP_VERSION"] = '"%s"' % CONFIG["MOZ_APP_VERSION"]
LOCAL_INCLUDES += [
--
2.47.3
@@ -1,312 +0,0 @@
From 38c03c5e125329cc45f3b290ae16f50fe533a5c3 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:11:17 +0100
Subject: [PATCH 31/52] rs-blocker.patch
---
services/settings/RemoteSettings.worker.mjs | 8 +-
.../settings/RemoteSettingsClient.sys.mjs | 21 ++++-
.../settings/RemoteSettingsWorker.sys.mjs | 4 +-
services/settings/SharedUtils.sys.mjs | 78 ++++++++++++++++++-
services/settings/Utils.sys.mjs | 28 ++++++-
services/settings/remote-settings.sys.mjs | 5 ++
.../search/SearchEngineSelector.sys.mjs | 8 +-
7 files changed, 136 insertions(+), 16 deletions(-)
diff --git a/services/settings/RemoteSettings.worker.mjs b/services/settings/RemoteSettings.worker.mjs
index 3e4e915c13ed..a92768553a29 100644
--- a/services/settings/RemoteSettings.worker.mjs
+++ b/services/settings/RemoteSettings.worker.mjs
@@ -62,12 +62,16 @@ const Agent = {
*
* @param {string} bucket
* @param {string} collection
+ * @param {string} allowedCollections
+ * @param {string} allowedCollectionsFromDump
* @returns {int} Number of records loaded from dump or -1 if no dump found.
*/
- async importJSONDump(bucket, collection) {
+ async importJSONDump(bucket, collection, allowedCollections, allowedCollectionsFromDump) {
const { data: records, timestamp } = await SharedUtils.loadJSONDump(
bucket,
- collection
+ collection,
+ allowedCollections,
+ allowedCollectionsFromDump
);
if (records === null) {
// Return -1 if file is missing.
diff --git a/services/settings/RemoteSettingsClient.sys.mjs b/services/settings/RemoteSettingsClient.sys.mjs
index f4f9b1c0bce9..fc3c6bb2b1ba 100644
--- a/services/settings/RemoteSettingsClient.sys.mjs
+++ b/services/settings/RemoteSettingsClient.sys.mjs
@@ -209,12 +209,21 @@ class AttachmentDownloader extends Downloader {
return cacheImpl;
}
+ get identifier() {
+ return this._client.identifier;
+ }
+
/**
* Download attachment and report Telemetry on failure.
*
* @see Downloader.download
*/
async download(record, options) {
+ if (!lazy.SharedUtils.isCollectionAllowed(this.bucketName, this.collectionName, lazy.Utils.allowedCollections)) {
+ throw Error(
+ `Download attempt to RS collection "${this.identifier}" was blocked.`
+ );
+ }
await lazy.UptakeTelemetry.report(
lazy.UptakeTelemetry.STATUS.DOWNLOAD_START,
{
@@ -586,7 +595,9 @@ export class RemoteSettingsClient extends EventEmitter {
}
({ data } = await lazy.SharedUtils.loadJSONDump(
this.bucketName,
- this.collectionName
+ this.collectionName,
+ lazy.Utils.allowedCollections,
+ lazy.Utils.allowedCollectionsFromDump
));
if (data !== null) {
lazy.console.info(`${this.identifier} falling back to JSON dump`);
@@ -656,6 +667,10 @@ export class RemoteSettingsClient extends EventEmitter {
return;
}
+ if (!lazy.SharedUtils.isCollectionAllowed(this.bucketName, this.collectionName, lazy.Utils.allowedCollections)) {
+ return;
+ }
+
// We want to know which timestamp we are expected to obtain in order to leverage
// cache busting. We don't provide ETag because we don't want a 304.
const { changes } = await lazy.Utils.fetchLatestChanges(
@@ -1040,7 +1055,9 @@ export class RemoteSettingsClient extends EventEmitter {
lazy.console.info(`${this.identifier} try to restore dump`);
const result = await lazy.RemoteSettingsWorker.importJSONDump(
this.bucketName,
- this.collectionName
+ this.collectionName,
+ lazy.Utils.allowedCollections,
+ lazy.Utils.allowedCollectionsFromDump
);
if (result < 0) {
lazy.console.debug(`${this.identifier} no dump available`);
diff --git a/services/settings/RemoteSettingsWorker.sys.mjs b/services/settings/RemoteSettingsWorker.sys.mjs
index 57bfb3f3d544..874b35abff18 100644
--- a/services/settings/RemoteSettingsWorker.sys.mjs
+++ b/services/settings/RemoteSettingsWorker.sys.mjs
@@ -162,8 +162,8 @@ class Worker {
]);
}
- async importJSONDump(bucket, collection) {
- return this._execute("importJSONDump", [bucket, collection], {
+ async importJSONDump(bucket, collection, allowedCollections, allowedCollectionsFromDump) {
+ return this._execute("importJSONDump", [bucket, collection, allowedCollections, allowedCollectionsFromDump], {
mustComplete: true,
});
}
diff --git a/services/settings/SharedUtils.sys.mjs b/services/settings/SharedUtils.sys.mjs
index e5b20d9b9dd6..9a71c99668f0 100644
--- a/services/settings/SharedUtils.sys.mjs
+++ b/services/settings/SharedUtils.sys.mjs
@@ -34,8 +34,13 @@ export var SharedUtils = {
*
* @param {string} bucket
* @param {string} collection
+ * @param {string} allowedCollections
+ * @param {string} allowedCollectionsFromDump
*/
- async loadJSONDump(bucket, collection) {
+ async loadJSONDump(bucket, collection, allowedCollections, allowedCollectionsFromDump) {
+ if (!this.isCollectionAllowedFromDump(bucket, collection, allowedCollections, allowedCollectionsFromDump)) {
+ return { data: null, timestamp: null };
+ }
// When using the preview bucket, we still want to load the main dump.
// But we store it locally in the preview bucket.
const jsonBucket = bucket.replace("-preview", "");
@@ -50,4 +55,75 @@ export var SharedUtils = {
// Will throw if JSON is invalid.
return response.json();
},
+
+ /**
+ * Internal code to determine whether the bucket and collection are allowed to
+ * be loaded by the remote settings client for a given list of allowed
+ * bucket/collection combinations.
+ * @param {string} bucket
+ * @param {string} collection
+ * @param {Array<string>} allowedCollections
+ * @returns {boolean} whether the bucket and collection are allowed to load
+ */
+ _isCollectionAllowedInternal(bucket, collection, allowedCollections) {
+ return (
+ allowedCollections.includes(`${bucket}/${collection}`) ||
+ allowedCollections.includes(`${bucket}/*`) ||
+ allowedCollections.includes("*")
+ );
+ },
+
+ /**
+ * Determines whether the bucket and collection are allowed to be loaded by the
+ * remote settings client.
+ * @param {string} bucket
+ * @param {string} collection
+ * @param {string} allowedCollections
+ * @returns {boolean} whether the bucket and collection are allowed to load
+ */
+ isCollectionAllowed(bucket, collection, allowedCollections) {
+ if (
+ this._isCollectionAllowedInternal(
+ bucket,
+ collection,
+ allowedCollections
+ )
+ ) {
+ return true;
+ }
+ console.warn(
+ `Connection attempt to RS collection "${bucket}/${collection}" was blocked/filtered.`
+ );
+ return false;
+ },
+
+ /**
+ * Determines whether the bucket and collection are allowed to be loaded from
+ * an in-tree remote settings dump.
+ * @param {string} bucket
+ * @param {string} collection
+ * @param {string} allowedCollections
+ * @param {string} allowedCollectionsFromDump
+ * @returns {boolean} whether the bucket and collection are allowed to load
+ */
+ isCollectionAllowedFromDump(bucket, collection, allowedCollections, allowedCollectionsFromDump) {
+ if (
+ this._isCollectionAllowedInternal(
+ bucket,
+ collection,
+ allowedCollectionsFromDump
+ ) ||
+ this._isCollectionAllowedInternal(
+ bucket,
+ collection,
+ allowedCollections
+ )
+ ) {
+ return true;
+ }
+ console.warn(
+ `Access attempt to RS collection "${bucket}/${collection}" from local dump was blocked/filtered.`
+ );
+ return false;
+ },
};
diff --git a/services/settings/Utils.sys.mjs b/services/settings/Utils.sys.mjs
index 40e919a997a5..ccc7694bcc28 100644
--- a/services/settings/Utils.sys.mjs
+++ b/services/settings/Utils.sys.mjs
@@ -99,6 +99,18 @@ XPCOMUtils.defineLazyPreferenceGetter(
""
);
+ChromeUtils.defineLazyGetter(lazy, "allowedCollections", () =>
+ Services.prefs
+ .getStringPref("librewolf.services.settings.allowedCollections", "")
+ .split(",")
+);
+
+ChromeUtils.defineLazyGetter(lazy, "allowedCollectionsFromDump", () =>
+ Services.prefs
+ .getStringPref("librewolf.services.settings.allowedCollectionsFromDump", "")
+ .split(",")
+);
+
function _isUndefined(value) {
return typeof value === "undefined";
}
@@ -111,6 +123,14 @@ export var Utils = {
: AppConstants.REMOTE_SETTINGS_SERVER_URLS[0];
},
+ get allowedCollections() {
+ return lazy.allowedCollections;
+ },
+
+ get allowedCollectionsFromDump() {
+ return lazy.allowedCollectionsFromDump;
+ },
+
CHANGES_PATH: "/buckets/monitor/collections/changes/changeset",
/**
@@ -451,7 +471,9 @@ export var Utils = {
if (lastModified === undefined) {
const { timestamp: dumpTimestamp } = await lazy.SharedUtils.loadJSONDump(
bucket,
- collection
+ collection,
+ this.allowedCollections,
+ this.allowedCollectionsFromDump
);
// Client recognize -1 as missing dump.
lastModified = dumpTimestamp ?? -1;
@@ -561,7 +583,9 @@ export var Utils = {
}
return {
- changes,
+ changes: changes.filter(change =>
+ lazy.SharedUtils.isCollectionAllowed(change.bucket, change.collection, this.allowedCollections)
+ ),
timestamp,
serverTimeMillis,
backoffSeconds,
diff --git a/services/settings/remote-settings.sys.mjs b/services/settings/remote-settings.sys.mjs
index b180cfc850ee..c8db18344c1f 100644
--- a/services/settings/remote-settings.sys.mjs
+++ b/services/settings/remote-settings.sys.mjs
@@ -16,6 +16,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
pushBroadcastService: "resource://gre/modules/PushBroadcastService.sys.mjs",
RemoteSettingsClient:
"resource://services-settings/RemoteSettingsClient.sys.mjs",
+ SharedUtils: "resource://services-settings/SharedUtils.sys.mjs",
SyncHistory: "resource://services-settings/SyncHistory.sys.mjs",
UptakeTelemetry: "resource://services-settings/UptakeTelemetry.sys.mjs",
Utils: "resource://services-settings/Utils.sys.mjs",
@@ -286,6 +287,10 @@ function remoteSettingsFunction() {
const collection = changeset.metadata.id;
const identifier = `${bucket}/${collection}`;
+ if (!lazy.SharedUtils.isCollectionAllowed(bucket, collection, lazy.Utils.allowedCollections)) {
+ continue;
+ }
+
if (pulled.includes(identifier)) {
// The startup bundles contain both main and preview changesets.
// Importing both increases complexity down the line, and brings no value.
diff --git a/toolkit/components/search/SearchEngineSelector.sys.mjs b/toolkit/components/search/SearchEngineSelector.sys.mjs
index 3a42b383af19..3befe8d89988 100644
--- a/toolkit/components/search/SearchEngineSelector.sys.mjs
+++ b/toolkit/components/search/SearchEngineSelector.sys.mjs
@@ -409,13 +409,7 @@ export class SearchEngineSelector {
* could be obtained.
*/
async #getConfigurationOverrides() {
- let result = [];
- try {
- result = await this.#remoteConfigOverrides.get();
- } catch (ex) {
- // This data is remote only, so we just return an empty array if it fails.
- }
- return result;
+ return [];
}
/**
--
2.47.3
@@ -1,39 +0,0 @@
From 97f59260bde3e817cb6b1ea9cab173de834391f4 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:11:20 +0100
Subject: [PATCH 32/52] rust-gentoo-musl.patch
---
build/moz.configure/rust.configure | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
index ea19412890bd..662f0d621628 100644
--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -424,11 +424,21 @@ def detect_rustc_target(host_or_target, arm_target, rust_supported_targets):
if len(narrowed) == 1:
return narrowed[0].rust_target
- # Finally, see if the vendor can be used to disambiguate.
+ # See if the vendor can be used to disambiguate.
narrowed = [c for c in candidates if c.target.vendor == host_or_target.vendor]
if len(narrowed) == 1:
return narrowed[0].rust_target
+ # Finally, check for vendor gentoo in the target triple.
+ vendor_aliases = {"unknown": ("gentoo")}
+ narrowed = [
+ c
+ for c in candidates
+ if host_or_target.vendor in vendor_aliases.get(c.target.vendor, ())
+ ]
+ if len(narrowed) == 1:
+ return narrowed[0].rust_target
+
return None
rustc_target = find_candidate(candidates)
--
2.47.3
@@ -1,98 +0,0 @@
From 0181d9a235bb94ae627e516cf6b941434a4e831f Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:11:24 +0100
Subject: [PATCH 33/52] strip-dash-from-compare.patch
---
xpcom/base/nsVersionComparator.cpp | 40 ++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/xpcom/base/nsVersionComparator.cpp b/xpcom/base/nsVersionComparator.cpp
index 21dd6499f796..e7e3f505db85 100644
--- a/xpcom/base/nsVersionComparator.cpp
+++ b/xpcom/base/nsVersionComparator.cpp
@@ -4,6 +4,7 @@
#include "nsVersionComparator.h"
+#include <ctype.h>
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
@@ -16,6 +17,7 @@
# include "nsString.h"
# endif
+# include <wctype.h>
# include "mozilla/Char16.h"
# include "nsAlgorithm.h"
#endif
@@ -331,6 +333,22 @@ static int32_t CompareVP(VersionPartW& aVer1, VersionPartW& aVer2) {
namespace mozilla {
#ifdef XP_WIN
+static void StripVersionSuffix(wchar_t* aVersion) {
+ if (!aVersion) return;
+
+ size_t len = wcslen(aVersion);
+ if (len < 2) return;
+
+ int pos = (int)len - 1;
+ while (pos >= 0 && iswdigit(aVersion[pos])) {
+ pos--;
+ }
+
+ if (pos >= 0 && aVersion[pos] == L'-') {
+ aVersion[pos] = L'\0';
+ }
+}
+
int32_t CompareVersions(const char16_t* aStrA, const char16_t* aStrB) {
wchar_t* A2 = wcsdup(char16ptr_t(aStrA));
if (!A2) {
@@ -343,6 +361,9 @@ int32_t CompareVersions(const char16_t* aStrA, const char16_t* aStrB) {
return 1;
}
+ StripVersionSuffix(A2);
+ StripVersionSuffix(B2);
+
int32_t result;
wchar_t* a = A2;
wchar_t* b = B2;
@@ -367,6 +388,22 @@ int32_t CompareVersions(const char16_t* aStrA, const char16_t* aStrB) {
}
#endif
+static void StripVersionSuffix(char* aVersion) {
+ if (!aVersion) return;
+
+ size_t len = strlen(aVersion);
+ if (len < 2) return;
+
+ int pos = (int)len - 1;
+ while (pos >= 0 && isdigit(aVersion[pos])) {
+ pos--;
+ }
+
+ if (pos >= 0 && aVersion[pos] == '-') {
+ aVersion[pos] = '\0';
+ }
+}
+
int32_t CompareVersions(const char* aStrA, const char* aStrB) {
char* A2 = strdup(aStrA);
if (!A2) {
@@ -379,6 +416,9 @@ int32_t CompareVersions(const char* aStrA, const char* aStrB) {
return 1;
}
+ StripVersionSuffix(A2);
+ StripVersionSuffix(B2);
+
int32_t result;
char* a = A2;
char* b = B2;
--
2.47.3
@@ -1,51 +0,0 @@
From 39bc6d8ff9776feeb8b4682957956d31b5680925 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:11:28 +0100
Subject: [PATCH 34/52] temp-macos-fix.patch
---
browser/app/macbuild/Contents/Info.plist.in | 2 --
browser/app/moz.build | 1 -
browser/installer/package-manifest.in | 1 -
3 files changed, 4 deletions(-)
diff --git a/browser/app/macbuild/Contents/Info.plist.in b/browser/app/macbuild/Contents/Info.plist.in
index cd59b5dfcbf8..0757ac1d98b7 100644
--- a/browser/app/macbuild/Contents/Info.plist.in
+++ b/browser/app/macbuild/Contents/Info.plist.in
@@ -190,8 +190,6 @@
<string>@MAC_APP_NAME@ @APP_VERSION@</string>
<key>CFBundleIconFile</key>
<string>firefox.icns</string>
- <key>CFBundleIconName</key>
- <string>AppIcon</string>
<key>CFBundleIdentifier</key>
<string>@MOZ_MACBUNDLE_ID@</string>
<key>CFBundleInfoDictionaryVersion</key>
diff --git a/browser/app/moz.build b/browser/app/moz.build
index db09aba7e9ec..2d8a4d867a04 100644
--- a/browser/app/moz.build
+++ b/browser/app/moz.build
@@ -74,7 +74,6 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
extra_files = [
(f"{branding}/firefox.icns", "Resources/firefox.icns"),
(f"{branding}/document.icns", "Resources/document.icns"),
- (f"{branding}/Assets.car", "Resources/Assets.car"),
]
if CONFIG["MOZ_UPDATER"]:
extra_files.append((
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
index 605af7a29185..70c1b894be93 100644
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -42,7 +42,6 @@
@APPNAME@/Contents/PkgInfo
@RESPATH@/firefox.icns
@RESPATH@/document.icns
-@RESPATH@/Assets.car
@RESPATH@/@LPROJ_ROOT@.lproj/*
#endif
--
2.47.3
@@ -1,31 +0,0 @@
From 6c60f71343ada19cf657593af1dcc1d3d3da3d80 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:11:32 +0100
Subject: [PATCH 35/52] macos-relaunch-without-updater.patch
---
toolkit/xre/nsCommandLineServiceMac.mm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/toolkit/xre/nsCommandLineServiceMac.mm b/toolkit/xre/nsCommandLineServiceMac.mm
index 3fc9808a5524..a20e7114bd69 100644
--- a/toolkit/xre/nsCommandLineServiceMac.mm
+++ b/toolkit/xre/nsCommandLineServiceMac.mm
@@ -61,8 +61,12 @@ void SetupMacCommandLine(int& argc, char**& argv, bool forRestart) {
NSString* updaterPath = [[path stringByDeletingLastPathComponent]
stringByAppendingPathComponent:
@"updater.app/Contents/MacOS/org.mozilla.updater"];
- AddToCommandLine(updaterPath.UTF8String);
- AddToCommandLine("--openAppBundle");
+ // Only use the updater as a relauncher when it exists. When the updater is
+ // disabled, fall back to relaunching the .app bundle directly via NSWorkspace.
+ if ([[NSFileManager defaultManager] fileExistsAtPath:updaterPath]) {
+ AddToCommandLine(updaterPath.UTF8String);
+ AddToCommandLine("--openAppBundle");
+ }
}
// We adjust the path to point to the .app bundle, rather than the executable
--
2.47.3
@@ -1,96 +0,0 @@
From 484614c225f0e13d9713ee5f85d579938b4dfe96 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:11:36 +0100
Subject: [PATCH 36/52] ui-patches/add-translate-page-context-menu.patch
---
.../base/content/browser-context.inc.xhtml | 2 +
browser/base/content/browser-context.js | 3 ++
browser/base/content/nsContextMenu.sys.mjs | 37 +++++++++++++++++++
3 files changed, 42 insertions(+)
diff --git a/browser/base/content/browser-context.inc.xhtml b/browser/base/content/browser-context.inc.xhtml
index 621be24e4e0c..b5ec280b761f 100644
--- a/browser/base/content/browser-context.inc.xhtml
+++ b/browser/base/content/browser-context.inc.xhtml
@@ -369,6 +369,8 @@
<menuitem id="context-searchselect-private"/>
<menuitem id="context-translate-selection"
data-l10n-id="main-context-menu-translate-selection"/>
+ <menuitem id="context-translate-page"
+ data-l10n-id="main-context-menu-translate-page"/>
<menu id="context-ask-chat"/>
<menuseparator id="frame-sep"/>
diff --git a/browser/base/content/browser-context.js b/browser/base/content/browser-context.js
index 042341cecb1a..a59e92ab302d 100644
--- a/browser/base/content/browser-context.js
+++ b/browser/base/content/browser-context.js
@@ -212,6 +212,9 @@ document.addEventListener(
case "context-translate-selection":
gContextMenu.openSelectTranslationsPanel(event);
break;
+ case "context-translate-page":
+ gContextMenu.openFullPageTranslationsPanel(event);
+ break;
case "context-showonlythisframe":
gContextMenu.showOnlyThisFrame();
break;
diff --git a/browser/base/content/nsContextMenu.sys.mjs b/browser/base/content/nsContextMenu.sys.mjs
index 305a6b1eb41d..d1a9aba3cc94 100644
--- a/browser/base/content/nsContextMenu.sys.mjs
+++ b/browser/base/content/nsContextMenu.sys.mjs
@@ -906,6 +906,7 @@ export class nsContextMenu {
this.showAndFormatSearchContextItem();
this.showTranslateSelectionItem();
+ this.showTranslatePageItem();
lazy.GenAI.buildAskChatMenu(document.getElementById("context-ask-chat"), {
browser: this.browser,
selectionInfo: this.selectionInfo,
@@ -2608,6 +2609,42 @@ export class nsContextMenu {
this.window.openTrustedLinkIn(drmInfoURL, dest);
}
+ /**
+ * Opens the FullPageTranslationsPanel singleton instance.
+ *
+ * @param {Event} event - The triggering event for opening the panel.
+ */
+ openFullPageTranslationsPanel(event) {
+ this.window.FullPageTranslationsPanel.open(event);
+ }
+
+ /**
+ * Displays or hides the translate-page item in the context menu.
+ */
+ showTranslatePageItem() {
+ const translatePageItem = this.document.getElementById(
+ "context-translate-page"
+ );
+ const translationsEnabled = lazy.TranslationsParent.AIFeature.isEnabled;
+ const isAboutPage = this.browser?.currentURI?.schemeIs?.("about");
+
+ translatePageItem.hidden =
+ // Only show the item if the feature is enabled.
+ !translationsEnabled ||
+ // Only show the item if Translations is supported on this hardware.
+ !lazy.TranslationsParent.getIsTranslationsEngineSupported() ||
+ // Do not show page translation on internal about: pages.
+ isAboutPage ||
+ // Do not show page translation for page contexts where it does not make sense.
+ this.onTextInput ||
+ this.isContentSelected ||
+ this.onLink ||
+ this.onImage ||
+ this.onCanvas ||
+ this.onVideo ||
+ this.onAudio;
+ }
+
/**
* Opens the SelectTranslationsPanel singleton instance.
*
--
2.47.3
@@ -1,173 +0,0 @@
From 0eaea882ee730683f16d3e9bde8cc52a4ce8f4cc Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:11:42 +0100
Subject: [PATCH 37/52] ui-patches/allow_cookies_for_site.patch
---
browser/base/content/browser-siteIdentity.js | 32 +++++++++++++++++
browser/base/content/browser-trustPanel.js | 35 +++++++++++++++++++
.../content/identityPanel.inc.xhtml | 5 +++
.../content/trustPanel.inc.xhtml | 7 ++++
4 files changed, 79 insertions(+)
diff --git a/browser/base/content/browser-siteIdentity.js b/browser/base/content/browser-siteIdentity.js
index 16b222280f85..2d0ba31d5ff8 100644
--- a/browser/base/content/browser-siteIdentity.js
+++ b/browser/base/content/browser-siteIdentity.js
@@ -231,6 +231,9 @@ var gIdentityHandler = {
"identity-popup-clear-sitedata-button": event => {
this.clearSiteData(event);
},
+ "identity-popup-allow-sitedata-button": () => {
+ this.toggleSiteData();
+ },
"identity-popup-remove-cert-exception": () => {
this.removeCertException();
},
@@ -483,6 +486,33 @@ var gIdentityHandler = {
event.stopPropagation();
},
+ async refreshSiteData() {
+ document.getElementById("identity-popup-allow-sitedata-toggle").toggleAttribute(
+ "pressed",
+ Services.perms.testExactPermissionFromPrincipal(
+ gBrowser.contentPrincipal,
+ "persist-data-on-shutdown"
+ ) === Services.perms.ALLOW_ACTION
+ );
+ },
+
+ async toggleSiteData() {
+ const pressed = document.getElementById("identity-popup-allow-sitedata-toggle").toggleAttribute(
+ "pressed"
+ );
+
+ if (pressed) {
+ Services.perms.addFromPrincipal(
+ gBrowser.contentPrincipal,
+ "persist-data-on-shutdown",
+ Services.perms.ALLOW_ACTION,
+ Services.perms.EXPIRE_NEVER
+ );
+ } else {
+ Services.perms.removeFromPrincipal(gBrowser.contentPrincipal, "persist-data-on-shutdown");
+ }
+ },
+
/**
* Handler for mouseclicks on the "More Information" button in the
* "identity-popup" panel.
@@ -1234,6 +1264,8 @@ var gIdentityHandler = {
this._identityPopupContentOwner.textContent = owner;
this._identityPopupContentSupp.textContent = supplemental;
this._identityPopupContentVerif.textContent = verifier;
+
+ this.refreshSiteData();
},
setURI(uri) {
diff --git a/browser/base/content/browser-trustPanel.js b/browser/base/content/browser-trustPanel.js
index a749cead9842..f607b960c9e5 100644
--- a/browser/base/content/browser-trustPanel.js
+++ b/browser/base/content/browser-trustPanel.js
@@ -341,6 +341,9 @@ class TrustPanel {
document
.getElementById("trustpanel-toggle")
.addEventListener("click", () => this.#toggleTrackingProtection());
+ document
+ .getElementById("identity-popup-allow-sitedata-button")
+ .addEventListener("click", () => this.#toggleCookiesAllowed());
document
.getElementById("identity-popup-remove-cert-exception")
.addEventListener("click", () => this.#removeCertException());
@@ -353,6 +356,30 @@ class TrustPanel {
}
}
+ #toggleCookiesAllowed() {
+ const pressed = document.getElementById("identity-popup-allow-sitedata-toggle").toggleAttribute(
+ "pressed"
+ );
+
+ if (pressed) {
+ Services.perms.addFromPrincipal(
+ gBrowser.contentPrincipal,
+ "persist-data-on-shutdown",
+ Services.perms.ALLOW_ACTION,
+ Services.perms.EXPIRE_NEVER
+ );
+ } else {
+ Services.perms.removeFromPrincipal(gBrowser.contentPrincipal, "persist-data-on-shutdown");
+ }
+ }
+
+ #areCookiesAllowed() {
+ return Services.perms.testExactPermissionFromPrincipal(
+ gBrowser.contentPrincipal,
+ "persist-data-on-shutdown"
+ ) === Services.perms.ALLOW_ACTION;
+ }
+
async showPopup(opts = {}) {
this.#initializePopup();
@@ -742,6 +769,9 @@ class TrustPanel {
{ host: this.#displayHost }
);
+ let toggleCookies = document.getElementById("identity-popup-allow-sitedata-toggle");
+ toggleCookies.toggleAttribute("pressed", this.#areCookiesAllowed());
+
let hostElement = document.getElementById("trustpanel-popup-host");
hostElement.setAttribute("value", this.#displayHost);
hostElement.setAttribute("tooltiptext", this.#displayHost);
@@ -781,6 +811,11 @@ class TrustPanel {
"hidden",
isPrivate
);
+ this.#updateAttribute(
+ document.getElementById("trustpanel-allow-cookies-footer"),
+ "hidden",
+ isPrivate
+ );
if (!isPrivate) {
try {
let baseDomain = SiteDataManager.getBaseDomainFromHost(this.#uri.host);
diff --git a/browser/components/controlcenter/content/identityPanel.inc.xhtml b/browser/components/controlcenter/content/identityPanel.inc.xhtml
index d7f214f471f7..088662a045a3 100644
--- a/browser/components/controlcenter/content/identityPanel.inc.xhtml
+++ b/browser/components/controlcenter/content/identityPanel.inc.xhtml
@@ -98,6 +98,11 @@
<toolbarbutton id="identity-popup-clear-sitedata-button"
data-l10n-id="identity-clear-site-data"
class="subviewbutton"/>
+ <toolbarbutton id="identity-popup-allow-sitedata-button"
+ class="subviewbutton">
+ <label data-l10n-id="identity-allow-site-data" flex="1"></label>
+ <html:moz-toggle id="identity-popup-allow-sitedata-toggle" style="pointer-events: none;"></html:moz-toggle>
+ </toolbarbutton>
</vbox>
</panelview>
diff --git a/browser/components/controlcenter/content/trustPanel.inc.xhtml b/browser/components/controlcenter/content/trustPanel.inc.xhtml
index 65f8089b0a5f..51794158610c 100644
--- a/browser/components/controlcenter/content/trustPanel.inc.xhtml
+++ b/browser/components/controlcenter/content/trustPanel.inc.xhtml
@@ -75,6 +75,13 @@
<toolbarbutton data-l10n-id="trustpanel-clear-cookies-button" id="trustpanel-clear-cookies-button" class="subviewbutton subviewbutton-nav"></toolbarbutton>
</vbox>
+ <vbox id="trustpanel-allow-cookies-footer">
+ <toolbarbutton id="identity-popup-allow-sitedata-button" class="subviewbutton">
+ <label data-l10n-id="identity-allow-site-data" flex="1"></label>
+ <html:moz-toggle id="identity-popup-allow-sitedata-toggle" style="pointer-events: none;"></html:moz-toggle>
+ </toolbarbutton>
+ </vbox>
+
<toolbarseparator></toolbarseparator>
<toolbarbutton id="trustpanel-privacy-link" data-l10n-id="trustpanel-privacy-link" class="subviewbutton"></toolbarbutton>
</vbox>
--
2.47.3
@@ -1,28 +0,0 @@
From d908628306c93f7cc9cc3bce321d156099efdf0a Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:11:45 +0100
Subject: [PATCH 38/52] ui-patches/home-preferences.patch
---
browser/themes/shared/preferences/preferences.css | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/browser/themes/shared/preferences/preferences.css b/browser/themes/shared/preferences/preferences.css
index 7116d47f1004..a7e7a4fd1dfd 100644
--- a/browser/themes/shared/preferences/preferences.css
+++ b/browser/themes/shared/preferences/preferences.css
@@ -1615,6 +1615,11 @@ setting-pane[onsearchpane] {
}
}
+#support-firefox,
+.mission-message {
+ display: none;
+}
+
#dohProviderSelect {
--select-max-width: 235px;
}
--
2.47.3
@@ -1,62 +0,0 @@
From 1af7edf004da29ad5291089cdac62f3d9a9411b0 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:11:51 +0100
Subject: [PATCH 39/52] ui-patches/lw-logo-devtools.patch
---
devtools/client/aboutdebugging/src/actions/runtimes.js | 4 +---
devtools/client/jar.mn | 1 +
.../themes/images/aboutdebugging-firefox-librewolf.svg | 1 +
.../client/themes/images/aboutdebugging-firefox-logo.svg | 7 +------
4 files changed, 4 insertions(+), 9 deletions(-)
create mode 100644 devtools/client/themes/images/aboutdebugging-firefox-librewolf.svg
diff --git a/devtools/client/aboutdebugging/src/actions/runtimes.js b/devtools/client/aboutdebugging/src/actions/runtimes.js
index 52148f80b280..74eac40db721 100644
--- a/devtools/client/aboutdebugging/src/actions/runtimes.js
+++ b/devtools/client/aboutdebugging/src/actions/runtimes.js
@@ -71,9 +71,7 @@ async function getRuntimeIcon(runtime, channel) {
}
}
- return channel === "release" || channel === "beta" || channel === "aurora"
- ? `chrome://devtools/skin/images/aboutdebugging-firefox-${channel}.svg`
- : "chrome://devtools/skin/images/aboutdebugging-firefox-nightly.svg";
+ return "chrome://devtools/skin/images/aboutdebugging-firefox-librewolf.svg";
}
function onRemoteDevToolsClientClosed() {
diff --git a/devtools/client/jar.mn b/devtools/client/jar.mn
index 4e0494c098b3..501d8b24cd8d 100644
--- a/devtools/client/jar.mn
+++ b/devtools/client/jar.mn
@@ -384,6 +384,7 @@ devtools.jar:
skin/images/aboutdebugging-firefox-logo.svg (themes/images/aboutdebugging-firefox-logo.svg)
skin/images/aboutdebugging-firefox-nightly.svg (themes/images/aboutdebugging-firefox-nightly.svg)
skin/images/aboutdebugging-firefox-release.svg (themes/images/aboutdebugging-firefox-release.svg)
+ skin/images/aboutdebugging-firefox-librewolf.svg (themes/images/aboutdebugging-firefox-librewolf.svg)
skin/images/aboutdebugging-globe-icon.svg (themes/images/aboutdebugging-globe-icon.svg)
skin/images/aboutdebugging-information.svg (themes/images/aboutdebugging-information.svg)
skin/images/aboutdebugging-process-icon.svg (themes/images/aboutdebugging-process-icon.svg)
diff --git a/devtools/client/themes/images/aboutdebugging-firefox-librewolf.svg b/devtools/client/themes/images/aboutdebugging-firefox-librewolf.svg
new file mode 100644
index 000000000000..386c02a5fd57
--- /dev/null
+++ b/devtools/client/themes/images/aboutdebugging-firefox-librewolf.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 67.733 67.733"><g transform="translate(-42.107 -153.898)"><circle cx="75.973" cy="187.765" r="33.867" fill="#00acff"/><path d="M72.544 214.677c-4.744-.609-9.282-2.5-13.242-5.518-1.292-.985-3.715-3.424-4.773-4.804-2.963-3.865-4.805-8.25-5.412-12.887-.26-1.984-.26-5.633.003-7.447 1.308-9.068 7.014-16.846 15.209-20.73 3.811-1.806 7.3-2.57 11.73-2.57 7.166 0 13.527 2.567 18.681 7.54 2.483 2.396 4.148 4.668 5.574 7.607 1.929 3.975 2.71 7.433 2.71 11.995 0 6.006-1.735 11.244-5.337 16.117-1.07 1.448-3.162 3.647-4.55 4.785-3.806 3.12-8.658 5.232-13.473 5.863-1.663.218-5.593.245-7.12.05zm10.041-4.865c2.898-.914 5.26-2.142 7.54-3.92 1.213-.946 3.309-3.062 4.188-4.227 2.383-3.162 4.004-7.122 4.482-10.946.23-1.842.096-5.738-.255-7.43-.93-4.48-2.932-8.265-6.086-11.503-1.966-2.02-3.757-3.35-6.06-4.505-3.495-1.752-6.49-2.46-10.424-2.464-4.164-.004-7.815.95-11.429 2.987-3.29 1.855-6.69 5.26-8.553 8.563-1.372 2.433-2.376 5.32-2.767 7.96-.257 1.73-.262 5.164-.01 6.82.504 3.316 1.76 6.592 3.584 9.34.995 1.5.964 1.484 1.842.981 1.57-.898 1.98-1.333 2.836-3.01 1-1.96 2.07-3.673 3.037-4.863 1.116-1.373 1.27-1.618 1.83-2.915.28-.652.786-1.61 1.122-2.13l.611-.942-.79-.777c-1.05-1.032-1.923-2.201-2.087-2.796-.168-.608.03-.947.818-1.402.798-.461 1.368-.593 3.5-.812 1.037-.107 2.163-.302 2.518-.437.353-.134 1.408-.708 2.344-1.276 2.703-1.639 2.932-1.723 4.552-1.688 1.369.03 1.371.029 2.183-.462 1.7-1.028 4.143-2.883 7.357-5.587.616-.519 1.21-.926 1.32-.905.454.088 1.289 2.137 1.416 3.476.077.812-.08 1.615-.562 2.873-.132.343-.192.67-.135.727.138.137.61-.453.61-.763 0-.394.262-.439.617-.106.258.242.481.312 1 .312.567 0 .708.052.93.348.375.5.463 1.866.175 2.732-.28.842-1.125 1.813-1.892 2.173-.686.323-2.075 1.68-2.726 2.662a31.64 31.64 0 00-1.037 1.742c-.321.582-.86 1.461-1.198 1.954-.664.97-1.233 2.323-1.782 4.238-.323 1.126-.35 1.419-.363 3.928-.016 3.032-.173 3.776-.993 4.71-.931 1.06-1.862 3.391-1.94 4.86-.05.928-.192 1.832-.395 2.502-.09.295.077.291 1.072-.022z" fill="#fff"/><path d="M77.062 181.654l1.222-1.565 1.966-.275-1.222 1.564z" fill="#00acff"/></g></svg>
diff --git a/devtools/client/themes/images/aboutdebugging-firefox-logo.svg b/devtools/client/themes/images/aboutdebugging-firefox-logo.svg
index fe4d116b1660..fbbc08c9af6b 100644
--- a/devtools/client/themes/images/aboutdebugging-firefox-logo.svg
+++ b/devtools/client/themes/images/aboutdebugging-firefox-logo.svg
@@ -1,6 +1 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
- <path fill="context-fill #20123a" d="M190.368 150.591c0.157 0.009 0.079 0.003 0 0zm-57.874-28.933c0.158 0.008 0.079 0.003 0 0zm346.228 44.674c-10.445-25.123-31.6-52.248-48.211-60.82 13.52 26.5 21.345 53.093 24.335 72.935 0 0.04 0.015 0.136 0.047 0.4-27.175-67.732-73.254-95.047-110.886-154.512-1.9-3.008-3.805-6.022-5.661-9.2a73.237 73.237 0 0 1-2.646-4.972 43.757 43.757 0 0 1-3.585-9.5 0.625 0.625 0 0 0-0.546-0.644 0.8 0.8 0 0 0-0.451 0c-0.033 0.011-0.084 0.051-0.119 0.065-0.053 0.02-0.12 0.069-0.176 0.095 0.026-0.036 0.083-0.117 0.1-0.135-53.437 31.3-75.587 86.093-81.282 120.97a128.057 128.057 0 0 0-47.624 12.153 6.144 6.144 0 0 0-3.041 7.63 6.034 6.034 0 0 0 8.192 3.525 116.175 116.175 0 0 1 41.481-10.826c0.468-0.033 0.937-0.062 1.405-0.1a117.624 117.624 0 0 1 5.932-0.211 120.831 120.831 0 0 1 34.491 4.777c0.654 0.192 1.295 0.414 1.946 0.616a120.15 120.15 0 0 1 5.539 1.842 121.852 121.852 0 0 1 3.992 1.564c1.074 0.434 2.148 0.868 3.206 1.331a118.453 118.453 0 0 1 4.9 2.307c0.743 0.368 1.485 0.735 2.217 1.117a120.535 120.535 0 0 1 4.675 2.587 107.785 107.785 0 0 1 2.952 1.776 123.018 123.018 0 0 1 42.028 43.477c-12.833-9.015-35.81-17.918-57.947-14.068 86.441 43.214 63.234 192.027-56.545 186.408a106.7 106.7 0 0 1-31.271-6.031 132.461 132.461 0 0 1-7.059-2.886c-1.356-0.618-2.711-1.243-4.051-1.935-29.349-15.168-53.583-43.833-56.611-78.643 0 0 11.093-41.335 79.433-41.335 7.388 0 28.508-20.614 28.9-26.593-0.09-1.953-41.917-18.59-58.223-34.656-8.714-8.585-12.851-12.723-16.514-15.829a71.7 71.7 0 0 0-6.225-4.7 111.335 111.335 0 0 1-0.675-58.733c-24.687 11.242-43.89 29.011-57.849 44.7h-0.111c-9.528-12.067-8.855-51.873-8.312-60.184-0.114-0.516-7.107 3.63-8.024 4.254a175.21 175.21 0 0 0-23.486 20.12 210.5 210.5 0 0 0-22.443 26.913c0 0.012-0.007 0.025-0.011 0.037 0-0.012 0.007-0.025 0.011-0.038a202.837 202.837 0 0 0-32.244 72.81c-0.058 0.265-2.29 10.054-3.92 22.147a265.794 265.794 0 0 0-0.769 5.651c-0.558 3.636-0.992 7.6-1.42 13.767-0.019 0.239-0.031 0.474-0.048 0.712a591.152 591.152 0 0 0-0.481 7.995c0 0.411-0.025 0.816-0.025 1.227 0 132.709 107.6 240.29 240.324 240.29 118.865 0 217.559-86.288 236.882-199.63 0.407-3.075 0.732-6.168 1.092-9.27 4.777-41.21-0.53-84.525-15.588-120.747zm-164.068 72.1z" />
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 67.733 67.733"><path d="M33.867 0A33.867 33.867 0 000 33.867a33.867 33.867 0 0033.867 33.866 33.867 33.867 0 0033.866-33.866A33.867 33.867 0 0033.867 0zm.086 6.822c7.166 0 13.526 2.568 18.68 7.54 2.484 2.397 4.149 4.669 5.575 7.608 1.928 3.975 2.71 7.432 2.71 11.995 0 6.006-1.735 11.244-5.337 16.117-1.07 1.448-3.162 3.647-4.55 4.785-3.807 3.12-8.659 5.231-13.473 5.863-1.664.218-5.594.245-7.121.049-4.744-.609-9.282-2.5-13.242-5.519-1.291-.984-3.715-3.423-4.773-4.803C9.46 46.592 7.618 42.206 7.01 37.57c-.26-1.985-.259-5.633.003-7.447 1.308-9.068 7.014-16.845 15.209-20.73 3.811-1.806 7.3-2.57 11.731-2.57zm-.089 4.097c-4.164-.004-7.815.95-11.43 2.987-3.289 1.855-6.69 5.26-8.553 8.563-1.371 2.433-2.375 5.32-2.767 7.96-.257 1.729-.262 5.164-.01 6.82.504 3.315 1.761 6.591 3.584 9.34.995 1.5.964 1.484 1.842.981 1.571-.898 1.981-1.334 2.837-3.01 1-1.96 2.07-3.673 3.037-4.863 1.116-1.374 1.269-1.618 1.829-2.915a17.5 17.5 0 011.123-2.13l.61-.942-.79-.777c-1.05-1.032-1.923-2.202-2.087-2.797-.168-.607.03-.946.82-1.402.796-.46 1.367-.593 3.498-.812 1.037-.106 2.163-.302 2.518-.436.353-.134 1.408-.709 2.344-1.276 2.703-1.639 2.932-1.724 4.553-1.688 1.368.03 1.37.029 2.182-.462 1.701-1.028 4.144-2.883 7.358-5.587.616-.519 1.21-.926 1.319-.905.454.088 1.29 2.136 1.416 3.476.077.812-.08 1.615-.562 2.872-.131.343-.192.67-.134.728.137.137.61-.453.61-.763 0-.394.261-.44.616-.106.259.242.482.311 1 .311.568 0 .708.053.93.348.375.501.463 1.867.176 2.733-.28.842-1.125 1.812-1.892 2.173-.686.322-2.076 1.68-2.726 2.662-.249.376-.716 1.16-1.037 1.742-.322.582-.861 1.461-1.199 1.954-.664.97-1.233 2.322-1.782 4.238-.322 1.125-.35 1.418-.363 3.928-.016 3.032-.173 3.776-.992 4.71-.932 1.06-1.862 3.391-1.94 4.86-.05.928-.193 1.832-.396 2.502-.089.294.078.29 1.073-.023 2.898-.913 5.26-2.14 7.54-3.92 1.213-.945 3.308-3.06 4.187-4.226 2.383-3.162 4.005-7.122 4.482-10.947.23-1.841.097-5.738-.254-7.429-.93-4.48-2.932-8.265-6.087-11.503-1.966-2.02-3.756-3.35-6.06-4.505-3.495-1.752-6.49-2.46-10.423-2.464zm4.279 14.997l-1.966.275-1.222 1.565 1.966-.276 1.222-1.564z" fill="context-fill #00acff"/></svg>
--
2.47.3
@@ -1,97 +0,0 @@
From 8801c367f1dba73a857bcca0df5693e0d538819f Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:11:57 +0100
Subject: [PATCH 40/52] ui-patches/neterror.patch
---
toolkit/content/errors/net-error-illustrations.mjs | 7 ++-----
toolkit/content/net-error-card.mjs | 12 +++++++++---
toolkit/themes/shared/aboutNetError.css | 2 +-
toolkit/themes/shared/desktop-jar.inc.mn | 1 +
toolkit/themes/shared/illustrations/warning.svg | 8 ++++++++
5 files changed, 21 insertions(+), 9 deletions(-)
create mode 100644 toolkit/themes/shared/illustrations/warning.svg
diff --git a/toolkit/content/errors/net-error-illustrations.mjs b/toolkit/content/errors/net-error-illustrations.mjs
index d785e4381ad2..24e6026d94ae 100644
--- a/toolkit/content/errors/net-error-illustrations.mjs
+++ b/toolkit/content/errors/net-error-illustrations.mjs
@@ -3,11 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
export const NET_ERROR_ILLUSTRATIONS = {
- noConnection: {
- src: "chrome://global/skin/illustrations/no-connection.svg",
- className: "no-connection",
- },
+ noConnection: {},
securityError: {
- src: "chrome://global/skin/illustrations/security-error.svg",
+ src: "chrome://global/skin/illustrations/warning.svg",
},
};
diff --git a/toolkit/content/net-error-card.mjs b/toolkit/content/net-error-card.mjs
index 8f51084ea10e..e964c4fd6862 100644
--- a/toolkit/content/net-error-card.mjs
+++ b/toolkit/content/net-error-card.mjs
@@ -1098,9 +1098,15 @@ export class NetErrorCard extends MozLitElement {
aria-labelledby="error-title"
aria-describedby="error-intro whatCanYouDo"
>
- <div class="img-container">
- <img src=${src} class=${ifDefined(className)} alt=${alt} />
- </div>
+ ${src &&
+ html`
+ <div class="img-container">
+ <img
+ src=${src}
+ ${alt && `data-l10n-id=${alt} data-l10n-attrs="alt"`}
+ />
+ </div>
+ `}
<div class="container">
${this.showCustomNetErrorCard
? html`${this.customNetErrorContainerTemplate()}`
diff --git a/toolkit/themes/shared/aboutNetError.css b/toolkit/themes/shared/aboutNetError.css
index eac2c03a57e1..e56fb33b1b0b 100644
--- a/toolkit/themes/shared/aboutNetError.css
+++ b/toolkit/themes/shared/aboutNetError.css
@@ -251,7 +251,7 @@ button:disabled {
}
.img-container > img {
- width: 8.75em;
+ width: 3.5em;
margin-block-start: 2em;
margin-inline-end: 2.5em;
diff --git a/toolkit/themes/shared/desktop-jar.inc.mn b/toolkit/themes/shared/desktop-jar.inc.mn
index a2b1b894f4e4..836d47d1b02b 100644
--- a/toolkit/themes/shared/desktop-jar.inc.mn
+++ b/toolkit/themes/shared/desktop-jar.inc.mn
@@ -153,6 +153,7 @@
skin/classic/global/illustrations/shield-check.svg (../../shared/illustrations/shield-check.svg)
skin/classic/global/illustrations/shield-alert.svg (../../shared/illustrations/shield-alert.svg)
skin/classic/global/illustrations/no-connection.svg (../../shared/illustrations/no-connection.svg)
+ skin/classic/global/illustrations/warning.svg (../../shared/illustrations/warning.svg)
skin/classic/global/illustrations/kit-concerned.svg (../../shared/illustrations/kit-concerned.svg)
skin/classic/global/illustrations/kit-confetti.svg (../../shared/illustrations/kit-confetti.svg)
skin/classic/global/illustrations/kit-happy.svg (../../shared/illustrations/kit-happy.svg)
diff --git a/toolkit/themes/shared/illustrations/warning.svg b/toolkit/themes/shared/illustrations/warning.svg
new file mode 100644
index 000000000000..e93301c81087
--- /dev/null
+++ b/toolkit/themes/shared/illustrations/warning.svg
@@ -0,0 +1,8 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"
+ fill="context-fill light-dark(#ffa436, #ffbd4f)" fill-opacity="context-fill-opacity">
+ <path
+ d="m14.875 12.037-5.497-10C8.997 1.346 8.311 1 7.625 1s-1.372.346-1.752 1.037l-5.497 10C-.358 13.37.607 15 2.128 15l10.995 0c1.52 0 2.485-1.63 1.752-2.963zM8.25 11.75 8 12l-.75 0-.25-.25L7 11l.25-.25.75 0 .25.25 0 .75zm0-2.688a.625.625 0 0 1-1.25 0l0-3.437a.625.625 0 0 1 1.25 0l0 3.437z" />
+</svg>
--
2.47.3
@@ -1,34 +0,0 @@
From 0585672972a84f7e454028b54a7001283f394699 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:12:00 +0100
Subject: [PATCH 41/52] ui-patches/pref-naming.patch
---
browser/locales/en-US/browser/preferences/preferences.ftl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/browser/locales/en-US/browser/preferences/preferences.ftl b/browser/locales/en-US/browser/preferences/preferences.ftl
index 8227dc4b8437..d72fdb67fe31 100644
--- a/browser/locales/en-US/browser/preferences/preferences.ftl
+++ b/browser/locales/en-US/browser/preferences/preferences.ftl
@@ -744,7 +744,7 @@ play-drm-content =
.label = Play DRM-controlled content
.accesskey = P
-play-drm-content-learn-more = Learn more
+play-drm-content-learn-more = Why we disable it
## About Firefox
@@ -765,7 +765,7 @@ update-application-updates-managed-by-os =
# Variables:
# $version (string) - Firefox version
-update-application-version = Version { $version } <a data-l10n-name="learn-more">Whats new</a>
+update-application-version = Version { $version } <a data-l10n-name="learn-more">Visit the repositories</a>
update-history-2 =
.label = Show update history
--
2.47.3
@@ -1,318 +0,0 @@
From df1c4c1b1e969881f543f2609a3bdf9916cee46b Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:12:08 +0100
Subject: [PATCH 42/52] ui-patches/privacy-preferences.patch
---
.../preferences/config/permissions-data.mjs | 108 ------------------
.../components/preferences/config/privacy.mjs | 28 -----
browser/components/preferences/preferences.js | 2 +-
.../components/preferences/privacy.inc.xhtml | 34 +++---
browser/components/preferences/privacy.js | 2 -
.../en-US/browser/preferences/preferences.ftl | 2 -
browser/themes/shared/preferences/privacy.css | 7 +-
7 files changed, 21 insertions(+), 162 deletions(-)
diff --git a/browser/components/preferences/config/permissions-data.mjs b/browser/components/preferences/config/permissions-data.mjs
index e9f9ae828c2c..962160b64225 100644
--- a/browser/components/preferences/config/permissions-data.mjs
+++ b/browser/components/preferences/config/permissions-data.mjs
@@ -728,112 +728,4 @@ SettingGroupManager.registerGroups({
},
],
},
- dataCollection: {
- items: [
- {
- id: "dataCollectionCategory",
- l10nId: "data-collection",
- control: "moz-fieldset",
- iconSrc: "chrome://global/skin/icons/trending.svg",
- controlAttrs: {
- headinglevel: 2,
- "data-l10n-attrs": "searchkeywords",
- },
- items: [
- {
- id: "dataCollectionLink",
- control: "a",
- l10nId: "data-collection-link",
- slot: "support-link",
- controlAttrs: {
- id: "dataCollectionPrivacyNoticeLink",
- target: "_blank",
- },
- },
- {
- id: "preferencesPrivacyProfiles",
- control: "moz-message-bar",
- l10nId: "data-collection-preferences-across-profiles",
- controlAttrs: {
- role: "status",
- },
- items: [
- {
- id: "privacyProfilesLink",
- control: "a",
- l10nId: "data-collection-profiles-link",
- slot: "support-link",
- controlAttrs: {
- id: "dataCollectionViewProfiles",
- target: "_blank",
- href: "",
- },
- },
- ],
- },
- {
- id: "telemetryContainer",
- control: "moz-message-bar",
- l10nId: "data-collection-health-report-telemetry-disabled",
- supportPage: "telemetry-clientid",
- controlAttrs: {
- role: "status",
- },
- },
- {
- id: "backup-multi-profile-warning-message-bar",
- control: "moz-message-bar",
- l10nId: "backup-multi-profile-warning-message",
- controlAttrs: {
- dismissable: true,
- },
- },
- {
- id: "submitHealthReportBox",
- supportPage: "technical-and-interaction-data",
- subcategory: "reports",
- items: [
- {
- id: "addonRecommendationEnabled",
- l10nId: "addon-recommendations3",
- supportPage: "personalized-addons",
- },
- {
- id: "optOutStudiesEnabled",
- l10nId: "data-collection-run-studies",
- items: [
- {
- id: "viewShieldStudies",
- control: "moz-box-link",
- l10nId: "data-collection-studies-link",
- controlAttrs: {
- href: "about:studies",
- },
- },
- ],
- },
- ],
- },
-
- {
- id: "enableNimbusRollouts",
- l10nId: "nimbus-rollouts",
- supportPage: "remote-improvements",
- },
- {
- id: "submitUsagePingBox",
- l10nId: "data-collection-usage-ping",
- subcategory: "reports",
- supportPage: "usage-ping-settings",
- },
- {
- id: "automaticallySubmitCrashesBox",
- l10nId: "data-collection-backlogged-crash-reports",
- subcategory: "reports",
- supportPage: "crash-reports",
- },
- ],
- },
- ],
- },
});
diff --git a/browser/components/preferences/config/privacy.mjs b/browser/components/preferences/config/privacy.mjs
index dccc0f1b2819..9d34147f5423 100644
--- a/browser/components/preferences/config/privacy.mjs
+++ b/browser/components/preferences/config/privacy.mjs
@@ -890,34 +890,6 @@ SettingGroupManager.registerGroups({
l10nId: "history-group",
headingLevel: 2,
items: [
- {
- id: "historyMode",
- control: "moz-select",
- options: [
- {
- value: "remember",
- l10nId: "history-remember-option-all2",
- },
- { value: "dontremember", l10nId: "history-remember-option-never2" },
- { value: "custom", l10nId: "history-remember-option-custom2" },
- ],
- controlAttrs: {
- "search-l10n-ids": `
- history-remember-description4,
- history-dontremember-description4,
- history-custom-description4,
- history-private-browsing-permanent.label,
- history-remember-browser-option.label,
- history-remember-search-option.label,
- history-clear-on-close-option.label,
- history-clear-on-close-settings.label
- `,
- },
- },
- {
- id: "privateBrowsingAutoStart",
- l10nId: "history-private-browsing-permanent",
- },
{
id: "rememberHistory",
l10nId: "history-remember-browser-option",
diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js
index 94612d8e28af..01f60127bbe9 100644
--- a/browser/components/preferences/preferences.js
+++ b/browser/components/preferences/preferences.js
@@ -395,7 +395,7 @@ const CONFIG_PANES = Object.freeze({
permissionsData: {
l10nId: "permissions-data-section",
iconSrc: "chrome://browser/skin/permissions.svg",
- groupIds: ["permissions", "dataCollection"],
+ groupIds: ["permissions"],
module: "chrome://browser/content/preferences/config/permissions-data.mjs",
visible: () => srdSectionEnabled("permissionsData"),
},
diff --git a/browser/components/preferences/privacy.inc.xhtml b/browser/components/preferences/privacy.inc.xhtml
index 78e2e934cf33..052afa00e06c 100644
--- a/browser/components/preferences/privacy.inc.xhtml
+++ b/browser/components/preferences/privacy.inc.xhtml
@@ -50,20 +50,6 @@
permissions-exceptions-manage-etp-desc,
"/>
</hbox>
- <hbox id="rfpIncompatibilityWarning" class="info-box-container" hidden="true">
- <vbox class="info-icon-container">
- <html:img class="info-icon"></html:img>
- </vbox>
- <vbox flex="1">
- <description>
- <html:span data-l10n-id="content-blocking-rfp-incompatibility-warning"/>
- <html:a is="moz-support-link"
- class="learnMore"
- support-page="resist-fingerprinting"
- />
- </description>
- </vbox>
- </hbox>
<hbox id="fpiIncompatibilityWarning" class="info-box-container" hidden="true">
<vbox class="info-icon-container">
<html:img class="info-icon"></html:img>
@@ -78,7 +64,7 @@
<radiogroup id="contentBlockingCategoryRadio"
preference="browser.contentblocking.category"
aria-labelledby="trackingProtectionMenuDesc">
- <vbox id="contentBlockingOptionStandard" class="privacy-detailedoption info-box-container">
+ <vbox id="contentBlockingOptionStandard" class="privacy-detailedoption info-box-container" hidden="true">
<hbox>
<radio id="standardRadio"
value="standard"
@@ -243,7 +229,7 @@
is="highlightable-button"
data-l10n-id="content-blocking-reload-tabs-button"/>
</html:div>
- <vbox class="content-blocking-warning info-box-container">
+ <vbox class="content-blocking-warning info-box-container" hidden="true">
<hbox>
<image class="content-blocking-warning-image"/>
<label class="content-blocking-warning-title" data-l10n-id="content-blocking-warning-title-2"/>
@@ -259,7 +245,7 @@
</vbox>
</vbox>
</vbox>
- <vbox id="contentBlockingOptionCustom" class="privacy-detailedoption info-box-container">
+ <vbox id="contentBlockingOptionCustom" class="privacy-detailedoption info-box-container" hidden="true">
<hbox>
<radio id="customRadio"
value="custom"
@@ -392,6 +378,20 @@
</vbox>
</radiogroup>
</vbox>
+ <hbox id="rfpIncompatibilityWarning" class="info-box-container" hidden="true">
+ <vbox class="info-icon-container">
+ <html:img class="info-icon"></html:img>
+ </vbox>
+ <vbox flex="1">
+ <description>
+ <html:span data-l10n-id="content-blocking-rfp-incompatibility-warning"/>
+ <html:a is="moz-support-link"
+ class="learnMore"
+ support-page="resist-fingerprinting"
+ />
+ </description>
+ </vbox>
+ </hbox>
</vbox>
</groupbox>
<html:setting-group id="nonTechnicalPrivacyGroup" groupid="nonTechnicalPrivacy" data-category="panePrivacy" hidden="true" data-srd-groupid="nonTechnicalPrivacy2"/>
diff --git a/browser/components/preferences/privacy.js b/browser/components/preferences/privacy.js
index a78085493646..5400217b0fc3 100644
--- a/browser/components/preferences/privacy.js
+++ b/browser/components/preferences/privacy.js
@@ -618,7 +618,6 @@ var gPrivacyPane = {
initSettingGroup("securityPrivacyStatus");
initSettingGroup("securityPrivacyWarnings");
initSettingGroup("httpsOnly");
- initSettingGroup("browsingProtection");
initSettingGroup("cookiesAndSiteData");
initSettingGroup("cookiesAndSiteData2");
initSettingGroup("certificates");
@@ -626,7 +625,6 @@ var gPrivacyPane = {
initSettingGroup("history");
initSettingGroup("history2");
initSettingGroup("permissions");
- initSettingGroup("dataCollection");
initSettingGroup("privacyPanel");
initSettingGroup("dnsOverHttps");
initSettingGroup("dnsOverHttpsAdvanced");
diff --git a/browser/locales/en-US/browser/preferences/preferences.ftl b/browser/locales/en-US/browser/preferences/preferences.ftl
index d72fdb67fe31..9590dd1d08c6 100644
--- a/browser/locales/en-US/browser/preferences/preferences.ftl
+++ b/browser/locales/en-US/browser/preferences/preferences.ftl
@@ -1934,8 +1934,6 @@ sitedata-cookies-exceptions3 =
content-blocking-enhanced-tracking-protection = Enhanced Tracking Protection
-content-blocking-section-top-level-description = Trackers follow you around online to collect information about your browsing habits and interests. { -brand-short-name } blocks many of these trackers and other malicious scripts.
-
content-blocking-learn-more = Learn more
content-blocking-fpi-incompatibility-warning = You are using First Party Isolation (FPI), which overrides some of { -brand-short-name }s cookie settings.
diff --git a/browser/themes/shared/preferences/privacy.css b/browser/themes/shared/preferences/privacy.css
index cbe70bc6455d..85f340cee183 100644
--- a/browser/themes/shared/preferences/privacy.css
+++ b/browser/themes/shared/preferences/privacy.css
@@ -233,7 +233,7 @@
}
.extra-information-label {
- margin-top: 18px;
+ margin-top: 5px;
}
/* Apply display: block to the containers of all the category information, as
@@ -269,9 +269,8 @@
}
.content-blocking-extra-blocking-desc {
- margin-inline-start: 0.5em;
- position: relative;
- top: 0.65em;
+ margin-top: 1em;
+ margin-bottom: 0.5em;
}
.content-blocking-label,
--
2.47.3
@@ -1,91 +0,0 @@
From 1fe59d97e86904f7bf983497a5a18127d3ed8ce1 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:12:12 +0100
Subject: [PATCH 43/52] ui-patches/remove-cfrprefs.patch
---
.../preferences/config/tabs-browsing.mjs | 41 -------------------
browser/components/preferences/preferences.js | 1 -
2 files changed, 42 deletions(-)
diff --git a/browser/components/preferences/config/tabs-browsing.mjs b/browser/components/preferences/config/tabs-browsing.mjs
index 7d4b5bec8b53..0cfde7bd0d09 100644
--- a/browser/components/preferences/config/tabs-browsing.mjs
+++ b/browser/components/preferences/config/tabs-browsing.mjs
@@ -541,16 +541,6 @@ Preferences.addSetting({
},
});
-// Recommendations settings
-Preferences.addSetting({
- id: "cfrRecommendations",
- pref: "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons",
-});
-Preferences.addSetting({
- id: "cfrRecommendations-features",
- pref: "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features",
-});
-
// Browser layout settings
Preferences.addSetting({
id: "browserLayoutRadioGroup",
@@ -783,25 +773,6 @@ SettingGroupManager.registerGroups({
},
],
},
- recommendations: {
- l10nId: "recommendations-group",
- headingLevel: 2,
- iconSrc: "chrome://browser/skin/lightning-bolt.svg",
- items: [
- {
- id: "cfrRecommendations",
- l10nId: "browsing-cfr-recommendations",
- supportPage: "extensionrecommendations",
- subcategory: "cfraddons",
- },
- {
- id: "cfrRecommendations-features",
- l10nId: "browsing-cfr-features",
- supportPage: "extensionrecommendations",
- subcategory: "cfrfeatures",
- },
- ],
- },
// Bug 2028609: the following sections are needed to ensure settings keep
// working in legacy views, and can be removed when the pref is flipped
drm: {
@@ -833,18 +804,6 @@ SettingGroupManager.registerGroups({
},
],
},
- {
- id: "cfrRecommendations",
- l10nId: "browsing-cfr-recommendations",
- supportPage: "extensionrecommendations",
- subcategory: "cfraddons",
- },
- {
- id: "cfrRecommendations-features",
- l10nId: "browsing-cfr-features",
- supportPage: "extensionrecommendations",
- subcategory: "cfrfeatures",
- },
{
id: "linkPreviewEnabled",
l10nId: "link-preview-settings-enable",
diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js
index 01f60127bbe9..2798ad677d20 100644
--- a/browser/components/preferences/preferences.js
+++ b/browser/components/preferences/preferences.js
@@ -477,7 +477,6 @@ const CONFIG_PANES = Object.freeze({
"keyboardShortcuts",
"media",
"performance",
- "recommendations",
],
iconSrc: "chrome://global/skin/icons/cursor-arrow.svg",
module: "chrome://browser/content/preferences/config/tabs-browsing.mjs",
--
2.47.3
@@ -1,25 +0,0 @@
From a46bad5a4815206b904f707cfc36a0b01857ba75 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:12:15 +0100
Subject: [PATCH 44/52] ui-patches/remove-organization-policy-banner.patch
---
browser/components/preferences/preferences.js | 2 --
1 file changed, 2 deletions(-)
diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js
index 2798ad677d20..89b032bedba7 100644
--- a/browser/components/preferences/preferences.js
+++ b/browser/components/preferences/preferences.js
@@ -639,8 +639,6 @@ function init_all() {
gotoPref(event.target.view);
});
- maybeDisplayPoliciesNotice();
-
window.addEventListener("hashchange", onHashChange);
window.addEventListener("beforeunload", onBeforeunload);
--
2.47.3
File diff suppressed because it is too large Load Diff
@@ -1,66 +0,0 @@
From b746f4cbe29321eeca3955c6ea04cb993f5960e2 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:12:32 +0100
Subject: [PATCH 46/52] ui-patches/trustpanel.patch
---
browser/themes/shared/controlcenter/panel.css | 43 +++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/browser/themes/shared/controlcenter/panel.css b/browser/themes/shared/controlcenter/panel.css
index 7a5d6a777c54..db270a154bbd 100644
--- a/browser/themes/shared/controlcenter/panel.css
+++ b/browser/themes/shared/controlcenter/panel.css
@@ -828,6 +828,49 @@
padding-block-end: var(--space-small);
}
+/* Hide ETP description (reads like ad) */
+#trustpanel-etp-description {
+ display: none;
+}
+
+/* Hide most of graphic but show tracker count */
+#trustpanel-graphic-image,
+#trustpanel-graphic-section-text,
+#trustpanel-blocker-section > label:nth-child(2) {
+ display: none;
+}
+#trustpanel-graphic-section,
+#trustpanel-blocker-section,
+#trustpanel-toggle-section {
+ background: none !important;
+ border: none !important;
+ padding: 0 !important;
+}
+#trustpanel-toggle-section {
+ margin-bottom: 0 !important;
+}
+#trustpanel-graphic-section {
+ margin-top: 0 !important;
+}
+#trustpanel-blocker-section {
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: start;
+}
+
+/* Make tracker count non-bold */
+#trustpanel-blocker-section > label:nth-child(1) {
+ font-weight: normal;
+}
+
+/* Place toggle before tracker count */
+#trustpanel-header-row {
+ order: -2;
+}
+#trustpanel-toggle-section {
+ order: -1;
+}
+
#trustpanel-header-row {
justify-content: space-between;
padding-block-start: var(--space-small);
--
2.47.3
@@ -1,37 +0,0 @@
From 2d86291ed691dab5f38ba637774a9ff577066319 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:12:36 +0100
Subject: [PATCH 47/52] ui-patches/wallpapers.patch
---
.../extensions/newtab/lib/Wallpapers/WallpaperFeed.sys.mjs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/browser/extensions/newtab/lib/Wallpapers/WallpaperFeed.sys.mjs b/browser/extensions/newtab/lib/Wallpapers/WallpaperFeed.sys.mjs
index 467b01f0d102..4239d5e5a919 100644
--- a/browser/extensions/newtab/lib/Wallpapers/WallpaperFeed.sys.mjs
+++ b/browser/extensions/newtab/lib/Wallpapers/WallpaperFeed.sys.mjs
@@ -155,16 +155,17 @@ export class WallpaperFeed {
}
// retrieving all records in collection
- let records;
+ let records = [];
try {
- records = await this.wallpaperClient.get();
+ if (Services.prefs.getBoolPref("librewolf.externalWallpapers.enabled", false)) {
+ records = await this.wallpaperClient.get();
+ }
} catch (error) {
// Fall through so the custom-wallpaper upload entry is still surfaced.
console.error(
"Error fetching wallpaper records from remote settings",
error
);
- records = [];
}
const customWallpaperEnabled = Services.prefs.getBoolPref(
--
2.47.3
@@ -1,57 +0,0 @@
From 3d859b146eda48ed7143b3a44452493c31b1fa6b Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:12:39 +0100
Subject: [PATCH 48/52] ui-patches/website-appearance-ui-rfp.patch
---
.../preferences/config/appearance.mjs | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/browser/components/preferences/config/appearance.mjs b/browser/components/preferences/config/appearance.mjs
index 45faa8c4c26f..1eba3052e344 100644
--- a/browser/components/preferences/config/appearance.mjs
+++ b/browser/components/preferences/config/appearance.mjs
@@ -270,6 +270,27 @@ if (Services.prefs.getBoolPref("browser.settings-redesign.enabled", false)) {
});
}
+Preferences.addSetting({
+ id: "librewolfRFPWarning",
+ deps: ["librewolfRFP"],
+ visible: ({librewolfRFP}) => {
+ const interval = setInterval(() => {
+ const chooser = document.getElementById("web-appearance-chooser");
+ if (chooser) {
+ clearInterval(interval);
+ if (librewolfRFP.value) {
+ chooser.style.opacity = "0.3";
+ chooser.style.pointerEvents = "none";
+ } else {
+ chooser.style.opacity = "1";
+ chooser.style.pointerEvents = "all";
+ }
+ }
+ }, 100);
+ return librewolfRFP.value;
+ },
+});
+
SettingGroupManager.registerGroups({
appearance: {
l10nId: "appearance-group2",
@@ -284,6 +305,12 @@ SettingGroupManager.registerGroups({
role: "status",
},
},
+ {
+ id: "librewolfRFPWarning",
+ l10nId: "librewolf-rfp-warning",
+ supportPage: "rfp-theme",
+ control: "moz-message-bar",
+ },
{
id: "web-appearance-chooser",
control: "moz-visual-picker",
--
2.47.3
@@ -1,58 +0,0 @@
From 828d539224f49b9fa5084b14b5aa0c7a6f7ce236 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:12:44 +0100
Subject: [PATCH 49/52] vendor-name.patch
---
toolkit/components/extensions/parent/ext-runtime.js | 10 +++++++++-
toolkit/xre/nsAppRunner.cpp | 6 ------
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/toolkit/components/extensions/parent/ext-runtime.js b/toolkit/components/extensions/parent/ext-runtime.js
index 22f03e99a871..875fca7be972 100644
--- a/toolkit/components/extensions/parent/ext-runtime.js
+++ b/toolkit/components/extensions/parent/ext-runtime.js
@@ -334,7 +334,15 @@ this.runtime = class extends ExtensionAPIPersistent {
getBrowserInfo: function () {
const { name, vendor, version, appBuildID } = Services.appinfo;
- const info = { name, vendor, version, buildID: appBuildID };
+ const useFirefoxDefaults = Services.prefs.getBoolPref(
+ "librewolf.getBrowserInfo.setToFirefoxDefaults",
+ true
+ );
+
+ const info = useFirefoxDefaults
+ ? { name: "Firefox", vendor: "Mozilla", version, buildID: appBuildID }
+ : { name, vendor, version, buildID: appBuildID };
+
return Promise.resolve(info);
},
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
index cd9485c34497..140c31d08353 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -2257,9 +2257,6 @@ static void DumpHelp() {
}
static inline void DumpVersion() {
- if (gAppData->vendor && *gAppData->vendor) {
- printf("%s ", (const char*)gAppData->vendor);
- }
printf("%s ", (const char*)gAppData->name);
// Use the displayed version
@@ -2273,9 +2270,6 @@ static inline void DumpVersion() {
}
static inline void DumpFullVersion() {
- if (gAppData->vendor && *gAppData->vendor) {
- printf("%s ", (const char*)gAppData->vendor);
- }
printf("%s ", (const char*)gAppData->name);
// Use the displayed version
--
2.47.3
@@ -1,614 +0,0 @@
From 9c9f33a51b1676b1bcc3f85e10347115b40e2ff4 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:12:55 +0100
Subject: [PATCH 50/52] webgl-permission.patch
---
.../content/popup-notifications.inc.xhtml | 7 +
browser/modules/ObserverForwarder.sys.mjs | 5 +
.../WebGLPermissionPromptHelper.sys.mjs | 132 +++++++++++++++++
browser/themes/shared/icons/webgl-blocked.svg | 18 +++
browser/themes/shared/icons/webgl.svg | 17 +++
browser/themes/shared/jar.inc.mn | 3 +
browser/themes/shared/notification-icons.css | 9 ++
.../notification-icons/webgl-blocked.svg | 18 +++
.../shared/notification-icons/webgl.svg | 17 +++
dom/canvas/ClientWebGLContext.cpp | 140 ++++++++++++++++++
dom/ipc/BrowserParent.cpp | 23 +++
dom/ipc/BrowserParent.h | 2 +
dom/ipc/PBrowser.ipdl | 8 +
modules/libpref/init/StaticPrefList.yaml | 14 ++
modules/libpref/moz.build | 1 +
15 files changed, 414 insertions(+)
create mode 100644 browser/modules/WebGLPermissionPromptHelper.sys.mjs
create mode 100644 browser/themes/shared/icons/webgl-blocked.svg
create mode 100644 browser/themes/shared/icons/webgl.svg
create mode 100644 browser/themes/shared/notification-icons/webgl-blocked.svg
create mode 100644 browser/themes/shared/notification-icons/webgl.svg
diff --git a/browser/base/content/popup-notifications.inc.xhtml b/browser/base/content/popup-notifications.inc.xhtml
index 4e2f449c8199..256e4c94719a 100644
--- a/browser/base/content/popup-notifications.inc.xhtml
+++ b/browser/base/content/popup-notifications.inc.xhtml
@@ -175,6 +175,13 @@
</popupnotificationcontent>
</popupnotification>
+ <popupnotification id="webgl-permissions-prompt-notification" hidden="true">
+ <popupnotificationcontent orient="vertical">
+ <description class="popup-notification-description"/>
+ <label id="webgl-permissions-prompt-warning"/>
+ </popupnotificationcontent>
+ </popupnotification>
+
<popupnotification id="contextual-feature-recommendation-notification"
buttonhighlight="true"
hidden="true">
diff --git a/browser/modules/ObserverForwarder.sys.mjs b/browser/modules/ObserverForwarder.sys.mjs
index b62b572cdb11..222765c2754e 100644
--- a/browser/modules/ObserverForwarder.sys.mjs
+++ b/browser/modules/ObserverForwarder.sys.mjs
@@ -14,6 +14,8 @@ let lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
CanvasPermissionPromptHelper:
"moz-src:///browser/modules/CanvasPermissionPromptHelper.sys.mjs",
+ WebGLPermissionPromptHelper:
+ "moz-src:///browser/modules/WebGLPermissionPromptHelper.sys.mjs",
FilePickerCrashed: "resource:///modules/FilePickerCrashed.sys.mjs",
PluginManager: "resource:///actors/PluginParent.sys.mjs",
SerialDeviceSharingHelper:
@@ -29,6 +31,9 @@ let gObservers = {
"canvas-permissions-prompt": ["CanvasPermissionPromptHelper"],
"canvas-permissions-prompt-hide-doorhanger": ["CanvasPermissionPromptHelper"],
+ "webgl-permissions-prompt": ["WebGLPermissionPromptHelper"],
+ "webgl-permissions-prompt-hide-doorhanger": ["WebGLPermissionPromptHelper"],
+
"file-picker-crashed": ["FilePickerCrashed"],
"gmp-plugin-crash": ["PluginManager"],
"plugin-crashed": ["PluginManager"],
diff --git a/browser/modules/WebGLPermissionPromptHelper.sys.mjs b/browser/modules/WebGLPermissionPromptHelper.sys.mjs
new file mode 100644
index 000000000000..7c647a147894
--- /dev/null
+++ b/browser/modules/WebGLPermissionPromptHelper.sys.mjs
@@ -0,0 +1,132 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
+
+import { PrivateBrowsingUtils } from "resource://gre/modules/PrivateBrowsingUtils.sys.mjs";
+
+export let WebGLPermissionPromptHelper = {
+ _permissionsPrompt: "webgl-permissions-prompt",
+ _permissionsPromptHideDoorHanger: "webgl-permissions-prompt-hide-doorhanger",
+ _notificationIcon: "webgl-notification-icon",
+
+ // aSubject is an nsIBrowser (e10s) or an nsIDOMWindow (non-e10s).
+ // aData is an Origin string.
+ observe(aSubject, aTopic, aData) {
+ if (
+ aTopic != this._permissionsPrompt &&
+ aTopic != this._permissionsPromptHideDoorHanger
+ ) {
+ return;
+ }
+
+ let browser;
+ if (aSubject instanceof Ci.nsIDOMWindow) {
+ browser = aSubject.docShell.chromeEventHandler;
+ } else {
+ browser = aSubject;
+ }
+
+ let window = browser?.documentGlobal;
+ if (!window) {
+ // Without knowing where this came from, we can't show the prompt.
+ return;
+ }
+
+ let principal =
+ Services.scriptSecurityManager.createContentPrincipalFromOrigin(aData);
+ let permission = Services.perms.testPermissionFromPrincipal(principal, "webgl");
+ if (permission === Ci.nsIPermissionManager.DENY_ACTION ||
+ permission === Ci.nsIPermissionManager.ALLOW_ACTION) {
+ return;
+ }
+
+ if (window.PopupNotifications.getNotification(
+ this._permissionsPrompt,
+ browser
+ )) {
+ return;
+ }
+
+ let { gNavigatorBundle, gBrowserBundle } = window;
+ let message = gNavigatorBundle.getFormattedString(
+ "webgl.siteprompt2",
+ ["<>"],
+ 1
+ );
+
+ function setWebGLPermission(aPerm, aPersistent) {
+ Services.perms.addFromPrincipal(
+ principal,
+ "webgl",
+ aPerm,
+ aPersistent
+ ? Ci.nsIPermissionManager.EXPIRE_NEVER
+ : Ci.nsIPermissionManager.EXPIRE_SESSION
+ );
+ }
+
+ let mainAction = {
+ label: gNavigatorBundle.getString("webgl.allow2"),
+ accessKey: gNavigatorBundle.getString("webgl.allow2.accesskey"),
+ callback(state) {
+ setWebGLPermission(
+ Ci.nsIPermissionManager.ALLOW_ACTION,
+ state && state.checkboxChecked
+ );
+ let tab = window?.gBrowser?.getTabForBrowser(browser);
+ if (tab) {
+ window.gBrowser.reloadTab(tab);
+ }
+ },
+ };
+
+ let secondaryActions = [
+ {
+ label: gNavigatorBundle.getString("webgl.block"),
+ accessKey: gNavigatorBundle.getString("webgl.block.accesskey"),
+ callback(state) {
+ setWebGLPermission(
+ Ci.nsIPermissionManager.DENY_ACTION,
+ state && state.checkboxChecked
+ );
+ },
+ },
+ ];
+
+ let checkbox = {
+ // In PB mode, we don't want the "always remember" checkbox
+ show: !PrivateBrowsingUtils.isWindowPrivate(window),
+ };
+ if (checkbox.show) {
+ checkbox.checked = true;
+ checkbox.label = gBrowserBundle.GetStringFromName("webgl.remember2");
+ }
+
+ let options = {
+ checkbox,
+ name: principal.host,
+ learnMoreURL:
+ Services.urlFormatter.formatURLPref("app.support.baseURL") +
+ "webgl-prompt",
+ dismissed: aTopic == this._permissionsPromptHideDoorHanger,
+ eventCallback(e) {
+ if (e == "showing" && this?.browser?.ownerDocument) {
+ this.browser.ownerDocument.getElementById(
+ "webgl-permissions-prompt-warning"
+ ).textContent = gBrowserBundle.GetStringFromName(
+ "webgl.siteprompt2.warning"
+ );
+ }
+ },
+ };
+ window.PopupNotifications.show(
+ browser,
+ this._permissionsPrompt,
+ message,
+ this._notificationIcon,
+ mainAction,
+ secondaryActions,
+ options
+ );
+ },
+};
diff --git a/browser/themes/shared/icons/webgl-blocked.svg b/browser/themes/shared/icons/webgl-blocked.svg
new file mode 100644
index 000000000000..6e18b7cf5401
--- /dev/null
+++ b/browser/themes/shared/icons/webgl-blocked.svg
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ version="1.1"
+ id="svg1"
+ xml:space="preserve"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ fill="context-fill"
+ fill-opacity="context-fill-opacity"><defs
+ id="defs1" /><g
+ id="g30"
+ transform="translate(-95.002999,-238.87424)"><path
+ id="path30"
+ style="stroke-linecap:round;paint-order:stroke fill markers"
+ d="m 95.604562,238.87619 c -0.463094,0.0319 -0.839908,0.6221 -0.419922,1.06446 l 1,1 1.820312,1.82031 v 10.48437 a 0.625,0.625 0 0 0 0.625,0.625 0.625,0.625 0 0 0 0.625,-0.625 v -1.35547 h 7.878908 l 2.80078,2.80079 c 0.24466,0.24372 0.6401,0.24372 0.88477,0 0.24415,-0.24409 0.24415,-0.64068 0,-0.88477 l -2.0625,-2.06445 -1.10157,-1.10157 h -0.002 l -3.72656,-3.72656 v -0.002 l -0.96289,-0.96289 h -0.002 l -1.82031,-1.82031 -1.249999,-1.25 -0.636719,-0.63672 -2.367187,-2.36719 -0.462891,-0.46289 -0.355469,-0.35547 c -0.147451,-0.13999 -0.31048,-0.19033 -0.464843,-0.17969 z m 6.056638,4.00196 1.25,1.25 h 5.07422 c 0.42057,0 0.74894,0.32747 0.75,0.74804 l 0.0117,5.01953 c 5e-5,0.0215 -0.004,0.0416 -0.006,0.0625 l 0.96289,0.96289 c 0.18374,-0.30216 0.29391,-0.65288 0.29297,-1.02929 l -0.0117,-5.01953 c -0.003,-1.09501 -0.90499,-1.99414 -2,-1.99414 z m -2.406248,1.25 h 0.117188 l 2.13867,2.14062 a 1.4999924,1.4999924 0 0 0 -0.50976,1.10547 1.4999924,1.4999924 0 0 0 1.5,1.5 1.4999924,1.4999924 0 0 0 1.11718,-0.5 l 2.26563,2.26562 h -6.628908 z" /></g></svg>
diff --git a/browser/themes/shared/icons/webgl.svg b/browser/themes/shared/icons/webgl.svg
new file mode 100644
index 000000000000..ffbf97c74dc7
--- /dev/null
+++ b/browser/themes/shared/icons/webgl.svg
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ version="1.1"
+ id="svg1"
+ xml:space="preserve"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ fill="context-fill"
+ fill-opacity="context-fill-opacity"><defs
+ id="defs1" /><g
+ id="g27"
+ transform="translate(-95.002767,-238.87424)"><path
+ id="path26"
+ d="m 96.625679,239.87424 a 0.625,0.625 0 0 0 -0.625,0.625 0.625,0.625 0 0 0 0.625,0.625 h 0.626953 c 0.422091,-7e-5 0.751953,0.32791 0.751953,0.75 v 11.37109 a 0.625,0.625 0 0 0 0.625,0.625 0.625,0.625 0 0 0 0.624997,-0.625 v -1.35547 h 8.749998 c 1.095,0 1.99494,-0.90304 1.99219,-1.99804 l -0.0117,-5.01953 c -0.003,-1.09501 -0.90499,-1.99414 -2,-1.99414 h -8.730468 v -1.00391 c 0,-1.09772 -0.904231,-2.00019 -2.00195,-2 z m 2.628903,4.25391 h 8.730468 c 0.42057,0 0.74894,0.32747 0.75,0.74804 l 0.0117,5.01953 c 10e-4,0.41835 -0.32385,0.74415 -0.74219,0.74414 h -8.749998 z m 3.246088,1.74609 a 1.4999924,1.4999924 0 0 0 -1.5,1.5 1.4999924,1.4999924 0 0 0 1.5,1.5 1.4999924,1.4999924 0 0 0 1.5,-1.5 1.4999924,1.4999924 0 0 0 -1.5,-1.5 z" /></g></svg>
diff --git a/browser/themes/shared/jar.inc.mn b/browser/themes/shared/jar.inc.mn
index 450bff017b14..731979c9d588 100644
--- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn
@@ -212,6 +212,9 @@
skin/classic/browser/calendar-24.svg (../shared/icons/calendar-24.svg)
skin/classic/browser/canvas.svg (../shared/icons/canvas.svg)
skin/classic/browser/canvas-blocked.svg (../shared/icons/canvas-blocked.svg)
+ skin/classic/browser/webgl.svg (../shared/icons/webgl.svg)
+ skin/classic/browser/webgl-blocked.svg (../shared/icons/webgl-blocked.svg)
+ skin/classic/browser/notification-icons/webgl.svg (../shared/notification-icons/webgl.svg)
skin/classic/browser/characterEncoding.svg (../shared/icons/characterEncoding.svg)
skin/classic/browser/chevron-animation.svg (../shared/icons/chevron-animation.svg)
skin/classic/browser/circle-check-dotted.svg (../shared/icons/circle-check-dotted.svg)
diff --git a/browser/themes/shared/notification-icons.css b/browser/themes/shared/notification-icons.css
index 7d3f1207266e..fbc37db2709e 100644
--- a/browser/themes/shared/notification-icons.css
+++ b/browser/themes/shared/notification-icons.css
@@ -211,6 +211,15 @@
list-style-image: url(chrome://browser/skin/canvas-blocked.svg);
}
+#webgl-notification-icon,
+.webgl-icon {
+ list-style-image: url(chrome://browser/skin/webgl.svg);
+}
+
+.webgl-icon.blocked-permission-icon {
+ list-style-image: url(chrome://browser/skin/webgl-blocked.svg);
+}
+
#webauthn-notification-icon,
.popup-notification-icon[popupid^="webauthn-prompt-"] {
list-style-image: url(chrome://browser/skin/fingerprint.svg);
diff --git a/browser/themes/shared/notification-icons/webgl-blocked.svg b/browser/themes/shared/notification-icons/webgl-blocked.svg
new file mode 100644
index 000000000000..6e18b7cf5401
--- /dev/null
+++ b/browser/themes/shared/notification-icons/webgl-blocked.svg
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ version="1.1"
+ id="svg1"
+ xml:space="preserve"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ fill="context-fill"
+ fill-opacity="context-fill-opacity"><defs
+ id="defs1" /><g
+ id="g30"
+ transform="translate(-95.002999,-238.87424)"><path
+ id="path30"
+ style="stroke-linecap:round;paint-order:stroke fill markers"
+ d="m 95.604562,238.87619 c -0.463094,0.0319 -0.839908,0.6221 -0.419922,1.06446 l 1,1 1.820312,1.82031 v 10.48437 a 0.625,0.625 0 0 0 0.625,0.625 0.625,0.625 0 0 0 0.625,-0.625 v -1.35547 h 7.878908 l 2.80078,2.80079 c 0.24466,0.24372 0.6401,0.24372 0.88477,0 0.24415,-0.24409 0.24415,-0.64068 0,-0.88477 l -2.0625,-2.06445 -1.10157,-1.10157 h -0.002 l -3.72656,-3.72656 v -0.002 l -0.96289,-0.96289 h -0.002 l -1.82031,-1.82031 -1.249999,-1.25 -0.636719,-0.63672 -2.367187,-2.36719 -0.462891,-0.46289 -0.355469,-0.35547 c -0.147451,-0.13999 -0.31048,-0.19033 -0.464843,-0.17969 z m 6.056638,4.00196 1.25,1.25 h 5.07422 c 0.42057,0 0.74894,0.32747 0.75,0.74804 l 0.0117,5.01953 c 5e-5,0.0215 -0.004,0.0416 -0.006,0.0625 l 0.96289,0.96289 c 0.18374,-0.30216 0.29391,-0.65288 0.29297,-1.02929 l -0.0117,-5.01953 c -0.003,-1.09501 -0.90499,-1.99414 -2,-1.99414 z m -2.406248,1.25 h 0.117188 l 2.13867,2.14062 a 1.4999924,1.4999924 0 0 0 -0.50976,1.10547 1.4999924,1.4999924 0 0 0 1.5,1.5 1.4999924,1.4999924 0 0 0 1.11718,-0.5 l 2.26563,2.26562 h -6.628908 z" /></g></svg>
diff --git a/browser/themes/shared/notification-icons/webgl.svg b/browser/themes/shared/notification-icons/webgl.svg
new file mode 100644
index 000000000000..ffbf97c74dc7
--- /dev/null
+++ b/browser/themes/shared/notification-icons/webgl.svg
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ version="1.1"
+ id="svg1"
+ xml:space="preserve"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ fill="context-fill"
+ fill-opacity="context-fill-opacity"><defs
+ id="defs1" /><g
+ id="g27"
+ transform="translate(-95.002767,-238.87424)"><path
+ id="path26"
+ d="m 96.625679,239.87424 a 0.625,0.625 0 0 0 -0.625,0.625 0.625,0.625 0 0 0 0.625,0.625 h 0.626953 c 0.422091,-7e-5 0.751953,0.32791 0.751953,0.75 v 11.37109 a 0.625,0.625 0 0 0 0.625,0.625 0.625,0.625 0 0 0 0.624997,-0.625 v -1.35547 h 8.749998 c 1.095,0 1.99494,-0.90304 1.99219,-1.99804 l -0.0117,-5.01953 c -0.003,-1.09501 -0.90499,-1.99414 -2,-1.99414 h -8.730468 v -1.00391 c 0,-1.09772 -0.904231,-2.00019 -2.00195,-2 z m 2.628903,4.25391 h 8.730468 c 0.42057,0 0.74894,0.32747 0.75,0.74804 l 0.0117,5.01953 c 10e-4,0.41835 -0.32385,0.74415 -0.74219,0.74414 h -8.749998 z m 3.246088,1.74609 a 1.4999924,1.4999924 0 0 0 -1.5,1.5 1.4999924,1.4999924 0 0 0 1.5,1.5 1.4999924,1.4999924 0 0 0 1.5,-1.5 1.4999924,1.4999924 0 0 0 -1.5,-1.5 z" /></g></svg>
diff --git a/dom/canvas/ClientWebGLContext.cpp b/dom/canvas/ClientWebGLContext.cpp
index afed0c39f23a..e9af0b03ffb8 100644
--- a/dom/canvas/ClientWebGLContext.cpp
+++ b/dom/canvas/ClientWebGLContext.cpp
@@ -24,7 +24,9 @@
#include "mozilla/RandomNum.h"
#include "mozilla/ResultVariant.h"
#include "mozilla/ScopeExit.h"
+#include "mozilla/StaticPrefs_librewolf.h"
#include "mozilla/StaticPrefs_webgl.h"
+#include "mozilla/dom/BrowserChild.h"
#include "mozilla/dom/BufferSourceBinding.h"
#include "mozilla/dom/Document.h"
#include "mozilla/dom/GeneratePlaceholderCanvasData.h"
@@ -45,6 +47,8 @@
#include "mozilla/layers/WebRenderUserData.h"
#include "nsContentUtils.h"
#include "nsDisplayList.h"
+#include "nsIPrincipal.h"
+#include "nsIPermissionManager.h"
namespace mozilla {
@@ -862,6 +866,131 @@ void ClientWebGLContext::ResetBitmap() {
Run<RPROC(Resize)>(size); // No-change resize still clears/resets everything.
}
+static uint32_t GetWebGLPermission(nsIPrincipal* aPrincipal) {
+ if (!aPrincipal) {
+ return nsIPermissionManager::UNKNOWN_ACTION;
+ }
+
+ if (IsUnrestrictedPrincipal(aPrincipal)) {
+ return true;
+ }
+
+ nsresult rv;
+ nsCOMPtr<nsIPermissionManager> permissionManager =
+ do_GetService(NS_PERMISSIONMANAGER_CONTRACTID, &rv);
+ NS_ENSURE_SUCCESS(rv, nsIPermissionManager::UNKNOWN_ACTION);
+
+ uint32_t permission;
+ rv = permissionManager->TestPermissionFromPrincipal(
+ aPrincipal, "webgl"_ns, &permission);
+ NS_ENSURE_SUCCESS(rv, nsIPermissionManager::UNKNOWN_ACTION);
+
+ return permission;
+}
+
+static bool IsWebGLAllowed_impl(
+ bool webGLDisabled, JSContext* aCx,
+ nsIPrincipal* aPrincipal,
+ const std::function<void(const nsAutoString&)>& aReportToConsole,
+ const std::function<void(bool)>& aTryPrompt) {
+
+ if(!webGLDisabled) {
+ return true;
+ }
+
+ if (!aCx) {
+ return false;
+ }
+
+ if (IsUnrestrictedPrincipal(aPrincipal)) {
+ return true;
+ }
+
+ Maybe<nsAutoCString> origin = Nothing();
+ auto getOrigin = [&]() {
+ if (origin.isSome()) {
+ return origin->IsEmpty();
+ }
+
+ nsAutoCString originResult;
+ nsresult rv = NS_ERROR_FAILURE;
+ if (aPrincipal) {
+ rv = aPrincipal->GetOrigin(originResult);
+ }
+ origin = NS_SUCCEEDED(rv) ? Some(originResult) : Some(""_ns);
+
+ return NS_SUCCEEDED(rv);
+ };
+
+ uint64_t permission = GetWebGLPermission(aPrincipal);
+ switch (permission) {
+ case nsIPermissionManager::ALLOW_ACTION:
+ return true;
+ case nsIPermissionManager::DENY_ACTION:
+ return false;
+ default:
+ break;
+ }
+
+ bool hidePermissionDoorhanger = StaticPrefs::librewolf_webgl_prompt_hide();
+
+ nsAutoString message;
+ message.AppendPrintf("Blocked %s from creating WebGL context but prompting the user.",
+ getOrigin() ? origin->get() : "unknown");
+ aReportToConsole(message);
+
+ aTryPrompt(hidePermissionDoorhanger);
+
+ return false;
+}
+
+static bool IsWebGLAllowed(dom::Document* aDocument, JSContext* aCx,
+ nsIPrincipal* aPrincipal) {
+ if(NS_WARN_IF(!aDocument)) {
+ return false;
+ }
+
+ bool webGLDisabled = StaticPrefs::librewolf_webgl_prompt();
+
+ if (!webGLDisabled) {
+ return true;
+ }
+
+ auto reportToConsole = [&](const nsAutoString& message) {
+ nsContentUtils::ReportToConsoleNonLocalized(
+ message, nsIScriptError::warningFlag, "Security"_ns, aDocument);
+ };
+
+ auto prompt = [&](bool hidePermissionDoorhanger) {
+ if (!aPrincipal) {
+ return;
+ }
+
+ nsAutoCString origin;
+ nsresult rv = aPrincipal->GetOrigin(origin);
+ if (NS_FAILED(rv)) {
+ return;
+ }
+
+ if (!XRE_IsContentProcess()) {
+ MOZ_ASSERT_UNREACHABLE(
+ "Who's calling this from the parent process without a chrome window "
+ "(it would have been exempt from the RFP targets)?");
+ return;
+ }
+
+ nsPIDOMWindowOuter* win = aDocument->GetWindow();
+ if (RefPtr<dom::BrowserChild> browserChild =
+ dom::BrowserChild::GetFrom(win)) {
+ browserChild->SendShowWebGLPermissionPrompt(origin, hidePermissionDoorhanger);
+ }
+ };
+
+ return IsWebGLAllowed_impl(
+ webGLDisabled, aCx, aPrincipal,
+ reportToConsole, prompt);
+}
+
bool ClientWebGLContext::CreateHostContext(const uvec2& requestedSize) {
const auto pNotLost = MakeRefPtr<webgl::NotLostData>(*this);
auto& notLost = *pNotLost;
@@ -900,6 +1029,17 @@ bool ClientWebGLContext::CreateHostContext(const uvec2& requestedSize) {
.options = options,
};
+ if (mCanvasElement && !StaticPrefs::webgl_disabled()) {
+ if(!IsWebGLAllowed(mCanvasElement->OwnerDoc(),
+ nsContentUtils::GetCurrentJSContext(),
+ mCanvasElement->NodePrincipal())) {
+
+ return Err("WebGL is currently disabled.");
+ }
+ }
+
+
+
// -
ScopedGfxFeatureReporter reporter("IpcWebGL");
diff --git a/dom/ipc/BrowserParent.cpp b/dom/ipc/BrowserParent.cpp
index 4fbe13919101..2473600d45c4 100644
--- a/dom/ipc/BrowserParent.cpp
+++ b/dom/ipc/BrowserParent.cpp
@@ -4229,6 +4229,29 @@ mozilla::ipc::IPCResult BrowserParent::RecvShowCanvasPermissionPrompt(
return IPC_OK();
}
+mozilla::ipc::IPCResult BrowserParent::RecvShowWebGLPermissionPrompt(const nsCString& aOrigin, const bool& aHideDoorHanger) {
+ nsCOMPtr<nsIBrowser> browser =
+ mFrameElement ? mFrameElement->AsBrowser() : nullptr;
+ if (!browser) {
+ // If the tab is being closed, the browser may not be available.
+ // In this case we can ignore the request.
+ return IPC_OK();
+ }
+ nsCOMPtr<nsIObserverService> os = services::GetObserverService();
+ if (!os) {
+ return IPC_FAIL_NO_REASON(this);
+ }
+ nsresult rv = os->NotifyObservers(
+ browser,
+ aHideDoorHanger ? "webgl-permissions-prompt-hide-doorhanger"
+ : "webgl-permissions-prompt",
+ NS_ConvertUTF8toUTF16(aOrigin).get());
+ if (NS_FAILED(rv)) {
+ return IPC_FAIL_NO_REASON(this);
+ }
+ return IPC_OK();
+}
+
mozilla::ipc::IPCResult BrowserParent::RecvVisitURI(
nsIURI* aURI, nsIURI* aLastVisitedURI, const uint32_t& aFlags,
const uint64_t& aBrowserId) {
diff --git a/dom/ipc/BrowserParent.h b/dom/ipc/BrowserParent.h
index f2537eccb928..c74a4e4c1251 100644
--- a/dom/ipc/BrowserParent.h
+++ b/dom/ipc/BrowserParent.h
@@ -757,6 +757,8 @@ class BrowserParent final : public PBrowserParent,
mozilla::ipc::IPCResult RecvShowCanvasPermissionPrompt(
const nsCString& aOrigin, const bool& aHideDoorHanger);
+ mozilla::ipc::IPCResult RecvShowWebGLPermissionPrompt(const nsCString& aOrigin, const bool& aHideDoorHanger);
+
mozilla::ipc::IPCResult RecvSetSystemFont(const nsCString& aFontName);
mozilla::ipc::IPCResult RecvGetSystemFont(nsCString* aFontName);
diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl
index 2be0054f75be..ee483b2fa6ce 100644
--- a/dom/ipc/PBrowser.ipdl
+++ b/dom/ipc/PBrowser.ipdl
@@ -650,6 +650,14 @@ parent:
*/
async ShowCanvasPermissionPrompt(nsCString aOrigin,
bool aHideDoorHanger);
+ /**
+ * This function is used to notify the parent that it should display a
+ * WebGL permission prompt.
+ *
+ * @param aOrigin origin string of the document that is requesting access.
+ */
+ async ShowWebGLPermissionPrompt(nsCString aOrigin,
+ bool aHideDoorHanger);
sync SetSystemFont(nsCString aFontName);
sync GetSystemFont() returns (nsCString retval);
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
index d073433aa9b5..27fc0906de46 100644
--- a/modules/libpref/init/StaticPrefList.yaml
+++ b/modules/libpref/init/StaticPrefList.yaml
@@ -11976,6 +11976,20 @@
value: true
mirror: always
+#---------------------------------------------------------------------------
+# Prefs starting with "librewolf."
+#---------------------------------------------------------------------------
+
+- name: librewolf.webgl.prompt
+ type: RelaxedAtomicBool
+ value: true
+ mirror: always
+
+- name: librewolf.webgl.prompt.hide
+ type: RelaxedAtomicBool
+ value: true
+ mirror: always
+
#---------------------------------------------------------------------------
# Prefs starting with "logging."
#---------------------------------------------------------------------------
diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build
index 2c8b218c618f..16805711b4e2 100644
--- a/modules/libpref/moz.build
+++ b/modules/libpref/moz.build
@@ -56,6 +56,7 @@ pref_groups = [
"javascript",
"layers",
"layout",
+ "librewolf",
"logging",
"mathml",
"media",
--
2.47.3
@@ -1,66 +0,0 @@
From f260cad296fb06a2be6b1816bb03f1015b9f8f14 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:12:58 +0100
Subject: [PATCH 51/52] windows-theming-bug.patch
---
browser/app/librewolf.exe.manifest | 47 ++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
create mode 100644 browser/app/librewolf.exe.manifest
diff --git a/browser/app/librewolf.exe.manifest b/browser/app/librewolf.exe.manifest
new file mode 100644
index 000000000000..cad0ac6b6a87
--- /dev/null
+++ b/browser/app/librewolf.exe.manifest
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity
+ version="1.0.0.0"
+ processorArchitecture="*"
+ name="LibreWolf"
+ type="win32"
+/>
+<description>LibreWolf</description>
+<dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ processorArchitecture="*"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ />
+ </dependentAssembly>
+</dependency>
+<dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="mozglue"
+ version="1.0.0.0"
+ language="*"
+ />
+ </dependentAssembly>
+</dependency>
+<ms_asmv3:trustInfo xmlns:ms_asmv3="urn:schemas-microsoft-com:asm.v3">
+ <ms_asmv3:security>
+ <ms_asmv3:requestedPrivileges>
+ <ms_asmv3:requestedExecutionLevel level="asInvoker" uiAccess="false" />
+ </ms_asmv3:requestedPrivileges>
+ </ms_asmv3:security>
+</ms_asmv3:trustInfo>
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+ </application>
+ </compatibility>
+</assembly>
--
2.47.3
@@ -1,107 +0,0 @@
From 8c23ea05790f53956fa4c0d8d13c5f1f1080ead6 Mon Sep 17 00:00:00 2001
From: LibreWolf Developers <noreply@librewolf.net>
Date: Sun, 6 Sep 2026 10:13:02 +0100
Subject: [PATCH 52/52] xdg-dir.patch
---
toolkit/xre/nsXREDirProvider.cpp | 47 ++++++++++++--------------------
1 file changed, 18 insertions(+), 29 deletions(-)
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
index 004c767956f2..902b5c81092b 100644
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -1341,7 +1341,8 @@ nsresult nsXREDirProvider::AppendFromAppData(nsIFile* aFile, bool aIsDotted) {
// Similar to nsXREDirProvider::AppendProfilePath.
// TODO: Bug 1990407 - Evaluate if refactoring might be required there in the
// future?
- if (gAppData->profile) {
+ // Use aIsDotted for a different purpose here, will probably break in the future
+ if (gAppData->profile && aIsDotted) {
nsAutoCString profile;
# if defined(MOZ_THUNDERBIRD)
if (gAppData->profile[0] != '.') {
@@ -1349,6 +1350,7 @@ nsresult nsXREDirProvider::AppendFromAppData(nsIFile* aFile, bool aIsDotted) {
}
# endif
profile.Append(gAppData->profile);
+ profile = "."_ns + nsDependentCString(gAppData->profile);
MOZ_TRY(aFile->AppendRelativeNativePath(profile));
} else {
nsAutoCString vendor;
@@ -1358,8 +1360,6 @@ nsresult nsXREDirProvider::AppendFromAppData(nsIFile* aFile, bool aIsDotted) {
ToLowerCase(vendor);
ToLowerCase(appName);
- MOZ_TRY(aFile->AppendRelativeNativePath(aIsDotted ? ("."_ns + vendor)
- : vendor));
MOZ_TRY(aFile->AppendRelativeNativePath(appName));
}
@@ -1396,6 +1396,14 @@ bool nsXREDirProvider::LegacyHomeExists(nsIFile** aFile) {
rv = localDir->Exists(&exists);
NS_ENSURE_SUCCESS(rv, false);
+ if (exists) {
+ rv = localDir->AppendNative("profiles.ini"_ns);
+ NS_ENSURE_SUCCESS(rv, false);
+
+ rv = localDir->Exists(&exists);
+ NS_ENSURE_SUCCESS(rv, false);
+ }
+
// Give a chance to (3)
if (!exists) {
nsCOMPtr<nsIFile> userDir;
@@ -1526,41 +1534,22 @@ nsresult nsXREDirProvider::GetLegacyOrXDGHomePath(const char* aHomeDir,
return NS_OK;
}
- // If the build was made against a specific profile name, MOZ_APP_PROFILE=
- // then make sure we respect this and dont move to XDG directory
- //
- // Only do this on Firefox.
- //
- // For Thunderbird, it always defines MOZ_APP_PROFILE=thunderbird. Hence,
- // check if the gAppData->profile value is set to something else, indicating
- // of a specific build where legacy needs to be forced, similar to the
- // Firefox handling. Both casing are verified to account for systems where
- // that matters.
- if (gAppData->profile
-# if defined(MOZ_THUNDERBIRD)
- && strcmp(gAppData->profile, "thunderbird") != 0 &&
- strcmp(gAppData->profile, "Thunderbird") != 0
-# endif
- ) {
- MOZ_TRY(NS_NewNativeLocalFile(nsDependentCString(aHomeDir),
- getter_AddRefs(localDir)));
- } else {
- MOZ_TRY(GetLegacyOrXDGConfigHome(aHomeDir, getter_AddRefs(localDir)));
- MOZ_TRY(localDir->Clone(getter_AddRefs(parentDir)));
- }
+ // Since we set gAppData->profile and don't want to force legacy behaviour
+ MOZ_TRY(GetLegacyOrXDGConfigHome(aHomeDir, getter_AddRefs(localDir)));
+ MOZ_TRY(localDir->Clone(getter_AddRefs(parentDir)));
MOZ_TRY(AppendFromAppData(localDir, false));
}
+ // The profile root directory needs to exists at that point.
+ MOZ_TRY(EnsureDirectoryExists(localDir));
+
// If required return the parent directory that matches the profile root
// directory.
if (aFile) {
- parentDir.forget(aFile);
+ localDir.forget(aFile);
}
- // The profile root directory needs to exists at that point.
- MOZ_TRY(EnsureDirectoryExists(localDir));
-
return NS_OK;
}
#endif // defined(MOZ_WIDGET_GTK)
--
2.47.3
-4
View File
@@ -1,4 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-or-later
tree="default"
rev="fb95137a04eb8fe1196cb12f26b100c1e060295c" # FIREFOX_155_0_1_RELEASE
@@ -1,39 +0,0 @@
ac_add_options --enable-application=browser
ac_add_options --disable-crashreporter
ac_add_options --disable-debug
ac_add_options --disable-default-browser-agent
ac_add_options --disable-tests
ac_add_options --disable-updater
ac_add_options --disable-cargo-incremental
ac_add_options --enable-hardening
ac_add_options --enable-stl-hardening
ac_add_options --enable-optimize
ac_add_options --enable-release
ac_add_options --enable-rust-simd
# allow replacing malloc manually, will not affect regular systems
# not compatible with ac_add_options --disable-jemalloc, which only works when preloading custom malloc
ac_add_options --enable-replace-malloc
ac_add_options --enable-jemalloc
ac_add_options --with-app-name=librewolf
ac_add_options --with-branding=browser/branding/librewolf
ac_add_options --with-l10n-base=$PWD/lw/l10n
export MOZ_TELEMETRY_REPORTING=
export MOZ_REQUIRE_SIGNING=
export MOZILLA_OFFICIAL=1
export MOZ_APP_REMOTINGNAME=LibreWolf
mk_add_options MOZ_CRASHREPORTER=0
mk_add_options MOZ_DATA_REPORTING=0
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
mk_add_options MOZ_TELEMETRY_REPORTING=0
export CFLAGS="-ftrivial-auto-var-init=zero -fwrapv -Wno-backend-plugin $CFLAGS"
export CXXFLAGS="-ftrivial-auto-var-init=zero -fwrapv -Wno-backend-plugin $CXXFLAGS"
#export LDFLAGS=
# Add your own stuff, libraries, architecture, etc..
# ex: `cat mozconfig.orig mozconfig.my > mozconfig`
@@ -1,3 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-or-later
tree="default"
@@ -1,52 +0,0 @@
# Application and Branding
ac_add_options --enable-application=browser
ac_add_options --with-app-name=librewolf
ac_add_options --with-branding=browser/branding/librewolf
ac_add_options --with-l10n-base=$PWD/lw/l10n
# Performance Optimizations
ac_add_options --enable-release
ac_add_options --enable-optimize
ac_add_options --enable-lto=full
ac_add_options --enable-rust-simd
ac_add_options --enable-wasm-avx
ac_add_options --enable-jemalloc
ac_add_options --linker=lld
ac_add_options MOZ_PGO=1
# Build Hardening & Size
ac_add_options --enable-hardening
ac_add_options --enable-stl-hardening
ac_add_options --enable-sandbox
ac_add_options --enable-jxl
ac_add_options --enable-bootstrap
ac_add_options --enable-strip
ac_add_options --enable-install-strip
# Disable Debugging & Tests
ac_add_options --disable-debug
ac_add_options --disable-debug-symbols
ac_add_options --disable-debug-js-modules
ac_add_options --disable-tests
# Disable Unwanted Features
ac_add_options --disable-cargo-incremental
ac_add_options --disable-default-browser-agent
ac_add_options --disable-updater
ac_add_options --disable-crashreporter
ac_add_options --disable-parental-controls
# Environment Flags (CPU-specific optimization)
export CFLAGS="-O3 -march=native -mtune=native"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="-Wl,--no-keep-memory"
# Disable Telemetry
export MOZ_TELEMETRY_REPORTING=
export MOZ_REQUIRE_SIGNING=
export MOZILLA_OFFICIAL=1
export MOZ_APP_REMOTINGNAME=LibreWolfHellFire
mk_add_options MOZ_CRASHREPORTER=0
mk_add_options MOZ_DATA_REPORTING=0
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
mk_add_options MOZ_TELEMETRY_REPORTING=0
@@ -1,3 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-or-later
tree="default"
-5
View File
@@ -1,5 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-or-later
rev="HEAD"
url="https://github.com/mozilla-firefox/firefox"
bkup_url="https://github.com/mozilla-firefox/firefox"
Symlink
+1
View File
@@ -0,0 +1 @@
lbmk
Executable
+122
View File
@@ -0,0 +1,122 @@
#!/usr/bin/env sh
# SPDX-FileCopyrightText: 2022 Caleb La Grange <thonkpeasant@protonmail.com>
# SPDX-FileCopyrightText: 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
# SPDX-FileCopyrightText: 2023 Leah Rowe <leah@libreboot.org>
# SPDX-License-Identifier: GPL-3.0-only
name=""
revision=""
location=""
url=""
bkup_url=""
tmp_dir=""
main()
{
if [ -z "${1+x}" ]; then
err 'Error: name not set'
fi
name=${1}
read_config
verify_config
clone_project
# clean in case of failure
rm -rf ${tmp_dir} >/dev/null 2>&1 || exit 1
}
read_config()
{
awkstr=" /\{.*${name}.*}{/ {flag=1;next} /\}/{flag=0} flag { print }"
while read -r line ; do
set ${line} >/dev/null 2>&1
case ${line} in
rev:*)
revision=${2}
;;
loc:*)
location=${2}
;;
url:*)
url=${2}
;;
bkup_url:*)
bkup_url=${2}
;;
esac
done << EOF
$(eval "awk '${awkstr}' resources/git/revisions")
EOF
}
verify_config()
{
if [ -z "${revision+x}" ]; then
err 'Error: revision not set'
elif [ -z "${location+x}" ]; then
err 'Error: location not set'
elif [ -z "${url+x}" ]; then
err 'Error: url not set'
fi
}
clone_project()
{
tmp_dir=$(mktemp -dt "${name}_XXXXX")
git clone ${url} ${tmp_dir} || git clone ${bkup_url} ${tmp_dir} \
|| err "ERROR: could not download ${name}"
(
cd ${tmp_dir} || exit 1
git reset --hard ${revision} || err "Cannot reset revision"
)
patch_project
if [ -d "${location}" ]; then
rm -Rf ${location} || exit 1
fi
mv ${tmp_dir} ${location} && return 0
printf "ERROR: Could not copy temp file to destination.\n"
err " ${tmp_dir} > ${location} check permissions"
}
patch_project()
{
patchdir="resources/${name}/patches"
for patchfile in ${PWD}/${patchdir}/*.patch ; do
if [ ! -f "${patchfile}" ]; then
continue
fi
(
cd ${tmp_dir} || exit 1
git am ${patchfile} || err "Cannot patch project: $name"
)
done
}
usage()
{
cat <<- EOF
Usage: ./gitclone [name]
Options:
name: Module name as specified in resources/git/revisions
EOF
}
err()
{
printf "${@}\n"
usage
exit 1
}
main $@
-446
View File
@@ -1,446 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (c) 2020-2021,2023-2026 Leah Rowe <leah@libreboot.org>
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
url=""
bkup_url=""
depend=""
loc=""
subcurl=""
subcurl_bkup=""
subgit=""
subgit_bkup=""
subhash=""
tmpgit="$xbtmp/gitclone"
tmpgitcache="$xbtmp/tmpgit"
fetch_targets()
{
if [ -d "src/$project/$tree" ]; then
return 0
fi
git_prep "$url" "$bkup_url" "$xbmkpwd/$configdir/$tree/patches" \
"src/$project/$tree" "submod"
}
fetch_project()
{
. "config/git/$project/pkg.cfg" || \
err "Can't read config 'config/git/$project/pkg.cfg'" \
"fetch_project" "@"
if [ -z "$url" ] || \
[ -z "$bkup_url" ]; then
err "url/bkup_url not both set 'config/git/$project/pkg.cfg'" \
"fetch_project" "$@"
fi
if [ -n "$depend" ]; then
for d in $depend ; do
x_ ./mk -f $d
done
fi
clone_project
}
clone_project()
{
if ! singletree "$project"; then
return 0
fi
loc="src/$project"
if [ -d "$loc" ]; then
return 0
fi
remkdir "${tmpgit%/*}"
git_prep "$url" "$bkup_url" "$xbmkpwd/config/$project/patches" "$loc"
}
git_prep()
{
printf "Creating code directory, src/%s/%s\n" "$project" "$tree"
_patchdir="$3"
_loc="$4" # $1 and $2 are gitrepo and gitrepo_backup
if [ -z "$rev" ]; then
err "$project/$tree: rev not set" "git_prep" "$@"
fi
xbget git "$1" "$2" "$tmpgit" "$rev" "$_patchdir"
if singletree "$project" || \
[ $# -gt 4 ]; then
dx_ fetch_submodule "$mdir/module.list"
fi
if [ "$_loc" != "${_loc%/*}" ]; then
x_ xbmkdir "${_loc%/*}"
fi
x_ mv "$tmpgit" "$_loc"
}
fetch_submodule()
{
mcfgdir="$mdir/${1##*/}"
st=""
subcurl=""
subcurl_bkup=""
subgit=""
subgit_bkup=""
subhash=""
if e "$mcfgdir/module.cfg" f missing; then
return 0
fi
. "$mcfgdir/module.cfg" || \
err "Can't read '$mcfgdir/module.cfg'" "fetch_submodules" "$@"
if [ -n "$subgit" ] || \
[ -n "$subgit_bkup" ]; then
st="$st git"
fi
if [ -n "$subcurl" ] || \
[ -n "$subcurl_bkup" ]; then
st="$st curl"
fi
st="${st# }"
if [ "$st" = "git curl" ]; then
err "$mdir: git+curl defined" "fetch_submodule" "$@"
fi
if [ -z "$st" ]; then
return 0
fi
if [ "$st" = "curl" ]; then
if [ -z "$subcurl" ] || [ -z "$subcurl_bkup" ]; then
err "subcurl/subcurl_bkup not both set" \
"fetch_submodule" "$@"
fi
elif [ -z "$subgit" ] || \
[ -z "$subgit_bkup" ]; then
err "subgit/subgit_bkup not both set" "fetch_submodule" "$@"
elif [ -z "$subhash" ]; then
err "subhash not set" "fetch_submodule" "$@"
fi
if [ "$st" = "git" ]; then
x_ rm -Rf "$tmpgit/$1"
xbget "$st" "$subgit" "$subgit_bkup" "$tmpgit/$1" \
"$subhash" "$mdir/${1##*/}/patches"
else
xbget "$st" "$subcurl" "$subcurl_bkup" "$tmpgit/$1" \
"$subhash" "$mdir/${1##*/}/patches"
fi
}
# TODO: in the following functions, argument numbers are used
# which is hard to understand. the code should be modified
# so that variable names are used instead, for easy reading
xbget()
{
if [ "$1" != "curl" ] && \
[ "$1" != "copy" ] && \
[ "$1" != "git" ]; then
err "Bad dlop (arg 1)" "xbget" "$@"
fi
for url in "$2" "$3"; do
if [ -z "$url" ]; then
err "empty URL given in" "xbget" "$@"
elif ! try_fetch "$url" "$@"; then
continue
fi
case "$1" in
git)
if [ ! -d "$4" ]; then
continue
fi
;;
*)
if [ ! -f "$4" ]; then
continue
fi
;;
esac
return 0 # successful download/copy
done
err "failed to download file/repository" "xbget" "$@"; :
}
try_fetch()
{
if [ "$2" = "git" ]; then
if ! try_fetch_git "$@"; then
return 1
fi
else
if ! try_fetch_file "$@"; then
return 1
fi
fi
}
try_fetch_git()
{
# 1st argument $1 is the current git remote being tried,
# let's say it was https://foo.example.com/repo, then cached
# directories becomes cache/mirror/foo.example.com/repo
if [ "$XBMK_CACHE_MIRROR" = "y" ]; then
cached="mirror"
else
cached="clone"
fi
cached="$cached/${1#*://}"
cached="$XBMK_CACHE/$cached"
x_ xbmkdir "${5%/*}" "${cached%/*}"
if ! try_$2 "$cached" "$@"; then
return 1
elif [ ! -d "$cached" ]; then
return 1
fi
if [ ! -d "$5" ]; then
tmpclone "$cached" "$5" "$6" "$7" || \
err "Can't clone final repo" "try_fetch" "$@"; :
fi
if [ ! -d "$5" ]; then
return 1
fi
}
try_fetch_file()
{
cached="file/$6"
cached="$XBMK_CACHE/$cached"
x_ xbmkdir "${5%/*}" "${cached%/*}"
if bad_checksum "$6" "$cached" 2>/dev/null; then
x_ rm -f "$cached"
fi
if [ ! -f "$cached" ]; then
if ! try_$2 "$cached" "$@"; then
return 1
fi
fi
if [ -f "$5" ]; then
if bad_checksum "$6" "$5" 2>/dev/null; then
x_ cp "$cached" "$5"
fi
fi
if [ ! -f "$cached" ]; then
return 1
elif bad_checksum "$6" "$cached"; then
x_ rm -f "$cached"
return 1
fi
if [ "$cached" != "$5" ]; then
x_ cp "$cached" "$5"
fi
if bad_checksum "$6" "$5"; then
x_ rm -f "$5"
return 1
elif [ ! -f "$5" ]; then
return 1
fi
}
try_curl()
{
ua="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
case "$2" in
https://www.supermicro.com/*)
ua="curl/8.6.0"
;;
*)
:
;;
esac
( x_ curl --location --retry 3 -A "$ua" "$2" -o "$1" ) \
|| ( x_ wget --tries 3 -U "$ua" "$2" -O "$1" ) \
|| return 1; :
}
try_copy()
{
( x_ cp "$2" "$1" ) || return 1; :
}
try_git()
{
gitdest="`findpath "$1" || err "Can't get findpath for '$1'"`" || \
err "failed findpath for '$1'" try_get "$@"
x_ rm -Rf "$tmpgitcache"
if [ ! -d "$gitdest" ]; then
if [ "$XBMK_CACHE_MIRROR" = "y" ]; then
( x_ git clone --mirror "$2" "$tmpgitcache" ) || \
return 1
else
( x_ git clone "$2" "$tmpgitcache" ) || return 1
fi
x_ xbmkdir "${gitdest%/*}"
x_ mv "$tmpgitcache" "$gitdest"
fi
if git -C "$gitdest" show "$7" 1>/dev/null 2>/dev/null && \
[ "$forcepull" != "y" ]; then
# don't try to pull the latest changes if the given target
# revision already exists locally. this saves a lot of time
# during release builds, and reduces the chance that we will
# interact with grub.git or gnulib.git overall during runtime
return 0
fi
if [ "$XBMK_CACHE_MIRROR" = "y" ]; then
( x_ git -C "$gitdest" fetch ) || :; :
( x_ git -C "$gitdest" update-server-info ) || :; :
else
( x_ git -C "$gitdest" pull --all ) || :; :
fi
}
bad_checksum()
{
if e "$2" f missing; then
return 0
fi
build_sbase
csum="$(x_ "$sha512sum" "$2" | awk '{print $1}')" || \
err "!sha512 '$2' $1" bad_checksum "$@"
if [ "$csum" = "$1" ]; then
return 1
else
x_ rm -f "$2"
printf "BAD SHA512 %s, '%s'; need %s\n" "$csum" "$2" "$1" 1>&2
fi
}
tmpclone()
{
( x_ git clone "$1" "$2" ) || return 1
( x_ git -C "$2" reset --hard "$3" ) || return 1
if [ ! -d "$4" ]; then
return 0
fi
tmpclone_patchlist="`mktemp || err "Can't create tmp patch list"`" || \
err "Can't create tmp patch list" "tmpclone" "$@"
x_ find "$4" -type f | sort > "$tmpclone_patchlist" || \
err "Can't write patch names to '$tmpclone_patchlist'" \
"tmpclone" "$@"
while read -r tmpclone_patch; do
( x_ git -C "$2" am --keep-cr "$tmpclone_patch" ) || \
err "Can't apply '$tmpclone_patch'" "tmpclone" "$@"; :
done < "$tmpclone_patchlist" || \
err "Can't read '$tmpclone_patchlist'" "tmpclone" "$@"
x_ rm -f "$tmpclone_patchlist"
}
-619
View File
@@ -1,619 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-only
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
# Copyright (c) 2020-2025 Leah Rowe <leah@libreboot.org>
# Copyright (c) 2025 Alper Nebi Yasak <alpernebiyasak@gmail.com>
export LANG=C.UTF-8
export LC_COLLATE=C.UTF-8
export LC_ALL=C.UTF-8
projectname="libreboot"
projectsite="https://libreboot.org/"
# TODO: consider just erroring here instead of hardcoding a default
if [ -z "${PATH+x}" ]; then
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
fi
sha512sum="util/sbase/sha512sum"
aur_notice=""
basetmp=""
board=""
checkvarschk=""
checkvarsxbmk=""
configdir=""
datadir=""
is_child=""
python=""
pyver=""
reinstall=""
relname=""
version=""
versiondate=""
xbmklock=""
xbmkpath=""
xbmkpwd=""
xbmkpwd=""
xbtmp=""
xbmk_init()
{
xbmkpwd="`pwd || err "Cannot generate PWD"`" || err "!" xbmk_init "$@"
xbmklock="$xbmkpwd/lock"
basetmp="$xbmkpwd/xbmkwd"
sha512sum="$xbmkpwd/util/sbase/sha512sum"
if [ $# -gt 0 ] && [ "$1" = "dependencies" ]; then
x_ xbmkpkg "$@"
exit 0
fi
id -u 1>/dev/null 2>/dev/null || \
err "suid check failed" "xbmk_init" "$@"
if [ "$(id -u)" = "0" ]; then
err "this command as root is not permitted" "xbmk_init" "$@"
fi
export PWD="$xbmkpwd"
x_ xbmkdir "$basetmp"
if [ ! -e "cache" ]; then
x_ xbmkdir "cache"
fi
for init_cmd in get_version set_env set_threads git_init child_exec; do
if ! xbmk_$init_cmd "$@"; then
break
fi
done
}
xbmkpkg()
{
xchk xbmkpkg "$@"
if [ $# -gt 2 ]; then
reinstall="$3"
fi
. "config/dependencies/$2" || \
err "Can't read 'config/dependencies/$2'" "xbmkpkg" "$@"
if [ -z "$pkg_add" ] || \
[ -z "$pkglist" ]; then
err "pkg_add/pkglist not both set" "xbmkpkg" "$@"
fi
if [ "$2" == "gentoo" ]; then
if [ -z "$pkg_use" ] || \
[ -z "$pkg_use_file" ]; then
err "pkg_use/pkg_use_file not both set" "xbmkpkg" "$@"
fi
printf "Updating package use...\n"
printf "Writing into %s" "$pkg_use_file..."
if [ ! -d "`dirname $pkg_use_file`" ]; then
x_ mkdir -p "`dirname $pkg_use_file`"
fi
printf "%s\n" "$pkg_use" >> "$pkg_use_file"
fi
x_ $pkg_add $pkglist
if [ -n "$aur_notice" ]; then
printf "You need AUR packages: %s\n" "$aur_notice" 1>&2
fi
}
xbmk_get_version()
{
if [ -f ".version" ]; then
read -r version < ".version" || \
err "can't read version file" "xbmk_get_version" "$@"
fi
if [ -f ".versiondate" ]; then
read -r versiondate < ".versiondate" || \
err "can't read versiondate" xbmk_get_version "$@"
fi
if [ -f ".version" ] && \
[ -z "$version" ]; then
err "version not set" "xbmk_get_version" "$@"
fi
if [ -f ".versiondate" ] && \
[ -z "$versiondate" ]; then
err "versiondate not set" "xbmk_get_version" "$@"
fi
if [ ! -e ".git" ] && \
[ ! -f ".version" ]; then
version="unknown"
fi
if [ ! -e ".git" ] && \
[ ! -f ".versiondate" ]; then
versiondate="1716415872"
fi
xbmk_sanitize_version
if [ -n "$version" ]; then
relname="$projectname-$version"
fi
}
# a parent instance will cause this function to return 0.
# a child instance will return 1, skipping further initialisation
# after this function is called.
xbmk_set_env()
{
is_child="n"
xbmkpath="$PATH"
# unify all temporary files/directories in a single TMPDIR
if [ -n "${TMPDIR+x}" ] && \
[ "${TMPDIR%_*}" != "$basetmp/xbmk" ]; then
unset TMPDIR
fi
if [ -n "${TMPDIR+x}" ]; then
export TMPDIR="$TMPDIR"
xbtmp="$TMPDIR"
fi
if [ -n "${TMPDIR+x}" ]; then
is_child="y"
fi
if [ "$is_child" = "y" ]; then
# child instance of xbmk, so we stop init after this point
# and execute the given user command upon return:
xbmk_child_set_env
return 1
else
# parent instance of xbmk, so we continue initialising.
# a parent instance of xbmk never processes its own
# command directly; instead, it calls a child instance
# of xbmk, and exits with the corresponding return status.
xbmk_parent_set_env
return 0
fi
}
xbmk_child_set_env()
{
xbmk_child_set_tmp
if [ -z "${XBMK_CACHE+x}" ]; then
err "XBMK_CACHE unset on child" "xbmk_set_env" "$@"
fi
if [ -z "${XBMK_THREADS+x}" ]; then
xbmk_set_threads; :
fi
if [ -z "${XBMK_CACHE_MIRROR+x}" ]; then
xbmk_set_mirror
fi
}
xbmk_child_set_tmp()
{
badtmp=""
locktmp=""
xbtmpchk=""
xbtmpchk="`findpath "$TMPDIR" || err "!findpath $TMPDIR"`" || \
err "!findpath '$TMPDIR'" "xbmk_child_set_tmp" "$@"
read -r locktmp < "$xbmklock" || \
err "can't read '$xbmklock'" "xbmk_child_set_tmp" "$@"
if [ "$locktmp" != "$xbtmpchk" ]; then
badtmp="TMPDIR '$xbtmpchk' changed; was '$locktmp'"
printf "bad TMPDIR init, '%s': %s\n" "$TMPDIR" "$badtmp" 1>&2
err "'$xbmklock' present with bad tmpdir. is a build running?"
fi
xbtmp="$xbtmpchk"
export TMPDIR="$xbtmpchk"
}
xbmk_parent_set_env()
{
xbmk_parent_check_tmp
printf "%s\n" "$xbtmp" > "$xbmklock" || \
err "cannot create '$xbmklock'" xbmk_set_env "$@"; :
# not really critical for security, but it's a barrier
# against the user to make them think twice before deleting it
# in case an actual instance of xbmk is already running:
x_ chmod -w "$xbmklock"
xbmk_parent_set_export
xbmk_set_version
remkdir "$xbtmp" "$xbtmp/gnupath" "$xbtmp/xbmkpath"
xbmk_set_pyver
xbmk_set_mirror
}
xbmk_parent_check_tmp()
{
export TMPDIR="$basetmp"
xbmklist="`mktemp || err "can't make tmplist"`" || \
err "can't make tmplist" xbmk_parent_check_tmp "$@"
x_ rm -f "$xbmklist"
x_ touch "$xbmklist"
for xtmpdir in "$basetmp"/xbmk_*; do
if [ -e "$xtmpdir" ]; then
printf "%s\n" "$xtmpdir" >> "$xbmklist" || \
err "can't write '$xtmpdir' to '$xbmklist'" \
"xbmk_parent_check_tmp" "$@"; :
fi
done
# set up a unified temporary directory, for common deletion later:
export TMPDIR="`x_ mktemp -d -t xbmk_XXXXXXXX`" || \
err "can't export TMPDIR" "xbmk_parent_check_tmp" "$@"
xbtmp="$TMPDIR"
while read -r xtmpdir; do
if [ "$xtmpdir" = "$xbtmp" ]; then
err "pre-existing '$xbtmp'" "xbmk_parent_check_tmp" "$@"
fi
done < "$xbmklist" || \
err "Can't read xbmklist: '$xbmklist'" "xbmk_parent_check_tmp" "$@"
x_ rm -f "$xbmklist"
}
xbmk_parent_set_export()
{
export XBMK_CACHE="$xbmkpwd/cache"
if [ -e "$XBMK_CACHE" ] && \
[ ! -d "$XBMK_CACHE" ]; then
err "cachedir '$XBMK_CACHE' is a file" \
"xbmk_parent_set_export" "$@"
fi
export PATH="$xbtmp/xbmkpath:$xbtmp/gnupath:$PATH"
xbmkpath="$PATH"
# if "y": a target won't be built if target.cfg says release=n
# (this is used to exclude certain build targets from releases)
if [ -z "${XBMK_RELEASE+x}" ]; then
export XBMK_RELEASE="n"
fi
if [ "$XBMK_RELEASE" = "Y" ]; then
export XBMK_RELEASE="y"
fi
if [ "$XBMK_RELEASE" != "y" ]; then
export XBMK_RELEASE="n"
fi
}
xbmk_set_threads()
{
if [ -z "${XBMK_THREADS+x}" ]; then
export XBMK_THREADS=1
fi
if ! expr "X$XBMK_THREADS" : "X-\{0,1\}[0123456789][0123456789]*$" \
1>/dev/null 2>/dev/null; then
export XBMK_THREADS=1
fi
}
xbmk_set_version()
{
version_="$version"
if [ -e ".git" ]; then
version="$(git describe --tags HEAD 2>&1)" || \
version="git-$(git rev-parse HEAD 2>&1)" || \
version="$version_"
fi
versiondate_="$versiondate"
if [ -e ".git" ]; then
versiondate="$(git show --no-patch --no-notes \
--pretty='%ct' HEAD)" || versiondate="$versiondate_"
fi
if [ -z "$version" ] || \
[ -z "$versiondate" ]; then
err "version and/or versiondate unset" "xbmk_set_version" "$@"
fi
update_xbmkver "."
relname="$projectname-$version"
export LOCALVERSION="-$projectname-${version%%-*}"
}
xbmk_set_pyver()
{
pyver="2"
python="python3"
pyv="import sys; print(sys.version_info[:])"
if ! pybin python3 1>/dev/null; then
python="python"
fi
if [ "$python" = "python3" ]; then
pyver="3"
fi
if ! pybin "$python" 1>/dev/null; then
pyver=""
fi
if [ -n "$pyver" ]; then
"`x_ pybin "$python"`" -c "$pyv" 1>/dev/null \
2>/dev/null || \
err "Can't detect Python version." "xbmk_set_pyver" "$@"
fi
if [ -n "$pyver" ]; then
pyver="$("$(pybin "$python")" -c "$pyv" | awk '{print $1}')"
pyver="${pyver#(}"
pyver="${pyver%,}"
fi
if [ "${pyver%%.*}" != "3" ]; then
err "Bad python version (must by 3.x)" "xbmk_set_pyver" "$@"
fi
# set up python in PATH (environmental variable):
(
x_ cd "$xbtmp/xbmkpath"
x_ ln -s "`x_ pybin "$python"`" python || \
err "can't make symlink" "xbmk_set_pyver" "$@"
) || \
err "Can't link Python in $xbtmp/xbmkpath" "xbmk_set_pyver" "$@"; :
}
# Use direct path, to prevent a hang if Python is using a virtual environment,
# not command -v, to prevent a hang when checking python's version
# See: https://docs.python.org/3/library/venv.html#how-venvs-work
pybin()
{
py="import sys; quit(1) if sys.prefix == sys.base_prefix else quit(0)"
venv=1
if ! command -v "$1" 1>/dev/null 2>/dev/null; then
venv=0
fi
if [ $venv -gt 0 ]; then
if ! "$1" -c "$py" 1>/dev/null 2>/dev/null; then
venv=0
fi
fi
# ideally, don't rely on PATH or hardcoded paths if python venv.
# use the *real*, direct executable linked to by the venv symlink:
if [ $venv -gt 0 ] && \
[ -L "`command -v "$1" 2>/dev/null`" ]; then
pypath="$(findpath \
"$(command -v "$1" 2>/dev/null)" 2>/dev/null || :)"
if [ -e "$pypath" ] && \
[ ! -d "$pypath" ] && \
[ -x "$pypath" ]; then
printf "%s\n" "$pypath"
return 0
fi
fi
# if python venv: fall back to common PATH directories for checking:
[ $venv -gt 0 ] && for pypath in "/usr/local/bin" "/usr/bin"; do
if [ -e "$pypath/$1" ] && \
! -d "$pypath/$1" ] && \
[ -x "$pypath/$1" ]; then
printf "%s/%s\n" "$pypath" "$1"
return 0
fi
done && return 1
# Defer to normal command -v if not a venv:
if ! command -v "$1" 2>/dev/null; then
return 1
fi
}
xbmk_set_mirror()
{
# defines whether cache/clone/ (regular clones)
# or cache/mirror (--mirror clones) are used, per project
# to use cache/mirror/ do: export XBMK_CACHE_MIRROR="y"
# mirror/ stores a separate directory per repository, even per backup.
# it's slower, and uses more disk space, and some upstreams might not
# appreciate it, so it should only be used for development or archival
# NOTE: unlike the lbmk design, which defaults to "n", the lwmk
# design defaults to "y". This is due to the sheer size of the firefox
# repository, and the complications caused by build artifacts in
# its build system. We want to make sure that we always have a reliable
# cache of the repository, so we default to mirror mode unless
# configured otherwise by the user.
# the lbmk design defaults to "n" because the coreboot repository
# contains every pull request as a new branch, so the decision was
# made accordingly there (to further reduce the risk of overly
# burdening them, that build system also defaults to a github
# backup instead of the main coreboot mirror)
# mozilla hosts firefox on github, and github has plenty of bandwidth.
# mirror mode is always preferred, in both build systems, at least
# for development purposes. end users who don't want to download as
# much (only the branch they're checkout out) might want to turn off
# mirror mode. by default, the lwmk build system assumes that the user
# is a developer, because most people who compile librewolf will use
# the tarball, probably in a linux distro or (hint hint) openbsd ports
if [ -z "${XBMK_CACHE_MIRROR+x}" ]; then
export XBMK_CACHE_MIRROR="y"
fi
if [ "$XBMK_CACHE_MIRROR" != "y" ] && \
[ "$XBMK_CACHE_MIRROR" != "n" ]; then
export XBMK_CACHE_MIRROR="y"
fi
}
xbmk_git_init()
{
if [ -L ".git" ]; then
err "'$xbmkpwd/.git' is a symlink" "xbmk_git_init" "$@"
fi
if [ -e ".git" ]; then
return 0
fi
# GNU-specific extensions of date are used.
# TODO: that is a bug. fix it!
x_ date --version | grep "GNU coreutils" 1>/dev/null 2>/dev/null || \
err "Non-GNU date implementation" "xbmk_git_init" "$@"
cdate="`x_ date -Rud @$versiondate || err "can't get date"`" || \
err "can't get date" "xbmk_git_init" "$@"
x_ git init 1>/dev/null 2>/dev/null
x_ git add -A . 1>/dev/null 2>/dev/null
x_ git -c user.name="xbmk" -c user.email="xbmk@example.com" \
commit -m "$projectname $version" --date "$cdate" \
--author="xbmk <xbmk@example.com>" 1>/dev/null 2>/dev/null
x_ git -c user.name="xbmk" -c user.email="xbmk@example.com" \
tag -a "$version" -m "$projectname $version" \
1>/dev/null 2>/dev/null; :
}
xbmk_child_exec()
{
xbmk_rval=0
( x_ ./mk "$@" ) \
|| xbmk_rval=1
( x_ rm -Rf "$xbtmp" ) \
|| xbmk_rval=1
( x_ rm -f "$xbmklock" ) \
|| xbmk_rval=1
exit $xbmk_rval
}
xbmk_init "$@"
-279
View File
@@ -1,279 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-only
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
# Copyright (c) 2020-2025 Leah Rowe <leah@libreboot.org>
# Copyright (c) 2025 Alper Nebi Yasak <alpernebiyasak@gmail.com>
mkrom_tarball()
{
update_xbmkver "$1"
mktarball "$1" "${1%/*}/${relname}_${1##*/}.tar.xz"
x_ rm -Rf "$1"
}
update_xbmkver()
{
xbmk_sanitize_version
printf "%s\n" "$version" > "$1/.version" || \
err "can't write '$1'" "update_xbmkver" "$@"; :
printf "%s\n" "$versiondate" > "$1/.versiondate" || \
err "can't write '$versiondate'" "update_xbmkver" "$@"; :
}
xbmk_sanitize_version()
{
if [ -z "$version" ]; then
return 0
fi
version="`printf "%s\n" "$version" | sed -e 's/\t//g'`"
version="`printf "%s\n" "$version" | sed -e 's/\ //g'`"
version="`printf "%s\n" "$version" | sed -e 's/\.\.//g'`"
version="`printf "%s\n" "$version" | sed -e 's/\.\///g'`"
version="`printf "%s\n" "$version" | sed -e 's/\//-/g'`"
version="${version#-}"
if [ -z "$version" ]; then
err "'version' empty after sanitization" \
"xbmk_sanitize_version" "$@"
fi
}
mktarball()
{
printf "Creating tar archive '%s' from directory '%s'\n" "$2" "$1"
if [ "${2%/*}" != "$2" ]; then
x_ xbmkdir "${2%/*}"
fi
x_ tar -c "$1" | xz -T$XBMK_THREADS -9e > "$2" || \
err "can't make tarball '$1'" "mktarball" "$@"
}
e()
{
es_t="e"
if [ $# -gt 1 ]; then
es_t="$2"
fi
es2="already exists"
estr="[ -$es_t \"\$1\" ] || return 1"
if [ $# -gt 2 ]; then
estr="[ -$es_t \"\$1\" ] && return 1"
es2="missing"
fi
eval "$estr"
printf "%s %s\n" "$1" "$es2" 1>&2
}
setvars()
{
_setvars=""
if [ $# -lt 2 ]; then
return 0
fi
val="$1"
shift 1
while [ $# -gt 0 ]; do
printf "%s=\"%s\"\n" "$1" "$val"
shift 1
done
}
# return 0 if project is single-tree, otherwise 1
# e.g. firefox is multi-tree, so 1
singletree()
{
( fx_ "eval exit 1 && err" find "config/$1/"*/ -type f \
-name "target.cfg" ) || return 1; :
}
findpath()
{
if [ $# -lt 1 ]; then
err "findpath: No arguments provided" "findpath" "$@"
fi
while [ $# -gt 0 ]; do
found="`readlink -f "$1" 2>/dev/null`" || return 1; :
if [ -z "$found" ]; then
found="`realpath "$1" 2>/dev/null`" || \
return 1
fi
printf "%s\n" "$found"
shift 1
done
}
build_sbase()
{
if [ ! -f "$sha512sum" ]; then
x_ make -C "$xbmkpwd/util/sbase"
fi
}
remkdir()
{
x_ rm -Rf "$@"
x_ xbmkdir "$@"
}
xbmkdir()
{
while [ $# -gt 0 ]; do
if [ ! -d "$1" ]; then
x_ mkdir -p "$1"
fi
shift 1
done
}
fx_()
{
xchk fx_ "$@"
xcmd="$1"
xfile="`mktemp || err "can't create tmpfile"`" || \
err "can't make tmpfile" "fx_" "$@"
x_ rm -f "$xfile"
x_ touch "$xfile"
shift 1
"$@" 2>/dev/null | sort 1>"$xfile" 2>/dev/null || \
err "can't sort to '$xfile'" "fx_" "$xcmd" "$@"
dx_ "$xcmd" "$xfile" || :
x_ rm -f "$xfile"
}
dx_()
{
xchk dx_ "$@"
if [ ! -f "$2" ]; then
return 0
fi
while read -r fx; do
$1 "$fx" || return 1; :
done < "$2" \
|| err "cannot read '$2'" "dx_" "$@"; :
}
x_()
{
if [ $# -lt 1 ]; then
return 0
elif [ -z "$1" ]; then
err "Empty first arg" "x_" "$@"
else
"$@" || err "Unhandled error" "x_" "$@"
fi
}
xchk()
{
if [ $# -lt 3 ]; then
err "$1 needs at least two arguments" "xchk" "$@"
elif [ -z "$2" ] || \
[ -z "$3" ]; then
err "arguments must not be empty" "xchk" "$@"
fi
}
err()
{
if [ $# -eq 1 ]; then
printf "ERROR %s: %s\n" "$0" "$1" 1>&2 || :
elif [ $# -gt 1 ]; then
printf "ERROR %s: %s: in command with args: " "$0" "$1" 1>&2
shift 1
xprintf "$@" 1>&2
else
printf "ERROR, but no arguments provided to err\n" 1>&2
fi
exit 1
}
xprintf()
{
xprintfargs=0
while [ $# -gt 0 ]; do
printf "\"%s\"" "$1"
if [ $# -gt 1 ]; then
printf " "
fi
xprintfargs=1
shift 1
done
if [ $xprintfargs -gt 0 ]; then
printf "\n"
fi
}
-146
View File
@@ -1,146 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
reldest=""
reldir=""
relmode=""
rsrc=""
vdir=""
release()
{
export XBMK_RELEASE="y"
reldir="release"
while getopts m: option; do
if [ -z "$OPTARG" ]; then
err "empty argument not allowed" "release" "$@"
fi
case "$option" in
m)
relmode="$OPTARG"
;;
*)
err "invalid option '-$option'" "release" "$@"
;;
esac
done
reldest="$reldir/$version"
if [ -e "$reldest" ]; then
err "already exists: \"$reldest\"" "release" "$@"
fi
vdir="`mktemp -d || err "can't make vdir"`" || \
err "can't make tmp vdir" "release" "$@"
vdir="$vdir/$version"
rsrc="$vdir/${relname}_src"
remkdir "$vdir"
x_ git clone . "$rsrc"
update_xbmkver "$rsrc"
prep_release src
prep_release tarball
if [ "$relmode" != "src" ]; then
prep_release bin
fi
x_ rm -Rf "$rsrc"
x_ xbmkdir "$reldir"
x_ mv "$vdir" "$reldir"
x_ rm -Rf "${vdir%"/$version"}"
printf "\n\nDONE! Check release files under %s\n" "$reldest"
}
prep_release()
{
(
if [ "$1" != "tarball" ]; then
x_ cd "$rsrc"
if [ ! -e "cache" ]; then
x_ ln -s "$XBMK_CACHE" "cache"
fi
fi
prep_release_$1
) || err "can't prep release $1" "prep_release" "$@"
}
prep_release_src()
{
x_ cp -R "util/sbase" "util/sbase2"
x_ ./mk -f
fx_ "x_ rm -Rf" x_ find . -name ".git"
fx_ "x_ rm -Rf" x_ find . -name ".gitmodules"
# delete unwanted files from the release
( fx_ nuke x_ find config -type f -name "nuke.list" ) || \
err "can't prune project files" "prep_release_src" "$@"; :
}
# delete unwanted files from the release
nuke()
{
r="$rsrc/src/${1#config/}"
if [ -d "${r%/*}" ]; then
x_ cd "${r%/*}"
dx_ "x_ rm -Rf" "$rsrc/$1"
fi
}
prep_release_tarball()
{
git log --graph --pretty=format:'%Cred%h%Creset %s %Creset' \
--abbrev-commit > "$rsrc/CHANGELOG" || \
err "can't create '$rsrc/CHANGELOG'" "prep_release_tarball" "$@"
x_ rm -f "$rsrc/lock" "$rsrc/cache"
x_ rm -Rf "$rsrc/xbmkwd" "$rsrc/util/sbase"
x_ mv "$rsrc/util/sbase2" "$rsrc/util/sbase"
(
x_ cd "${rsrc%/*}"
x_ mktarball "${rsrc##*/}" "${rsrc##*/}.tar.xz"
) || err "can't create src tarball" "prep_release_tarball" "$@"; :
}
prep_release_bin()
{
x_ ./mk -b firefox
fx_ mkrom_tarball x_ find bin -maxdepth 1 -type d -name "serprog_*"
x_ mv bin ../roms
}
-680
View File
@@ -1,680 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (c) 2022-2023 Alper Nebi Yasak <alpernebiyasak@gmail.com>
# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
# flag e.g. ./mk -b <-- mkflag would be "b"
flag=""
# macros, overridden depending on the flag
if_do_make=""
if_dry_build=":"
if_not_do_make=":"
if_not_dry_build=""
autoconfargs=""
autogenargs=""
badhash=""
badtghash=""
bootstrapargs=""
build_depend=""
buildtype=""
cleanargs=""
cmakedir=""
cmd=""
mozconfig=""
dest_dir=""
elfdir=""
forcepull=""
listfile=""
makeargs=""
mdir=""
mkhelper=""
mkhelpercfg=""
mode=""
postmake=""
premake=""
project=""
release=""
rev=""
srcdir=""
target=""
target_dir=""
targets=""
tree=""
trees()
{
flags="f:F:b:c:x:d:"
while getopts $flags option; do
if [ -n "$flag" ]; then
err "only one flag is permitted" "trees" "$@"
fi
flag="$1"
case "$flag" in
-d)
# -d is similar to -b, except that
# a large number of operations will be
# skipped. these are "if_not_dry_build build" scenarios
# where only a subset of build tasks are done,
# and $if_not_dry_build is prefixed to skipped commands
if_dry_build=""
if_not_dry_build=":"
;;
-b) : ;;
-c) mode="distclean" ;;
-x) mode="crossgcc-clean" ;;
-f|-F) # download source code for a project
# macros. colon means false.
if_do_make=":"
if_dry_build=""
if_not_do_make=""
if_not_dry_build=":"
if [ "$flag" = "-F" ]; then
# don't skip git fetch/pull on cached src
forcepull="y"
fi
;;
*) err "invalid option '-$option'" "trees" "$@" ;;
esac
if [ -z "${OPTARG+x}" ]; then
shift 1
break
fi
project="${OPTARG#src/}"
project="${project#config/git/}"
shift 2
done
if [ -z "$flag" ]; then
err "missing flag ($flags)" "trees" "$@"
elif [ -z "$project" ]; then
fx_ "x_ ./mk $flag" x_ ls -1 config/git
return 1
elif [ ! -f "config/git/$project/pkg.cfg" ]; then
err "config/git/$project/pkg.cfg missing" "trees" "$@"
fi
elfdir="elf/$project"
datadir="config/data/$project"
configdir="config/$project"
srcdir="src/$project"
dest_dir="$elfdir"
listfile="$datadir/build.list"
if [ ! -f "$listfile" ]; then
listfile="" # build.list is optional on all projects
fi
mkhelpercfg="$datadir/mkhelper.cfg"
if e "$mkhelpercfg" f missing; then
mkhelpercfg="$xbtmp/mkhelper.cfg"
x_ touch "$mkhelpercfg"
fi
targets="$*"
cmd="build_targets $targets"
if singletree "$project"; then
cmd="build_project"
fi
remkdir "${tmpgit%/*}"
}
build_project()
{
if ! configure_project "$configdir"; then
return 0
elif [ -f "$listfile" ]; then
if ! $if_not_dry_build elfcheck; then
return 0
fi
fi
if [ "$mode" = "distclean" ]; then
mode="clean"
fi
if ! run_make_command; then
return 0
fi
if [ -z "$mode" ]; then
$if_not_dry_build \
copy_elf; :
fi
}
build_targets()
{
if [ ! -d "$configdir" ]; then
err "directory '$configdir' doesn't exist" "build_targets" "$@"
elif [ $# -lt 1 ]; then
targets="$(ls -1 "$configdir")" || \
err "'$configdir': can't list targets" "build_targets" "$@"
fi
for x in $targets; do
unset CROSS_COMPILE
export PATH="$xbmkpath"
if [ "$x" = "list" ]; then
x_ ls -1 "config/$project"
listfile=""
break
fi
printf "'make %s', '%s', '%s'\n" "$mode" "$project" "$x"
target="$x"
x_ handle_mozconfig
if [ -z "$mode" ]; then
x_ $postmake
fi
done; :
}
handle_mozconfig()
{
target_dir="$configdir/$target"
if [ ! -f "CHANGELOG" ]; then
fetch_project "$project"
fi
if ! configure_project "$target_dir"; then
return 0
fi
if [ -z "$tree" ]; then
err "$configdir: 'tree' not set" "handle_mozconfig" "$@"
fi
srcdir="src/$project/$tree"
if [ "$mode" = "${mode%clean}" ] && \
[ ! -d "$srcdir" ]; then
return 0
fi
for y in "$target_dir/config"/*; do
if [ "$flag" != "-d" ] && \
[ ! -f "$y" ]; then
continue
elif [ "$flag" != "-d" ]; then
mozconfig="$y"
fi
if [ -z "$mode" ]; then
check_mozconfig || continue; :
fi
handle_makefile
if [ -z "$mode" ]; then
$if_not_dry_build \
copy_elf
fi
done; :
}
configure_project()
{
tcfg="$1/target.cfg"
autoconfargs=""
badhash=""
badtghash=""
bootstrapargs=""
build_depend=""
buildtype=""
cleanargs=""
makeargs=""
mkhelper=""
postmake=""
premake=""
release=""
if [ ! -f "$tcfg" ]; then
buildtype="auto"
fi
# globally initialise all variables for a source tree / target:
if e "$datadir/mkhelper.cfg" f; then
. "$datadir/mkhelper.cfg" || \
err "Can't read '$datadir/mkhelper.cfg'" \
"configure_project" "$@"
fi
# override target/tree specific variables from per-target config:
while e "$tcfg" f || \
[ "$cmd" != "build_project" ]; do
# TODO: implement infinite loop detection here, caused
# by project targets pointing to other targets/trees
# when then ultimate point back repeatedly; this is
# currently avoided simply by careful configuration.
# temporary files per tree/target name could be created
# per iteration, and then checked the next time
printf "Loading %s config: %s\n" "$project" "$tcfg"
rev=""
tree=""
. "$tcfg" || \
err "Can't read '$tcfg'" "configure_project" "$@"
if [ "$flag" = "-d" ]; then
build_depend="" # dry run
fi
if [ "$cmd" = "build_project" ]; then
# single-tree, so it can't be a target pointing
# to a main source tree
break
fi
$if_do_make \
break
if [ "${tcfg%/*/target.cfg}" = "${tcfg%"/$tree/target.cfg"}" ]
then
# we have found the main source tree that
# a given target uses; no need to continue
break
else
tcfg="${tcfg%/*/target.cfg}/$tree/target.cfg"
fi
done
if [ "$XBMK_RELEASE" = "y" ] && \
[ "$release" = "n" ]; then
return 1
fi
if [ -z "$mode" ]; then
$if_not_dry_build \
build_dependencies
fi
mdir="$xbmkpwd/config/submodule/$project"
if [ -n "$tree" ]; then
mdir="$mdir/$tree"
fi
if [ ! -f "CHANGELOG" ]; then
delete_old_project_files
$if_not_do_make \
fetch_${cmd#build_}
fi
$if_not_do_make \
return 1
x_ ./mk -f "$project" "$target"
}
# projects can specify which other projects
# to build first, as declared dependencies:
build_dependencies()
{
for bd in $build_depend; do
bd_project="${bd%%/*}"
bd_tree="${bd##*/}"
if [ -z "$bd_project" ]; then
$if_not_dry_build \
err "$project/$tree: !bd '$bd'" \
"build_dependencies" "$@"
fi
if [ "${bd##*/}" = "$bd" ]; then
bd_tree=""
fi
if [ -n "$bd_project" ]; then
$if_not_dry_build \
x_ ./mk -b $bd_project $bd_tree; :
fi
done; :
}
# delete_old_project_files along with project_up_to_date,
# concatenates the sha512sum hashes of all files related to
# a project, tree or target, then gets the sha512sum of that
# concatenation. this is checked against any existing
# calculation previously cached; if the result differs, or
# nothing was previously stored, we know to delete resources
# such as builds, project sources and so on, for auto-rebuild:
delete_old_project_files()
{
# delete an entire source tree along with its builds:
if ! project_up_to_date hash "$tree" badhash "$datadir" \
"$configdir/$tree" "$mdir"; then
x_ rm -Rf "src/$project/$tree" "elf/$project/$tree"
fi
x_ cp "$xbtmp/new.hash" "$XBMK_CACHE/hash/$project$tree"
if singletree "$project" || \
[ -z "$target" ] || \
[ "$target" = "$tree" ]; then
return 0
fi
# delete only the builds of a given target, but not src.
# this is useful when only the target config changes, for
# example x200_8mb coreboot configs change, but not coreboot:
if ! project_up_to_date tghash "$target" badtghash "$configdir/$target"
then
x_ rm -Rf "elf/$project/$tree/$target"
fi
x_ cp "$xbtmp/new.hash" "$XBMK_CACHE/tghash/$project$target"
}
project_up_to_date()
{
old_hash=""
hash=""
hashdir="$1"
hashname="$2"
badhashvar="$3"
shift 3
x_ xbmkdir "$XBMK_CACHE/$hashdir"
if [ -f "$XBMK_CACHE/$hashdir/$project$hashname" ]; then
read -r old_hash < "$XBMK_CACHE/$hashdir/$project$hashname" \
|| err \
"$hashdir: err '$XBMK_CACHE/$hashdir/$project$hashname'" \
"project_up_to_date" "$hashdir" "$hashname" "$badhashvar" \
"$@"
fi
build_sbase
fx_ "x_ util/sbase/sha512sum" find "$@" -type f -not -path \
"*/.git*/*" | awk '{print $1}' > "$xbtmp/tmp.hash" || \
err "!h $project $hashdir" \
"project_up_to_date" "$hashdir" "$hashname" "$badhashvar" "$@"
hash="$(x_ "$sha512sum" "$xbtmp/tmp.hash" | awk '{print $1}' || \
err)" || err "$hashname: Can't read sha512 of '$xbtmp/tmp.hash'" \
"project_up_to_date" "$hashdir" "$hashname" "$badhashvar" "$@"
if [ "$hash" != "$old_hash" ] || \
[ ! -f "$XBMK_CACHE/$hashdir/$project$hashname" ]; then
eval "$badhashvar=\"y\""
fi
printf "%s\n" "$hash" > "$xbtmp/new.hash" || \
err "!mkhash $xbtmp/new.hash ($hashdir $hashname $badhashvar)" \
"project_up_to_date" "$hashdir" "$hashname" "$badhashvar" "$@"
eval "[ \"\$$badhashvar\" = \"y\" ] && return 1"; :
}
check_mozconfig()
{
if [ ! -f "$mozconfig" ]; then
$if_not_dry_build \
err "$project/$target: no config" "check_mozconfig" "$@"
fi
dest_dir="$elfdir/$tree/$target/${mozconfig#"$target_dir/config/"}"
# skip build if a previous one exists:
$if_dry_build \
return 0
if ! elfcheck; then
return 1
fi
}
elfcheck()
{
# TODO: *STILL* very hacky check. do it properly (based on build.list)
# extremely hacky check that glues the entire universe together
# beware demons
( fx_ "eval exit 1 && err" find "$dest_dir" -type f ) || return 1; :
}
handle_makefile()
{
if $if_not_dry_build check_makefile "$srcdir"; then
$if_not_dry_build \
x_ make -C "$srcdir" $cleanargs clean
fi
if [ -f "$mozconfig" ]; then
x_ cp "$mozconfig" "$srcdir/mozconfig"
fi
run_make_command || \
err "no makefile!" "handle_makefile" "$@"; :
}
run_make_command()
{
if [ -z "$mode" ]; then
x_ $premake
fi
if $if_not_dry_build check_cmake "$srcdir"; then
if [ -z "$mode" ]; then
$if_not_dry_build \
check_autoconf "$srcdir"
fi
fi
if ! $if_not_dry_build check_makefile "$srcdir"; then
return 1
fi
$if_not_dry_build \
x_ make -C "$srcdir" $mode -j$XBMK_THREADS $makeargs
if [ -z "$mode" ]; then
x_ $mkhelper
fi
if ! check_makefile "$srcdir"; then
return 0
fi
if [ "$mode" = "clean" ]; then
$if_dry_build \
return 0
if ! make -C "$srcdir" $cleanargs distclean; then
x_ make -C "$srcdir" $cleanargs clean
fi
fi
}
check_cmake()
{
$if_dry_build \
return 0
if [ ! -n "$cmakedir" ]; then
return 0
elif ! check_makefile "$1"; then
if ! cmake -B "$1" "$1/$cmakedir"; then
x_ check_makefile "$1"
fi
fi
x_ check_makefile "$1"; :
}
check_autoconf()
{
(
x_ cd "$1"
if [ -f "bootstrap" ]; then
x_ ./bootstrap $bootstrapargs
fi
if [ -f "autogen.sh" ]; then
x_ ./autogen.sh $autogenargs
fi
if [ -f "configure" ]; then
x_ ./configure $autoconfargs; :
fi
) || err "can't bootstrap project: $1" "check_autoconf" "$@"; :
}
check_makefile()
{
if [ ! -f "$1/Makefile" ] && \
[ ! -f "$1/makefile" ] && \
[ ! -f "$1/GNUmakefile" ]; then
return 1
fi
}
copy_elf()
{
if [ -f "$listfile" ]; then
x_ xbmkdir "$dest_dir"
fi
if [ -f "$listfile" ]; then
while read -r f; do
if [ -f "$srcdir/$f" ]; then
x_ cp "$srcdir/$f" "$dest_dir"
fi
done < "$listfile" || err \
"cannot read '$listfile'" "copy_elf" "$@"; :
fi
( x_ make clean -C "$srcdir" $cleanargs ) || \
err "can't make-clean '$srcdir'" "copy_elf" "$@"; :
}
Executable
+126
View File
@@ -0,0 +1,126 @@
#!/usr/bin/env sh
# generic script for calling other scripts in lbmk
#
# Copyright (C) 2014,2015,2020,2021,2023 Leah Rowe <info@minifree.org>
# Copyright (C) 2015 Patrick "P. J." McDermott <pj@pehjota.net>
# Copyright (C) 2015, 2016 Klemens Nanni <contact@autoboot.org>
# Copyright (C) 2022, Caleb La Grange <thonkpeasant@protonmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
projectname="$(cat projectname)"
buildpath=""
mode=""
option=""
main()
{
if [ "${0##*/}" = "lbmk" ]; then
die "Do not run the lbmk script directly!"
elif [ "${0##*/}" = "download" ]; then
./update module $@ || exit 1
exit 0
elif [ $# -lt 1 ]; then
die "Too few arguments. Try: ${0} help"
fi
buildpath="./resources/scripts/${0##*/}"
mode="${1}"
./.gitcheck
if [ "${mode}" != "dependencies" ]; then
./resources/scripts/misc/versioncheck
fi
if [ "${mode}" = help ]; then
usage $0
exit 0
elif [ $# -lt 2 ]; then
usage $0
exit 0
fi
option="${2}"
shift 2
case "${option}" in
list)
printf "Options for mode '%s':\n\n" ${mode}
listoptions "${mode}"
;;
all)
for option in $(listoptions "${mode}"); do
"${buildpath}/${mode}/${option}" $@
done
;;
*)
if [ ! -d "${buildpath}/${mode}" ]; then
usage $0
die "Invalid mode '${mode}'. Run: ${0} help"
elif [ ! -f "${buildpath}/${mode}/${option}" ]; then
usage $0
printf "Invalid option for '%s'." ${mode}
die "Run: ${0} ${mode} list'."
fi
"${buildpath}/${mode}/${option}" $@ || die "lbmk error"
esac
./.gitcheck clean
}
# Takes exactly one mode as parameter
listoptions()
{
for option in "${buildpath}/${1}/"*; do
printf '%s\n' ${option##*/}
done
}
usage()
{
progname=${0}
cat <<- EOF
USAGE: ${progname} <MODE> <OPTION>
possible values for 'mode':
$(listmodes)
Example: ${progname} module all
Example: ${progname} module flashrom [static]
Example: ${progname} roms withgrub
Example: ${progname} clean all
Refer to ${projectname} documentation for more info.
EOF
}
listmodes()
{
for mode in "${buildpath}"/*; do
printf '%s\n' ${mode##*/}
done
}
die()
{
./.gitcheck clean
printf "Error: %s\n" "${@}" 1>&2
exit 1
}
main $@
-91
View File
@@ -1,91 +0,0 @@
#!/usr/bin/env sh
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (c) 2020-2026 Leah Rowe <leah@libreboot.org>
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
set -u -e
xrval=0
(
ispwd="true"
xbdir=""
if [ "$0" != "./mk" ]; then
if [ "${0##*/}" != "$0" ]; then
xbdir="`readlink -f "$0" 2>/dev/null`"
if [ -z "$xbdir" ]; then
xbdir="`realpath "$0" 2>/dev/null`"
fi
cd "${xbdir%/*}" || exit 1
else
ispwd="false"
fi
fi
if [ "$ispwd" = "true" ] && [ -L "mk" ]; then
ispwd="false"
fi
if [ "$ispwd" = "false" ]; then
printf "You must run this in the proper work directory.\n" 1>&2
exit 1
fi
. "include/lib.sh"
. "include/init.sh"
. "include/release.sh"
. "include/get.sh"
main()
{
cmd=""
if [ $# -gt 0 ]; then
cmd="$1"
shift 1
fi
case "$cmd" in
version)
printf "%s\nWebsite: %s\n" "$relname" "$projectsite"
;;
release)
$cmd "$@"
;;
-*)
return 0
;;
*)
err "bad command" main "$@"
;;
esac
# some commands disable them. turn them back on!
set -u -e
return 1
}
main "$@" || exit 0
. "include/tree.sh"
trees "$@" || exit 0
x_ touch "$mkhelpercfg"
. "$mkhelpercfg"
$cmd
) || xrval=1
exit $xrval
Symlink
+1
View File
@@ -0,0 +1 @@
lbmk
+1
View File
@@ -0,0 +1 @@
censored-libreboot
+42
View File
@@ -0,0 +1,42 @@
src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/F14MicrocodePatch05000119.c
3rdparty/arm-trusted-firmware/plat/mediatek/mt8173/drivers/spm/spm_hotplug.c
3rdparty/arm-trusted-firmware/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c
3rdparty/arm-trusted-firmware/plat/mediatek/mt8173/drivers/spm/spm_suspend.c
3rdparty/arm-trusted-firmware/plat/rockchip/rk3368/drivers/ddr/rk3368_ddr_reg_resume_V1.05.bin
3rdparty/chromeec/test/legacy_nvmem_dump.h
3rdparty/vboot/tests/futility/data/bios_link_mp.bin
3rdparty/vboot/tests/futility/data/bios_peppy_mp.bin
src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/F14MicrocodePatch0500000B.c
src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/F14MicrocodePatch0500001A.c
src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/F14MicrocodePatch05000029.c
src/vendorcode/amd/agesa/f14/Proc/GNB/Nb/Family/0x14/F14NbSmuFirmware.h
src/vendorcode/amd/agesa/f14/Proc/GNB/PCIe/Family/0x14/F14PcieAlibSsdt.h
src/vendorcode/amd/agesa/f15tn/Proc/CPU/Family/0x15/TN/F15TnMicrocodePatch0600111F_Enc.c
src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GnbSmuFirmwareTN.h
src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/PcieAlibSsdtTNFM2.h
src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/PcieAlibSsdtTNFS1.h
src/vendorcode/amd/agesa/f16kb/Proc/CPU/Family/0x16/KB/F16KbId7001MicrocodePatch.c
src/vendorcode/amd/agesa/f16kb/Proc/GNB/Modules/GnbInitKB/AlibSsdtKB.h
src/vendorcode/amd/agesa/f16kb/Proc/GNB/Modules/GnbInitKB/GnbSamuPatchKB.h
src/vendorcode/amd/agesa/f16kb/Proc/GNB/Modules/GnbInitKB/GnbSmuFirmwareKB.h
3rdparty/chromeec/third_party/bmi260/accelgyro_bmi260_config_tbin.h
3rdparty/arm-trusted-firmware/plat/mediatek/mt8173/drivers/spm/spm_hotplug.c
3rdparty/arm-trusted-firmware/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c
3rdparty/arm-trusted-firmware/plat/mediatek/mt8173/drivers/spm/spm_suspend.c
3rdparty/arm-trusted-firmware/plat/rockchip/rk3368/drivers/ddr/rk3368_ddr_reg_resume_V1.05.bin
3rdparty/vboot/tests/futility/data/bios_link_mp.bin
3rdparty/vboot/tests/futility/data/bios_peppy_mp.bin
src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/F14MicrocodePatch0500000B.c
src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/F14MicrocodePatch0500001A.c
src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/F14MicrocodePatch05000029.c
src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/F14MicrocodePatch05000119.c
src/vendorcode/amd/agesa/f14/Proc/GNB/Nb/Family/0x14/F14NbSmuFirmware.h
src/vendorcode/amd/agesa/f14/Proc/GNB/PCIe/Family/0x14/F14PcieAlibSsdt.h
src/vendorcode/amd/agesa/f15tn/Proc/CPU/Family/0x15/TN/F15TnMicrocodePatch0600111F_Enc.c
src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GnbSmuFirmwareTN.h
src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/PcieAlibSsdtTNFM2.h
src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/PcieAlibSsdtTNFS1.h
src/vendorcode/amd/agesa/f16kb/Proc/CPU/Family/0x16/KB/F16KbId7001MicrocodePatch.c
src/vendorcode/amd/agesa/f16kb/Proc/GNB/Modules/GnbInitKB/AlibSsdtKB.h
src/vendorcode/amd/agesa/f16kb/Proc/GNB/Modules/GnbInitKB/GnbSamuPatchKB.h
src/vendorcode/amd/agesa/f16kb/Proc/GNB/Modules/GnbInitKB/GnbSmuFirmwareKB.h
+4
View File
@@ -0,0 +1,4 @@
cbtree="cros"
arch="spaghettimonster"
cbrevision="8da4bfe5b573f395057fbfb5a9d99b376e25c2a4" # 4.17
romtype="normal"
@@ -0,0 +1,55 @@
From 0d5a5f3ee1ee5d6f757d5877b7adbe9839487ccf Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org>
Date: Sat, 19 Nov 2022 14:55:01 +0000
Subject: [PATCH 1/1] fix crossgcc build error
---
util/crossgcc/patches/gcc-11.2.0_gnat.patch | 32 ++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/util/crossgcc/patches/gcc-11.2.0_gnat.patch b/util/crossgcc/patches/gcc-11.2.0_gnat.patch
index 2d7cecee24..c22cec45d0 100644
--- a/util/crossgcc/patches/gcc-11.2.0_gnat.patch
+++ b/util/crossgcc/patches/gcc-11.2.0_gnat.patch
@@ -5,7 +5,37 @@
# Extra flags to pass to recursive makes.
-COMMON_ADAFLAGS= -gnatpg
-+COMMON_ADAFLAGS= -gnatpg -gnatwGUR
++COMMON_ADAFLAGS= -gnatpg -gnatwn
ifeq ($(TREECHECKING),)
CHECKING_ADAFLAGS=
else
+diff -Nurp gcc-11.2.0/gcc/ada/gcc-interface/Make-lang.in gcc-11.2.0.new/gcc/ada/gcc-interface/Make-lang.in
+--- gcc-11.2.0/gcc/ada/gcc-interface/Make-lang.in 2022-06-03 00:31:57.993273717 +0200
++++ gcc-11.2.0.new/gcc/ada/gcc-interface/Make-lang.in 2022-06-03 00:30:50.214166847 +0200
+@@ -334,6 +334,7 @@ GNAT_ADA_OBJS = \
+ ada/hostparm.o \
+ ada/impunit.o \
+ ada/inline.o \
++ ada/libgnat/i-c.o \
+ ada/libgnat/interfac.o \
+ ada/itypes.o \
+ ada/krunch.o \
+@@ -364,7 +365,10 @@ GNAT_ADA_OBJS = \
+ ada/rtsfind.o \
+ ada/libgnat/s-addope.o \
+ ada/libgnat/s-addima.o \
++ ada/libgnat/s-aotase.o \
+ ada/libgnat/s-assert.o \
++ ada/libgnat/s-atoope.o \
++ ada/libgnat/s-atopri.o \
+ ada/libgnat/s-bitops.o \
+ ada/libgnat/s-carun8.o \
+ ada/libgnat/s-casuti.o \
+@@ -548,6 +552,7 @@ GNATBIND_OBJS = \
+ ada/hostparm.o \
+ ada/init.o \
+ ada/initialize.o \
++ ada/libgnat/i-c.o \
+ ada/libgnat/interfac.o \
+ ada/krunch.o \
+ ada/lib.o \
--
2.25.1
@@ -0,0 +1,38 @@
From 1ce4f118b024a6367382b46016781f30fe622e3e Mon Sep 17 00:00:00 2001
From: Nicholas Chin <nic.c3.14@gmail.com>
Date: Fri, 12 May 2023 19:55:15 -0600
Subject: [PATCH] Remove warning for coreboot images built without a payload
I added this in upstream to prevent people from accidentally flashing
roms without a payload resulting in a no boot situation, but in
libreboot lbmk handles the payload and thus this warning always comes
up. This has caused confusion and concern so just patch it out.
---
payloads/Makefile.inc | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/payloads/Makefile.inc b/payloads/Makefile.inc
index e735443a76..4f1692a873 100644
--- a/payloads/Makefile.inc
+++ b/payloads/Makefile.inc
@@ -49,16 +49,5 @@ distclean-payloads:
print-repo-info-payloads:
-$(foreach payload, $(PAYLOADS_LIST), $(MAKE) -C $(payload) print-repo-info 2>/dev/null; )
-ifeq ($(CONFIG_PAYLOAD_NONE),y)
-files_added:: warn_no_payload
-endif
-
-warn_no_payload:
- printf "\n\t** WARNING **\n"
- printf "coreboot has been built without a payload. Writing\n"
- printf "a coreboot image without a payload to your board's\n"
- printf "flash chip will result in a non-booting system. You\n"
- printf "can use cbfstool to add a payload to the image.\n\n"
-
.PHONY: force-payload coreinfo nvramcui
-.PHONY: clean-payloads distclean-payloads print-repo-info-payloads warn_no_payload
+.PHONY: clean-payloads distclean-payloads print-repo-info-payloads
--
2.40.1
@@ -0,0 +1,28 @@
From 9f52555eac217623ad2edc72492f9ded6a5b538d Mon Sep 17 00:00:00 2001
From: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Thu, 22 Jun 2023 16:44:27 +0300
Subject: [PATCH] HACK: Disable coreboot related BL31 features
I don't know why, but removing this BL31 make argument lets gru-kevin
power off properly when shut down from Linux. Needs investigation.
---
src/arch/arm64/Makefile.inc | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/arch/arm64/Makefile.inc b/src/arch/arm64/Makefile.inc
index 6b49743633c3..e1982d92cc5c 100644
--- a/src/arch/arm64/Makefile.inc
+++ b/src/arch/arm64/Makefile.inc
@@ -158,9 +158,6 @@ BL31_MAKEARGS += LOG_LEVEL=40
# Always enable crash reporting, even on a release build
BL31_MAKEARGS += CRASH_REPORTING=1
-# Enable coreboot-specific features like CBMEM console support
-BL31_MAKEARGS += COREBOOT=1
-
# Avoid build/release|build/debug distinction by overriding BUILD_PLAT directly
BL31_MAKEARGS += BUILD_PLAT="$(BL31_BUILD)"
--
2.40.1
+8
View File
@@ -0,0 +1,8 @@
cbtree="default"
romtype="normal"
arch="x86_64"
payload_grub="n"
payload_grub_withseabios="n"
payload_seabios="y"
microcode_required="n"
blobs_required="n"
@@ -0,0 +1,577 @@
#
# Automatically generated file; DO NOT EDIT.
# coreboot configuration
#
#
# General setup
#
CONFIG_COREBOOT_BUILD=y
CONFIG_LOCALVERSION=""
CONFIG_CBFS_PREFIX="fallback"
CONFIG_COMPILER_GCC=y
# CONFIG_COMPILER_LLVM_CLANG is not set
CONFIG_ARCH_SUPPORTS_CLANG=y
# CONFIG_ANY_TOOLCHAIN is not set
# CONFIG_CCACHE is not set
# CONFIG_IWYU is not set
# CONFIG_FMD_GENPARSER is not set
# CONFIG_UTIL_GENPARSER is not set
# CONFIG_OPTION_BACKEND_NONE is not set
CONFIG_USE_OPTION_TABLE=y
CONFIG_STATIC_OPTION_TABLE=y
CONFIG_COMPRESS_RAMSTAGE_LZMA=y
# CONFIG_COMPRESS_RAMSTAGE_LZ4 is not set
CONFIG_INCLUDE_CONFIG_FILE=y
CONFIG_COLLECT_TIMESTAMPS=y
# CONFIG_TIMESTAMPS_ON_CONSOLE is not set
CONFIG_USE_BLOBS=y
# CONFIG_USE_AMD_BLOBS is not set
# CONFIG_USE_QC_BLOBS is not set
# CONFIG_COVERAGE is not set
# CONFIG_UBSAN is not set
CONFIG_HAVE_ASAN_IN_RAMSTAGE=y
# CONFIG_ASAN is not set
# CONFIG_NO_STAGE_CACHE is not set
CONFIG_TSEG_STAGE_CACHE=y
# CONFIG_UPDATE_IMAGE is not set
# CONFIG_BOOTSPLASH_IMAGE is not set
# CONFIG_FW_CONFIG is not set
#
# Software Bill Of Materials (SBOM)
#
# CONFIG_SBOM is not set
# end of Software Bill Of Materials (SBOM)
# end of General setup
#
# Mainboard
#
#
# Important: Run 'make distclean' before switching boards
#
# CONFIG_VENDOR_51NB is not set
# CONFIG_VENDOR_ACER is not set
# CONFIG_VENDOR_ADLINK is not set
# CONFIG_VENDOR_AMD is not set
# CONFIG_VENDOR_AOPEN is not set
# CONFIG_VENDOR_APPLE is not set
# CONFIG_VENDOR_ASROCK is not set
# CONFIG_VENDOR_ASUS is not set
# CONFIG_VENDOR_BIOSTAR is not set
# CONFIG_VENDOR_BOSTENTECH is not set
# CONFIG_VENDOR_CAVIUM is not set
# CONFIG_VENDOR_CLEVO is not set
# CONFIG_VENDOR_COMPULAB is not set
# CONFIG_VENDOR_DELL is not set
# CONFIG_VENDOR_EMULATION is not set
# CONFIG_VENDOR_EXAMPLE is not set
# CONFIG_VENDOR_FACEBOOK is not set
# CONFIG_VENDOR_FOXCONN is not set
# CONFIG_VENDOR_GETAC is not set
# CONFIG_VENDOR_GIGABYTE is not set
# CONFIG_VENDOR_GOOGLE is not set
# CONFIG_VENDOR_HP is not set
# CONFIG_VENDOR_IBASE is not set
CONFIG_VENDOR_INTEL=y
# CONFIG_VENDOR_KONTRON is not set
# CONFIG_VENDOR_LENOVO is not set
# CONFIG_VENDOR_LIBRETREND is not set
# CONFIG_VENDOR_MSI is not set
# CONFIG_VENDOR_OCP is not set
# CONFIG_VENDOR_OPENCELLULAR is not set
# CONFIG_VENDOR_PACKARDBELL is not set
# CONFIG_VENDOR_PCENGINES is not set
# CONFIG_VENDOR_PINE64 is not set
# CONFIG_VENDOR_PORTWELL is not set
# CONFIG_VENDOR_PRODRIVE is not set
# CONFIG_VENDOR_PROTECTLI is not set
# CONFIG_VENDOR_PURISM is not set
# CONFIG_VENDOR_RAZER is not set
# CONFIG_VENDOR_RODA is not set
# CONFIG_VENDOR_SAMSUNG is not set
# CONFIG_VENDOR_SAPPHIRE is not set
# CONFIG_VENDOR_SIEMENS is not set
# CONFIG_VENDOR_SIFIVE is not set
# CONFIG_VENDOR_STARLABS is not set
# CONFIG_VENDOR_SUPERMICRO is not set
# CONFIG_VENDOR_SYSTEM76 is not set
# CONFIG_VENDOR_TI is not set
# CONFIG_VENDOR_UP is not set
CONFIG_BOARD_SPECIFIC_OPTIONS=y
CONFIG_MAINBOARD_PART_NUMBER="D510MO"
CONFIG_MAINBOARD_VERSION="1.0"
CONFIG_MAINBOARD_DIR="intel/d510mo"
CONFIG_VGA_BIOS_ID="8086,a001"
CONFIG_DIMM_MAX=4
CONFIG_DIMM_SPD_SIZE=256
CONFIG_FMDFILE=""
# CONFIG_NO_POST is not set
CONFIG_MAINBOARD_VENDOR="Intel"
CONFIG_CBFS_SIZE=0x00100000
CONFIG_MAX_CPUS=4
# CONFIG_ONBOARD_VGA_IS_PRIMARY is not set
CONFIG_POST_DEVICE=y
CONFIG_POST_IO=y
CONFIG_DEVICETREE="devicetree.cb"
# CONFIG_VBOOT is not set
CONFIG_OVERRIDE_DEVICETREE=""
# CONFIG_VGA_BIOS is not set
CONFIG_MAINBOARD_SMBIOS_MANUFACTURER="Intel"
CONFIG_INTEL_GMA_VBT_FILE="src/mainboard/$(MAINBOARDDIR)/data.vbt"
CONFIG_PRERAM_CBMEM_CONSOLE_SIZE=0xc00
CONFIG_CMOS_DEFAULT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.default"
CONFIG_CMOS_LAYOUT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.layout"
CONFIG_BOOT_DEVICE_SPI_FLASH_BUS=0
# CONFIG_CONSOLE_POST is not set
CONFIG_MEMLAYOUT_LD_FILE="src/arch/x86/memlayout.ld"
CONFIG_DCACHE_RAM_BASE=0xfefc0000
CONFIG_DCACHE_RAM_SIZE=0x8000
CONFIG_C_ENV_BOOTBLOCK_SIZE=0x40000
CONFIG_DCACHE_BSP_STACK_SIZE=0x2000
CONFIG_ECAM_MMCONF_BASE_ADDRESS=0xe0000000
CONFIG_ECAM_MMCONF_BUS_NUMBER=256
CONFIG_MAX_ACPI_TABLE_SIZE_KB=144
CONFIG_SPI_FLASH_INCLUDE_ALL_DRIVERS=y
CONFIG_SPI_FLASH_WINBOND=y
# CONFIG_DRIVERS_INTEL_WIFI is not set
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x20000
# CONFIG_BOARD_INTEL_ADLRVP_P is not set
# CONFIG_BOARD_INTEL_ADLRVP_P_EXT_EC is not set
# CONFIG_BOARD_INTEL_ADLRVP_P_MCHP is not set
# CONFIG_BOARD_INTEL_ADLRVP_M is not set
# CONFIG_BOARD_INTEL_ADLRVP_M_EXT_EC is not set
# CONFIG_BOARD_INTEL_ADLRVP_N is not set
# CONFIG_BOARD_INTEL_ADLRVP_N_EXT_EC is not set
# CONFIG_BOARD_INTEL_ADLRVP_RPL_EXT_EC is not set
# CONFIG_BOARD_INTEL_APOLLOLAKE_RVP1 is not set
# CONFIG_BOARD_INTEL_APOLLOLAKE_RVP2 is not set
# CONFIG_BOARD_INTEL_BASKING_RIDGE is not set
# CONFIG_BOARD_INTEL_CEDARISLAND_CRB is not set
#
# Coffeelake RVP
#
# CONFIG_BOARD_INTEL_COFFEELAKE_RVPU is not set
# CONFIG_BOARD_INTEL_COFFEELAKE_RVP11 is not set
# CONFIG_BOARD_INTEL_WHISKEYLAKE_RVP is not set
# CONFIG_BOARD_INTEL_COFFEELAKE_RVP8 is not set
# CONFIG_BOARD_INTEL_COMETLAKE_RVPU is not set
CONFIG_BOARD_INTEL_D510MO=y
# CONFIG_BOARD_INTEL_D945GCLF is not set
# CONFIG_BOARD_INTEL_DCP847SKE is not set
# CONFIG_BOARD_INTEL_DG41WV is not set
# CONFIG_BOARD_INTEL_DG43GT is not set
# CONFIG_BOARD_INTEL_ELKHARTLAKE_CRB is not set
# CONFIG_BOARD_INTEL_EMERALDLAKE2 is not set
# CONFIG_BOARD_INTEL_GALILEO is not set
# CONFIG_BOARD_INTEL_GLKRVP is not set
# CONFIG_BOARD_INTEL_HARCUVAR is not set
# CONFIG_BOARD_INTEL_JASPERLAKE_RVP is not set
# CONFIG_BOARD_INTEL_JASPERLAKE_RVP_EXT_EC is not set
# CONFIG_BOARD_INTEL_KBLRVP3 is not set
# CONFIG_BOARD_INTEL_KBLRVP7 is not set
# CONFIG_BOARD_INTEL_KBLRVP8 is not set
# CONFIG_BOARD_INTEL_KBLRVP11 is not set
# CONFIG_BOARD_INTEL_KUNIMITSU is not set
# CONFIG_BOARD_INTEL_LEAFHILL is not set
# CONFIG_BOARD_INTEL_MINNOW3 is not set
# CONFIG_BOARD_INTEL_MTLRVP_P is not set
# CONFIG_BOARD_INTEL_MTLRVP_P_EXT_EC is not set
# CONFIG_BOARD_INTEL_SKLSDLBRK is not set
# CONFIG_BOARD_INTEL_SHADOWMOUNTAIN is not set
# CONFIG_BOARD_INTEL_STRAGO is not set
# CONFIG_BOARD_INTEL_TGLRVP_UP3 is not set
# CONFIG_BOARD_INTEL_TGLRVP_UP4 is not set
# CONFIG_BOARD_INTEL_WTM2 is not set
CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME="D510MO"
CONFIG_PCIEXP_HOTPLUG_BUSES=32
CONFIG_PCIEXP_HOTPLUG_MEM=0x800000
CONFIG_PCIEXP_HOTPLUG_PREFETCH_MEM=0x10000000
CONFIG_PS2K_EISAID="PNP0303"
CONFIG_PS2M_EISAID="PNP0F13"
# CONFIG_DEBUG_SMI is not set
# CONFIG_PCIEXP_L1_SUB_STATE is not set
# CONFIG_PCIEXP_CLK_PM is not set
# CONFIG_DRIVERS_UART_8250IO is not set
CONFIG_HEAP_SIZE=0x4000
CONFIG_EC_GPE_SCI=0x50
CONFIG_BOARD_ROMSIZE_KB_1024=y
# CONFIG_COREBOOT_ROMSIZE_KB_256 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_512 is not set
CONFIG_COREBOOT_ROMSIZE_KB_1024=y
# CONFIG_COREBOOT_ROMSIZE_KB_2048 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_4096 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_5120 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_6144 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_8192 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_10240 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_12288 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_16384 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_32768 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_65536 is not set
CONFIG_COREBOOT_ROMSIZE_KB=1024
CONFIG_ROM_SIZE=0x00100000
CONFIG_HAVE_POWER_STATE_AFTER_FAILURE=y
CONFIG_HAVE_POWER_STATE_PREVIOUS_AFTER_FAILURE=y
CONFIG_POWER_STATE_OFF_AFTER_FAILURE=y
# CONFIG_POWER_STATE_ON_AFTER_FAILURE is not set
# CONFIG_POWER_STATE_PREVIOUS_AFTER_FAILURE is not set
CONFIG_MAINBOARD_POWER_FAILURE_STATE=0
# end of Mainboard
#
# Chipset
#
#
# SoC
#
CONFIG_CHIPSET_DEVICETREE=""
CONFIG_CBFS_MCACHE_SIZE=0x4000
CONFIG_ROMSTAGE_ADDR=0x2000000
CONFIG_VERSTAGE_ADDR=0x2000000
CONFIG_SMM_RESERVED_SIZE=0x80000
CONFIG_SMM_MODULE_STACK_SIZE=0x400
CONFIG_ACPI_CPU_STRING="\\_SB.CP%02X"
CONFIG_EHCI_BAR=0xfef00000
CONFIG_STACK_SIZE=0x2000
CONFIG_VBT_DATA_SIZE_KB=8
CONFIG_INTEL_GMA_BCLV_OFFSET=0xc8254
CONFIG_INTEL_GMA_BCLV_WIDTH=16
CONFIG_INTEL_GMA_BCLM_OFFSET=0xc8256
CONFIG_INTEL_GMA_BCLM_WIDTH=16
CONFIG_BOOTBLOCK_IN_CBFS=y
CONFIG_FIXED_MCHBAR_MMIO_BASE=0xfed14000
CONFIG_FIXED_DMIBAR_MMIO_BASE=0xfed18000
CONFIG_FIXED_EPBAR_MMIO_BASE=0xfed19000
# CONFIG_PCIEXP_ASPM is not set
# CONFIG_PCIEXP_COMMON_CLOCK is not set
CONFIG_FIXED_SMBUS_IO_BASE=0x400
CONFIG_HPET_MIN_TICKS=0x80
CONFIG_CBFS_CACHE_ALIGN=8
CONFIG_INTEL_HAS_TOP_SWAP=y
# CONFIG_INTEL_ADD_TOP_SWAP_BOOTBLOCK is not set
CONFIG_INTEL_TOP_SWAP_BOOTBLOCK_SIZE=0x10000
#
# CPU
#
CONFIG_CPU_INTEL_MODEL_106CX=y
CONFIG_SOCKET_SPECIFIC_OPTIONS=y
CONFIG_CPU_INTEL_SOCKET_FCBGA559=y
CONFIG_CPU_INTEL_COMMON=y
CONFIG_ENABLE_VMX=y
CONFIG_SET_IA32_FC_LOCK_BIT=y
CONFIG_SET_MSR_AESNI_LOCK_BIT=y
CONFIG_CPU_INTEL_COMMON_TIMEBASE=y
CONFIG_CPU_INTEL_COMMON_SMM=y
CONFIG_MICROCODE_UPDATE_PRE_RAM=y
CONFIG_CPU_HAS_L2_ENABLE_MSR=y
CONFIG_PARALLEL_MP=y
CONFIG_XAPIC_ONLY=y
# CONFIG_X2APIC_ONLY is not set
# CONFIG_X2APIC_RUNTIME is not set
# CONFIG_X2APIC_LATE_WORKAROUND is not set
CONFIG_UDELAY_TSC=y
CONFIG_TSC_MONOTONIC_TIMER=y
CONFIG_TSC_SYNC_MFENCE=y
CONFIG_LOGICAL_CPUS=y
CONFIG_HAVE_SMI_HANDLER=y
CONFIG_SMM_TSEG=y
CONFIG_SMM_LAPIC_REMAP_MITIGATION=y
CONFIG_AP_STACK_SIZE=0x800
CONFIG_SMP=y
CONFIG_MMX=y
CONFIG_SSE=y
CONFIG_SSE2=y
CONFIG_SUPPORT_CPU_UCODE_IN_CBFS=y
CONFIG_USE_CPU_MICROCODE_CBFS_BINS=y
CONFIG_CPU_MICROCODE_CBFS_DEFAULT_BINS=y
# CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS is not set
# CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_HEADER is not set
# CONFIG_CPU_MICROCODE_CBFS_NONE is not set
#
# Northbridge
#
CONFIG_NORTHBRIDGE_INTEL_PINEVIEW=y
#
# Southbridge
#
CONFIG_PCIEXP_HOTPLUG=y
CONFIG_SOUTHBRIDGE_INTEL_I82801GX=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_RESET=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_RTC=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_PMCLIB=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_PMBASE=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_GPIO=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_HPET=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_EARLY_SMBUS=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_SMBUS=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_SPI=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_SPI_ICH7=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_PIRQ_ACPI_GEN=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_RCBA_PIRQ=y
CONFIG_HAVE_INTEL_CHIPSET_LOCKDOWN=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_SMM=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_USB_DEBUG=y
CONFIG_INTEL_CHIPSET_LOCKDOWN=y
CONFIG_TCO_SPACE_NOT_YET_SPLIT=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_WATCHDOG=y
CONFIG_FIXED_RCBA_MMIO_BASE=0xfed1c000
CONFIG_RCBA_LENGTH=0x4000
#
# Super I/O
#
CONFIG_SUPERIO_WINBOND_COMMON_PRE_RAM=y
CONFIG_SUPERIO_WINBOND_W83627THG=y
#
# Embedded Controllers
#
CONFIG_ARCH_X86=y
CONFIG_ARCH_BOOTBLOCK_X86_32=y
CONFIG_ARCH_VERSTAGE_X86_32=y
CONFIG_ARCH_ROMSTAGE_X86_32=y
CONFIG_ARCH_POSTCAR_X86_32=y
CONFIG_ARCH_RAMSTAGE_X86_32=y
CONFIG_ARCH_ALL_STAGES_X86_32=y
CONFIG_AP_IN_SIPI_WAIT=y
CONFIG_SIPI_VECTOR_IN_ROM=y
CONFIG_X86_TOP4G_BOOTMEDIA_MAP=y
CONFIG_PC80_SYSTEM=y
CONFIG_HAVE_CMOS_DEFAULT=y
CONFIG_POSTCAR_STAGE=y
CONFIG_BOOTBLOCK_SIMPLE=y
# CONFIG_BOOTBLOCK_NORMAL is not set
CONFIG_COLLECT_TIMESTAMPS_TSC=y
CONFIG_HAVE_CF9_RESET=y
CONFIG_DEBUG_HW_BREAKPOINTS=y
CONFIG_DEBUG_NULL_DEREF_BREAKPOINTS=y
# end of Chipset
#
# Devices
#
CONFIG_HAVE_VGA_TEXT_FRAMEBUFFER=y
CONFIG_MAINBOARD_HAS_NATIVE_VGA_INIT=y
CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT=y
# CONFIG_VGA_ROM_RUN is not set
# CONFIG_NO_GFX_INIT is not set
CONFIG_NO_EARLY_GFX_INIT=y
#
# Display
#
CONFIG_VGA_TEXT_FRAMEBUFFER=y
# end of Display
CONFIG_PCI=y
CONFIG_ECAM_MMCONF_SUPPORT=y
CONFIG_PCIX_PLUGIN_SUPPORT=y
CONFIG_CARDBUS_PLUGIN_SUPPORT=y
CONFIG_AZALIA_PLUGIN_SUPPORT=y
CONFIG_PCIEXP_PLUGIN_SUPPORT=y
CONFIG_ECAM_MMCONF_LENGTH=0x10000000
CONFIG_PCI_ALLOW_BUS_MASTER=y
CONFIG_PCI_SET_BUS_MASTER_PCI_BRIDGES=y
CONFIG_PCI_ALLOW_BUS_MASTER_ANY_DEVICE=y
# CONFIG_PCIEXP_SUPPORT_RESIZABLE_BARS is not set
# CONFIG_PCIEXP_LANE_ERR_STAT_CLEAR is not set
CONFIG_PCIEXP_HOTPLUG_PREFETCH_MEM_ABOVE_4G=y
# CONFIG_PCIEXP_HOTPLUG_PREFETCH_MEM_BELOW_4G is not set
CONFIG_PCIEXP_HOTPLUG_IO=0x2000
CONFIG_FIRMWARE_CONNECTION_MANAGER=y
# CONFIG_SOFTWARE_CONNECTION_MANAGER is not set
# CONFIG_EARLY_PCI_BRIDGE is not set
CONFIG_SUBSYSTEM_VENDOR_ID=0x0000
CONFIG_SUBSYSTEM_DEVICE_ID=0x0000
CONFIG_INTEL_GMA_HAVE_VBT=y
CONFIG_INTEL_GMA_ADD_VBT=y
# CONFIG_SOFTWARE_I2C is not set
CONFIG_I2C_TRANSFER_TIMEOUT_US=500000
# CONFIG_RESOURCE_ALLOCATION_TOP_DOWN is not set
CONFIG_NO_DDR5=y
CONFIG_NO_LPDDR4=y
CONFIG_NO_DDR4=y
CONFIG_USE_DDR3=y
CONFIG_USE_DDR2=y
# end of Devices
#
# Generic Drivers
#
CONFIG_CRB_TPM_BASE_ADDRESS=0xfed40000
# CONFIG_ELOG is not set
# CONFIG_SMMSTORE is not set
CONFIG_SPI_FLASH=y
CONFIG_BOOT_DEVICE_SPI_FLASH_RW_NOMMAP=y
CONFIG_BOOT_DEVICE_SPI_FLASH_RW_NOMMAP_EARLY=y
# CONFIG_SPI_FLASH_NO_FAST_READ is not set
CONFIG_SPI_FLASH_ADESTO=y
CONFIG_SPI_FLASH_AMIC=y
CONFIG_SPI_FLASH_ATMEL=y
CONFIG_SPI_FLASH_EON=y
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_SST=y
CONFIG_SPI_FLASH_STMICRO=y
# CONFIG_DRIVERS_UART_OXPCIE is not set
CONFIG_HAVE_USBDEBUG=y
# CONFIG_USBDEBUG is not set
# CONFIG_VPD is not set
# CONFIG_DRIVERS_GENERIC_CBFS_SERIAL is not set
# CONFIG_DRIVERS_GENERIC_CBFS_UUID is not set
# CONFIG_DRIVERS_GENESYSLOGIC_GL9750 is not set
# CONFIG_DRIVERS_GENESYSLOGIC_GL9755 is not set
# CONFIG_DRIVERS_GENESYSLOGIC_GL9763E is not set
CONFIG_DRIVERS_I2C_CK505=y
# CONFIG_DRIVERS_I2C_MAX98396 is not set
CONFIG_INTEL_EDID=y
CONFIG_INTEL_INT15=y
CONFIG_INTEL_GMA_ACPI=y
CONFIG_INTEL_GMA_OPREGION_2_0=y
# CONFIG_DRIVERS_NXP_UWB_SR1XX is not set
# CONFIG_DRIVERS_PS2_KEYBOARD is not set
CONFIG_DRIVERS_MC146818=y
# CONFIG_USE_PC_CMOS_ALTCENTURY is not set
CONFIG_VGA=y
# CONFIG_DRIVERS_SIL_3114 is not set
# end of Generic Drivers
#
# Security
#
#
# CBFS verification
#
# CONFIG_CBFS_VERIFICATION is not set
# end of CBFS verification
#
# Verified Boot (vboot)
#
# end of Verified Boot (vboot)
#
# Trusted Platform Module
#
CONFIG_NO_TPM=y
# end of Trusted Platform Module
#
# Memory initialization
#
CONFIG_PLATFORM_HAS_DRAM_CLEAR=y
CONFIG_SECURITY_CLEAR_DRAM_ON_REGULAR_BOOT=y
# end of Memory initialization
# CONFIG_STM is not set
CONFIG_BOOTMEDIA_LOCK_NONE=y
# CONFIG_BOOTMEDIA_LOCK_CONTROLLER is not set
# CONFIG_BOOTMEDIA_LOCK_CHIP is not set
# CONFIG_BOOTMEDIA_SMM_BWP is not set
# end of Security
CONFIG_ACPI_HAVE_PCAT_8259=y
CONFIG_ACPI_INTEL_HARDWARE_SLEEP_VALUES=y
CONFIG_ACPI_SOC_NVS=y
CONFIG_HAVE_ACPI_TABLES=y
CONFIG_BOOT_DEVICE_SPI_FLASH=y
CONFIG_BOOT_DEVICE_MEMORY_MAPPED=y
CONFIG_BOOT_DEVICE_SUPPORTS_WRITES=y
#
# Console
#
CONFIG_BOOTBLOCK_CONSOLE=y
CONFIG_POSTCAR_CONSOLE=y
CONFIG_SQUELCH_EARLY_SMP=y
# CONFIG_SPKMODEM is not set
# CONFIG_CONSOLE_NE2K is not set
CONFIG_CONSOLE_CBMEM=y
# CONFIG_CONSOLE_CBMEM_DUMP_TO_UART is not set
# CONFIG_CONSOLE_SPI_FLASH is not set
# CONFIG_CONSOLE_I2C_SMBUS is not set
# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_8 is not set
# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_7 is not set
# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_6 is not set
# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_5 is not set
# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_4 is not set
# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_3 is not set
# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_2 is not set
# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_1 is not set
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_0=y
CONFIG_DEFAULT_CONSOLE_LOGLEVEL=0
CONFIG_CONSOLE_USE_LOGLEVEL_PREFIX=y
CONFIG_CONSOLE_USE_ANSI_ESCAPES=y
# CONFIG_CMOS_POST is not set
CONFIG_POST_DEVICE_NONE=y
# CONFIG_POST_DEVICE_LPC is not set
# CONFIG_POST_DEVICE_PCI_PCIE is not set
CONFIG_POST_IO_PORT=0x80
CONFIG_HWBASE_DEBUG_NULL=y
# end of Console
CONFIG_HAVE_ACPI_RESUME=y
CONFIG_RESUME_PATH_SAME_AS_BOOT=y
CONFIG_HAVE_MONOTONIC_TIMER=y
CONFIG_HAVE_OPTION_TABLE=y
CONFIG_IOAPIC=y
CONFIG_USE_WATCHDOG_ON_BOOT=y
#
# System tables
#
CONFIG_GENERATE_SMBIOS_TABLES=y
CONFIG_MAINBOARD_SERIAL_NUMBER="123456789"
# end of System tables
#
# Payload
#
CONFIG_PAYLOAD_NONE=y
# end of Payload
#
# Debugging
#
#
# CPU Debug Settings
#
# CONFIG_DISPLAY_MTRRS is not set
#
# BLOB Debug Settings
#
#
# General Debug Settings
#
# CONFIG_FATAL_ASSERTS is not set
# CONFIG_DEBUG_CBFS is not set
CONFIG_HAVE_DEBUG_RAM_SETUP=y
# CONFIG_DEBUG_RAM_SETUP is not set
CONFIG_HAVE_DEBUG_SMBUS=y
# CONFIG_DEBUG_SMBUS is not set
# CONFIG_DEBUG_CONSOLE_INIT is not set
# CONFIG_DEBUG_SPI_FLASH is not set
# CONFIG_DEBUG_BOOT_STATE is not set
# CONFIG_DEBUG_ADA_CODE is not set
# end of Debugging
CONFIG_DECOMPRESS_OFAST=y
CONFIG_WARNINGS_ARE_ERRORS=y
CONFIG_MAX_REBOOT_CNT=3
CONFIG_RELOCATABLE_MODULES=y
CONFIG_HAVE_BOOTBLOCK=y
CONFIG_HAVE_ROMSTAGE=y
CONFIG_HAVE_RAMSTAGE=y
+9
View File
@@ -0,0 +1,9 @@
cbtree="default"
romtype="normal"
arch="x86_64"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_memtest="y"
microcode_required="n"
blobs_required="n"
@@ -0,0 +1,577 @@
#
# Automatically generated file; DO NOT EDIT.
# coreboot configuration
#
#
# General setup
#
CONFIG_COREBOOT_BUILD=y
CONFIG_LOCALVERSION=""
CONFIG_CBFS_PREFIX="fallback"
CONFIG_COMPILER_GCC=y
# CONFIG_COMPILER_LLVM_CLANG is not set
CONFIG_ARCH_SUPPORTS_CLANG=y
# CONFIG_ANY_TOOLCHAIN is not set
# CONFIG_CCACHE is not set
# CONFIG_IWYU is not set
# CONFIG_FMD_GENPARSER is not set
# CONFIG_UTIL_GENPARSER is not set
# CONFIG_OPTION_BACKEND_NONE is not set
CONFIG_USE_OPTION_TABLE=y
CONFIG_STATIC_OPTION_TABLE=y
CONFIG_COMPRESS_RAMSTAGE_LZMA=y
# CONFIG_COMPRESS_RAMSTAGE_LZ4 is not set
CONFIG_INCLUDE_CONFIG_FILE=y
CONFIG_COLLECT_TIMESTAMPS=y
# CONFIG_TIMESTAMPS_ON_CONSOLE is not set
CONFIG_USE_BLOBS=y
# CONFIG_USE_AMD_BLOBS is not set
# CONFIG_USE_QC_BLOBS is not set
# CONFIG_COVERAGE is not set
# CONFIG_UBSAN is not set
CONFIG_HAVE_ASAN_IN_RAMSTAGE=y
# CONFIG_ASAN is not set
# CONFIG_NO_STAGE_CACHE is not set
CONFIG_TSEG_STAGE_CACHE=y
# CONFIG_UPDATE_IMAGE is not set
# CONFIG_BOOTSPLASH_IMAGE is not set
# CONFIG_FW_CONFIG is not set
#
# Software Bill Of Materials (SBOM)
#
# CONFIG_SBOM is not set
# end of Software Bill Of Materials (SBOM)
# end of General setup
#
# Mainboard
#
#
# Important: Run 'make distclean' before switching boards
#
# CONFIG_VENDOR_51NB is not set
# CONFIG_VENDOR_ACER is not set
# CONFIG_VENDOR_ADLINK is not set
# CONFIG_VENDOR_AMD is not set
# CONFIG_VENDOR_AOPEN is not set
# CONFIG_VENDOR_APPLE is not set
# CONFIG_VENDOR_ASROCK is not set
# CONFIG_VENDOR_ASUS is not set
# CONFIG_VENDOR_BIOSTAR is not set
# CONFIG_VENDOR_BOSTENTECH is not set
# CONFIG_VENDOR_CAVIUM is not set
# CONFIG_VENDOR_CLEVO is not set
# CONFIG_VENDOR_COMPULAB is not set
# CONFIG_VENDOR_DELL is not set
# CONFIG_VENDOR_EMULATION is not set
# CONFIG_VENDOR_EXAMPLE is not set
# CONFIG_VENDOR_FACEBOOK is not set
# CONFIG_VENDOR_FOXCONN is not set
# CONFIG_VENDOR_GETAC is not set
# CONFIG_VENDOR_GIGABYTE is not set
# CONFIG_VENDOR_GOOGLE is not set
# CONFIG_VENDOR_HP is not set
# CONFIG_VENDOR_IBASE is not set
CONFIG_VENDOR_INTEL=y
# CONFIG_VENDOR_KONTRON is not set
# CONFIG_VENDOR_LENOVO is not set
# CONFIG_VENDOR_LIBRETREND is not set
# CONFIG_VENDOR_MSI is not set
# CONFIG_VENDOR_OCP is not set
# CONFIG_VENDOR_OPENCELLULAR is not set
# CONFIG_VENDOR_PACKARDBELL is not set
# CONFIG_VENDOR_PCENGINES is not set
# CONFIG_VENDOR_PINE64 is not set
# CONFIG_VENDOR_PORTWELL is not set
# CONFIG_VENDOR_PRODRIVE is not set
# CONFIG_VENDOR_PROTECTLI is not set
# CONFIG_VENDOR_PURISM is not set
# CONFIG_VENDOR_RAZER is not set
# CONFIG_VENDOR_RODA is not set
# CONFIG_VENDOR_SAMSUNG is not set
# CONFIG_VENDOR_SAPPHIRE is not set
# CONFIG_VENDOR_SIEMENS is not set
# CONFIG_VENDOR_SIFIVE is not set
# CONFIG_VENDOR_STARLABS is not set
# CONFIG_VENDOR_SUPERMICRO is not set
# CONFIG_VENDOR_SYSTEM76 is not set
# CONFIG_VENDOR_TI is not set
# CONFIG_VENDOR_UP is not set
CONFIG_BOARD_SPECIFIC_OPTIONS=y
CONFIG_MAINBOARD_PART_NUMBER="D510MO"
CONFIG_MAINBOARD_VERSION="1.0"
CONFIG_MAINBOARD_DIR="intel/d510mo"
CONFIG_VGA_BIOS_ID="8086,a001"
CONFIG_DIMM_MAX=4
CONFIG_DIMM_SPD_SIZE=256
CONFIG_FMDFILE=""
# CONFIG_NO_POST is not set
CONFIG_MAINBOARD_VENDOR="Intel"
CONFIG_CBFS_SIZE=0x01000000
CONFIG_MAX_CPUS=4
# CONFIG_ONBOARD_VGA_IS_PRIMARY is not set
CONFIG_POST_DEVICE=y
CONFIG_POST_IO=y
CONFIG_DEVICETREE="devicetree.cb"
# CONFIG_VBOOT is not set
CONFIG_OVERRIDE_DEVICETREE=""
# CONFIG_VGA_BIOS is not set
CONFIG_MAINBOARD_SMBIOS_MANUFACTURER="Intel"
CONFIG_INTEL_GMA_VBT_FILE="src/mainboard/$(MAINBOARDDIR)/data.vbt"
CONFIG_PRERAM_CBMEM_CONSOLE_SIZE=0xc00
CONFIG_CMOS_DEFAULT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.default"
CONFIG_CMOS_LAYOUT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.layout"
CONFIG_BOOT_DEVICE_SPI_FLASH_BUS=0
# CONFIG_CONSOLE_POST is not set
CONFIG_MEMLAYOUT_LD_FILE="src/arch/x86/memlayout.ld"
CONFIG_DCACHE_RAM_BASE=0xfefc0000
CONFIG_DCACHE_RAM_SIZE=0x8000
CONFIG_C_ENV_BOOTBLOCK_SIZE=0x40000
CONFIG_DCACHE_BSP_STACK_SIZE=0x2000
CONFIG_ECAM_MMCONF_BASE_ADDRESS=0xe0000000
CONFIG_ECAM_MMCONF_BUS_NUMBER=256
CONFIG_MAX_ACPI_TABLE_SIZE_KB=144
CONFIG_SPI_FLASH_INCLUDE_ALL_DRIVERS=y
CONFIG_SPI_FLASH_WINBOND=y
# CONFIG_DRIVERS_INTEL_WIFI is not set
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x20000
# CONFIG_BOARD_INTEL_ADLRVP_P is not set
# CONFIG_BOARD_INTEL_ADLRVP_P_EXT_EC is not set
# CONFIG_BOARD_INTEL_ADLRVP_P_MCHP is not set
# CONFIG_BOARD_INTEL_ADLRVP_M is not set
# CONFIG_BOARD_INTEL_ADLRVP_M_EXT_EC is not set
# CONFIG_BOARD_INTEL_ADLRVP_N is not set
# CONFIG_BOARD_INTEL_ADLRVP_N_EXT_EC is not set
# CONFIG_BOARD_INTEL_ADLRVP_RPL_EXT_EC is not set
# CONFIG_BOARD_INTEL_APOLLOLAKE_RVP1 is not set
# CONFIG_BOARD_INTEL_APOLLOLAKE_RVP2 is not set
# CONFIG_BOARD_INTEL_BASKING_RIDGE is not set
# CONFIG_BOARD_INTEL_CEDARISLAND_CRB is not set
#
# Coffeelake RVP
#
# CONFIG_BOARD_INTEL_COFFEELAKE_RVPU is not set
# CONFIG_BOARD_INTEL_COFFEELAKE_RVP11 is not set
# CONFIG_BOARD_INTEL_WHISKEYLAKE_RVP is not set
# CONFIG_BOARD_INTEL_COFFEELAKE_RVP8 is not set
# CONFIG_BOARD_INTEL_COMETLAKE_RVPU is not set
CONFIG_BOARD_INTEL_D510MO=y
# CONFIG_BOARD_INTEL_D945GCLF is not set
# CONFIG_BOARD_INTEL_DCP847SKE is not set
# CONFIG_BOARD_INTEL_DG41WV is not set
# CONFIG_BOARD_INTEL_DG43GT is not set
# CONFIG_BOARD_INTEL_ELKHARTLAKE_CRB is not set
# CONFIG_BOARD_INTEL_EMERALDLAKE2 is not set
# CONFIG_BOARD_INTEL_GALILEO is not set
# CONFIG_BOARD_INTEL_GLKRVP is not set
# CONFIG_BOARD_INTEL_HARCUVAR is not set
# CONFIG_BOARD_INTEL_JASPERLAKE_RVP is not set
# CONFIG_BOARD_INTEL_JASPERLAKE_RVP_EXT_EC is not set
# CONFIG_BOARD_INTEL_KBLRVP3 is not set
# CONFIG_BOARD_INTEL_KBLRVP7 is not set
# CONFIG_BOARD_INTEL_KBLRVP8 is not set
# CONFIG_BOARD_INTEL_KBLRVP11 is not set
# CONFIG_BOARD_INTEL_KUNIMITSU is not set
# CONFIG_BOARD_INTEL_LEAFHILL is not set
# CONFIG_BOARD_INTEL_MINNOW3 is not set
# CONFIG_BOARD_INTEL_MTLRVP_P is not set
# CONFIG_BOARD_INTEL_MTLRVP_P_EXT_EC is not set
# CONFIG_BOARD_INTEL_SKLSDLBRK is not set
# CONFIG_BOARD_INTEL_SHADOWMOUNTAIN is not set
# CONFIG_BOARD_INTEL_STRAGO is not set
# CONFIG_BOARD_INTEL_TGLRVP_UP3 is not set
# CONFIG_BOARD_INTEL_TGLRVP_UP4 is not set
# CONFIG_BOARD_INTEL_WTM2 is not set
CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME="D510MO"
CONFIG_PCIEXP_HOTPLUG_BUSES=32
CONFIG_PCIEXP_HOTPLUG_MEM=0x800000
CONFIG_PCIEXP_HOTPLUG_PREFETCH_MEM=0x10000000
CONFIG_PS2K_EISAID="PNP0303"
CONFIG_PS2M_EISAID="PNP0F13"
# CONFIG_DEBUG_SMI is not set
# CONFIG_PCIEXP_L1_SUB_STATE is not set
# CONFIG_PCIEXP_CLK_PM is not set
# CONFIG_DRIVERS_UART_8250IO is not set
CONFIG_HEAP_SIZE=0x4000
CONFIG_EC_GPE_SCI=0x50
CONFIG_BOARD_ROMSIZE_KB_1024=y
# CONFIG_COREBOOT_ROMSIZE_KB_256 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_512 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_1024 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_2048 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_4096 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_5120 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_6144 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_8192 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_10240 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_12288 is not set
CONFIG_COREBOOT_ROMSIZE_KB_16384=y
# CONFIG_COREBOOT_ROMSIZE_KB_32768 is not set
# CONFIG_COREBOOT_ROMSIZE_KB_65536 is not set
CONFIG_COREBOOT_ROMSIZE_KB=16384
CONFIG_ROM_SIZE=0x01000000
CONFIG_HAVE_POWER_STATE_AFTER_FAILURE=y
CONFIG_HAVE_POWER_STATE_PREVIOUS_AFTER_FAILURE=y
CONFIG_POWER_STATE_OFF_AFTER_FAILURE=y
# CONFIG_POWER_STATE_ON_AFTER_FAILURE is not set
# CONFIG_POWER_STATE_PREVIOUS_AFTER_FAILURE is not set
CONFIG_MAINBOARD_POWER_FAILURE_STATE=0
# end of Mainboard
#
# Chipset
#
#
# SoC
#
CONFIG_CHIPSET_DEVICETREE=""
CONFIG_CBFS_MCACHE_SIZE=0x4000
CONFIG_ROMSTAGE_ADDR=0x2000000
CONFIG_VERSTAGE_ADDR=0x2000000
CONFIG_SMM_RESERVED_SIZE=0x80000
CONFIG_SMM_MODULE_STACK_SIZE=0x400
CONFIG_ACPI_CPU_STRING="\\_SB.CP%02X"
CONFIG_EHCI_BAR=0xfef00000
CONFIG_STACK_SIZE=0x2000
CONFIG_VBT_DATA_SIZE_KB=8
CONFIG_INTEL_GMA_BCLV_OFFSET=0xc8254
CONFIG_INTEL_GMA_BCLV_WIDTH=16
CONFIG_INTEL_GMA_BCLM_OFFSET=0xc8256
CONFIG_INTEL_GMA_BCLM_WIDTH=16
CONFIG_BOOTBLOCK_IN_CBFS=y
CONFIG_FIXED_MCHBAR_MMIO_BASE=0xfed14000
CONFIG_FIXED_DMIBAR_MMIO_BASE=0xfed18000
CONFIG_FIXED_EPBAR_MMIO_BASE=0xfed19000
# CONFIG_PCIEXP_ASPM is not set
# CONFIG_PCIEXP_COMMON_CLOCK is not set
CONFIG_FIXED_SMBUS_IO_BASE=0x400
CONFIG_HPET_MIN_TICKS=0x80
CONFIG_CBFS_CACHE_ALIGN=8
CONFIG_INTEL_HAS_TOP_SWAP=y
# CONFIG_INTEL_ADD_TOP_SWAP_BOOTBLOCK is not set
CONFIG_INTEL_TOP_SWAP_BOOTBLOCK_SIZE=0x10000
#
# CPU
#
CONFIG_CPU_INTEL_MODEL_106CX=y
CONFIG_SOCKET_SPECIFIC_OPTIONS=y
CONFIG_CPU_INTEL_SOCKET_FCBGA559=y
CONFIG_CPU_INTEL_COMMON=y
CONFIG_ENABLE_VMX=y
CONFIG_SET_IA32_FC_LOCK_BIT=y
CONFIG_SET_MSR_AESNI_LOCK_BIT=y
CONFIG_CPU_INTEL_COMMON_TIMEBASE=y
CONFIG_CPU_INTEL_COMMON_SMM=y
CONFIG_MICROCODE_UPDATE_PRE_RAM=y
CONFIG_CPU_HAS_L2_ENABLE_MSR=y
CONFIG_PARALLEL_MP=y
CONFIG_XAPIC_ONLY=y
# CONFIG_X2APIC_ONLY is not set
# CONFIG_X2APIC_RUNTIME is not set
# CONFIG_X2APIC_LATE_WORKAROUND is not set
CONFIG_UDELAY_TSC=y
CONFIG_TSC_MONOTONIC_TIMER=y
CONFIG_TSC_SYNC_MFENCE=y
CONFIG_LOGICAL_CPUS=y
CONFIG_HAVE_SMI_HANDLER=y
CONFIG_SMM_TSEG=y
CONFIG_SMM_LAPIC_REMAP_MITIGATION=y
CONFIG_AP_STACK_SIZE=0x800
CONFIG_SMP=y
CONFIG_MMX=y
CONFIG_SSE=y
CONFIG_SSE2=y
CONFIG_SUPPORT_CPU_UCODE_IN_CBFS=y
CONFIG_USE_CPU_MICROCODE_CBFS_BINS=y
CONFIG_CPU_MICROCODE_CBFS_DEFAULT_BINS=y
# CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS is not set
# CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_HEADER is not set
# CONFIG_CPU_MICROCODE_CBFS_NONE is not set
#
# Northbridge
#
CONFIG_NORTHBRIDGE_INTEL_PINEVIEW=y
#
# Southbridge
#
CONFIG_PCIEXP_HOTPLUG=y
CONFIG_SOUTHBRIDGE_INTEL_I82801GX=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_RESET=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_RTC=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_PMCLIB=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_PMBASE=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_GPIO=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_HPET=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_EARLY_SMBUS=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_SMBUS=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_SPI=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_SPI_ICH7=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_PIRQ_ACPI_GEN=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_RCBA_PIRQ=y
CONFIG_HAVE_INTEL_CHIPSET_LOCKDOWN=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_SMM=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_USB_DEBUG=y
CONFIG_INTEL_CHIPSET_LOCKDOWN=y
CONFIG_TCO_SPACE_NOT_YET_SPLIT=y
CONFIG_SOUTHBRIDGE_INTEL_COMMON_WATCHDOG=y
CONFIG_FIXED_RCBA_MMIO_BASE=0xfed1c000
CONFIG_RCBA_LENGTH=0x4000
#
# Super I/O
#
CONFIG_SUPERIO_WINBOND_COMMON_PRE_RAM=y
CONFIG_SUPERIO_WINBOND_W83627THG=y
#
# Embedded Controllers
#
CONFIG_ARCH_X86=y
CONFIG_ARCH_BOOTBLOCK_X86_32=y
CONFIG_ARCH_VERSTAGE_X86_32=y
CONFIG_ARCH_ROMSTAGE_X86_32=y
CONFIG_ARCH_POSTCAR_X86_32=y
CONFIG_ARCH_RAMSTAGE_X86_32=y
CONFIG_ARCH_ALL_STAGES_X86_32=y
CONFIG_AP_IN_SIPI_WAIT=y
CONFIG_SIPI_VECTOR_IN_ROM=y
CONFIG_X86_TOP4G_BOOTMEDIA_MAP=y
CONFIG_PC80_SYSTEM=y
CONFIG_HAVE_CMOS_DEFAULT=y
CONFIG_POSTCAR_STAGE=y
CONFIG_BOOTBLOCK_SIMPLE=y
# CONFIG_BOOTBLOCK_NORMAL is not set
CONFIG_COLLECT_TIMESTAMPS_TSC=y
CONFIG_HAVE_CF9_RESET=y
CONFIG_DEBUG_HW_BREAKPOINTS=y
CONFIG_DEBUG_NULL_DEREF_BREAKPOINTS=y
# end of Chipset
#
# Devices
#
CONFIG_HAVE_VGA_TEXT_FRAMEBUFFER=y
CONFIG_MAINBOARD_HAS_NATIVE_VGA_INIT=y
CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT=y
# CONFIG_VGA_ROM_RUN is not set
# CONFIG_NO_GFX_INIT is not set
CONFIG_NO_EARLY_GFX_INIT=y
#
# Display
#
CONFIG_VGA_TEXT_FRAMEBUFFER=y
# end of Display
CONFIG_PCI=y
CONFIG_ECAM_MMCONF_SUPPORT=y
CONFIG_PCIX_PLUGIN_SUPPORT=y
CONFIG_CARDBUS_PLUGIN_SUPPORT=y
CONFIG_AZALIA_PLUGIN_SUPPORT=y
CONFIG_PCIEXP_PLUGIN_SUPPORT=y
CONFIG_ECAM_MMCONF_LENGTH=0x10000000
CONFIG_PCI_ALLOW_BUS_MASTER=y
CONFIG_PCI_SET_BUS_MASTER_PCI_BRIDGES=y
CONFIG_PCI_ALLOW_BUS_MASTER_ANY_DEVICE=y
# CONFIG_PCIEXP_SUPPORT_RESIZABLE_BARS is not set
# CONFIG_PCIEXP_LANE_ERR_STAT_CLEAR is not set
CONFIG_PCIEXP_HOTPLUG_PREFETCH_MEM_ABOVE_4G=y
# CONFIG_PCIEXP_HOTPLUG_PREFETCH_MEM_BELOW_4G is not set
CONFIG_PCIEXP_HOTPLUG_IO=0x2000
CONFIG_FIRMWARE_CONNECTION_MANAGER=y
# CONFIG_SOFTWARE_CONNECTION_MANAGER is not set
# CONFIG_EARLY_PCI_BRIDGE is not set
CONFIG_SUBSYSTEM_VENDOR_ID=0x0000
CONFIG_SUBSYSTEM_DEVICE_ID=0x0000
CONFIG_INTEL_GMA_HAVE_VBT=y
CONFIG_INTEL_GMA_ADD_VBT=y
# CONFIG_SOFTWARE_I2C is not set
CONFIG_I2C_TRANSFER_TIMEOUT_US=500000
# CONFIG_RESOURCE_ALLOCATION_TOP_DOWN is not set
CONFIG_NO_DDR5=y
CONFIG_NO_LPDDR4=y
CONFIG_NO_DDR4=y
CONFIG_USE_DDR3=y
CONFIG_USE_DDR2=y
# end of Devices
#
# Generic Drivers
#
CONFIG_CRB_TPM_BASE_ADDRESS=0xfed40000
# CONFIG_ELOG is not set
# CONFIG_SMMSTORE is not set
CONFIG_SPI_FLASH=y
CONFIG_BOOT_DEVICE_SPI_FLASH_RW_NOMMAP=y
CONFIG_BOOT_DEVICE_SPI_FLASH_RW_NOMMAP_EARLY=y
# CONFIG_SPI_FLASH_NO_FAST_READ is not set
CONFIG_SPI_FLASH_ADESTO=y
CONFIG_SPI_FLASH_AMIC=y
CONFIG_SPI_FLASH_ATMEL=y
CONFIG_SPI_FLASH_EON=y
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_SST=y
CONFIG_SPI_FLASH_STMICRO=y
# CONFIG_DRIVERS_UART_OXPCIE is not set
CONFIG_HAVE_USBDEBUG=y
# CONFIG_USBDEBUG is not set
# CONFIG_VPD is not set
# CONFIG_DRIVERS_GENERIC_CBFS_SERIAL is not set
# CONFIG_DRIVERS_GENERIC_CBFS_UUID is not set
# CONFIG_DRIVERS_GENESYSLOGIC_GL9750 is not set
# CONFIG_DRIVERS_GENESYSLOGIC_GL9755 is not set
# CONFIG_DRIVERS_GENESYSLOGIC_GL9763E is not set
CONFIG_DRIVERS_I2C_CK505=y
# CONFIG_DRIVERS_I2C_MAX98396 is not set
CONFIG_INTEL_EDID=y
CONFIG_INTEL_INT15=y
CONFIG_INTEL_GMA_ACPI=y
CONFIG_INTEL_GMA_OPREGION_2_0=y
# CONFIG_DRIVERS_NXP_UWB_SR1XX is not set
# CONFIG_DRIVERS_PS2_KEYBOARD is not set
CONFIG_DRIVERS_MC146818=y
# CONFIG_USE_PC_CMOS_ALTCENTURY is not set
CONFIG_VGA=y
# CONFIG_DRIVERS_SIL_3114 is not set
# end of Generic Drivers
#
# Security
#
#
# CBFS verification
#
# CONFIG_CBFS_VERIFICATION is not set
# end of CBFS verification
#
# Verified Boot (vboot)
#
# end of Verified Boot (vboot)
#
# Trusted Platform Module
#
CONFIG_NO_TPM=y
# end of Trusted Platform Module
#
# Memory initialization
#
CONFIG_PLATFORM_HAS_DRAM_CLEAR=y
CONFIG_SECURITY_CLEAR_DRAM_ON_REGULAR_BOOT=y
# end of Memory initialization
# CONFIG_STM is not set
CONFIG_BOOTMEDIA_LOCK_NONE=y
# CONFIG_BOOTMEDIA_LOCK_CONTROLLER is not set
# CONFIG_BOOTMEDIA_LOCK_CHIP is not set
# CONFIG_BOOTMEDIA_SMM_BWP is not set
# end of Security
CONFIG_ACPI_HAVE_PCAT_8259=y
CONFIG_ACPI_INTEL_HARDWARE_SLEEP_VALUES=y
CONFIG_ACPI_SOC_NVS=y
CONFIG_HAVE_ACPI_TABLES=y
CONFIG_BOOT_DEVICE_SPI_FLASH=y
CONFIG_BOOT_DEVICE_MEMORY_MAPPED=y
CONFIG_BOOT_DEVICE_SUPPORTS_WRITES=y
#
# Console
#
CONFIG_BOOTBLOCK_CONSOLE=y
CONFIG_POSTCAR_CONSOLE=y
CONFIG_SQUELCH_EARLY_SMP=y
# CONFIG_SPKMODEM is not set
# CONFIG_CONSOLE_NE2K is not set
CONFIG_CONSOLE_CBMEM=y
# CONFIG_CONSOLE_CBMEM_DUMP_TO_UART is not set
# CONFIG_CONSOLE_SPI_FLASH is not set
# CONFIG_CONSOLE_I2C_SMBUS is not set
# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_8 is not set
# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_7 is not set
# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_6 is not set
# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_5 is not set
# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_4 is not set
# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_3 is not set
# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_2 is not set
# CONFIG_DEFAULT_CONSOLE_LOGLEVEL_1 is not set
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_0=y
CONFIG_DEFAULT_CONSOLE_LOGLEVEL=0
CONFIG_CONSOLE_USE_LOGLEVEL_PREFIX=y
CONFIG_CONSOLE_USE_ANSI_ESCAPES=y
# CONFIG_CMOS_POST is not set
CONFIG_POST_DEVICE_NONE=y
# CONFIG_POST_DEVICE_LPC is not set
# CONFIG_POST_DEVICE_PCI_PCIE is not set
CONFIG_POST_IO_PORT=0x80
CONFIG_HWBASE_DEBUG_NULL=y
# end of Console
CONFIG_HAVE_ACPI_RESUME=y
CONFIG_RESUME_PATH_SAME_AS_BOOT=y
CONFIG_HAVE_MONOTONIC_TIMER=y
CONFIG_HAVE_OPTION_TABLE=y
CONFIG_IOAPIC=y
CONFIG_USE_WATCHDOG_ON_BOOT=y
#
# System tables
#
CONFIG_GENERATE_SMBIOS_TABLES=y
CONFIG_MAINBOARD_SERIAL_NUMBER="123456789"
# end of System tables
#
# Payload
#
CONFIG_PAYLOAD_NONE=y
# end of Payload
#
# Debugging
#
#
# CPU Debug Settings
#
# CONFIG_DISPLAY_MTRRS is not set
#
# BLOB Debug Settings
#
#
# General Debug Settings
#
# CONFIG_FATAL_ASSERTS is not set
# CONFIG_DEBUG_CBFS is not set
CONFIG_HAVE_DEBUG_RAM_SETUP=y
# CONFIG_DEBUG_RAM_SETUP is not set
CONFIG_HAVE_DEBUG_SMBUS=y
# CONFIG_DEBUG_SMBUS is not set
# CONFIG_DEBUG_CONSOLE_INIT is not set
# CONFIG_DEBUG_SPI_FLASH is not set
# CONFIG_DEBUG_BOOT_STATE is not set
# CONFIG_DEBUG_ADA_CODE is not set
# end of Debugging
CONFIG_DECOMPRESS_OFAST=y
CONFIG_WARNINGS_ARE_ERRORS=y
CONFIG_MAX_REBOOT_CNT=3
CONFIG_RELOCATABLE_MODULES=y
CONFIG_HAVE_BOOTBLOCK=y
CONFIG_HAVE_ROMSTAGE=y
CONFIG_HAVE_RAMSTAGE=y
+43
View File
@@ -0,0 +1,43 @@
src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/F14MicrocodePatch05000119.c
3rdparty/arm-trusted-firmware/plat/mediatek/mt8173/drivers/spm/spm_hotplug.c
3rdparty/arm-trusted-firmware/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c
3rdparty/arm-trusted-firmware/plat/mediatek/mt8173/drivers/spm/spm_suspend.c
3rdparty/arm-trusted-firmware/plat/rockchip/rk3368/drivers/ddr/rk3368_ddr_reg_resume_V1.05.bin
3rdparty/chromeec/test/legacy_nvmem_dump.h
3rdparty/vboot/tests/futility/data/bios_link_mp.bin
3rdparty/vboot/tests/futility/data/bios_peppy_mp.bin
src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/F14MicrocodePatch0500000B.c
src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/F14MicrocodePatch0500001A.c
src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/F14MicrocodePatch05000029.c
src/vendorcode/amd/agesa/f14/Proc/GNB/Nb/Family/0x14/F14NbSmuFirmware.h
src/vendorcode/amd/agesa/f14/Proc/GNB/PCIe/Family/0x14/F14PcieAlibSsdt.h
src/vendorcode/amd/agesa/f15tn/Proc/CPU/Family/0x15/TN/F15TnMicrocodePatch0600111F_Enc.c
src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GnbSmuFirmwareTN.h
src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/PcieAlibSsdtTNFM2.h
src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/PcieAlibSsdtTNFS1.h
src/vendorcode/amd/agesa/f16kb/Proc/CPU/Family/0x16/KB/F16KbId7001MicrocodePatch.c
src/vendorcode/amd/agesa/f16kb/Proc/GNB/Modules/GnbInitKB/AlibSsdtKB.h
src/vendorcode/amd/agesa/f16kb/Proc/GNB/Modules/GnbInitKB/GnbSamuPatchKB.h
src/vendorcode/amd/agesa/f16kb/Proc/GNB/Modules/GnbInitKB/GnbSmuFirmwareKB.h
3rdparty/chromeec/third_party/bmi260/accelgyro_bmi260_config_tbin.h
3rdparty/arm-trusted-firmware/plat/mediatek/mt8173/drivers/spm/spm_hotplug.c
3rdparty/arm-trusted-firmware/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c
3rdparty/arm-trusted-firmware/plat/mediatek/mt8173/drivers/spm/spm_suspend.c
3rdparty/arm-trusted-firmware/plat/rockchip/rk3368/drivers/ddr/rk3368_ddr_reg_resume_V1.05.bin
3rdparty/vboot/tests/futility/data/bios_link_mp.bin
3rdparty/vboot/tests/futility/data/bios_peppy_mp.bin
src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/F14MicrocodePatch0500000B.c
src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/F14MicrocodePatch0500001A.c
src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/F14MicrocodePatch05000029.c
src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/F14MicrocodePatch05000119.c
src/vendorcode/amd/agesa/f14/Proc/GNB/Nb/Family/0x14/F14NbSmuFirmware.h
src/vendorcode/amd/agesa/f14/Proc/GNB/PCIe/Family/0x14/F14PcieAlibSsdt.h
src/vendorcode/amd/agesa/f15tn/Proc/CPU/Family/0x15/TN/F15TnMicrocodePatch0600111F_Enc.c
src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GnbSmuFirmwareTN.h
src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/PcieAlibSsdtTNFM2.h
src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/PcieAlibSsdtTNFS1.h
src/vendorcode/amd/agesa/f16kb/Proc/CPU/Family/0x16/KB/F16KbId7001MicrocodePatch.c
src/vendorcode/amd/agesa/f16kb/Proc/GNB/Modules/GnbInitKB/AlibSsdtKB.h
src/vendorcode/amd/agesa/f16kb/Proc/GNB/Modules/GnbInitKB/GnbSamuPatchKB.h
src/vendorcode/amd/agesa/f16kb/Proc/GNB/Modules/GnbInitKB/GnbSmuFirmwareKB.h
3rdparty/vboot/tests/futility/data/bios_peppy_dev.bin
+4
View File
@@ -0,0 +1,4 @@
cbtree="default"
romtype="normal"
cbrevision="e70bc423f9a2e1d13827f2703efe1f9c72549f20"
arch="x86_64"
@@ -0,0 +1,23 @@
From 4c5971a6fcf7e948f7df4d0ce2ab0751060cb2ca Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@retroboot.org>
Date: Fri, 19 Mar 2021 05:54:58 +0000
Subject: [PATCH 01/18] apple/macbook21: Set default VRAM to 64MiB instead of
8MiB
---
src/mainboard/apple/macbook21/cmos.default | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mainboard/apple/macbook21/cmos.default b/src/mainboard/apple/macbook21/cmos.default
index cf1bc4566e..dc0df3b6d6 100644
--- a/src/mainboard/apple/macbook21/cmos.default
+++ b/src/mainboard/apple/macbook21/cmos.default
@@ -5,4 +5,4 @@ boot_devices=''
boot_default=0x40
cmos_defaults_loaded=Yes
lpt=Enable
-gfx_uma_size=8M
+gfx_uma_size=64M
--
2.39.2
@@ -0,0 +1,68 @@
From ff523fd40649b72512b0f1253701509d83ca4a8d Mon Sep 17 00:00:00 2001
From: Vitali64 <5405891-vitali64yt@users.noreply.gitlab.com>
Date: Wed, 27 Oct 2021 13:36:01 +0200
Subject: [PATCH 02/18] add c3 and clockgen to apple/macbook21
---
src/mainboard/apple/macbook21/Kconfig | 1 +
src/mainboard/apple/macbook21/cstates.c | 13 +++++++++++++
src/mainboard/apple/macbook21/devicetree.cb | 6 ++++++
3 files changed, 20 insertions(+)
diff --git a/src/mainboard/apple/macbook21/Kconfig b/src/mainboard/apple/macbook21/Kconfig
index 5f5ffde588..27377b737c 100644
--- a/src/mainboard/apple/macbook21/Kconfig
+++ b/src/mainboard/apple/macbook21/Kconfig
@@ -16,6 +16,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_ACPI_TABLES
select HAVE_ACPI_RESUME
select I945_LVDS
+ select DRIVERS_I2C_CK505
config MAINBOARD_DIR
default "apple/macbook21"
diff --git a/src/mainboard/apple/macbook21/cstates.c b/src/mainboard/apple/macbook21/cstates.c
index 13d06f0839..88b8669c61 100644
--- a/src/mainboard/apple/macbook21/cstates.c
+++ b/src/mainboard/apple/macbook21/cstates.c
@@ -29,6 +29,19 @@ static const acpi_cstate_t cst_entries[] = {
.addrh = 0,
}
},
+ {
+ .ctype = 3,
+ .latency = 17,
+ .power = 250,
+ .resource = {
+ .space_id = ACPI_ADDRESS_SPACE_FIXED,
+ .bit_width = ACPI_FFIXEDHW_VENDOR_INTEL,
+ .bit_offset = ACPI_FFIXEDHW_CLASS_MWAIT,
+ .access_size = ACPI_ACCESS_SIZE_UNDEFINED,
+ .addrl = 0x20,
+ .addrh = 0,
+ }
+ },
};
int get_cst_entries(const acpi_cstate_t **entries)
diff --git a/src/mainboard/apple/macbook21/devicetree.cb b/src/mainboard/apple/macbook21/devicetree.cb
index dd701da7ed..5587c48d1f 100644
--- a/src/mainboard/apple/macbook21/devicetree.cb
+++ b/src/mainboard/apple/macbook21/devicetree.cb
@@ -100,7 +100,13 @@ chip northbridge/intel/i945
end
device pci 1f.3 on # SMBUS
subsystemid 0x8086 0x7270
+ chip drivers/i2c/ck505
+ register "mask" = "{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }"
+ register "regs" = "{ 0x77, 0x77, 0x2d, 0x00, 0x21, 0x10, 0x3b, 0x06, 0x07, 0x0f, 0xf0, 0x01, 0x1e, 0x7f, 0x80, 0x80, 0x10, 0x08, 0x04, 0x01 }"
+ device i2c 69 on end
+ end
end
+
end
end
end
--
2.39.2
@@ -0,0 +1,23 @@
From fe79712702002bf2044227d6c3cef7ae022e3539 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@osboot.org>
Date: Sun, 3 Jan 2021 03:34:01 +0000
Subject: [PATCH 03/18] lenovo/x60: 64MiB Video RAM changed to default
(previously it was 8MiB)
---
src/mainboard/lenovo/x60/cmos.default | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mainboard/lenovo/x60/cmos.default b/src/mainboard/lenovo/x60/cmos.default
index 5c3576d1f3..88170a1aab 100644
--- a/src/mainboard/lenovo/x60/cmos.default
+++ b/src/mainboard/lenovo/x60/cmos.default
@@ -15,4 +15,4 @@ trackpoint=Enable
sticky_fn=Disable
power_management_beeps=Enable
low_battery_beep=Enable
-gfx_uma_size=8M
+gfx_uma_size=64M
--
2.39.2
@@ -0,0 +1,22 @@
From 79440902866bdafeec651476a5a0e51d42b43b21 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@osboot.org>
Date: Mon, 22 Feb 2021 22:16:59 +0000
Subject: [PATCH 04/18] lenovo/t60: make 64MiB VRAM the default in cmos.default
---
src/mainboard/lenovo/t60/cmos.default | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mainboard/lenovo/t60/cmos.default b/src/mainboard/lenovo/t60/cmos.default
index af865f16da..7f03157df7 100644
--- a/src/mainboard/lenovo/t60/cmos.default
+++ b/src/mainboard/lenovo/t60/cmos.default
@@ -15,4 +15,4 @@ trackpoint=Enable
sticky_fn=Disable
power_management_beeps=Enable
low_battery_beep=Enable
-gfx_uma_size=8M
+gfx_uma_size=64M
--
2.39.2
@@ -0,0 +1,27 @@
From 73ca2562e77c971c2e581a414dc57b4b9aa544d7 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org>
Date: Fri, 14 May 2021 13:10:33 +0100
Subject: [PATCH 05/18] lenovo/t400: set VRAM to 352MiB VRAM by default
In the past, this caused stability issues so we set it to 256MiB. Nowadays,
coreboot has fixed the issue preventing this. See:
https://review.coreboot.org/c/coreboot/+/16831
So, set the VRAM to 352MiB
---
src/mainboard/lenovo/t400/cmos.default | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mainboard/lenovo/t400/cmos.default b/src/mainboard/lenovo/t400/cmos.default
index a326e315b1..e74d15d030 100644
--- a/src/mainboard/lenovo/t400/cmos.default
+++ b/src/mainboard/lenovo/t400/cmos.default
@@ -13,4 +13,4 @@ power_management_beeps=Enable
low_battery_beep=Enable
sata_mode=AHCI
hybrid_graphics_mode=Integrated Only
-gfx_uma_size=32M
+gfx_uma_size=352M
--
2.39.2
@@ -0,0 +1,24 @@
From badcbb2f07ac0e3d8b53a23e324f709bf93c3dd5 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org>
Date: Fri, 14 May 2021 13:11:59 +0100
Subject: [PATCH 06/18] lenovo/x200: set VRAM to 352MiB by default
This fix makes it possible:
https://review.coreboot.org/c/coreboot/+/16831
---
src/mainboard/lenovo/x200/cmos.default | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mainboard/lenovo/x200/cmos.default b/src/mainboard/lenovo/x200/cmos.default
index bb4323836e..33a6a69f59 100644
--- a/src/mainboard/lenovo/x200/cmos.default
+++ b/src/mainboard/lenovo/x200/cmos.default
@@ -12,4 +12,4 @@ sticky_fn=Disable
power_management_beeps=Enable
low_battery_beep=Enable
sata_mode=AHCI
-gfx_uma_size=32M
+gfx_uma_size=352M
--
2.39.2
@@ -0,0 +1,22 @@
From 59e14decddd3a3d0eb9905196df045e34b7ce035 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org>
Date: Fri, 14 May 2021 13:18:26 +0100
Subject: [PATCH 07/18] gigabyte/ga-g41m-es2l: set VRAM to 352MiB by default
---
src/mainboard/gigabyte/ga-g41m-es2l/cmos.default | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mainboard/gigabyte/ga-g41m-es2l/cmos.default b/src/mainboard/gigabyte/ga-g41m-es2l/cmos.default
index 8372032119..3a9a8e2d72 100644
--- a/src/mainboard/gigabyte/ga-g41m-es2l/cmos.default
+++ b/src/mainboard/gigabyte/ga-g41m-es2l/cmos.default
@@ -2,4 +2,4 @@ boot_option=Fallback
debug_level=Debug
power_on_after_fail=Enable
nmi=Enable
-gfx_uma_size=64M
+gfx_uma_size=352M
--
2.39.2
@@ -0,0 +1,22 @@
From 794e082e64558678fe245c86a2c81b4edc582795 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org>
Date: Fri, 14 May 2021 13:21:39 +0100
Subject: [PATCH 08/18] acer/g43t-am3: set VRAM to 352MiB by default
---
src/mainboard/acer/g43t-am3/cmos.default | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mainboard/acer/g43t-am3/cmos.default b/src/mainboard/acer/g43t-am3/cmos.default
index 706f5dd551..98899e8bf5 100644
--- a/src/mainboard/acer/g43t-am3/cmos.default
+++ b/src/mainboard/acer/g43t-am3/cmos.default
@@ -3,4 +3,4 @@ debug_level=Debug
power_on_after_fail=Disable
nmi=Enable
sata_mode=AHCI
-gfx_uma_size=64M
+gfx_uma_size=352M
--
2.39.2
@@ -0,0 +1,34 @@
From 62121b837771b0b05f6490943ff9f1ccaba45bdb Mon Sep 17 00:00:00 2001
From: persmule <persmule@gmail.com>
Date: Sun, 31 Oct 2021 23:33:26 +0000
Subject: [PATCH 09/18] lenovo/t400: Enable all SATA ports
There are 2 SATA ports on the chassis of t400(s), but at least one dock for
t400 contains a port for (P/S)ATA device, and t400s has a eSATA port on its
chassis, and another one on its dock.
They have to be unmasked via device tree to use.
This patch unmasked all SATA ports found within t400s with factory firmware.
---
src/mainboard/lenovo/t400/devicetree.cb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mainboard/lenovo/t400/devicetree.cb b/src/mainboard/lenovo/t400/devicetree.cb
index 1df350ab67..21c8e2c9a1 100644
--- a/src/mainboard/lenovo/t400/devicetree.cb
+++ b/src/mainboard/lenovo/t400/devicetree.cb
@@ -46,8 +46,8 @@ chip northbridge/intel/gm45
register "gpe0_en" = "0x01000000"
register "gpi1_routing" = "2"
- # Set AHCI mode, enable ports 1 and 2.
- register "sata_port_map" = "0x03"
+ # Set AHCI mode, enable ports 1, 2, 5 and 6.
+ register "sata_port_map" = "0x33"
register "sata_clock_request" = "0"
register "sata_traffic_monitor" = "0"
--
2.39.2
@@ -0,0 +1,56 @@
From 30d8dd45ab489bed21398b04bd03a54e08eafaf2 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org>
Date: Sat, 4 Mar 2023 23:55:41 +0000
Subject: [PATCH 18/18] ich9m boards: set 256MB VRAM instead
352MB causes some stability issues reported by a few people
---
src/mainboard/acer/g43t-am3/cmos.default | 2 +-
src/mainboard/gigabyte/ga-g41m-es2l/cmos.default | 2 +-
src/mainboard/lenovo/t400/cmos.default | 2 +-
src/mainboard/lenovo/x200/cmos.default | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/mainboard/acer/g43t-am3/cmos.default b/src/mainboard/acer/g43t-am3/cmos.default
index 98899e8bf5..e8b45ea22c 100644
--- a/src/mainboard/acer/g43t-am3/cmos.default
+++ b/src/mainboard/acer/g43t-am3/cmos.default
@@ -3,4 +3,4 @@ debug_level=Debug
power_on_after_fail=Disable
nmi=Enable
sata_mode=AHCI
-gfx_uma_size=352M
+gfx_uma_size=256M
diff --git a/src/mainboard/gigabyte/ga-g41m-es2l/cmos.default b/src/mainboard/gigabyte/ga-g41m-es2l/cmos.default
index 3a9a8e2d72..bedad54d2a 100644
--- a/src/mainboard/gigabyte/ga-g41m-es2l/cmos.default
+++ b/src/mainboard/gigabyte/ga-g41m-es2l/cmos.default
@@ -2,4 +2,4 @@ boot_option=Fallback
debug_level=Debug
power_on_after_fail=Enable
nmi=Enable
-gfx_uma_size=352M
+gfx_uma_size=256M
diff --git a/src/mainboard/lenovo/t400/cmos.default b/src/mainboard/lenovo/t400/cmos.default
index e74d15d030..b907a3e2df 100644
--- a/src/mainboard/lenovo/t400/cmos.default
+++ b/src/mainboard/lenovo/t400/cmos.default
@@ -13,4 +13,4 @@ power_management_beeps=Enable
low_battery_beep=Enable
sata_mode=AHCI
hybrid_graphics_mode=Integrated Only
-gfx_uma_size=352M
+gfx_uma_size=256M
diff --git a/src/mainboard/lenovo/x200/cmos.default b/src/mainboard/lenovo/x200/cmos.default
index 33a6a69f59..458b3f19c5 100644
--- a/src/mainboard/lenovo/x200/cmos.default
+++ b/src/mainboard/lenovo/x200/cmos.default
@@ -12,4 +12,4 @@ sticky_fn=Disable
power_management_beeps=Enable
low_battery_beep=Enable
sata_mode=AHCI
-gfx_uma_size=352M
+gfx_uma_size=256M
--
2.39.2

Some files were not shown because too many files have changed in this diff Show More