Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
c092ad2
Update .gitignore
hackpascal Jan 17, 2024
f2d1d58
Makefile: enable debug symbols for release build
hackpascal Feb 25, 2021
22ab509
build_macros.mk: add support to use prebuilt libraries
hackpascal Feb 25, 2021
5b5280c
tools: mediatek: add support for MediaTek bromimage utility
hackpascal Feb 25, 2021
912555c
tools: mediatek: add anti-rollback related tools
hackpascal Feb 25, 2021
6bb3cdd
tools: mediatek: add offline signing tool for TBBR
hackpascal Jul 4, 2023
20f09ef
tools: add production-related tools
hackpascal Aug 10, 2022
003ac2e
mmc: do not check mmc_csd.spec_vers for eMMC
hackpascal Feb 25, 2021
0481cde
mmc: add support to poll card busy state
hackpascal Jul 4, 2023
244a44c
nand: record oob size in nand framework
hackpascal Aug 10, 2022
82f1b5c
spi-nor: extend support for 4-byte address flashes
hackpascal Aug 10, 2022
12d46b0
gpio: add interface for changing gpio mode
hackpascal Aug 10, 2022
e7a7b94
drivers: io: add support for UBI
hackpascal Jul 4, 2023
4919b17
partition: add support to patch MBR data
hackpascal Jan 17, 2024
93536d9
mediatek: add common files for APSoC platform
hackpascal Jul 4, 2023
a2f8ac2
lib: do not setup pmuv3 for mt7629 in bl32
hackpascal Oct 12, 2023
11f94c6
lib: add NAND mapping block management (NMBM) library
hackpascal Aug 9, 2022
d17bb51
lib: xz: add xz decompress support from xz-embedded-20210201
hackpascal Aug 9, 2022
97ae312
Build: add xz compression image filter
hackpascal Aug 9, 2022
e1ffbbe
Makefile: add new bootloader stage for decompressing BL2 payload
hackpascal Aug 9, 2022
6664472
make_helpers: add simple build option dependency check
hackpascal Aug 9, 2022
42ef551
Prepare for MediaTek Anti-Rollback mechanism
hackpascal Feb 25, 2021
98ac614
Prepare for MediaTek FSEK mechanism
hackpascal Jul 4, 2023
73754e4
mediatek: mt7622: add initial BL2/BL31 support
hackpascal Feb 25, 2021
11d2558
mediatek: mt7622: add DDR initialization support
hackpascal May 8, 2021
2b394c8
mediatek: mt7622: add eFuse read/write support
hackpascal Feb 25, 2021
ab0f710
mediatek: mt7622: add basic anti-rollback framework
hackpascal Feb 25, 2021
6846a3a
mediatek: mt7622: add build option dependency rules
hackpascal Jul 4, 2023
80d6e88
mediatek: mt7629: add initial BL2/BL32 support
hackpascal Feb 25, 2021
252cec6
mediatek: mt7629: add DDR initialization support
hackpascal Feb 25, 2021
c79d9a6
mediatek: mt7629: add eFuse read/write support
hackpascal Feb 25, 2021
ff042b5
mediatek: mt7629: add build option dependency rules
hackpascal Jul 4, 2023
524e083
mediatek: mt7986: add initial BL2/BL31 support
hackpascal Aug 10, 2022
624a9de
mediatek: mt7986: add DDR initialization support
hackpascal Aug 10, 2022
2d44dfa
mediatek: mt7986: add eFuse read/write support
hackpascal Aug 10, 2022
4d0c474
mediatek: mt7986: add anti-rollback support
hackpascal Aug 10, 2022
f5a67fb
mediatek: mt7986: add FSEK support
hackpascal Jul 4, 2023
668e170
mediatek: mt7986: add build option dependency rules
hackpascal Jul 4, 2023
bb28c9d
mediatek: mt7981: add initial BL2/BL31 support
hackpascal Aug 10, 2022
bdc0941
mediatek: mt7981: add DDR initialization support
hackpascal Aug 10, 2022
6c45530
mediatek: mt7981: add eFuse read/write support
hackpascal Aug 10, 2022
9e54d87
mediatek: mt7981: add anti-rollback support
hackpascal Aug 10, 2022
da8a815
mediatek: mt7981: add build option dependency rules
hackpascal Jul 4, 2023
4d03fbb
mediatek: mt7988: add initial BL2/BL31 support
hackpascal Jul 4, 2023
99c8849
mediatek: mt7988: add DDR initialization support
hackpascal Jul 4, 2023
f283bb3
mediatek: mt7988: add eFuse read/write support
hackpascal Jul 4, 2023
ab7590d
mediatek: mt7988: add anti-rollback support
hackpascal Jul 4, 2023
f19f50f
mediatek: mt7988: add build option dependency rules
hackpascal Jul 4, 2023
bacca82
Add support for menuconfig
hackpascal Aug 10, 2022
fb2a2b6
mediatek: snfi: FM35Q1GA is x4-only
dangowrt Feb 29, 2024
6470986
mediatek: snfi: adjust pin drive strength for Fidelix SPI-NAND
dangowrt Mar 10, 2024
40a3661
mediatek: snfi: adjust drive strength to 12mA like old loader does
dangowrt Mar 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ node_modules/
env/
.venv/
venv/

