diff --git a/patch/u-boot/legacy/u-boot-spacemit-k1/008-Quiet-MBR-support.patch b/patch/u-boot/legacy/u-boot-spacemit-k1/008-Quiet-MBR-support.patch new file mode 100644 index 0000000000..574a9c2b88 --- /dev/null +++ b/patch/u-boot/legacy/u-boot-spacemit-k1/008-Quiet-MBR-support.patch @@ -0,0 +1,93 @@ +From 391f0eec0507d736af5b3d40030527637c10f057 Mon Sep 17 00:00:00 2001 +From: Patrick Yavitz +Date: Sat, 21 Feb 2026 08:40:09 -0500 +Subject: [PATCH] Quiet MBR support + +Signed-off-by: Patrick Yavitz +--- + board/spacemit/k1-x/k1x.c | 6 ++---- + common/spl/spl_mmc.c | 6 +----- + 2 files changed, 3 insertions(+), 9 deletions(-) + +diff --git a/board/spacemit/k1-x/k1x.c b/board/spacemit/k1-x/k1x.c +index 83c7d400..afdb4193 100644 +--- a/board/spacemit/k1-x/k1x.c ++++ b/board/spacemit/k1-x/k1x.c +@@ -520,7 +520,7 @@ void _load_env_from_blk(struct blk_desc *dev_desc, const char *dev_name, int dev + char cmd[128]; + struct disk_partition info; + +- printf("BPI: :%s\n", "_load_env_from_blk"); ++ printf("K1X: :%s\n", "_load_env_from_blk"); + for (part = 1; part <= MAX_SEARCH_PARTITIONS; part++) { + err = part_get_info(dev_desc, part, &info); + if (err) +@@ -531,7 +531,7 @@ void _load_env_from_blk(struct blk_desc *dev_desc, const char *dev_name, int dev + } + } + if (part > MAX_SEARCH_PARTITIONS) { +-#ifdef BPI ++#ifdef K1X + return; + #else + part = 1; +@@ -546,14 +546,12 @@ void _load_env_from_blk(struct blk_desc *dev_desc, const char *dev_name, int dev + sprintf(cmd, "load %s %d:%d 0x%x env_%s.txt", dev_name, + dev, part, CONFIG_SPL_LOAD_FIT_ADDRESS, CONFIG_SYS_CONFIG_NAME); + pr_debug("cmd:%s\n", cmd); +- printf("BPI: cmd:%s\n", cmd); + if (run_command(cmd, 0)) + return; + + memset(cmd, '\0', 128); + sprintf(cmd, "env import -t 0x%x", CONFIG_SPL_LOAD_FIT_ADDRESS); + pr_debug("cmd:%s\n", cmd); +- printf("BPI: cmd:%s\n", cmd); + if (!run_command(cmd, 0)){ + pr_info("load env_%s.txt from bootfs successful\n", CONFIG_SYS_CONFIG_NAME); + } +diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c +index 581958bb..59ea522d 100644 +--- a/common/spl/spl_mmc.c ++++ b/common/spl/spl_mmc.c +@@ -91,7 +91,6 @@ int mmc_load_image_raw_sector(struct spl_image_info *spl_image, + + /* read image header to find the image size & load address */ + count = blk_dread(bd, sector, 1, header); +- printf("BPI:hdr read sector %lx, count=%lu\n", sector, count); + debug("hdr read sector %lx, count=%lu\n", sector, count); + if (count == 0) { + ret = -EIO; +@@ -223,12 +222,11 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image, + } + } + #endif +- printf("BPI: partition=%d part_name[%s]\n",partition ,part_name); + + for (int p = 1; p <= MAX_SEARCH_PARTITIONS; p++) { + err = part_get_info(mmc_get_blk_desc(mmc), p, &info); + if (err) { +-#ifdef BPI ++#ifdef K1X + #else + if (!strcmp(part_name, "opensbi")){ + info.start = 0x500; +@@ -243,7 +241,6 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image, + #endif + continue; + } +- printf("BPI: p=%d info.name=[%s] info.start[%lx]\n",p ,info.name,info.start); + if (!strcmp(part_name, info.name)){ + if (mmc_load_image_raw_sector(spl_image, bootdev, mmc, info.start) == 0) + return 0; +@@ -262,7 +259,6 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image, + #ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR + return mmc_load_image_raw_sector(spl_image, bootdev, mmc, info.start + sector); + #else +- printf("BPI2: info.name=[%s] info.start[%lx]\n" ,info.name,info.start); + return mmc_load_image_raw_sector(spl_image, bootdev, mmc, info.start); + #endif + } +-- +2.51.0 +