From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5F68FC4332F for ; Sun, 20 Nov 2022 15:33:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4C08085441; Sun, 20 Nov 2022 16:33:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="gh25Osvw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BB16F85443; Sun, 20 Nov 2022 16:33:41 +0100 (CET) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (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 5CAA78543E for ; Sun, 20 Nov 2022 16:33:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x836.google.com with SMTP id h21so6006216qtu.2 for ; Sun, 20 Nov 2022 07:33:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=SnpM3FNyZ7GhrDZpr4AAn3jfhstCL3b1IUm8r+YhfaI=; b=gh25OsvwYbNyN2KoxdIRGdpcxdRutuQg28/2qpA7/DDGMuf9FnRPyRj4scYwIZs4d5 Ss+8x+rEqTkyXhkHbPMW/TzKTOoWe0xesPY4fy4watpm91H46dHDr5U4laNSE5fjy1RB p6MdTuh0sa7JfoCIa7Sfl+Sf6Nv87mTEXdKYg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SnpM3FNyZ7GhrDZpr4AAn3jfhstCL3b1IUm8r+YhfaI=; b=FeeBlO4/fYvVzmJ/iLTjMqo7XE+1B/HAwsrAwlBREEReN7e+W5WNf6HTjWXDh7c1eo xLwgUPl4jk/9nygG733+UDgWv8LDGtUc5QUgBsjuc1ko/2yKEtmWXV5iJgOnNQ+XNDhQ I3XOUW2Ifp2aHIxo5MRpcypgbPdeAHMfJaHmvW24tvZ6o4+A/RAGZM32fr9yygfcouV3 WyK5ByPrB1+rEaIJ9QZhnhxWpxGhqZfVWgl2hdxnoJJ1AChRDL6ZGrf31dJcBAXy/68H mNkXZSm3ntvnHEEwJou2ZoA3Zs0SYmAo4eZhjLw7NAz9Km3+RniYMSg9XzNUxEreGxGM 1BnQ== X-Gm-Message-State: ANoB5plnzHlJffbbLBNaz1vjEj+azaV6b5obERlNy4++/vjVzJ+pXkFJ bne2jzFvKB4l0S1e8EsKMAmoYsQhWbgybQ== X-Google-Smtp-Source: AA0mqf7ARlxcq10WsL0vGVV8iwtel22/mVAEg43Nj1kQ2WFXYMZCH2WvzySrYcFk0gAOVVBklVvp8Q== X-Received: by 2002:ac8:5299:0:b0:3a5:3623:17b2 with SMTP id s25-20020ac85299000000b003a5362317b2mr14354944qtn.543.1668958418111; Sun, 20 Nov 2022 07:33:38 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-fd93-7b04-a775-7606.res6.spectrum.com. [2603:6081:7b00:6400:fd93:7b04:a775:7606]) by smtp.gmail.com with ESMTPSA id t4-20020ac87384000000b0039cba52974fsm5348606qtp.94.2022.11.20.07.33.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Nov 2022 07:33:37 -0800 (PST) Date: Sun, 20 Nov 2022 10:33:35 -0500 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: u-boot@lists.denx.de, maemo-leste@lists.dyne.org, Sicelo , Merlijn Wajer , Ivaylo Dimitrov , Pavel Machek Subject: Re: [maemo-leste] Broken u-boot on n900 hw (possibly CONFIG_POSITION_INDEPENDENT) Message-ID: <20221120153335.GF7282@bill-the-cat> References: <20221009193317.5cwxcmntr6ziaphn@pali> <20221020200658.mby4a2rfxbw7j67v@pali> <20221021190955.mznki677gc4ogc7j@pali> <20221102000826.rmk45pdrbn5gwndz@pali> <20221109203328.xshcy76q53d5vxjn@pali> <20221119211301.pffzina66azietye@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KSyhVCl2eeZHT0Rn" Content-Disposition: inline In-Reply-To: <20221119211301.pffzina66azietye@pali> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean --KSyhVCl2eeZHT0Rn Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 19, 2022 at 10:13:01PM +0100, Pali Roh=E1r wrote: > On Wednesday 09 November 2022 21:33:28 Pali Roh=E1r wrote: > > On Wednesday 02 November 2022 01:08:26 Pali Roh=E1r wrote: > > > On Friday 21 October 2022 21:09:55 Pali Roh=E1r wrote: > > > > On Thursday 20 October 2022 22:06:58 Pali Roh=E1r wrote: > > > > > On Monday 10 October 2022 23:30:21 Sicelo wrote: > > > > > > On Sun, Oct 09, 2022 at 09:33:17PM +0200, Pali Roh=E1r wrote: > > > > > > > Hello! > > > > > > >=20 > > > > > > > Current u-boot from master branch does not work on n900 hw. I= t does not > > > > > > > show anything on display, there just nokia logo. > > > > > > >=20 > > > > > > > In qemu it is working fine and all tests are passing. Also in= qemu is > > > > > > > display working without any problem. > > > > > > >=20 > > > > > > > Could you help me to debug it? Maybe something is printed to = serial > > > > > > > console? Or maybe serial console could be used for printf-deb= ugging? > > > > > > >=20 > > > > > > > I just figured out that disabling CONFIG_POSITION_INDEPENDENT= u-boot > > > > > > > option make it working again. But it requires to restoring ol= der version > > > > > > > of lowlevel_init.S file which does not depend on POSITION_IND= EPENDENT: > > > > > > >=20 > > > > > > > git checkout 7c4ad9821758f98db127e9d6864671c906c02d3b -- = board/nokia/rx51/lowlevel_init.S > > > > > > >=20 > > > > > > > And also setting CONFIG_SYS_TEXT_BASE=3D0x80008000 (to some v= alue in RAM). > > > > > >=20 > > > > > > Hi > > > > > >=20 > > > > > > I have a really crude serial console setup in place now, but ve= ry little > > > > > > time, and even less experience with u-boot. I should be able to= do the > > > > > > tests for you on Saturday night (UTC+2). Perhaps over IRC might= be a > > > > > > good idea, in case I need some hand-holding, and if you still n= eed the > > > > > > help by then. > > > > > >=20 > > > > > > Regards > > > > > > Sicelo > > > > >=20 > > > > > Well, I do not know where to start or how to instruct somebody wh= o is > > > > > not experienced with u-boot debugging. I think that the first step > > > > > should be to look if U-Boot prints something on the serial consol= e or > > > > > not. If it prints then try to find via printf-driven-debugging pl= ace > > > > > where it stuck. If it does not print anything on the console then= try to > > > > > setup debug early console, check if it prints something now and d= o same > > > > > type of debugging. And if even early debug console does not work = then > > > > > probably initialize serial console directly in lowlevel_init.S fi= le, > > > > > prints something to serial, then move code for printing to later = stage > > > > > and try to figure out what is broken... > > > >=20 > > > > Early debug uart console can be enabled by configs/nokia_rx51_defco= nfig options: > > > >=20 > > > > CONFIG_DEBUG_UART=3Dy > > > > CONFIG_DEBUG_UART_OMAP=3Dy > > > > CONFIG_DEBUG_UART_SHIFT=3D2 > > > > CONFIG_DEBUG_UART_BASE=3D0x49020000 > > > > CONFIG_DEBUG_UART_CLOCK=3D48000000 > > > >=20 > > > > And all debug verbose logs can be enabled by configs/nokia_rx51_def= config options: > > > >=20 > > > > CONFIG_DM_DEBUG=3Dy > > > > CONFIG_LOG=3Dy > > > > CONFIG_LOGLEVEL=3D9 > > > > CONFIG_LOG_MAX_LEVEL=3D9 > > > > CONFIG_LOG_DEFAULT_LEVEL=3D9 > > > >=20 > > > > By compiling via 'make u-boot.bin KCPPFLAGS=3D-DLOG_DEBUG' > > >=20 > > > Can somebody with serial console provide this debug output if there is > > > something useful? > >=20 > > Can somebody help me with this? >=20 > Merlijn Wajer now sent me output from serial console: >=20 > ... > initcall: 0001ebd4 (relocated to 8fe0abd4) > MMC: 0 > - 0 'omap_hsmmc' > - found > 1 > - 0 'omap_hsmmc' > - 1 'omap_hsmmc' > - found > 2 > - 0 'omap_hsmmc' > - 1 'omap_hsmmc' > - not found > OMAP SD/MMC: 0, OMAP SD/MMC: 1 > initcall: 0001ea8c (relocated to 8fe0aa8c) > Loading Environment from ... Using default environment > Destroy Hash Table: 8fe25a98 table =3D 00000000 > Create Hash Table: N=3D387 >=20 > After the "Create Hash Table: N=3D387" line there is nothing more. > Repeated tests have same result, always stop at that line. >=20 > In qemu after that line I see following output: >=20 > INSERT: table 8fe25a98, filled 1/389 rv 8fd0e2f4 =3D=3D> name=3D"bootcm= d" value=3D"run sdboot;run emmcboot;run attachboot;echo" > INSERT: table 8fe25a98, filled 2/389 rv 8fd0e344 =3D=3D> name=3D"bootde= lay" value=3D"30" > INSERT: table 8fe25a98, filled 3/389 rv 8fd0f960 =3D=3D> name=3D"baudra= te" value=3D"115200" > DELETE CANDIDATE: "preboot" > hdelete: DELETE key "preboot" > DELETE ERROR ############################## > INSERT: table 8fe25a98, filled 4/389 rv 8fd0e574 =3D=3D> name=3D"loadad= dr" value=3D"0x80008000" > ... >=20 > In qemu is u-boot working fine. >=20 > So it looks like that there is u-boot crash in environment code and only > when running on real HW. >=20 > Any idea? Could there be some relocation issue in u-boot env code? My first thought here is that something like 534f0fbd6520 ("arm64: Fix relocation of env_addr if POSITION_INDEPENDENT=3Dy") might be needed on 32bit as well? --=20 Tom --KSyhVCl2eeZHT0Rn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmN6SMwACgkQFHw5/5Y0 tyxAkAv+KRERTJ0HMKSO1iaR6dhxLf02xrtV8LlB8B5pIDOH08ekVQkx2FkjI5Sy znHttYi4yU1mAdSjHj6NN3uBpJa7p2Vl+x5D/ACxQu4li3TiDXizOJyy7amAbQei o9zOXMC1/gah18pBMK1WXDE2Qa+25MkvppPFsXumZukrF8nYtPMR0OdbjKb2kgNq IKUKqi1tMCDvW+uKarLYE4fMVdZ8/7f1xR5ps7rplkERKFN4WBXhv2tVndqC3t+F pS2RGw729XsLyzNIXIWHEe5o1g5UYRimk1tx8j27Fa8DbrT6quDdqZ6sAuY20cT/ RXY/UASd7Cf/SFKHiYiQnAYw1WcXosIkaZITUTkkPmXy6DYlGDHxm2giEX1ISj4A n1hzqw5Z9Sfh1+jE8VTrIc8fG/oiRiVciD4bYhodaTFH83K1Z1fMP12gnn9cj70w Ik6FTdjd1TB81j4hHD5G9WAAkps+9IiXeIb/3UMINqrh8WtQMCI3JQ+ls0Qw9DvW 5cMy1nq/ =VqsI -----END PGP SIGNATURE----- --KSyhVCl2eeZHT0Rn--