# MediaTek related
.vscode/
Kconfiglib/__pycache__/
7 changes: 7 additions & 0 deletions Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
# Copyright (c) 2023, MediaTek Inc. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#

source "plat/mediatek/apsoc_common/Config.in"
5 changes: 5 additions & 0 deletions Kconfiglib/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Copyright (c) 2011-2019, Ulf Magnusson <ulfalizer@gmail.com>

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2 changes: 2 additions & 0 deletions Kconfiglib/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Include the license file in source distributions
include LICENSE.txt
841 changes: 841 additions & 0 deletions Kconfiglib/README.rst

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions Kconfiglib/alldefconfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env python3

# Copyright (c) 2018-2019, Ulf Magnusson
# SPDX-License-Identifier: ISC

"""
Writes a configuration file where all symbols are set to their their default
values.

The default output filename is '.config'. A different filename can be passed in
the KCONFIG_CONFIG environment variable.

Usage for the Linux kernel:

$ make [ARCH=<arch>] scriptconfig SCRIPT=Kconfiglib/alldefconfig.py
"""
import kconfiglib


def main():
kconf = kconfiglib.standard_kconfig(__doc__)
kconf.load_allconfig("alldef.config")
print(kconf.write_config())


if __name__ == "__main__":
main()
46 changes: 46 additions & 0 deletions Kconfiglib/allmodconfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env python3

# Copyright (c) 2018-2019, Ulf Magnusson
# SPDX-License-Identifier: ISC

"""
Writes a configuration file where as many symbols as possible are set to 'm'.

The default output filename is '.config'. A different filename can be passed
in the KCONFIG_CONFIG environment variable.

Usage for the Linux kernel:

$ make [ARCH=<arch>] scriptconfig SCRIPT=Kconfiglib/allmodconfig.py
"""
import kconfiglib


def main():
kconf = kconfiglib.standard_kconfig(__doc__)

# See allnoconfig.py
kconf.warn = False

for sym in kconf.unique_defined_syms:
if sym.orig_type == kconfiglib.BOOL:
# 'bool' choice symbols get their default value, as determined by
# e.g. 'default's on the choice
if not sym.choice:
# All other bool symbols get set to 'y', like for allyesconfig
sym.set_value(2)
elif sym.orig_type == kconfiglib.TRISTATE:
sym.set_value(1)

for choice in kconf.unique_choices:
choice.set_value(2 if choice.orig_type == kconfiglib.BOOL else 1)

kconf.warn = True

kconf.load_allconfig("allmod.config")

print(kconf.write_config())


