From patchwork Wed Apr 21 19:13:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Schwierzeck X-Patchwork-Id: 1468818 X-Patchwork-Delegate: daniel.schwierzeck@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=rrHyAxPA; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FQVb03Hbbz9sVw for ; Thu, 22 Apr 2021 05:13:48 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B462682B05; Wed, 21 Apr 2021 21:13:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="rrHyAxPA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 98573826BA; Wed, 21 Apr 2021 21:13:24 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BA15780C92 for ; Wed, 21 Apr 2021 21:13:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=daniel.schwierzeck@gmail.com Received: by mail-ej1-x634.google.com with SMTP id w23so49302672ejb.9 for ; Wed, 21 Apr 2021 12:13:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XuTiTrQo/bfphOXLBbA6jh2mxFBPM7ffxzMkZ71DJ4o=; b=rrHyAxPAq6akyPF4FB2pofN8bnPNPtMIyiMekIyDLrgU/fTanCWcBIEPow7QE7PZTL hAJxthh+tfrqW6Q9a8+/1A+mkoHaVowfQ2jVvsC4bmwQrAOv17XNFp0lvJibmzlcEPWo ppe5x2GHfk2+fbDCS5umrW0+HatOxGrCzo+YBXjgE4vCGqHC4I6E87oLoRXTyxhtBBxQ EvLuhqccHdIyePkKRxUdVTn9SoW4lILqMNL3lVw1zMNneWYAx4FCugFjtHdUX6214ySf CRjYvZ+s8AwvGLDgb5MsEykA1SpB1COmYD5M8yT7/lS6yLmVWJMw9gaxgvjOCssirDTP 4rGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XuTiTrQo/bfphOXLBbA6jh2mxFBPM7ffxzMkZ71DJ4o=; b=HMkFf0ovdCryMzjbShth/ojkIb2rWfgNUpcJxbA86S9oD4C9AzttB6wJYAlI2nJvoT q36uX+VHALXSZv9d2qpeUpdtRGWEdv5++8qvRQjrCMKO7kkhahkuHivreE84JGyVX/sj fY/jqduVSuprFWeeJuIk+feMzui2AWKLiS3v2JH5KKoNAIk4pSbmp+2ahEWHIvdq16jC oSoW5dzY6XVwxIdoo4wyNG5sCAYUbUQOvHjm1KpgfjomKFiyWybBYP3nLmaT5ry60qrT OTAkgWvxE67o3x++YwsqBPDoENV82O7ry0dVH0HNJ5fx9CE4Im7gYz8z1ISpChG6oYTL hGQA== X-Gm-Message-State: AOAM530q7rqDp6Rdw1Ww9HVuwdbzi1AnPaD7LYKfAmGwTEvl2MsSXvgR ejOZkJ3j2nGNahVnbF/ljhJPNNsLHsU= X-Google-Smtp-Source: ABdhPJxR1Ql0Df9rrz3JBkVlFmpZBbLbp4ejZ51774C3cczmHufhYzBuW3njt1Dr8aalfDO11jHmsg== X-Received: by 2002:a17:907:77d9:: with SMTP id kz25mr34566786ejc.153.1619032398301; Wed, 21 Apr 2021 12:13:18 -0700 (PDT) Received: from workstation.lan.schwierd.dedyn.io (i5E86058A.versanet.de. [94.134.5.138]) by smtp.gmail.com with ESMTPSA id c7sm214840edt.84.2021.04.21.12.13.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Apr 2021 12:13:17 -0700 (PDT) From: Daniel Schwierzeck To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Tom Rini , Daniel Schwierzeck Subject: [PATCH 1/2] MIPS: remove deprecated qemu_mips board Date: Wed, 21 Apr 2021 21:13:13 +0200 Message-Id: <20210421191315.527351-1-daniel.schwierzeck@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Remove qemu_mips boards because DM migration doesn't make sense. The board support for qemu_mips is already marked as deprecated in Qemu in favour of the Malta board. Also qemu_mips support has been removed from Linux a long time ago. The official replacement is the Malta board. The same Malta U-Boot image can be used with Qemu and on physical hardware. All combinations of Big Endian and Little Endian as well as 32 bit and 64 bit are supported. Signed-off-by: Daniel Schwierzeck --- .azure-pipelines.yml | 12 ----- .gitlab-ci.yml | 24 --------- arch/mips/Kconfig | 11 ---- board/qemu-mips/Kconfig | 26 ---------- board/qemu-mips/MAINTAINERS | 14 ------ board/qemu-mips/Makefile | 7 --- board/qemu-mips/lowlevel_init.S | 40 --------------- board/qemu-mips/qemu-mips.c | 85 ------------------------------- configs/qemu_mips64_defconfig | 29 ----------- configs/qemu_mips64el_defconfig | 30 ----------- configs/qemu_mips_defconfig | 27 ---------- configs/qemu_mipsel_defconfig | 28 ----------- include/configs/qemu-mips.h | 89 --------------------------------- include/configs/qemu-mips64.h | 89 --------------------------------- scripts/config_whitelist.txt | 1 - 15 files changed, 512 deletions(-) delete mode 100644 board/qemu-mips/Kconfig delete mode 100644 board/qemu-mips/MAINTAINERS delete mode 100644 board/qemu-mips/Makefile delete mode 100644 board/qemu-mips/lowlevel_init.S delete mode 100644 board/qemu-mips/qemu-mips.c delete mode 100644 configs/qemu_mips64_defconfig delete mode 100644 configs/qemu_mips64el_defconfig delete mode 100644 configs/qemu_mips_defconfig delete mode 100644 configs/qemu_mipsel_defconfig delete mode 100644 include/configs/qemu-mips.h delete mode 100644 include/configs/qemu-mips64.h diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index d176e045e1..cb482063cc 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -205,18 +205,6 @@ jobs: qemu_arm64: TEST_PY_BD: "qemu_arm64" TEST_PY_TEST_SPEC: "not sleep" - qemu_mips: - TEST_PY_BD: "qemu_mips" - TEST_PY_TEST_SPEC: "not sleep" - qemu_mipsel: - TEST_PY_BD: "qemu_mipsel" - TEST_PY_TEST_SPEC: "not sleep" - qemu_mips64: - TEST_PY_BD: "qemu_mips64" - TEST_PY_TEST_SPEC: "not sleep" - qemu_mips64el: - TEST_PY_BD: "qemu_mips64el" - TEST_PY_TEST_SPEC: "not sleep" qemu_malta: TEST_PY_BD: "malta" TEST_PY_ID: "--id qemu" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 51bd64308a..469992f69e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -225,30 +225,6 @@ qemu_arm64 test.py: TEST_PY_TEST_SPEC: "not sleep" <<: *buildman_and_testpy_dfn -qemu_mips test.py: - variables: - TEST_PY_BD: "qemu_mips" - TEST_PY_TEST_SPEC: "not sleep" - <<: *buildman_and_testpy_dfn - -qemu_mipsel test.py: - variables: - TEST_PY_BD: "qemu_mipsel" - TEST_PY_TEST_SPEC: "not sleep" - <<: *buildman_and_testpy_dfn - -qemu_mips64 test.py: - variables: - TEST_PY_BD: "qemu_mips64" - TEST_PY_TEST_SPEC: "not sleep" - <<: *buildman_and_testpy_dfn - -qemu_mips64el test.py: - variables: - TEST_PY_BD: "qemu_mips64el" - TEST_PY_TEST_SPEC: "not sleep" - <<: *buildman_and_testpy_dfn - qemu_malta test.py: variables: TEST_PY_BD: "malta" diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 77f563e98e..e54801673b 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -12,16 +12,6 @@ choice prompt "Target select" optional -config TARGET_QEMU_MIPS - bool "Support qemu-mips" - select ROM_EXCEPTION_VECTORS - select SUPPORTS_BIG_ENDIAN - select SUPPORTS_CPU_MIPS32_R1 - select SUPPORTS_CPU_MIPS32_R2 - select SUPPORTS_CPU_MIPS64_R1 - select SUPPORTS_CPU_MIPS64_R2 - select SUPPORTS_LITTLE_ENDIAN - config TARGET_MALTA bool "Support malta" select DM @@ -174,7 +164,6 @@ endchoice source "board/imgtec/boston/Kconfig" source "board/imgtec/malta/Kconfig" source "board/imgtec/xilfpga/Kconfig" -source "board/qemu-mips/Kconfig" source "arch/mips/mach-ath79/Kconfig" source "arch/mips/mach-mscc/Kconfig" source "arch/mips/mach-bmips/Kconfig" diff --git a/board/qemu-mips/Kconfig b/board/qemu-mips/Kconfig deleted file mode 100644 index e696a12192..0000000000 --- a/board/qemu-mips/Kconfig +++ /dev/null @@ -1,26 +0,0 @@ -if TARGET_QEMU_MIPS - -config SYS_BOARD - default "qemu-mips" - -config SYS_CONFIG_NAME - default "qemu-mips" if 32BIT - default "qemu-mips64" if 64BIT - -config SYS_TEXT_BASE - default 0xbfc00000 if 32BIT - default 0xffffffffbfc00000 if 64BIT - -config SYS_DCACHE_SIZE - default 16384 - -config SYS_DCACHE_LINE_SIZE - default 32 - -config SYS_ICACHE_SIZE - default 16384 - -config SYS_ICACHE_LINE_SIZE - default 32 - -endif diff --git a/board/qemu-mips/MAINTAINERS b/board/qemu-mips/MAINTAINERS deleted file mode 100644 index 334f9d8ee9..0000000000 --- a/board/qemu-mips/MAINTAINERS +++ /dev/null @@ -1,14 +0,0 @@ -QEMU-MIPS BOARD -M: Vlad Lungu -S: Maintained -F: board/qemu-mips/ -F: include/configs/qemu-mips.h -F: configs/qemu_mips_defconfig - -QEMU_MIPSEL BOARD -#M: - -S: Maintained -F: configs/qemu_mipsel_defconfig -F: include/configs/qemu-mips64.h -F: configs/qemu_mips64_defconfig -F: configs/qemu_mips64el_defconfig diff --git a/board/qemu-mips/Makefile b/board/qemu-mips/Makefile deleted file mode 100644 index 98e3874090..0000000000 --- a/board/qemu-mips/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# (C) Copyright 2003-2006 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. - -obj-y = qemu-mips.o -obj-y += lowlevel_init.o diff --git a/board/qemu-mips/lowlevel_init.S b/board/qemu-mips/lowlevel_init.S deleted file mode 100644 index b0f7072701..0000000000 --- a/board/qemu-mips/lowlevel_init.S +++ /dev/null @@ -1,40 +0,0 @@ -/* Memory sub-system initialization code */ - -#include -#include -#include - - .text - .set noreorder - .set mips32 - - .globl lowlevel_init -lowlevel_init: - - /* - * Step 2) Establish Status Register - * (set BEV, clear ERL, clear EXL, clear IE) - */ - li t1, 0x00400000 - mtc0 t1, CP0_STATUS - - /* - * Step 3) Establish CP0 Config0 - * (set K0=3) - */ - li t1, 0x00000003 - mtc0 t1, CP0_CONFIG - - /* - * Step 7) Establish Cause - * (set IV bit) - */ - li t1, 0x00800000 - mtc0 t1, CP0_CAUSE - - /* Establish Wired (and Random) */ - mtc0 zero, CP0_WIRED - nop - - jr ra - nop diff --git a/board/qemu-mips/qemu-mips.c b/board/qemu-mips/qemu-mips.c deleted file mode 100644 index f57091739e..0000000000 --- a/board/qemu-mips/qemu-mips.c +++ /dev/null @@ -1,85 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2007 - * Vlad Lungu vlad.lungu@windriver.com - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -DECLARE_GLOBAL_DATA_PTR; - -int dram_init(void) -{ - /* Sdram is setup by assembler code */ - /* If memory could be changed, we should return the true value here */ - gd->ram_size = MEM_SIZE * 1024 * 1024; - - return 0; -} - -int checkboard(void) -{ - u32 proc_id; - u32 config1; - - proc_id = read_c0_prid(); - printf("Board: Qemu -M mips CPU: "); - switch (proc_id) { - case 0x00018000: - printf("4Kc"); - break; - case 0x00018400: - printf("4KEcR1"); - break; - case 0x00019000: - printf("4KEc"); - break; - case 0x00019300: - config1 = read_c0_config1(); - if (config1 & 1) - printf("24Kf"); - else - printf("24Kc"); - break; - case 0x00019500: - printf("34Kf"); - break; - case 0x00000400: - printf("R4000"); - break; - case 0x00018100: - config1 = read_c0_config1(); - if (config1 & 1) - printf("5Kf"); - else - printf("5Kc"); - break; - case 0x000182a0: - printf("20Kc"); - break; - - default: - printf("unknown"); - } - printf(" proc_id=0x%x\n", proc_id); - - return 0; -} - -int misc_init_r(void) -{ - set_io_port_base(0); - return 0; -} - -int board_eth_init(struct bd_info *bis) -{ - return ne2k_register(); -} diff --git a/configs/qemu_mips64_defconfig b/configs/qemu_mips64_defconfig deleted file mode 100644 index 30d42ef3ee..0000000000 --- a/configs/qemu_mips64_defconfig +++ /dev/null @@ -1,29 +0,0 @@ -CONFIG_MIPS=y -CONFIG_SYS_TEXT_BASE=0xFFFFFFFFBFC00000 -CONFIG_ENV_SIZE=0x8000 -CONFIG_ENV_SECT_SIZE=0x8000 -CONFIG_TARGET_QEMU_MIPS=y -CONFIG_CPU_MIPS64_R1=y -CONFIG_BOOTDELAY=10 -CONFIG_MISC_INIT_R=y -CONFIG_HUSH_PARSER=y -CONFIG_SYS_PROMPT="qemu-mips64 # " -CONFIG_CMD_IMLS=y -CONFIG_CMD_IDE=y -# CONFIG_CMD_LOADB is not set -# CONFIG_CMD_LOADS is not set -# CONFIG_CMD_SETEXPR is not set -CONFIG_CMD_DHCP=y -CONFIG_CMD_RARP=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_FAT=y -# CONFIG_ISO_PARTITION is not set -CONFIG_ENV_OVERWRITE=y -CONFIG_ENV_IS_IN_FLASH=y -CONFIG_ENV_ADDR=0xFFFFFFFFBFFF8000 -CONFIG_MTD_NOR_FLASH=y -CONFIG_FLASH_CFI_DRIVER=y -CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y -CONFIG_SYS_FLASH_CFI=y -CONFIG_SYS_NS16550=y -CONFIG_LZMA=y diff --git a/configs/qemu_mips64el_defconfig b/configs/qemu_mips64el_defconfig deleted file mode 100644 index 4a45d5e0fd..0000000000 --- a/configs/qemu_mips64el_defconfig +++ /dev/null @@ -1,30 +0,0 @@ -CONFIG_MIPS=y -CONFIG_SYS_TEXT_BASE=0xFFFFFFFFBFC00000 -CONFIG_ENV_SIZE=0x8000 -CONFIG_ENV_SECT_SIZE=0x8000 -CONFIG_TARGET_QEMU_MIPS=y -CONFIG_SYS_LITTLE_ENDIAN=y -CONFIG_CPU_MIPS64_R1=y -CONFIG_BOOTDELAY=10 -CONFIG_MISC_INIT_R=y -CONFIG_HUSH_PARSER=y -CONFIG_SYS_PROMPT="qemu-mips64el # " -CONFIG_CMD_IMLS=y -CONFIG_CMD_IDE=y -# CONFIG_CMD_LOADB is not set -# CONFIG_CMD_LOADS is not set -# CONFIG_CMD_SETEXPR is not set -CONFIG_CMD_DHCP=y -CONFIG_CMD_RARP=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_FAT=y -# CONFIG_ISO_PARTITION is not set -CONFIG_ENV_OVERWRITE=y -CONFIG_ENV_IS_IN_FLASH=y -CONFIG_ENV_ADDR=0xFFFFFFFFBFFF8000 -CONFIG_MTD_NOR_FLASH=y -CONFIG_FLASH_CFI_DRIVER=y -CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y -CONFIG_SYS_FLASH_CFI=y -CONFIG_SYS_NS16550=y -CONFIG_LZMA=y diff --git a/configs/qemu_mips_defconfig b/configs/qemu_mips_defconfig deleted file mode 100644 index ebf7af0140..0000000000 --- a/configs/qemu_mips_defconfig +++ /dev/null @@ -1,27 +0,0 @@ -CONFIG_MIPS=y -CONFIG_SYS_TEXT_BASE=0xBFC00000 -CONFIG_ENV_SIZE=0x8000 -CONFIG_ENV_SECT_SIZE=0x8000 -CONFIG_TARGET_QEMU_MIPS=y -CONFIG_BOOTDELAY=10 -CONFIG_MISC_INIT_R=y -CONFIG_HUSH_PARSER=y -CONFIG_SYS_PROMPT="qemu-mips # " -CONFIG_CMD_IMLS=y -CONFIG_CMD_IDE=y -# CONFIG_CMD_LOADB is not set -# CONFIG_CMD_LOADS is not set -# CONFIG_CMD_SETEXPR is not set -CONFIG_CMD_DHCP=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_FAT=y -# CONFIG_ISO_PARTITION is not set -CONFIG_ENV_OVERWRITE=y -CONFIG_ENV_IS_IN_FLASH=y -CONFIG_ENV_ADDR=0xBFFF8000 -CONFIG_MTD_NOR_FLASH=y -CONFIG_FLASH_CFI_DRIVER=y -CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y -CONFIG_SYS_FLASH_CFI=y -CONFIG_SYS_NS16550=y -CONFIG_LZMA=y diff --git a/configs/qemu_mipsel_defconfig b/configs/qemu_mipsel_defconfig deleted file mode 100644 index 03862f7c4f..0000000000 --- a/configs/qemu_mipsel_defconfig +++ /dev/null @@ -1,28 +0,0 @@ -CONFIG_MIPS=y -CONFIG_SYS_TEXT_BASE=0xBFC00000 -CONFIG_ENV_SIZE=0x8000 -CONFIG_ENV_SECT_SIZE=0x8000 -CONFIG_TARGET_QEMU_MIPS=y -CONFIG_SYS_LITTLE_ENDIAN=y -CONFIG_BOOTDELAY=10 -CONFIG_MISC_INIT_R=y -CONFIG_HUSH_PARSER=y -CONFIG_SYS_PROMPT="qemu-mipsel # " -CONFIG_CMD_IMLS=y -CONFIG_CMD_IDE=y -# CONFIG_CMD_LOADB is not set -# CONFIG_CMD_LOADS is not set -# CONFIG_CMD_SETEXPR is not set -CONFIG_CMD_DHCP=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_FAT=y -# CONFIG_ISO_PARTITION is not set -CONFIG_ENV_OVERWRITE=y -CONFIG_ENV_IS_IN_FLASH=y -CONFIG_ENV_ADDR=0xBFFF8000 -CONFIG_MTD_NOR_FLASH=y -CONFIG_FLASH_CFI_DRIVER=y -CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y -CONFIG_SYS_FLASH_CFI=y -CONFIG_SYS_NS16550=y -CONFIG_LZMA=y diff --git a/include/configs/qemu-mips.h b/include/configs/qemu-mips.h deleted file mode 100644 index 5e787d7209..0000000000 --- a/include/configs/qemu-mips.h +++ /dev/null @@ -1,89 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2003 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - */ - -/* - * This file contains the configuration parameters for qemu-mips target. - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#define CONFIG_QEMU_MIPS - -#define CONFIG_TIMESTAMP /* Print image info with timestamp */ - -#define CONFIG_EXTRA_ENV_SETTINGS \ - "addmisc=setenv bootargs ${bootargs} " \ - "console=ttyS0,${baudrate} " \ - "panic=1\0" \ - "bootfile=/tftpboot/vmlinux\0" \ - "load=tftp 80500000 ${u-boot}\0" \ - "" - -#define CONFIG_BOOTCOMMAND "bootp;bootelf" - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_BOOTFILESIZE - -#define CONFIG_DRIVER_NE2000 -#define CONFIG_DRIVER_NE2000_BASE 0xb4000300 - -#define CONFIG_SYS_NS16550_SERIAL -#define CONFIG_SYS_NS16550_REG_SIZE 1 -#define CONFIG_SYS_NS16550_CLK 115200 -#define CONFIG_SYS_NS16550_COM1 0xb40003f8 - -#ifdef CONFIG_SYS_BIG_ENDIAN -#define CONFIG_IDE_SWAP_IO -#endif - -#define CONFIG_SYS_IDE_MAXBUS 2 -#define CONFIG_SYS_ATA_IDE0_OFFSET 0x1f0 -#define CONFIG_SYS_ATA_IDE1_OFFSET 0x170 -#define CONFIG_SYS_ATA_DATA_OFFSET 0 -#define CONFIG_SYS_ATA_REG_OFFSET 0 -#define CONFIG_SYS_ATA_BASE_ADDR 0xb4000000 - -#define CONFIG_SYS_IDE_MAXDEVICE 4 - -/* - * Miscellaneous configurable options - */ - -#define CONFIG_SYS_MALLOC_LEN (256 << 10) - -#define CONFIG_SYS_BOOTPARAMS_LEN 128*1024 - -#define CONFIG_SYS_MHZ 132 - -#define CONFIG_SYS_MIPS_TIMER_FREQ (CONFIG_SYS_MHZ * 1000000) - -/* Cached addr */ -#define CONFIG_SYS_SDRAM_BASE 0x80000000 - -/* default load address */ -#define CONFIG_SYS_LOAD_ADDR 0x81000000 - -/*----------------------------------------------------------------------- - * FLASH and environment organization - */ -/* The following #defines are needed to get flash environment right */ -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE - -#define CONFIG_SYS_INIT_SP_OFFSET 0x400000 - -/* We boot from this flash, selected with dip switch */ -#define CONFIG_SYS_FLASH_BASE 0xbfc00000 -#define CONFIG_SYS_MAX_FLASH_BANKS 1 -#define CONFIG_SYS_MAX_FLASH_SECT 128 - -/* Address and size of Primary Environment Sector */ - -#define MEM_SIZE 128 - -#endif /* __CONFIG_H */ diff --git a/include/configs/qemu-mips64.h b/include/configs/qemu-mips64.h deleted file mode 100644 index 0ed00bc88f..0000000000 --- a/include/configs/qemu-mips64.h +++ /dev/null @@ -1,89 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2003 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - */ - -/* - * This file contains the configuration parameters for qemu-mips64 target. - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#define CONFIG_QEMU_MIPS - -#define CONFIG_TIMESTAMP /* Print image info with timestamp */ - -#define CONFIG_EXTRA_ENV_SETTINGS \ - "addmisc=setenv bootargs ${bootargs} " \ - "console=ttyS0,${baudrate} " \ - "panic=1\0" \ - "bootfile=/tftpboot/vmlinux\0" \ - "load=tftp ffffffff80500000 ${u-boot}\0" \ - "" - -#define CONFIG_BOOTCOMMAND "bootp;bootelf" - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_BOOTFILESIZE - -#define CONFIG_DRIVER_NE2000 -#define CONFIG_DRIVER_NE2000_BASE 0xffffffffb4000300 - -#define CONFIG_SYS_NS16550_SERIAL -#define CONFIG_SYS_NS16550_REG_SIZE 1 -#define CONFIG_SYS_NS16550_CLK 115200 -#define CONFIG_SYS_NS16550_COM1 0xffffffffb40003f8 - -#ifdef CONFIG_SYS_BIG_ENDIAN -#define CONFIG_IDE_SWAP_IO -#endif - -#define CONFIG_SYS_IDE_MAXBUS 2 -#define CONFIG_SYS_ATA_IDE0_OFFSET 0x1f0 -#define CONFIG_SYS_ATA_IDE1_OFFSET 0x170 -#define CONFIG_SYS_ATA_DATA_OFFSET 0 -#define CONFIG_SYS_ATA_REG_OFFSET 0 -#define CONFIG_SYS_ATA_BASE_ADDR 0xffffffffb4000000 - -#define CONFIG_SYS_IDE_MAXDEVICE 4 - -/* - * Miscellaneous configurable options - */ - -#define CONFIG_SYS_MALLOC_LEN (256 << 10) - -#define CONFIG_SYS_BOOTPARAMS_LEN 128*1024 - -#define CONFIG_SYS_MHZ 132 - -#define CONFIG_SYS_MIPS_TIMER_FREQ (CONFIG_SYS_MHZ * 1000000) - -/* Cached addr */ -#define CONFIG_SYS_SDRAM_BASE 0xffffffff80000000 - -/* default load address */ -#define CONFIG_SYS_LOAD_ADDR 0xffffffff81000000 - -/*----------------------------------------------------------------------- - * FLASH and environment organization - */ -/* The following #defines are needed to get flash environment right */ -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE - -#define CONFIG_SYS_INIT_SP_OFFSET 0x400000 - -/* We boot from this flash, selected with dip switch */ -#define CONFIG_SYS_FLASH_BASE 0xffffffffbfc00000 -#define CONFIG_SYS_MAX_FLASH_BANKS 1 -#define CONFIG_SYS_MAX_FLASH_SECT 128 - -/* Address and size of Primary Environment Sector */ - -#define MEM_SIZE 128 - -#endif /* __CONFIG_H */ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index a2fcafd2e6..981c9d5963 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1308,7 +1308,6 @@ CONFIG_PXA_STD_I2C CONFIG_PXA_VGA CONFIG_PXA_VIDEO CONFIG_QBMAN_CLK_DIV -CONFIG_QEMU_MIPS CONFIG_QIXIS_I2C_ACCESS CONFIG_QSPI CONFIG_QUOTA From patchwork Wed Apr 21 19:13:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Schwierzeck X-Patchwork-Id: 1468817 X-Patchwork-Delegate: daniel.schwierzeck@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Ef2oXO8g; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FQVZp6Jtrz9sVw for ; Thu, 22 Apr 2021 05:13:36 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3A2268188B; Wed, 21 Apr 2021 21:13:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Ef2oXO8g"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5C2E68188B; Wed, 21 Apr 2021 21:13:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C71DE8188B for ; Wed, 21 Apr 2021 21:13:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=daniel.schwierzeck@gmail.com Received: by mail-ej1-x630.google.com with SMTP id w3so65135257ejc.4 for ; Wed, 21 Apr 2021 12:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7nJbozmEyKSRezltnDKdVQ9/b9p/1U9Ms1kOMKnb7Ak=; b=Ef2oXO8gyRGPerM4zuM8x9jYsIl1pks3YahrhtvhG4a3/dQgJe1B8KifW/sTWXGGj6 kVslhlYC9E+kjuYZyiHXNXWPhoDoJkrqj77OPcnietQRm8042QdHwBwUEaC1/TVbt7a8 o67W8iUO/aezjvcyFNeCwFUp5z9jcJUqXgUhxGUGx4tU4f50sXJspIjWSAjHkyeJ9+8+ apWax4hp+4QZurMuWrAmU0AA3cFvN7GvMxDY18KAMhyFFS/1O7rSax5JBo0PheV5nxef eRfFvgekmqKXsJV0zwuGN3kVGapVX4lnBeeMlzfYBfmDRwNuen8GPiJkhRM1II88wO4w p0Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7nJbozmEyKSRezltnDKdVQ9/b9p/1U9Ms1kOMKnb7Ak=; b=Fak6pgQCg4Hw54EIrvqE364s0tTDt0nBubT4dC74XFhHsx/+AX9FM61uCUjSgWBYiU 3iZyeNzcE+DauFWzd7CtkzlNkYIhsfRFLWmQsfQmr8H2lByY8iZHkMr0uJLYfWBvXAju fFEVGHstLhcUd5Pw/T74luKoUVcjrTVWcALEC+RglL91hQNXJu6O6X/VCq3Y8t1exfMf Il3dRMhR9VzMafL6oHf/i0oKbrwt/qvN5RJEn12LXGKPcK4hJ2g5mXPBato6nO/ZrVxK o/hENmBbuaPNnF31iQZDaoHGjGHgfuTwj9hGQfFszTP12I5dV/GNIfKlt/9M+Sl7GLVm BQyw== X-Gm-Message-State: AOAM530B/j7nP1ZIdK8sojFMPVAEQlMnLIeJfNg5LM4SACzS1k/VQIk0 OoRaJdKZk0qoJzs7bPQZf90z0D830us= X-Google-Smtp-Source: ABdhPJyKPFeWjLbOwm0NDKekhE8JBmFL09lILrxsPcApnow14wfk6f2nPPUNS/doTegqqQXW59vDDw== X-Received: by 2002:a17:906:2e59:: with SMTP id r25mr33966277eji.268.1619032399350; Wed, 21 Apr 2021 12:13:19 -0700 (PDT) Received: from workstation.lan.schwierd.dedyn.io (i5E86058A.versanet.de. [94.134.5.138]) by smtp.gmail.com with ESMTPSA id c7sm214840edt.84.2021.04.21.12.13.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Apr 2021 12:13:18 -0700 (PDT) From: Daniel Schwierzeck To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Tom Rini , Daniel Schwierzeck Subject: [PATCH 2/2] doc: update and fix Qemu MIPS documentation Date: Wed, 21 Apr 2021 21:13:14 +0200 Message-Id: <20210421191315.527351-2-daniel.schwierzeck@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210421191315.527351-1-daniel.schwierzeck@gmail.com> References: <20210421191315.527351-1-daniel.schwierzeck@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Update description to use the MIPS Malta board for Qemu. Signed-off-by: Daniel Schwierzeck --- doc/board/emulation/qemu-mips.rst | 273 +++++++++--------------------- 1 file changed, 78 insertions(+), 195 deletions(-) diff --git a/doc/board/emulation/qemu-mips.rst b/doc/board/emulation/qemu-mips.rst index d35925126a..5fd8a0a23b 100644 --- a/doc/board/emulation/qemu-mips.rst +++ b/doc/board/emulation/qemu-mips.rst @@ -1,246 +1,129 @@ .. SPDX-License-Identifier: GPL-2.0+ -.. sectionauthor:: Vlad Lungu +.. sectionauthor:: Daniel Schwierzeck QEMU MIPS ========= -Qemu is a full system emulator. See http://www.nongnu.org/qemu/ +Qemu for MIPS is based on the MIPS Malta board. The built Malta U-Boot +images can be used for Qemu and on physical hardware. The Malta board +supports all combinations of Little and Big Endian as well as 32 bit +and 64 bit. Limitations & comments ---------------------- -Supports the "-M mips" configuration of qemu: serial,NE2000,IDE. -Supports little and big endian as well as 32 bit and 64 bit. -Derived from au1x00 with a lot of things cut out. - -Supports emulated flash (patch Jean-Christophe PLAGNIOL-VILLARD) with -recent qemu versions. When using emulated flash, launch with --pflash and erase mips_bios.bin. - - -Notes for the Qemu MIPS port ----------------------------- +The memory size for Qemu is hard-coded to 256 MiB. For Malta Little Endian +targets an extra endianness swapped image named *u-boot-swap.bin* is +generated and required for Qemu. Example usage -^^^^^^^^^^^^^ - -Using u-boot.bin as ROM (replaces Qemu monitor): +------------- -32 bit, big endian +Build for 32 bit, big endian: .. code-block:: bash - make qemu_mips_defconfig - qemu-system-mips -M mips -bios u-boot.bin -nographic + make malta_defconfig + make + UBOOT_BIN=u-boot.bin + QEMU_BIN=qemu-system-mips + QEMU_CPU=24Kc -32 bit, little endian +Build for 32 bit, little endian: .. code-block:: bash - make qemu_mipsel_defconfig - qemu-system-mipsel -M mips -bios u-boot.bin -nographic + make maltael_defconfig + make + UBOOT_BIN=u-boot-swap.bin + QEMU_BIN=qemu-system-mipsel + QEMU_CPU=24Kc -64 bit, big endian +Build for 64 bit, big endian: .. code-block:: bash - make qemu_mips64_defconfig - qemu-system-mips64 -cpu MIPS64R2-generic -M mips -bios u-boot.bin -nographic + make malta64_defconfig + make + UBOOT_BIN=u-boot.bin + QEMU_BIN=qemu-system-mips64 + QEMU_CPU=MIPS64R2-generic -64 bit, little endian +Build for 64 bit, little endian: .. code-block:: bash - make qemu_mips64el_defconfig - qemu-system-mips64el -cpu MIPS64R2-generic -M mips -bios u-boot.bin -nographic + make malta64el_defconfig + make + UBOOT_BIN=u-boot-swap.bin + QEMU_BIN=qemu-system-mips64el + QEMU_CPU=MIPS64R2-generic -or using u-boot.bin from emulated flash: - -if you use a QEMU version after commit 4224 +Generate NOR flash image with U-Boot binary: .. code-block:: bash - # create image: - dd of=flash bs=1k count=4k if=/dev/zero - dd of=flash bs=1k conv=notrunc if=u-boot.bin - # start it (see above): - qemu-system-mips[64][el] [-cpu MIPS64R2-generic] -M mips -pflash flash -nographic - -Download kernel + initrd -^^^^^^^^^^^^^^^^^^^^^^^^ - -On ftp://ftp.denx.de/pub/contrib/Jean-Christophe_Plagniol-Villard/qemu_mips/ -you can downland:: + dd if=/dev/zero bs=1M count=4 | tr '\000' '\377' > pflash.img + dd if=${UBOOT_BIN} of=pflash.img conv=notrunc - #config to build the kernel - qemu_mips_defconfig - #patch to fix mips interrupt init on 2.6.24.y kernel - qemu_mips_kernel.patch - initrd.gz - vmlinux - vmlinux.bin - System.map - -Generate uImage -^^^^^^^^^^^^^^^ - -.. code-block:: bash - - tools/mkimage -A mips -O linux -T kernel -C gzip -a 0x80010000 -e 0x80245650 -n "Linux 2.6.24.y" -d vmlinux.bin.gz uImage - -Copy uImage to Flash -^^^^^^^^^^^^^^^^^^^^ +Start Qemu: .. code-block:: bash - dd if=uImage bs=1k conv=notrunc seek=224 of=flash - -Generate Ide Disk -^^^^^^^^^^^^^^^^^ + mkdir tftproot + ${QEMU_BIN} -nographic -cpu ${QEMU_CPU} -m 256 -drive if=pflash,file="$(pwd)/pflash.img",format=raw -netdev user,id=net0,tftp="$(pwd)/tftproot" -device pcnet,netdev=net0 .. code-block:: bash - dd of=ide bs=1k count=100k if=/dev/zero + U-Boot 2021.04-00963-g60279a2b1d (Apr 21 2021 - 19:54:32 +0200) - # Create partion table - sudo sfdisk ide << EOF - label: dos - label-id: 0x6fe3a999 - device: image - unit: sectors - image1 : start= 63, size= 32067, Id=83 - image2 : start= 32130, size= 32130, Id=83 - image3 : start= 64260, size= 4128705, Id=83 - EOF + Board: MIPS Malta CoreLV + DRAM: 256 MiB + Flash: 4 MiB + Loading Environment from Flash... *** Warning - bad CRC, using default environment -Copy to ide -^^^^^^^^^^^ + In: serial@3f8 + Out: serial@3f8 + Err: serial@3f8 + Net: pcnet#0 + IDE: Bus 0: not available + maltael # -.. code-block:: bash - - dd if=uImage bs=512 conv=notrunc seek=63 of=ide +How to debug U-Boot +------------------- -Generate ext2 on part 2 on Copy uImage and initrd.gz -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +In order to debug U-Boot you need to start qemu with gdb server support (-s) +and waiting the connection to start the CPU (-S). Start Qemu in the first console: .. code-block:: bash - # Attached as loop device ide offset = 32130 * 512 - sudo losetup -o 16450560 /dev/loop0 ide - # Format as ext2 ( arg2 : nb blocks) - sudo mkfs.ext2 /dev/loop0 16065 - sudo losetup -d /dev/loop0 - # Mount and copy uImage and initrd.gz to it - sudo mount -o loop,offset=16450560 -t ext2 ide /mnt - sudo mkdir /mnt/boot - cp {initrd.gz,uImage} /mnt/boot/ - # Umount it - sudo umount /mnt - -Set Environment -^^^^^^^^^^^^^^^ - -.. code-block:: bash + mkdir tftproot + ${QEMU_BIN} -s -S -nographic -cpu ${QEMU_CPU} -m 256 -drive if=pflash,file="$(pwd)/pflash.img",format=raw -netdev user,id=net0,tftp="$(pwd)/tftproot" -device pcnet,netdev=net0 - setenv rd_start 0x80800000 - setenv rd_size 2663940 - setenv kernel BFC38000 - setenv oad_addr 80500000 - setenv load_addr2 80F00000 - setenv kernel_flash BFC38000 - setenv load_addr_hello 80200000 - setenv bootargs 'root=/dev/ram0 init=/bin/sh' - setenv load_rd_ext2 'ide res; ext2load ide 0:2 ${rd_start} /boot/initrd.gz' - setenv load_rd_tftp 'tftp ${rd_start} /initrd.gz' - setenv load_kernel_hda 'ide res; diskboot ${load_addr} 0:2' - setenv load_kernel_ext2 'ide res; ext2load ide 0:2 ${load_addr} /boot/uImage' - setenv load_kernel_tftp 'tftp ${load_addr} /qemu_mips/uImage' - setenv boot_ext2_ext2 'run load_rd_ext2; run load_kernel_ext2; run addmisc; bootm ${load_addr}' - setenv boot_ext2_flash 'run load_rd_ext2; run addmisc; bootm ${kernel_flash}' - setenv boot_ext2_hda 'run load_rd_ext2; run load_kernel_hda; run addmisc; bootm ${load_addr}' - setenv boot_ext2_tftp 'run load_rd_ext2; run load_kernel_tftp; run addmisc; bootm ${load_addr}' - setenv boot_tftp_hda 'run load_rd_tftp; run load_kernel_hda; run addmisc; bootm ${load_addr}' - setenv boot_tftp_ext2 'run load_rd_tftp; run load_kernel_ext2; run addmisc; bootm ${load_addr}' - setenv boot_tftp_flash 'run load_rd_tftp; run addmisc; bootm ${kernel_flash}' - setenv boot_tftp_tftp 'run load_rd_tftp; run load_kernel_tftp; run addmisc; bootm ${load_addr}' - setenv load_hello_tftp 'tftp ${load_addr_hello} /examples/hello_world.bin' - setenv go_tftp 'run load_hello_tftp; go ${load_addr_hello}' - setenv addmisc 'setenv bootargs ${bootargs} console=ttyS0,${baudrate} rd_start=${rd_start} rd_size=${rd_size} ethaddr=${ethaddr}' - setenv bootcmd 'run boot_tftp_flash' - -Now you can boot from flash, ide, ide+ext2 and tfp +In the second console start gdb: .. code-block:: bash - qemu-system-mips -M mips -pflash flash -monitor null -nographic -net nic -net user -tftp `pwd` -hda ide - - -How to debug U-Boot -------------------- - -In order to debug U-Boot you need to start qemu with gdb server support (-s) -and waiting the connection to start the CPU (-S) + gdb-multiarch --eval-command "target remote :1234" u-boot .. code-block:: bash - qemu-system-mips -S -s -M mips -pflash flash -monitor null -nographic -net nic -net user -tftp `pwd` -hda ide - -in an other console you start gdb - -Debugging of U-Boot Before Relocation -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Before relocation, the addresses in the ELF file can be used without any problems -by connecting to the gdb server localhost:1234 - -.. code-block:: none - - $ mipsel-unknown-linux-gnu-gdb u-boot - GNU gdb 6.6 - Copyright (C) 2006 Free Software Foundation, Inc. - GDB is free software, covered by the GNU General Public License, and you are - welcome to change it and/or distribute copies of it under certain conditions. - Type "show copying" to see the conditions. - There is absolutely no warranty for GDB. Type "show warranty" for details. - This GDB was configured as "--host=i486-linux-gnu --target=mipsel-unknown-linux-gnu"... - (gdb) target remote localhost:1234 - Remote debugging using localhost:1234 - _start () at start.S:64 - 64 RVECENT(reset,0) /* U-Boot entry point */ - Current language: auto; currently asm - (gdb) b board.c:289 - Breakpoint 1 at 0xbfc00cc8: file board.c, line 289. - (gdb) c - Continuing. - - Breakpoint 1, board_init_f (bootflag=) at board.c:290 - 290 relocate_code (addr_sp, id, addr); - Current language: auto; currently c - (gdb) p/x addr - $1 = 0x87fa0000 - -Debugging of U-Boot After Relocation -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -For debugging U-Boot after relocation we need to know the address to which -U-Boot relocates itself to 0x87fa0000 by default. -And replace the symbol table to this offset. - -.. code-block:: none - - (gdb) symbol-file - Discard symbol table from `/private/u-boot-arm/u-boot'? (y or n) y - Error in re-setting breakpoint 1: - No symbol table is loaded. Use the "file" command. - No symbol file now. - (gdb) add-symbol-file u-boot 0x87fa0000 - add symbol table from file "u-boot" at - .text_addr = 0x87fa0000 - (y or n) y - Reading symbols from /private/u-boot-arm/u-boot...done. - Breakpoint 1 at 0x87fa0cc8: file board.c, line 289. - (gdb) c - Continuing. - - Program received signal SIGINT, Interrupt. - 0xffffffff87fa0de4 in udelay (usec=) at time.c:78 - 78 while ((tmo - read_c0_count()) < 0x7fffffff) + GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2 + Copyright (C) 2020 Free Software Foundation, Inc. + License GPLv3+: GNU GPL version 3 or later + This is free software: you are free to change and redistribute it. + There is NO WARRANTY, to the extent permitted by law. + Type "show copying" and "show warranty" for details. + This GDB was configured as "x86_64-linux-gnu". + Type "show configuration" for configuration details. + For bug reporting instructions, please see: + . + Find the GDB manual and other documentation resources online at: + . + + For help, type "help". + Type "apropos word" to search for commands related to "word"... + Reading symbols from u-boot... + Remote debugging using :1234 + 0xbfc00000 in ?? () + (gdb) c + Continuing.