diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 3b684ec73ba..5314a8b2444 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -190,18 +190,6 @@ stages: export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt make pylint_err - - job: check_for_pre_schema_tags - displayName: 'Check for pre-schema driver model tags' - pool: - vmImage: $(ubuntu_vm) - container: - image: $(ci_runner_image) - options: $(container_option) - steps: - # If grep succeeds and finds a match the test fails as we should - # have no matches. - - script: git grep u-boot,dm- -- '*.dts*' && exit 1 || exit 0 - - job: check_packing_of_python_tools displayName: 'Check we can package the Python tools' pool: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0337380f98e..a5d7f4dc738 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -249,15 +249,6 @@ Run pylint: - export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt" - make pylint_err -# Check for pre-schema driver model tags -Check for pre-schema tags: - extends: .testsuites - script: - - git config --global --add safe.directory "${CI_PROJECT_DIR}"; - # If grep succeeds and finds a match the test fails as we should - # have no matches. - - git grep u-boot,dm- -- '*.dts*' && exit 1 || exit 0 - # Check we can package the Python tools Check packing of Python tools: extends: .testsuites diff --git a/common/board_r.c b/common/board_r.c index 143d51d0633..76f9fc090fb 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -572,13 +572,6 @@ static int dm_announce(void) printf("Warning: Unexpected devicetree source (not from a prior stage)"); printf("Warning: U-Boot may not function properly\n"); } - if (IS_ENABLED(CONFIG_OF_TAG_MIGRATE) && - (gd->flags & GD_FLG_OF_TAG_MIGRATE)) - /* - * U-Boot will silently fail to work after 2023.07 if - * there are old tags present - */ - printf("Warning: Device tree includes old 'u-boot,dm-' tags: please fix by 2023.07!\n"); } return 0; diff --git a/configs/ibex-ast2700_defconfig b/configs/ibex-ast2700_defconfig index 088eec1ec70..a4090f05513 100644 --- a/configs/ibex-ast2700_defconfig +++ b/configs/ibex-ast2700_defconfig @@ -65,7 +65,6 @@ CONFIG_CMD_SYSBOOT=y CONFIG_CMD_EXT4=y CONFIG_CMD_FS_GENERIC=y CONFIG_DEVICE_TREE_INCLUDES="ast2700-u-boot.dtsi" -# CONFIG_OF_TAG_MIGRATE is not set CONFIG_ENV_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RX_ETH_BUFFER=2 # CONFIG_DM_DEVICE_REMOVE is not set diff --git a/configs/jaguar-rk3588_defconfig b/configs/jaguar-rk3588_defconfig index 3ed07d18e10..def0acf6cfd 100644 --- a/configs/jaguar-rk3588_defconfig +++ b/configs/jaguar-rk3588_defconfig @@ -57,7 +57,6 @@ CONFIG_CMD_SQUASHFS=y # CONFIG_SPL_DOS_PARTITION is not set CONFIG_SPL_OF_CONTROL=y CONFIG_OF_LIVE=y -# CONFIG_OF_TAG_MIGRATE is not set CONFIG_OF_SPL_REMOVE_PROPS="interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y diff --git a/configs/sama5d29_curiosity_mmc1_defconfig b/configs/sama5d29_curiosity_mmc1_defconfig index 4e56c670357..ad835af5dbd 100644 --- a/configs/sama5d29_curiosity_mmc1_defconfig +++ b/configs/sama5d29_curiosity_mmc1_defconfig @@ -65,7 +65,6 @@ CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y CONFIG_MTDIDS_DEFAULT="nor0=nor0" CONFIG_MTDPARTS_DEFAULT="mtdparts=nor0:256k(bootstrap)ro,1M(u-boot)ro,256k(env)ro,512k(dtb)ro,6M(kernel)ro" CONFIG_OF_CONTROL=y -# CONFIG_OF_TAG_MIGRATE is not set CONFIG_ENV_IS_IN_FAT=y CONFIG_ENV_FAT_DEVICE_AND_PART="1:1" CONFIG_ENV_RELOC_GD_ENV_ADDR=y diff --git a/configs/sama5d29_curiosity_mmc_defconfig b/configs/sama5d29_curiosity_mmc_defconfig index 28d5626a2a5..e01332768b1 100644 --- a/configs/sama5d29_curiosity_mmc_defconfig +++ b/configs/sama5d29_curiosity_mmc_defconfig @@ -65,7 +65,6 @@ CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y CONFIG_MTDIDS_DEFAULT="nor0=nor0" CONFIG_MTDPARTS_DEFAULT="mtdparts=nor0:256k(bootstrap)ro,1M(u-boot)ro,256k(env)ro,512k(dtb)ro,6M(kernel)ro" CONFIG_OF_CONTROL=y -# CONFIG_OF_TAG_MIGRATE is not set CONFIG_ENV_IS_IN_FAT=y CONFIG_ENV_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y diff --git a/configs/sama5d29_curiosity_qspiflash_defconfig b/configs/sama5d29_curiosity_qspiflash_defconfig index e19e39cd6dc..17504f5de14 100644 --- a/configs/sama5d29_curiosity_qspiflash_defconfig +++ b/configs/sama5d29_curiosity_qspiflash_defconfig @@ -65,7 +65,6 @@ CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y CONFIG_MTDIDS_DEFAULT="nor0=nor0" CONFIG_MTDPARTS_DEFAULT="mtdparts=nor0:256k(bootstrap)ro,1M(u-boot)ro,256k(env)ro,512k(dtb)ro,6M(kernel)ro" CONFIG_OF_CONTROL=y -# CONFIG_OF_TAG_MIGRATE is not set CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_ENV_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y diff --git a/configs/sama7g54_curiosity_mmc_defconfig b/configs/sama7g54_curiosity_mmc_defconfig index 557173d1af0..f6f552c0087 100644 --- a/configs/sama7g54_curiosity_mmc_defconfig +++ b/configs/sama7g54_curiosity_mmc_defconfig @@ -68,7 +68,6 @@ CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y CONFIG_MTDIDS_DEFAULT="nand0=nand0,nor0=nor0" CONFIG_MTDPARTS_DEFAULT="mtdparts=nand0:256k(bootstrap-nand)ro,1M(u-boot-nand)ro,256k(env-nand)ro,512k(dtb-nand)ro,6M(kernel-nand)ro,-(rootfs-nand)ro;nor0:256k(bootstrap-nor)ro,1M(u-boot-nor)ro,256k(env-nor)ro,512k(dtb-nor)ro,6M(kernel-nor)ro" CONFIG_OF_CONTROL=y -# CONFIG_OF_TAG_MIGRATE is not set CONFIG_ENV_IS_IN_FAT=y CONFIG_ENV_FAT_DEVICE_AND_PART="1:1" CONFIG_ENV_RELOC_GD_ENV_ADDR=y diff --git a/configs/sama7g54_curiosity_nandflash_defconfig b/configs/sama7g54_curiosity_nandflash_defconfig index 4a3b5e5f5b3..830454705c2 100644 --- a/configs/sama7g54_curiosity_nandflash_defconfig +++ b/configs/sama7g54_curiosity_nandflash_defconfig @@ -67,7 +67,6 @@ CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y CONFIG_MTDIDS_DEFAULT="nand0=nand0,nor0=nor0" CONFIG_MTDPARTS_DEFAULT="mtdparts=nand0:256k(bootstrap-nand)ro,1M(u-boot-nand)ro,256k(env-nand)ro,512k(dtb-nand)ro,6M(kernel-nand)ro,-(rootfs-nand)ro;nor0:256k(bootstrap-nor)ro,1M(u-boot-nor)ro,256k(env-nor)ro,512k(dtb-nor)ro,6M(kernel-nor)ro" CONFIG_OF_CONTROL=y -# CONFIG_OF_TAG_MIGRATE is not set CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y diff --git a/configs/sama7g54_curiosity_qspiflash_defconfig b/configs/sama7g54_curiosity_qspiflash_defconfig index fee0a8bac04..d91eb28db0f 100644 --- a/configs/sama7g54_curiosity_qspiflash_defconfig +++ b/configs/sama7g54_curiosity_qspiflash_defconfig @@ -68,7 +68,6 @@ CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y CONFIG_MTDIDS_DEFAULT="nand0=nand0,nor0=nor0" CONFIG_MTDPARTS_DEFAULT="mtdparts=nand0:256k(bootstrap-nand)ro,1M(u-boot-nand)ro,256k(env-nand)ro,512k(dtb-nand)ro,6M(kernel-nand)ro,-(rootfs-nand)ro;nor0:256k(bootstrap-nor)ro,1M(u-boot-nor)ro,256k(env-nor)ro,512k(dtb-nor)ro,6M(kernel-nor)ro" CONFIG_OF_CONTROL=y -# CONFIG_OF_TAG_MIGRATE is not set CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_ENV_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y diff --git a/configs/tiger-rk3588_defconfig b/configs/tiger-rk3588_defconfig index 8ba2a996ee2..50a3b553a11 100644 --- a/configs/tiger-rk3588_defconfig +++ b/configs/tiger-rk3588_defconfig @@ -57,7 +57,6 @@ CONFIG_CMD_SQUASHFS=y # CONFIG_SPL_DOS_PARTITION is not set CONFIG_SPL_OF_CONTROL=y CONFIG_OF_LIVE=y -# CONFIG_OF_TAG_MIGRATE is not set CONFIG_OF_SPL_REMOVE_PROPS="interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index e040e3f2806..071d998a0a5 100644 --- a/drivers/core/ofnode.c +++ b/drivers/core/ofnode.c @@ -1629,18 +1629,6 @@ bool ofnode_pre_reloc(ofnode node) ofnode_read_bool(node, "bootph-pre-sram")) return gd->flags & GD_FLG_RELOC; - if (IS_ENABLED(CONFIG_OF_TAG_MIGRATE)) { - /* detect and handle old tags */ - if (ofnode_read_bool(node, "u-boot,dm-pre-reloc") || - ofnode_read_bool(node, "u-boot,dm-pre-proper") || - ofnode_read_bool(node, "u-boot,dm-spl") || - ofnode_read_bool(node, "u-boot,dm-tpl") || - ofnode_read_bool(node, "u-boot,dm-vpl")) { - gd->flags |= GD_FLG_OF_TAG_MIGRATE; - return true; - } - } - return false; #endif } diff --git a/dts/Kconfig b/dts/Kconfig index 4e2622d48d0..870f75ad3ec 100644 --- a/dts/Kconfig +++ b/dts/Kconfig @@ -408,16 +408,6 @@ config SPL_MULTI_DTB_FIT_USER_DEF_ADDR at compilation time. This is the address of this area. It must be aligned on 2-byte boundary. -config OF_TAG_MIGRATE - bool "Ease migration from old device trees with u-boot,dm- tags" - default y - help - U-Boot moved over to use new tags to mark device tree nodes which need - to be processed in SPL, before relocation, etc. Enable this option to - detect old tags and handle them. - - Note: This option will be removed after the 2023.07 release. - config OF_SPL_REMOVE_PROPS string "List of device tree properties to drop for SPL" depends on SPL_OF_CONTROL diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 506ee51cdb0..745d2c3a966 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -671,10 +671,10 @@ enum gd_flags { * @GD_FLG_FDT_CHANGED: Device tree change has been detected by tests */ GD_FLG_FDT_CHANGED = 0x100000, - /** - * @GD_FLG_OF_TAG_MIGRATE: Device tree has old u-boot,dm- tags + /* + * @GD_FLG_OF_TAG_MIGRATE: Previously had the value of 0x200000 but was + * freed when migration support was removed. */ - GD_FLG_OF_TAG_MIGRATE = 0x200000, /** * @GD_FLG_DM_DEAD: Driver model is not accessible. This can be set when * the memory used to holds its tables has been mapped out. diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 5db2fbc418a..791eb1cb327 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -671,15 +671,6 @@ cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \ # pass removes various unused properties from the remaining nodes. # The output is typically a much smaller device tree file. -ifdef CONFIG_OF_TAG_MIGRATE -# Support the old tags for a migration period -migrate_tpl := -b u-boot,dm-pre-reloc -b u-boot,dm-tpl -migrate_vpl := -b u-boot,dm-pre-reloc -b u-boot,dm-vpl -migrate_spl := -b u-boot,dm-pre-reloc -b u-boot,dm-spl -migrate_all := -P u-boot,dm-pre-reloc \ - -P u-boot,dm-spl -P u-boot,dm-tpl -P u-boot,dm-vpl -endif - ifeq ($(CONFIG_VPL_BUILD),y) fdtgrep_props := -b bootph-all -b bootph-verify $(migrate_vpl) else diff --git a/test/py/tests/test_of_migrate.py b/test/py/tests/test_of_migrate.py deleted file mode 100644 index ab89332331e..00000000000 --- a/test/py/tests/test_of_migrate.py +++ /dev/null @@ -1,105 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -# Copyright 2023 Google LLC -# Written by Simon Glass - -"""Test handling of unmigrated u-boot,dm- tags""" - -import os -import pytest - -import utils - -# This is needed for Azure, since the default '..' directory is not writeable -TMPDIR1 = '/tmp/test_no_migrate' -TMPDIR2 = '/tmp/test_no_migrate_spl' -TMPDIR3 = '/tmp/test_migrate' - -def build_for_migrate(ubman, replace_pair, board, tmpdir, disable_migrate=True): - """Build an updated U-Boot with a slightly modified device tree - - Args: - ubman (ConsoleBase): U-Boot console - replace_pair (tuple): - String to find - String to replace it with - board (str): Board to build - tmpdir (str): Temporary directory to use - disable_migrate (bool): True to disable CONFIG_OF_TAG_MIGRATE in build - """ - srcdir = ubman.config.source_dir - build_dir = ubman.config.build_dir - - # Get the source for the existing dts - dt_dir = os.path.join(build_dir, 'arch', 'sandbox', 'dts') - orig_fname = os.path.join(dt_dir, 'sandbox.dtb') - out_dts = os.path.join(dt_dir, 'sandbox_out.dts') - utils.run_and_log(ubman, ['dtc', orig_fname, '-I', 'dtb', '-O', 'dts', - '-o', out_dts]) - - # Update it to use an old tag - with open(out_dts) as inf: - data = inf.read() - data = data.replace(*replace_pair) - - dts_fname = os.path.join(dt_dir, 'sandbox_oldtag.dts') - with open(dts_fname, 'w') as outf: - print(data, file=outf) - dtb_fname = os.path.join(dt_dir, 'sandbox_oldtag.dtb') - utils.run_and_log(ubman, ['dtc', dts_fname, '-o', dtb_fname]) - - migrate = ['-a', '~CONFIG_OF_TAG_MIGRATE'] if disable_migrate else [] - - # Build sandbox with this new dtb, turning off OF_TAG_MIGRATE - env = dict(os.environ) - env['EXT_DTB'] = dtb_fname - env['DEVICE_TREE'] = 'sandbox_new' - env['NO_LTO'] = '1' # Speed up build - out = utils.run_and_log( - ubman, ['./tools/buildman/buildman', '-m', '--board', board, - *migrate, '-w', '-o', tmpdir], ignore_errors=True, env=env) - return out - -@pytest.mark.slow -@pytest.mark.boardspec('sandbox') -def test_of_no_migrate(ubman): - """Test sandbox with old boot phase tags like u-boot,dm-pre-proper""" - - build_for_migrate(ubman, ['bootph-some-ram', 'u-boot,dm-pre-proper'], - 'sandbox', TMPDIR1) - - # It should fail to run, since the lcd device will not be bound before - # relocation. so won't get its frame-buffer memory - out = utils.run_and_log( - ubman, [os.path.join(TMPDIR1, 'u-boot'), '-D', '-c', 'help'], - ignore_errors=True) - assert "Video device 'lcd' cannot allocate frame buffer memory" in out - - -@pytest.mark.slow -@pytest.mark.boardspec('sandbox_spl') -@pytest.mark.boardspec('spl_of_platdata_inst') -@pytest.mark.boardspec('!sandbox_tpl') -def test_of_no_migrate_spl(ubman): - """Test sandbox with old boot phase tags like u-boot,dm-spl""" - - out = build_for_migrate(ubman, ['bootph-pre-ram', 'u-boot,dm-spl'], - 'sandbox_spl', TMPDIR2) - - # It should fail to build, since the SPL DT will not include 'spl-test' - # node, among others - assert "undefined type ‘struct dtd_sandbox_spl_test’" in out - - -@pytest.mark.slow -@pytest.mark.boardspec('sandbox') -def test_of_migrate(ubman): - """Test sandbox shows a message when tags were migrated""" - - build_for_migrate(ubman, ['bootph-some-ram', 'u-boot,dm-pre-proper'], - 'sandbox', TMPDIR3, disable_migrate=False) - - # It should show a migration message - out = utils.run_and_log( - ubman, [os.path.join(TMPDIR3, 'u-boot'), '-D', '-c', 'help'], - ignore_errors=True) - assert "Warning: Device tree includes old 'u-boot,dm-' tags" in out diff --git a/tools/key2dtsi.py b/tools/key2dtsi.py index 320ea930a97..66facc02d87 100755 --- a/tools/key2dtsi.py +++ b/tools/key2dtsi.py @@ -59,7 +59,7 @@ if args.required_conf: elif args.required_image: out.write('\t\t\trequired = "image";\n') if args.spl: - out.write('\t\t\tu-boot,dm-spl;\n') + out.write('\t\t\tbootph-pre-ram;\n') out.write('\t\t};\n') out.write('\t};\n') out.write('};\n') diff --git a/tools/patman/test_checkpatch.py b/tools/patman/test_checkpatch.py index 4e8d163184e..b4722330f86 100644 --- a/tools/patman/test_checkpatch.py +++ b/tools/patman/test_checkpatch.py @@ -522,11 +522,5 @@ index 0000000..2234c87 self.check_strl("cat"); self.check_strl("cpy"); - def test_schema(self): - """Check for uses of strn(cat|cpy)""" - pm = PatchMaker() - pm.add_line('arch/sandbox/dts/sandbox.dtsi', '\tu-boot,dm-pre-proper;') - self.check_single_message(pm, 'PRE_SCHEMA', 'error') - if __name__ == "__main__": unittest.main()