if __name__ == "__main__":
main()
45 changes: 45 additions & 0 deletions Kconfiglib/allnoconfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env python3

# Copyright (c) 2018-2019, Ulf Magnusson
# SPDX-License-Identifier: ISC

"""
Writes a configuration file where as many symbols as possible are set to 'n'.

The default output filename is '.config'. A different filename can be passed
in the KCONFIG_CONFIG environment variable.

Usage for the Linux kernel:

$ make [ARCH=<arch>] scriptconfig SCRIPT=Kconfiglib/allnoconfig.py
"""

# See examples/allnoconfig_walk.py for another way to implement this script

import kconfiglib


def main():
kconf = kconfiglib.standard_kconfig(__doc__)

# Avoid warnings that would otherwise get printed by Kconfiglib for the
# following:
#
# 1. Assigning a value to a symbol without a prompt, which never has any
# effect
#
# 2. Assigning values invalid for the type (only bool/tristate symbols
# accept 0/1/2, for n/m/y). The assignments will be ignored for other
# symbol types, which is what we want.
kconf.warn = False
for sym in kconf.unique_defined_syms:
sym.set_value(2 if sym.is_allnoconfig_y else 0)
kconf.warn = True

kconf.load_allconfig("allno.config")

print(kconf.write_config())


if __name__ == "__main__":
main()
56 changes: 56 additions & 0 deletions Kconfiglib/allyesconfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env python3

# Copyright (c) 2018-2019, Ulf Magnusson
# SPDX-License-Identifier: ISC

"""
Writes a configuration file where as many symbols as possible are set to 'y'.

The default output filename is '.config'. A different filename can be passed
in the KCONFIG_CONFIG environment variable.

Usage for the Linux kernel:

$ make [ARCH=<arch>] scriptconfig SCRIPT=Kconfiglib/allyesconfig.py
"""
import kconfiglib


def main():
kconf = kconfiglib.standard_kconfig(__doc__)

# See allnoconfig.py
kconf.warn = False

# Try to set all symbols to 'y'. Dependencies might truncate the value down
# later, but this will at least give the highest possible value.
#
# Assigning 0/1/2 to non-bool/tristate symbols has no effect (int/hex
# symbols still take a string, because they preserve formatting).
for sym in kconf.unique_defined_syms:
# Set choice symbols to 'm'. This value will be ignored for choices in
# 'y' mode (the "normal" mode), which will instead just get their
# default selection, but will set all symbols in m-mode choices to 'm',
# which is as high as they can go.
#
# Here's a convoluted example of how you might get an m-mode choice
# even during allyesconfig:
#
# choice
# tristate "weird choice"
# depends on m
sym.set_value(1 if sym.choice else 2)

# Set all choices to the highest possible mode
for choice in kconf.unique_choices:
choice.set_value(2)

kconf.warn = True

kconf.load_allconfig("allyes.config")

print(kconf.write_config())


if __name__ == "__main__":
main()
43 changes: 43 additions & 0 deletions Kconfiglib/defconfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env python3

# Copyright (c) 2019, Ulf Magnusson
# SPDX-License-Identifier: ISC

"""
Reads a specified configuration file, then writes a new configuration file.
This can be used to initialize the configuration from e.g. an arch-specific
configuration file. This input configuration file would usually be a minimal
configuration file, as generated by e.g. savedefconfig.

The default output filename is '.config'. A different filename can be passed in
the KCONFIG_CONFIG environment variable.
"""
import argparse

import kconfiglib


def main():
parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,
description=__doc__)

parser.add_argument(
"--kconfig",
default="Kconfig",
help="Top-level Kconfig file (default: Kconfig)")

parser.add_argument(
"config",
metavar="CONFIGURATION",
help="Input configuration file")

args = parser.parse_args()

kconf = kconfiglib.Kconfig(args.kconfig, suppress_traceback=True)
print(kconf.load_config(args.config))
print(kconf.write_config())


if __name__ == "__main__":
main()
Loading