radxa cm3 2024.01 mmc write error
Hi, I'm playing with radxa cme and mainline u-boot 2024.01 (present in scarthgap yocto). I realized that mmc write fails all the time like: => md.l $loadaddr 00c00800: ff7ff7eb fffd fff5 9fff => mmc write $loadaddr 1fc0 10 MMC write: dev # 0, block # 8128, count 16 ... mmc write failed 0 blocks written: ERROR 1fc0 = 8128 is according to rockchip gpt table u-boot env partition. Is there something I'm doing wrong or its regression? Thanks and regards, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com
Re: rk3328 efuse return just 0
Hi Jonas, On Fri, Jun 9, 2023 at 1:06 AM Jonas Karlman wrote: > Hi Marek, > > On 2023-06-08 15:06, Belisko Marek wrote: > > Hi, > > > > I'm using tip of actual master and with this small patches: > > --- a/configs/rock-pi-e-rk3328_defconfig > > +++ b/configs/rock-pi-e-rk3328_defconfig > > @@ -73,6 +73,8 @@ CONFIG_FASTBOOT_BUF_ADDR=0x800800 > > CONFIG_FASTBOOT_CMD_OEM_FORMAT=y > > CONFIG_ROCKCHIP_GPIO=y > > CONFIG_SYS_I2C_ROCKCHIP=y > > +CONFIG_MISC=y > > +CONFIG_ROCKCHIP_EFUSE=y > > CONFIG_MMC_DW=y > > CONFIG_MMC_DW_ROCKCHIP=y > > CONFIG_ETH_DESIGNWARE=y > > > > --- a/configs/rock-pi-e-rk3328_defconfig > > +++ b/configs/rock-pi-e-rk3328_defconfig > > @@@ -45,8 -34,6 +45,7 @@@ CONFIG_SPL_I2C= > > CONFIG_SPL_POWER=y > > CONFIG_SPL_ATF=y > > CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y > > +CONFIG_TPL_SYS_MALLOC_SIMPLE=y > > - CONFIG_TPL_DRIVERS_MISC=y > > CONFIG_CMD_BOOTZ=y > > CONFIG_CMD_GPT=y > > CONFIG_CMD_MMC=y > > > > as for the following issue: > > > /home/marek/data/projects/u-boot/drivers/misc/rockchip-efuse.c:273:(.text.rockchip_efuse_of_to_plat+0x1c): > > relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol > > `dev_read_addr_ptr' > How about this issue? I can send a patch to fix that. > > > > I'm trying to enable proper ethaddr handling (as in this case cpuid# is > > used for ethaddr generation). > > > > With those enabled options I'm still getting an cpuid# variable set to > all > > '0'. Is there some other fix necessary maybe? > > I was able to reproduce this issue on my Rock Pi E using plain mainline > arm-trusted-firmware. To use efuse on RK3328 the efuse block needs to be > initialized, u-boot does not do this. > Thanks for the info. I've applied a patch from armbian and it started working! > > Two options to work around this can be: > 1. Use vendor bl31 blob from [1] > 2. Patch mainline atf with a patch from [2] > > [1] > https://github.com/rockchip-linux/rkbin/blob/master/bin/rk33/rk322xh_bl31_v1.49.elf > [2] > https://github.com/armbian/build/blob/main/patch/atf/atf-rockchip64/rk3328-efuse-init.patch > > Regards, > Jonas > > > > > Thanks and BR, > > > > marek > > Cheers, marek
rk3328 efuse return just 0
Hi, I'm using tip of actual master and with this small patches: --- a/configs/rock-pi-e-rk3328_defconfig +++ b/configs/rock-pi-e-rk3328_defconfig @@ -73,6 +73,8 @@ CONFIG_FASTBOOT_BUF_ADDR=0x800800 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_MISC=y +CONFIG_ROCKCHIP_EFUSE=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_ETH_DESIGNWARE=y --- a/configs/rock-pi-e-rk3328_defconfig +++ b/configs/rock-pi-e-rk3328_defconfig @@@ -45,8 -34,6 +45,7 @@@ CONFIG_SPL_I2C= CONFIG_SPL_POWER=y CONFIG_SPL_ATF=y CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y +CONFIG_TPL_SYS_MALLOC_SIMPLE=y - CONFIG_TPL_DRIVERS_MISC=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPT=y CONFIG_CMD_MMC=y as for the following issue: /home/marek/data/projects/u-boot/drivers/misc/rockchip-efuse.c:273:(.text.rockchip_efuse_of_to_plat+0x1c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `dev_read_addr_ptr' I'm trying to enable proper ethaddr handling (as in this case cpuid# is used for ethaddr generation). With those enabled options I'm still getting an cpuid# variable set to all '0'. Is there some other fix necessary maybe? Thanks and BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com
rk3328: No partition table found issue
Hi, I'm using 2022.01 on rockpi-e and having an issue that some SDcards cannot seem to have issue with accessing partitions. I have the same image flashed on 2 SD cards. One boots fine and other one shows: ## Executing script at 0050 Saving Environment to MMC... Writing to redundant MMC(1)... OK ** No partition table - mmc 1 ** whole log: U-Boot 2022.01 (Jan 10 2022 - 18:46:34 +) Model: Radxa ROCK Pi E DRAM: 510 MiB PMIC: RK8050 (on=0x40, off=0x00) MMC: mmc@ff50: 1, mmc@ff52: 0 Loading Environment from MMC... *** Warning - bad CRC, using default environment In:serial@ff13 Out: serial@ff13 Err: serial@ff13 Model: Radxa ROCK Pi E Net: Could not get PHY for ethernet@ff54: addr -1 No ethernet found. Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc1 is current device Scanning mmc 1:1... Found U-Boot script /boot.scr 355 bytes read in 3 ms (115.2 KiB/s) ## Executing script at 0050 Saving Environment to MMC... Writing to redundant MMC(1)... OK ** No partition table - mmc 1 ** Couldn't find partition mmc 1:2 Can't set block device Wrong Image Format for bootm command Is there maybe in newer u-boot some fix for this problem? Thanks and BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com
rockpi-e sometimes fails to load u-boot.img
Hello, I'm using 2022.01 u-boot. Booting from SDcard sometimes shows up this log: U-Boot SPL 2022.01 (Jan 10 2022 - 18:46:34 +) Trying to boot from MMC2 Card did not respond to voltage select! : -110 spl: mmc init failed with error: -95 Trying to boot from MMC1 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ### and after reboot board boots fine. Is there any explanation why this is happening pls? Thanks and regards, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com
binman issue on ubuntu 20.04
Hi, I'm trying to compile an older u-boot (2017.03) with Ubuntu 20.04. Machine is sunxi. COmpilation went fine but when binman assembles u-boot-sunxi-with-spl.bin it stuck somewhere. I've enabled python traces and it loops in forever: subprocess.py(1668): if errpipe_data: cros_subprocess.py(94): if stdout_pty is not None: cros_subprocess.py(96): if stderr_pty is not None: cros_subprocess.py(100): if kwargs: command.py(73): while pipeline: command.py(95): if capture: command.py(97): last_pipe.CommunicateFilter(None)) --- modulename: cros_subprocess, funcname: CommunicateFilter cros_subprocess.py(144): read_set = [] cros_subprocess.py(145): write_set = [] cros_subprocess.py(146): stdout = None # Return cros_subprocess.py(147): stderr = None # Return cros_subprocess.py(149): if self.stdin: cros_subprocess.py(157): if self.stdout: cros_subprocess.py(158): read_set.append(self.stdout) cros_subprocess.py(159): stdout = [] cros_subprocess.py(160): if self.stderr and self.stderr != self.stdout: cros_subprocess.py(163): combined = [] cros_subprocess.py(165): input_offset = 0 cros_subprocess.py(166): while read_set or write_set: cros_subprocess.py(167): try: cros_subprocess.py(168): rlist, wlist, _ = select.select(read_set, write_set, [], 0.2) cros_subprocess.py(174): if not stay_alive: cros_subprocess.py(177): if self.stdin in wlist: cros_subprocess.py(188): if self.stdout in rlist: cros_subprocess.py(189): data = "" cros_subprocess.py(191): try: cros_subprocess.py(192): data = os.read(self.stdout.fileno(), 1024) cros_subprocess.py(195): if data == "": cros_subprocess.py(199): stdout.append(data) cros_subprocess.py(200): combined.append(data) cros_subprocess.py(201): if output: cros_subprocess.py(203): if self.stderr in rlist: Any idea if there is some fix for that or idea where to look? Thanks and BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com
imx8m read boot ROM log issue
Hi, I'm trying to add support for reading imx8mq boot ROM event log and got inspired by this patch: https://lists.denx.de/pipermail/u-boot/2021-July/453318.html My question is if the condition for checking log pointers is correct: /* If the ROM event log pointer is not valid. */ if (*rom_log_addr < 0x90 || *rom_log_addr >= 0xb0 || *rom_log_addr & 0x3) return part; rom_load_addr is set at the beginning of function to 0x9E0 which is offset in OCRAM. Then the value from this address is checked by the above condition and in my experiments function always returns in this particular line (I'm getting a value e.g. 0x710004bf at address 0x9e0) dueto the fact that this condition is never met. So my question is if I'm doing something wrong or I simply don't understand the code :) Thanks and regards, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com
imx8mq hangs when reset board with button
Hello, I'm trying to find the cause why my imx8mq based board hangs when it is rebooted by reset button (works fine when init reset by reboot -f in console). By adding print messages I was able to track down in following code: ret = cdn_api_checkalive(); printf("CDN_API_CheckAlive returned ret = %d\n", ret); if (ret) return -EPERM; ret = cdn_api_general_test_echo_ext_blocking(echo_msg, echo_resp, sizeof(echo_msg), CDN_BUS_TYPE_APB); cdn_api_general_test_echo_ext_blocking function never returns and it blocks forever. Any idea what can be checked? Boot log: Loading Environment from MMC... OK [*]-Video Link 0imx8m_hdmi_probe - 271 video_link_get_display_timings - 382 video_link_get_display_timings - 428 imx8m_hdmi_probe - 285 imx8m_dcss_get_timings_from_display - 429 video_link_get_display_timings - 382 video_link_get_display_timings - 428 imx8m_dcss_get_timings_from_display - 442 pixelclock 7425, hlen 1280, vlen 720 imx8m_dcss_probe - 474 imx8m_dcss_probe - 477 imx8m_dcss_probe - 480 imx8m_hdmi_enable - 256 imx8m_hdmi_init - 130 CDN_API_Init completed CDN_API_CheckAlive returned ret = 0 Thanks. BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com
raspberrypi cm4 devicetree missing?
Hello, I'm using u-boot v2020.01 and run on cm4 model it boots fine just report that model is unknown: DRAM: 948 MiB RPI: Board rev 0x14 outside known range RPI Unknown model (0xa03140) I checked and in later releases there is added support for cm4 but what I'm missing is devicetree blob. In mainline commit: 561bce3522bd1df5f6b10fbae5a6ea5c0b131ff9 is set to bcm2711-rpi-cm4.dtb but I cannot find such file in u-boot tree. My idea is to change the console to use UART2 instead of mini uart. Thanks for clarification. BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com
rockchip RK3399 emmc booting
Hi, I'm trying to run mainline on a custom rk3399 board which boots from eMMC only. Currently I'm using Rockchip SDK which can build an image for the whole system) and then flash it to emmc using (AFAIU using dfu in u-boot). Does anyone have experience with mainline running on rk3399 and have the same functionality? Or is there another way to flash images to eMMC? Thanks and BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com
Re: raspberrypi cm3 v2019.07 not working
On Tue, May 12, 2020 at 1:51 PM Matthias Brugger wrote: > > > > On 12/05/2020 13:39, Matthias Brugger wrote: > > > > > > On 12/05/2020 13:36, Belisko Marek wrote: > >> On Tue, May 12, 2020 at 1:16 PM Matthias Brugger > >> wrote: > >>> > >>> > >>> > >>> On 12/05/2020 13:00, Belisko Marek wrote: > >>>> On Tue, May 12, 2020 at 12:51 PM Matthias Brugger > >>>> wrote: > >>>>> > >>>>> > >>>>> > >>>>> On 12/05/2020 11:15, Belisko Marek wrote: > >>>>>> On Fri, May 8, 2020 at 11:39 PM Belisko Marek > >>>>>> wrote: > >>>>>>> > >>>>>>> Hi Matthias, > >>>>>>> > >>>>>>> On Fri, May 8, 2020 at 11:28 PM Matthias Brugger > >>>>>>> wrote: > >>>>>>>> > >>>>>>>> Hi Marek, > >>>>>>>> > >>>>>>>> On 08/05/2020 21:52, Belisko Marek wrote: > >>>>>>>>> On Wed, May 6, 2020 at 11:02 PM Belisko Marek > >>>>>>>>> wrote: > >>>>>>>>>> > >>>>>>>>>> On Tue, May 5, 2020 at 10:18 PM Belisko Marek > >>>>>>>>>> wrote: > >>>>>>>>>>> > >>>>>>>>>>> Hi, > >>>>>>>>>>> > >>>>>>>>>>> I'm trying to run 2019.07 u-boot on raspberrypi cm3 module but I > >>>>>>>>>>> got > >>>>>>>>>>> no feedback on console. When used 2018.01 it boots fine. Probably > >>>>>>>>>>> I > >>>>>>>>>>> need to do git bisect but maybe someone have some idea or > >>>>>>>>>>> experience > >>>>>>>>>>> what can cause that. Thanks. > >>>>>>>>>> I give a try 2020.01 and I got only this: > >>>>>>>>>> U-Boot 2020.01 (May 06 2020 - 20:09:45 +) > >>>>>>>>>> > >>>>>>>>>> DRAM: 948 MiB > >>>>>>>>>> RPI Compute Module 3 (0xa020a0) > >>>>>>>>>> > >>>>>>>>>> I'll try to debug it and let you know. > >>>>>>>>> Debug messages shows this: > >>>>>>>>> https://pastebin.com/2SwNzrb1 > >>>>>>>>> > >>>>>>>>> I tried to debug but I have no clue what is going one there. > >>>>>>>>> > >>>>>>>>> Also u-boot 2019.07 is not working at all on cm3 due to this commit > >>>>>>>>> (after bisect when reverted u-boot start working again): > >>>>>>>>> 143256b353c4d2ad1cf5e5e63b38410188b35e49 - fdt: update bcm283x > >>>>>>>>> device > >>>>>>>>> tree sources to Linux 5.1-rc6 state > >>>>>>>>> > >>>>>>>>> Any ideas hint how to resolve this issue? Thanks. > >>>>>>>>> > >>>>>>>> > >>>>>>>> Can you try to cherry-pick the following two patches to your tree: > >>>>>>>> 5051377a0b ("arm: dts: bcm283x: Rename U-Boot file") > >>>>>>>> 89e47e8eb6 ("fdt: fix bcm283x dm-pre-reloc definitions") > >>>>>>> But those are present in 2020.01 and this version at least print > >>>>>>> something to console but stuck somewhere (pls see pastebin log with > >>>>>>> debug enabled) > >>>>>>> I prefer to run 2020.01 ;). Thanks. > >>>>>> Any other stuff I can try to make it working in 2020.01? Could that be > >>>>>> firmware issue somehow? Thanks. > >>>>> > >>>>> Sorry I didn't realized that your first try was with 2020.01. > >>>>> I just confirmed that it acutually does not boot. As a shortcut, do you > >>>>> know > >>>>> which is the last working version of U-Boot? > >>>> v2019.07 with reverted commit : > >>>> 143256b353c4d2ad1cf5e5e63b38410188b35e49 - fdt: up
Re: raspberrypi cm3 v2019.07 not working
On Tue, May 12, 2020 at 1:16 PM Matthias Brugger wrote: > > > > On 12/05/2020 13:00, Belisko Marek wrote: > > On Tue, May 12, 2020 at 12:51 PM Matthias Brugger wrote: > >> > >> > >> > >> On 12/05/2020 11:15, Belisko Marek wrote: > >>> On Fri, May 8, 2020 at 11:39 PM Belisko Marek > >>> wrote: > >>>> > >>>> Hi Matthias, > >>>> > >>>> On Fri, May 8, 2020 at 11:28 PM Matthias Brugger > >>>> wrote: > >>>>> > >>>>> Hi Marek, > >>>>> > >>>>> On 08/05/2020 21:52, Belisko Marek wrote: > >>>>>> On Wed, May 6, 2020 at 11:02 PM Belisko Marek > >>>>>> wrote: > >>>>>>> > >>>>>>> On Tue, May 5, 2020 at 10:18 PM Belisko Marek > >>>>>>> wrote: > >>>>>>>> > >>>>>>>> Hi, > >>>>>>>> > >>>>>>>> I'm trying to run 2019.07 u-boot on raspberrypi cm3 module but I got > >>>>>>>> no feedback on console. When used 2018.01 it boots fine. Probably I > >>>>>>>> need to do git bisect but maybe someone have some idea or experience > >>>>>>>> what can cause that. Thanks. > >>>>>>> I give a try 2020.01 and I got only this: > >>>>>>> U-Boot 2020.01 (May 06 2020 - 20:09:45 +) > >>>>>>> > >>>>>>> DRAM: 948 MiB > >>>>>>> RPI Compute Module 3 (0xa020a0) > >>>>>>> > >>>>>>> I'll try to debug it and let you know. > >>>>>> Debug messages shows this: > >>>>>> https://pastebin.com/2SwNzrb1 > >>>>>> > >>>>>> I tried to debug but I have no clue what is going one there. > >>>>>> > >>>>>> Also u-boot 2019.07 is not working at all on cm3 due to this commit > >>>>>> (after bisect when reverted u-boot start working again): > >>>>>> 143256b353c4d2ad1cf5e5e63b38410188b35e49 - fdt: update bcm283x device > >>>>>> tree sources to Linux 5.1-rc6 state > >>>>>> > >>>>>> Any ideas hint how to resolve this issue? Thanks. > >>>>>> > >>>>> > >>>>> Can you try to cherry-pick the following two patches to your tree: > >>>>> 5051377a0b ("arm: dts: bcm283x: Rename U-Boot file") > >>>>> 89e47e8eb6 ("fdt: fix bcm283x dm-pre-reloc definitions") > >>>> But those are present in 2020.01 and this version at least print > >>>> something to console but stuck somewhere (pls see pastebin log with > >>>> debug enabled) > >>>> I prefer to run 2020.01 ;). Thanks. > >>> Any other stuff I can try to make it working in 2020.01? Could that be > >>> firmware issue somehow? Thanks. > >> > >> Sorry I didn't realized that your first try was with 2020.01. > >> I just confirmed that it acutually does not boot. As a shortcut, do you > >> know > >> which is the last working version of U-Boot? > > v2019.07 with reverted commit : > > 143256b353c4d2ad1cf5e5e63b38410188b35e49 - fdt: update bcm283x device > > tree sources to Linux 5.1-rc6 state > > work fine. Without revert it shows anything on console. So something > > between 2019.07..2020.01 mus fix it partially ;) > > I just tired v2020.04 and it works for me. Would you mind testing that on > your end? OK I'll give a try and try to bisect between 2020.01 and 2020.04. I have dependency on 2020.01 as I integrate mender and then use this version. > > Do you have a hard dependency on v2020.01? > > Regards, > Matthias Thanks. BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com
Re: raspberrypi cm3 v2019.07 not working
On Tue, May 12, 2020 at 12:51 PM Matthias Brugger wrote: > > > > On 12/05/2020 11:15, Belisko Marek wrote: > > On Fri, May 8, 2020 at 11:39 PM Belisko Marek > > wrote: > >> > >> Hi Matthias, > >> > >> On Fri, May 8, 2020 at 11:28 PM Matthias Brugger wrote: > >>> > >>> Hi Marek, > >>> > >>> On 08/05/2020 21:52, Belisko Marek wrote: > >>>> On Wed, May 6, 2020 at 11:02 PM Belisko Marek > >>>> wrote: > >>>>> > >>>>> On Tue, May 5, 2020 at 10:18 PM Belisko Marek > >>>>> wrote: > >>>>>> > >>>>>> Hi, > >>>>>> > >>>>>> I'm trying to run 2019.07 u-boot on raspberrypi cm3 module but I got > >>>>>> no feedback on console. When used 2018.01 it boots fine. Probably I > >>>>>> need to do git bisect but maybe someone have some idea or experience > >>>>>> what can cause that. Thanks. > >>>>> I give a try 2020.01 and I got only this: > >>>>> U-Boot 2020.01 (May 06 2020 - 20:09:45 +) > >>>>> > >>>>> DRAM: 948 MiB > >>>>> RPI Compute Module 3 (0xa020a0) > >>>>> > >>>>> I'll try to debug it and let you know. > >>>> Debug messages shows this: > >>>> https://pastebin.com/2SwNzrb1 > >>>> > >>>> I tried to debug but I have no clue what is going one there. > >>>> > >>>> Also u-boot 2019.07 is not working at all on cm3 due to this commit > >>>> (after bisect when reverted u-boot start working again): > >>>> 143256b353c4d2ad1cf5e5e63b38410188b35e49 - fdt: update bcm283x device > >>>> tree sources to Linux 5.1-rc6 state > >>>> > >>>> Any ideas hint how to resolve this issue? Thanks. > >>>> > >>> > >>> Can you try to cherry-pick the following two patches to your tree: > >>> 5051377a0b ("arm: dts: bcm283x: Rename U-Boot file") > >>> 89e47e8eb6 ("fdt: fix bcm283x dm-pre-reloc definitions") > >> But those are present in 2020.01 and this version at least print > >> something to console but stuck somewhere (pls see pastebin log with > >> debug enabled) > >> I prefer to run 2020.01 ;). Thanks. > > Any other stuff I can try to make it working in 2020.01? Could that be > > firmware issue somehow? Thanks. > > Sorry I didn't realized that your first try was with 2020.01. > I just confirmed that it acutually does not boot. As a shortcut, do you know > which is the last working version of U-Boot? v2019.07 with reverted commit : 143256b353c4d2ad1cf5e5e63b38410188b35e49 - fdt: update bcm283x device tree sources to Linux 5.1-rc6 state work fine. Without revert it shows anything on console. So something between 2019.07..2020.01 mus fix it partially ;) > > Regards, > Matthias BR, marek
Re: raspberrypi cm3 v2019.07 not working
On Fri, May 8, 2020 at 11:39 PM Belisko Marek wrote: > > Hi Matthias, > > On Fri, May 8, 2020 at 11:28 PM Matthias Brugger wrote: > > > > Hi Marek, > > > > On 08/05/2020 21:52, Belisko Marek wrote: > > > On Wed, May 6, 2020 at 11:02 PM Belisko Marek > > > wrote: > > >> > > >> On Tue, May 5, 2020 at 10:18 PM Belisko Marek > > >> wrote: > > >>> > > >>> Hi, > > >>> > > >>> I'm trying to run 2019.07 u-boot on raspberrypi cm3 module but I got > > >>> no feedback on console. When used 2018.01 it boots fine. Probably I > > >>> need to do git bisect but maybe someone have some idea or experience > > >>> what can cause that. Thanks. > > >> I give a try 2020.01 and I got only this: > > >> U-Boot 2020.01 (May 06 2020 - 20:09:45 +) > > >> > > >> DRAM: 948 MiB > > >> RPI Compute Module 3 (0xa020a0) > > >> > > >> I'll try to debug it and let you know. > > > Debug messages shows this: > > > https://pastebin.com/2SwNzrb1 > > > > > > I tried to debug but I have no clue what is going one there. > > > > > > Also u-boot 2019.07 is not working at all on cm3 due to this commit > > > (after bisect when reverted u-boot start working again): > > > 143256b353c4d2ad1cf5e5e63b38410188b35e49 - fdt: update bcm283x device > > > tree sources to Linux 5.1-rc6 state > > > > > > Any ideas hint how to resolve this issue? Thanks. > > > > > > > Can you try to cherry-pick the following two patches to your tree: > > 5051377a0b ("arm: dts: bcm283x: Rename U-Boot file") > > 89e47e8eb6 ("fdt: fix bcm283x dm-pre-reloc definitions") > But those are present in 2020.01 and this version at least print > something to console but stuck somewhere (pls see pastebin log with > debug enabled) > I prefer to run 2020.01 ;). Thanks. Any other stuff I can try to make it working in 2020.01? Could that be firmware issue somehow? Thanks. > > > > Regards, > > Matthias > > BR, > > marek BR, marek
Re: raspberrypi cm3 v2019.07 not working
Hi Matthias, On Fri, May 8, 2020 at 11:28 PM Matthias Brugger wrote: > > Hi Marek, > > On 08/05/2020 21:52, Belisko Marek wrote: > > On Wed, May 6, 2020 at 11:02 PM Belisko Marek > > wrote: > >> > >> On Tue, May 5, 2020 at 10:18 PM Belisko Marek > >> wrote: > >>> > >>> Hi, > >>> > >>> I'm trying to run 2019.07 u-boot on raspberrypi cm3 module but I got > >>> no feedback on console. When used 2018.01 it boots fine. Probably I > >>> need to do git bisect but maybe someone have some idea or experience > >>> what can cause that. Thanks. > >> I give a try 2020.01 and I got only this: > >> U-Boot 2020.01 (May 06 2020 - 20:09:45 +) > >> > >> DRAM: 948 MiB > >> RPI Compute Module 3 (0xa020a0) > >> > >> I'll try to debug it and let you know. > > Debug messages shows this: > > https://pastebin.com/2SwNzrb1 > > > > I tried to debug but I have no clue what is going one there. > > > > Also u-boot 2019.07 is not working at all on cm3 due to this commit > > (after bisect when reverted u-boot start working again): > > 143256b353c4d2ad1cf5e5e63b38410188b35e49 - fdt: update bcm283x device > > tree sources to Linux 5.1-rc6 state > > > > Any ideas hint how to resolve this issue? Thanks. > > > > Can you try to cherry-pick the following two patches to your tree: > 5051377a0b ("arm: dts: bcm283x: Rename U-Boot file") > 89e47e8eb6 ("fdt: fix bcm283x dm-pre-reloc definitions") But those are present in 2020.01 and this version at least print something to console but stuck somewhere (pls see pastebin log with debug enabled) I prefer to run 2020.01 ;). Thanks. > > Regards, > Matthias BR, marek
Re: raspberrypi cm3 v2019.07 not working
On Wed, May 6, 2020 at 11:02 PM Belisko Marek wrote: > > On Tue, May 5, 2020 at 10:18 PM Belisko Marek wrote: > > > > Hi, > > > > I'm trying to run 2019.07 u-boot on raspberrypi cm3 module but I got > > no feedback on console. When used 2018.01 it boots fine. Probably I > > need to do git bisect but maybe someone have some idea or experience > > what can cause that. Thanks. > I give a try 2020.01 and I got only this: > U-Boot 2020.01 (May 06 2020 - 20:09:45 +) > > DRAM: 948 MiB > RPI Compute Module 3 (0xa020a0) > > I'll try to debug it and let you know. Debug messages shows this: https://pastebin.com/2SwNzrb1 I tried to debug but I have no clue what is going one there. Also u-boot 2019.07 is not working at all on cm3 due to this commit (after bisect when reverted u-boot start working again): 143256b353c4d2ad1cf5e5e63b38410188b35e49 - fdt: update bcm283x device tree sources to Linux 5.1-rc6 state Any ideas hint how to resolve this issue? Thanks. > > BR, > > marek > > > -- > as simple and primitive as possible > - > Marek Belisko - OPEN-NANDRA > Freelance Developer > > Ruska Nova Ves 219 | Presov, 08005 Slovak Republic > Tel: +421 915 052 184 > skype: marekwhite > twitter: #opennandra > web: http://open-nandra.com BR, marek
Re: raspberrypi cm3 v2019.07 not working
On Tue, May 5, 2020 at 10:18 PM Belisko Marek wrote: > > Hi, > > I'm trying to run 2019.07 u-boot on raspberrypi cm3 module but I got > no feedback on console. When used 2018.01 it boots fine. Probably I > need to do git bisect but maybe someone have some idea or experience > what can cause that. Thanks. I give a try 2020.01 and I got only this: U-Boot 2020.01 (May 06 2020 - 20:09:45 +) DRAM: 948 MiB RPI Compute Module 3 (0xa020a0) I'll try to debug it and let you know. BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com
raspberrypi cm3 v2019.07 not working
Hi, I'm trying to run 2019.07 u-boot on raspberrypi cm3 module but I got no feedback on console. When used 2018.01 it boots fine. Probably I need to do git bisect but maybe someone have some idea or experience what can cause that. Thanks. BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com
Re: [U-Boot] amlogic a96 mini
Hi Tom, On Wed, Dec 4, 2019 at 11:26 PM Tom Rini wrote: > > On Fri, Nov 29, 2019 at 12:06:33PM +0100, Belisko Marek wrote: > > > Hi, > > > > I'm trying to run mainline u-boot on amlogic a96mini device but before > > I try to flash it does anybody have an idea if it will work on > > mainline. As I have limited number of devices and I know that after > > flashing I can brick the board so would like to ask if anybody have > > experience with this device and running mainline. Thanks and BR, > > I would strongly recommend making > https://github.com/superna/linux/wiki/Amlogic-HDMI-Boot-Dongle as a > back-up. While I have before managed to interrupt a re-flash cycle such > that the DTB on-board is still there and so the binary portions of the > firmware are happy it will then load U-Boot from SD card. I did not > play with mainline however. OK thanks for hint. IIRC this hdmi thingy tells FW from which media to boot and then I can compile u-boot and have boot it from SDcard? For me any amlogic u-boot is fine just need to be sure it will boot from emmc in final step then :). Thanks. > > -- > Tom BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com
[U-Boot] amlogic a96 mini
Hi, I'm trying to run mainline u-boot on amlogic a96mini device but before I try to flash it does anybody have an idea if it will work on mainline. As I have limited number of devices and I know that after flashing I can brick the board so would like to ask if anybody have experience with this device and running mainline. Thanks and BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Raspberry PI Compute Module - UART Issue
Hi Lee, On Tue, Sep 17, 2019 at 4:45 PM Lee Annamalai wrote: > > Hi > > I am using a Raspberry PI compute module (CM 3+), which seems to be running > U-Boot - U-Boot 2019.04-dirty (Aug 21 2019 - 14:41:54 +) > > The CM3+ is communicating on the UART at boot, before the Kernel loads: > > U-Boot 2019.04-dirty (Aug 21 2019 - 14:41:54 +) > > DRAM: 948 MiB > RPI Compute Module 3 (0xa220a0) > MMC: mmc@7e202000: 0, sdhci@7e30: 1 > Loading Environment from FAT... WARNING at > drivers/mmc/bcm2835_sdhost.c:408/bcm2835_send_command()! > WARNING at drivers/mmc/bcm2835_sdhost.c:408/bcm2835_send_OK > In:serial > Out: serial > 1 0 > WARNING at drivers/mmc/bcm2835_sdhost.c:408/bcm2835_send_command()! > WARNING at drivers/mmc/bcm2835_sdhost.c:408/bcm2835_send_command()! > switch to partitions #0, OK > mmc0(part 0) is current device > LOADBOOTENV > Running uenvcmd ... > ENVCMD > 6697472 bytes read in 285 ms (22.4 MiB/s) > 3647066 bytes read in 155 ms (22.4 MiB/s) > 42064 bytes read in 12 ms (3.3 MiB/s) > Kernel image @ 0x20 [ 0x00 - 0x663200 ] > ## Flattened Device Tree blob at 0200 >Booting using the fdt blob at OK >Loa > Starting kern > > > > I however have a serial device connected to the UART and it starts > communicating on power on to the UART. This is causing the boot process to > stop. > > I would like to find out how to stop U-BOOT from reading messages on the UART > at boot? Please try to set bootdelay to 0 or -1 (this will force not to read for user input). I suggest to read in u-boot docs article about autoboot (will give you some more background). > > Regards > Lee Annamalai > ___ > U-Boot mailing list > U-Boot@lists.denx.de > https://lists.denx.de/listinfo/u-boot BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] raspberrypi0w issue when change cmdline.txt -> FDT_ERR_BADMAGIC
Hi, I'm having strange issue that when update cmdline.txt in boot partition (basically after first boot there is resize of data partition) then I get this: U-Boot 2018.07-g981cc831e3 (Mar 26 2019 - 11:14:55 +0100) DRAM: 448 MiB RPI Zero W (0x9000c1) MMC: sdhci@7e30: 0 Loading Environment from FAT... *** Warning - bad CRC, using default environment Failed (-5) Loading Environment from MMC... OK In: serial Out: serial Err: serial Net: No ethernet found. Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Found U-Boot script /boot.scr 300 bytes read in 6 ms (48.8 KiB/s) ## Executing script at 0240 libfdt fdt_check_header(): FDT_ERR_BADMAGIC switch to partitions #0, OK mmc0 is current device 4688856 bytes read in 307 ms (14.6 MiB/s) Kernel image @ 0x08 [ 0x00 - 0x478bd8 ] ERROR: Did not find a cmdline Flattened Device Tree Could not find a valid device tree SCRIPT FAILED: continuing... starting USB... USB0: scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found when checking fdt_addr there was no dtb loaded at all (juts 0xaa on that address). When remove resize from cmdline.txt before booting then board boots fine. Any ideas if broadcom FW can change something in that regard and break things? Thanks for any pointers. BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] paralella board support
Hi, I became owner or parallella board and it seems they still have custom fork of u-boot [1] (not up to date). Does anyone work on mainlining this device? I can give some hand. Thanks. [1] - https://github.com/parallella/parallella-uboot BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] input in flex scanner failed (for rpi_0_w_defconfig)
Hi, I'm trying to build u-boot in docker on osx (installed build-essentials + gcc-arm) but hit this issue (with verbose make) during config phase. I tried same on linux and it works fine. Any ideas what can cause this (or how to debug)? make ARCH=arm rpi_0_w_defconfig V=1 make -f ./scripts/Makefile.build obj=scripts/basic cc -Wp,-MD,scripts/basic/.fixdep.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/basic/fixdep scripts/basic/fixdep.c rm -f .tmp_quiet_recordmcount make -f ./scripts/Makefile.build obj=scripts/kconfig rpi_0_w_defconfig cc -Wp,-MD,scripts/kconfig/.conf.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer-DCURSES_LOC="" -DLOCALE -c -o scripts/kconfig/conf.o scripts/kconfig/conf.c cc -Wp,-MD,scripts/kconfig/.zconf.tab.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer-DCURSES_LOC="" -DLOCALE -Iscripts/kconfig -c -o scripts/kconfig/zconf.tab.o scripts/kconfig/zconf.tab.c cc -o scripts/kconfig/conf scripts/kconfig/conf.o scripts/kconfig/zconf.tab.o scripts/kconfig/conf --defconfig=arch/../configs/rpi_0_w_defconfig Kconfig input in flex scanner failed scripts/kconfig/Makefile:121: recipe for target 'rpi_0_w_defconfig' failed make[1]: *** [rpi_0_w_defconfig] Error 2 Makefile:478: recipe for target 'rpi_0_w_defconfig' failed make: *** [rpi_0_w_defconfig] Error 2 BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] am335x with 1GB of ram EMIF support
Hi, I have custom board based on am335x which have assembled 43-46TR16512A RAM (should be 512x16 = 1GB size). Board boots fine with DDR3 config for BBB (RAM data looks similar) but shows only 512MB of RAM available (also in linux). IIRC it is necessary to update RAM EMIF table to have support for 1G or something else is missing (based on that [0] looks like some DDR init sequence much be updated to support 1G addressing)? Thanks for any help. [0] - https://www.element14.com/community/thread/37588/l/double-dram-capacity-on-beaglebone-black?displayFullThread=true BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] am33xx board with no external RTC crystal issue
Hi Alex, On Tue, Oct 30, 2018 at 7:12 AM Alex Kiernan wrote: > > On Mon, Oct 29, 2018 at 11:36 PM Belisko Marek > wrote: > > > > Hi, > > > > I'm working on custome am33xx based HW which have no external 32KHz > > crystal. Anyway I want to use bootcount feature. I was trying to use > > internal PRCM CLK_32KHZ clock as source for RTCSS but still when want > > to read RTC registers I get data abort. > > > > I adapted this method : > > > > static void rtc32k_enable(void) > > { > > struct davinci_rtc *rtc = (struct davinci_rtc *)RTC_BASE; > > > > /* > > * Unlock the RTC's registers. For more details please see the > > * RTC_SS section of the TRM. In order to unlock we need to > > @@ -287,9 +288,8 @@ static void rtc32k_enable(void) > > writel(RTC_KICK1R_WE, >kick1r); > > > > /* Enable the RTC 32K OSC by setting bits 3 and 6. */ > > - writel((1 << 3) | (1 << 6), >osc); > > + writel((1 << 6), >osc); > > } > > > > to not use external crystal 32KHz clock but internal. Anyway when > > doing that board just hangs and thats it. Any ideas or suggestions? > > I've a board exactly like that... check you're driving RTC_PORz > correctly, if you hold it in reset, that's the behaviour I see. OK thanks for info. I think it's hold in reset. > > > It > > is even possible to have something like that? I just seen that > > include/configs/siemens-am33x-common.h (using also am335x cpu without > > external 32KHz crystal) storing bootcount to env. Thanks a lot for any > > pointers. > > > > FWIW I gave up trying to use the internal clock as I couldn't get it > to tick reliably (my suspicion was my hand modified board wasn't > actually driving the reset correctly) and instead switched to keeping > the bootcounter in SRAM. I'm using bootcount stored in env. I'm using 2017.09 and didn't see option to store bootcount in RAM (maybe overlooked something). So you mean bootcount is stored in internal cpu SRAM? Thanks. > > -- > Alex Kiernan BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] am33xx board with no external RTC crystal issue
Hi, I'm working on custome am33xx based HW which have no external 32KHz crystal. Anyway I want to use bootcount feature. I was trying to use internal PRCM CLK_32KHZ clock as source for RTCSS but still when want to read RTC registers I get data abort. I adapted this method : static void rtc32k_enable(void) { struct davinci_rtc *rtc = (struct davinci_rtc *)RTC_BASE; /* * Unlock the RTC's registers. For more details please see the * RTC_SS section of the TRM. In order to unlock we need to @@ -287,9 +288,8 @@ static void rtc32k_enable(void) writel(RTC_KICK1R_WE, >kick1r); /* Enable the RTC 32K OSC by setting bits 3 and 6. */ - writel((1 << 3) | (1 << 6), >osc); + writel((1 << 6), >osc); } to not use external crystal 32KHz clock but internal. Anyway when doing that board just hangs and thats it. Any ideas or suggestions? It is even possible to have something like that? I just seen that include/configs/siemens-am33x-common.h (using also am335x cpu without external 32KHz crystal) storing bootcount to env. Thanks a lot for any pointers. BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] raspberrypi compute module3 emmc not usable
Hi Peter, On Wed, Jul 11, 2018 at 10:01 AM Peter Robinson wrote: > > On Tue, Jul 10, 2018 at 9:37 PM, Belisko Marek > wrote: > > Hello, > > > > I'm trying to use u-boot on CM3 (which contains eMMC) to boot kernel. > > I'm using u-boot 2018.05 and it can start fine like: > > U-Boot 2018.05 (Jul 10 2018 - 20:32:05 +) > > > > DRAM: 948 MiB > > RPI Compute Module 3 (0xa220a0) > > MMC: sdhci@7e30: 0 > > Loading Environment from FAT... unable to select a mode > > ** No partition table - mmc 0 ** > > Failed (-5) > > In:serial > > Out: vidconsole > > Err: vidconsole > > Net: No ethernet found. > > starting USB... > > USB0: scanning bus 0 for devices... 1 USB Device(s) found > >scanning usb for storage devices... 0 Storage Device(s) found > > Hit any key to stop autoboot: 0 > > U-Boot> > > U-Boot> > > U-Boot> > > U-Boot> mmc info > > Device: sdhci@7e30 > > Manufacturer ID: 15 > > OEM: 100 > > Name: 4FPD3 > > Bus Speed: 5200 > > Mode : MMC legacy > > Rd Block Len: 512 > > MMC version 5.0 > > High Capacity: Yes > > Capacity: 3.6 GiB > > Bus Width: 1-bit > > Erase Group Size: 512 KiB > > HC WP Group Size: 8 MiB > > User Capacity: 3.6 GiB WRREL > > Boot Capacity: 4 MiB ENH > > RPMB Capacity: 512 KiB ENH > > U-Boot> mmc part > > ## Unknown partition table type 0 > > U-Boot> mmc read $loadaddr 0 2 > > > > but reading from eMMC fails with: > > > > MMC read: dev # 0, block # 0, count 2 ... 0 blocks read: ERROR > > > > so it looks like eMMC is not properly working with CM3 in this > > version? Any ideas what to check to have it working before I dig to > > debugging session ;). Thanks. > > I'm sure there was a patch series explicitly enabling the CM3 and > associated IO board but I don't see it in git or my inbox but maybe my > search fu is off this morning. There is a patch series landing in 4.19 > with support for it [1] so I suspect it'll be worthwhile someone > looking at proper support for it in u-boot too. Patch https://github.com/anholt/linux/commit/e9af481cbc21bba1d4447a5a4bd1674c40d619a1 add support for CM1 which is different processor but IIRC CM3 support is already in u-boot except eMMC is not working, so probably I dig to that area ;). > > [1] > http://lists.infradead.org/pipermail/linux-rpi-kernel/2018-July/007651.html BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] raspberrypi compute module3 emmc not usable
Hi Jonathan, On Wed, Jul 11, 2018 at 3:11 AM Jonathan Gray wrote: > > On Tue, Jul 10, 2018 at 10:37:19PM +0200, Belisko Marek wrote: > > Hello, > > > > I'm trying to use u-boot on CM3 (which contains eMMC) to boot kernel. > > I'm using u-boot 2018.05 and it can start fine like: > > U-Boot 2018.05 (Jul 10 2018 - 20:32:05 +) > > > > DRAM: 948 MiB > > RPI Compute Module 3 (0xa220a0) > > MMC: sdhci@7e30: 0 > > Loading Environment from FAT... unable to select a mode > > ** No partition table - mmc 0 ** > > Failed (-5) > > In:serial > > Out: vidconsole > > Err: vidconsole > > Net: No ethernet found. > > starting USB... > > USB0: scanning bus 0 for devices... 1 USB Device(s) found > >scanning usb for storage devices... 0 Storage Device(s) found > > Hit any key to stop autoboot: 0 > > U-Boot> > > U-Boot> > > U-Boot> > > U-Boot> mmc info > > Device: sdhci@7e30 > > Manufacturer ID: 15 > > OEM: 100 > > Name: 4FPD3 > > Bus Speed: 5200 > > Mode : MMC legacy > > Rd Block Len: 512 > > MMC version 5.0 > > High Capacity: Yes > > Capacity: 3.6 GiB > > Bus Width: 1-bit > > Erase Group Size: 512 KiB > > HC WP Group Size: 8 MiB > > User Capacity: 3.6 GiB WRREL > > Boot Capacity: 4 MiB ENH > > RPMB Capacity: 512 KiB ENH > > U-Boot> mmc part > > ## Unknown partition table type 0 > > U-Boot> mmc read $loadaddr 0 2 > > > > but reading from eMMC fails with: > > > > MMC read: dev # 0, block # 0, count 2 ... 0 blocks read: ERROR > > > > so it looks like eMMC is not properly working with CM3 in this > > version? Any ideas what to check to have it working before I dig to > > debugging session ;). Thanks. > > You should give 2018.07 a try, which includes a change for a problem > reported by someone with a CM3. > > commit 79fd08f7456c7d12b04ef39e51d84d9981599c3a > Author: Alexander Graf > Date: Wed May 23 22:24:51 2018 +0200 > > mmc: Unirqify bcm2835_sdhost and fix writes > > The bcm2835 sdhost driver has a problem with "write multiple" commands. > It seems to boil down to the fact that the controller dislikes its FIFO > to get drained at the end of a block when a write multiple blocks command > is in flight. > > The easy fix is to simply get rid of all the IRQ driven logic and make > the driver push as much data into the FIFO as it can. That way we never > drain and we never run into the problem. > > Reported-by: Jan Leonhardt > Signed-off-by: Alexander Graf > > drivers/mmc/bcm2835_sdhost.c | 265 > ++ > 1 file changed, 47 insertions(+), 218 deletions(-) tried but looks like result is same: U-Boot 2018.07-dirty (Jul 11 2018 - 03:14:31 +) DRAM: 948 MiB RPI Compute Module 3 (0xa220a0) MMC: sdhci@7e30: 0 Loading Environment from FAT... ** No partition table - mmc 0 ** Failed (-5) In:serial Out: vidconsole Err: vidconsole Net: No ethernet found. starting USB... USB0: scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 U-Boot> U-Boot> mmc dev unable to select a mode switch to partitions #0, OK mmc0(part 0) is current device U-Boot> mmc info Device: sdhci@7e30 Manufacturer ID: 15 OEM: 100 Name: 4FPD3 Bus Speed: 5200 Mode : MMC legacy Rd Block Len: 512 MMC version 5.0 High Capacity: Yes Capacity: 3.6 GiB Bus Width: 1-bit Erase Group Size: 512 KiB HC WP Group Size: 8 MiB User Capacity: 3.6 GiB WRREL Boot Capacity: 4 MiB ENH RPMB Capacity: 512 KiB ENH U-Boot> mmc part ## Unknown partition table type 0 U-Boot> mmc read $loadaddr 0 2 MMC read: dev # 0, block # 0, count 2 ... 0 blocks read: ERROR U-Boot> Thanks and BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] raspberrypi compute module3 emmc not usable
Hello, I'm trying to use u-boot on CM3 (which contains eMMC) to boot kernel. I'm using u-boot 2018.05 and it can start fine like: U-Boot 2018.05 (Jul 10 2018 - 20:32:05 +) DRAM: 948 MiB RPI Compute Module 3 (0xa220a0) MMC: sdhci@7e30: 0 Loading Environment from FAT... unable to select a mode ** No partition table - mmc 0 ** Failed (-5) In:serial Out: vidconsole Err: vidconsole Net: No ethernet found. starting USB... USB0: scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 U-Boot> U-Boot> U-Boot> U-Boot> mmc info Device: sdhci@7e30 Manufacturer ID: 15 OEM: 100 Name: 4FPD3 Bus Speed: 5200 Mode : MMC legacy Rd Block Len: 512 MMC version 5.0 High Capacity: Yes Capacity: 3.6 GiB Bus Width: 1-bit Erase Group Size: 512 KiB HC WP Group Size: 8 MiB User Capacity: 3.6 GiB WRREL Boot Capacity: 4 MiB ENH RPMB Capacity: 512 KiB ENH U-Boot> mmc part ## Unknown partition table type 0 U-Boot> mmc read $loadaddr 0 2 but reading from eMMC fails with: MMC read: dev # 0, block # 0, count 2 ... 0 blocks read: ERROR so it looks like eMMC is not properly working with CM3 in this version? Any ideas what to check to have it working before I dig to debugging session ;). Thanks. BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] am335x: musb: mass storage device issue
Hi Yegor, On Mon, Feb 13, 2017 at 12:57 PM, Yegor Yefremovwrote: > My am335x based board doesn't detect USB sticks: > > U-Boot 2017.03-rc1 (Feb 13 2017 - 12:46:54 +0100) > > CPU : AM335X-GP rev 2.1 > I2C: ready > DRAM: 256 MiB > NAND: 256 MiB > MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 > Using default environment > > Net:not set. Validating first E-fuse MAC > cpsw > Hit any key to stop autoboot: 0 > => usb reset > resetting USB... > USB0: scanning bus 0 for devices... 2 USB Device(s) found >scanning usb for storage devices... 0 Storage Device(s) found > > > => usb tree > USB device tree: > 1 Hub (480 Mb/s, 100mA) > | USB2.0 Hub > | > +-2 Vendor specific (480 Mb/s, 500mA) >Quectel, Incorporated UMTS/HSPA Module > > U-Boot finds a hub and a 3g modem attached to it, but the USB drive, > that is also attached to this hub won't be detected. > maybe stupid reply but did you test on other board or with other usb device? I can check on BBB in the evening and post findings. > > So far I haven't tried to bisect the issue (have to find a working > commit including my board), but the same setup is working for 2014.07 > u-boot. Am I the only one or are other am335x based also affected? > > Regards, > Yegor > ___ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot > BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] imx7 u-boot nand update from u-boot
Hi Jagan, On Thu, Sep 29, 2016 at 1:23 PM, Jagan Teki <jagannadh.t...@gmail.com> wrote: > On Thu, Aug 4, 2016 at 11:52 AM, Belisko Marek <marek.beli...@gmail.com> > wrote: >> Hi, >> >> I'm trying to figure out how it is possible easily update u-boot in >> nand on custom imx7 board. I can start u-boot using imx_usb tool. I >> came from ti am33xx world where I simply get u-boot.img from tftp >> server and store it to beginning of flash (after SPL offset). >> >> According imx7 datasheet for nand boot it is necessary to store FCB + >> DBBT and other things. It is currently possible only with userspace >> tool kobs-ng which can save u-boot to nand memory. It is possible to >> generate such image (with FCB, ...) to be able to update u-boot from >> u-boot by tftp and some nand write? Or it is enough to just write >> u-boot.imx to offset 0x400 when u-boot was writen before by kobs-ng >> and it will work? Many thanks for replies. > > Try this patch[1] for nand bootupdate look fine for me. Thanks a lot. I'll look on it. Cheers. > > U-Boot> tftp ${loadaddr} SPL > U-Boot> nand bootupdate ${loadaddr} ${filesize} > > U-Boot> nand erase 0x20 0x10 > U-Boot> tftp ${loadaddr} u-boot.img > U-Boot> nand write ${loadaddr} 0x20 ${filesize} > > [1] https://patchwork.ozlabs.org/patch/637573/ > > thanks! > -- > Jagan Teki > Free Software Engineer | www.openedev.com > U-Boot, Linux | Upstream Maintainer > Hyderabad, India. BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] imx7 u-boot nand update from u-boot
Hi, I'm trying to figure out how it is possible easily update u-boot in nand on custom imx7 board. I can start u-boot using imx_usb tool. I came from ti am33xx world where I simply get u-boot.img from tftp server and store it to beginning of flash (after SPL offset). According imx7 datasheet for nand boot it is necessary to store FCB + DBBT and other things. It is currently possible only with userspace tool kobs-ng which can save u-boot to nand memory. It is possible to generate such image (with FCB, ...) to be able to update u-boot from u-boot by tftp and some nand write? Or it is enough to just write u-boot.imx to offset 0x400 when u-boot was writen before by kobs-ng and it will work? Many thanks for replies. BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 00/26] spl: Support loading a FIT image containing U-Boot
Hi Simon, On Thu, Jan 28, 2016 at 5:39 PM, Simon Glasswrote: > We need a way to support more than one board per binary in U-Boot with > device tree. Various methods have been discussed. The one that seems to make > the most sense is to adjust SPL so that it can load a FIT which contains > U-Boot and several device tree binaries. This is how things with with Linux: > load a FIT and select the correct device tree to pass to Linux. Some time ago I rise question [0] to load FIT kernel directly in SPL using falcon mode. I did look at your patches and I have a feeling that with small adaptions it should be possible? Am I right or it's impossible? (Trying to use it on am33xx boards). Many thanks. > > This series: > > - Adjusts the build system to optionally build a u-boot.img in FIT format > that includes the U-Boot binary and >1 device tree files > - Adjusts SPL to support loading this > - Adds a way for SPL to determine which device tree to select (by calling a > board-specific function) > - Adjusts SPL to pass this selected device tree to U-Boot when it starts > > It would be painful to require an .its file for each board just to support > this feature. In any case various people have commented that it would be > nice not to have to write this file in general. Therefore, this series > enhances mkimage to automatically generate a FIT without a .its file. So far > it understands how to add a main image and a number of device tree files. It > does not support hashing or verified boot as yet. > > One problem with the FIT format as it stands is that all the data is inline. > This means that the entire file must be read in order to figure out what > device-tree files are available. It is then possible to copy the images into > place. > > This is not really suitable for SPL since copying can be slow, and reading > unnecessary data would make the FIT format less efficient than the legacy > format. > > Therefore this series adds a new feature to FIT which allows the images to > be stored immediately after the FIT itself ends. This makes the FIT very > small. It can be read quickly and in its entirety. Then the images can be > loaded one by one as needed. This allows SPL to support FITs containing lots > of images very efficiently. > > To achieve this, mkimage is enhanced to convert between the 'normal' and > 'external' version of a FIT file. The latter is only used for the SPL loader. > The main difference is that viewing an 'external' FIT will not show the > contents of each image. > > This series also includes a few other tidy-ups, such as moving mkimage's > tricky argument-processing code to use getopt(). > > NOTE: There are a few problems remaining with the Kconfig conversion. I'm > still fiddling with this but thought it best to send this series out for > comment in the meantime. > > This series is available at u-boot-fdt/spl-working. > [0] - http://lists.denx.de/pipermail/u-boot/2015-February/203938.html > > > ___ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] am33xx booting from emmc boot partition
Hi, I'm using am33x based board with emmc (2 boot partitions, userdata). I can start u-boot when MLO and u-boot.img are written to user data partition (raw mode) but I'm unable when stored in boot part 1. I got fallback to serial boot always, no message on console. I did use mmc-utils to switch emmc to boot from boot part 1 like: 'mmc bootpart enable 1 0 /dev/mmcblk1' but it doesn't help. Any other ideas or somebody have it working? I'm using latest u-boot master. Thanks. BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] cpsw not working with slave2 port defined only
Hi Mugunthan, On Mon, Jun 1, 2015 at 11:10 AM, Mugunthan V N mugunthan...@ti.com wrote: On Tuesday 26 May 2015 01:00 AM, Belisko Marek wrote: Hi, I have custom am33xx board with phy connected to slave2 port. I copy'n'paste cpsw setup from /board/BuR/common/common.c but I'm using only slave2 port (RMII mode) so my cpsw_slave_data looks like: static struct cpsw_slave_data cpsw_slaves[] = { { .slave_reg_ofs = 0x308, .sliver_reg_ofs = 0xdc0, .phy_addr = 4, }, }; with this configuration cpsw driver can detect link but it cannot establish any communication (tested with dhcp command). When I add to cpsw_slaves dummy slave1 port definition (with e.g. phy_addr = 0) it start working. mdio bus is working fine (tested with mdio list + mdio read). Pinmux is good as it works with dummy slave1 config. Any ideas what I'm doing wrong or why only slave2 port cannot be used? I grep whole source code but all boards using cpsw use slave1 only or slave1/slave2 configurations. Many thanks. Do not remove slave 0 structures and have no of slaves as 2 and set active slave to 1 as done in the following commit 4c8014b9429b593c28fbf0384a6c7ded8587806a in mainline u-boot. Thanks it works now. I picked 7a0227534dfc17c96bb02529fb69971d079a85f0 and setup everything as you suggested and it works fine. The driver uses the slave numbers to add mac address to ALE, which will fail when you remove slaves from the salve structures. I think this should be fixed to avoid problems when you have only slave2. When I have time I'll look on it. Regards Mugunthan V N BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] cpsw not working with slave2 port defined only
Hi, On Tue, May 26, 2015 at 4:51 AM, Mx21 dillon...@qq.com wrote: hi marek: please check your cpsw_data.slaves change it to 1 I have already cpsw_data.slaves = 1 as I have only one slave port (port 2). and you can set cpsw_data.active_slave = 0 before cpsw_register ,if cpsw_data.slaves is 2. This is when you have more slaves and want to have preferred one to be primary ethernet. It's not my case also. P.S.: please don't top post BR, marek -- Original -- From: Belisko Marek;marek.beli...@gmail.com; Date: Tue, May 26, 2015 03:30 AM To: U-Boot Mailing Listu-boot@lists.denx.de; Subject: [U-Boot] cpsw not working with slave2 port defined only Hi, I have custom am33xx board with phy connected to slave2 port. I copy'n'paste cpsw setup from /board/BuR/common/common.c but I'm using only slave2 port (RMII mode) so my cpsw_slave_data looks like: static struct cpsw_slave_data cpsw_slaves[] = { { .slave_reg_ofs = 0x308, .sliver_reg_ofs = 0xdc0, .phy_addr = 4, }, }; with this configuration cpsw driver can detect link but it cannot establish any communication (tested with dhcp command). When I add to cpsw_slaves dummy slave1 port definition (with e.g. phy_addr = 0) it start working. mdio bus is working fine (tested with mdio list + mdio read). Pinmux is good as it works with dummy slave1 config. Any ideas what I'm doing wrong or why only slave2 port cannot be used? I grep whole source code but all boards using cpsw use slave1 only or slave1/slave2 configurations. Many thanks. BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] cpsw not working with slave2 port defined only
On Mon, May 25, 2015 at 9:30 PM, Belisko Marek marek.beli...@gmail.com wrote: Hi, I have custom am33xx board with phy connected to slave2 port. I copy'n'paste cpsw setup from /board/BuR/common/common.c but I'm using only slave2 port (RMII mode) so my cpsw_slave_data looks like: static struct cpsw_slave_data cpsw_slaves[] = { { .slave_reg_ofs = 0x308, .sliver_reg_ofs = 0xdc0, .phy_addr = 4, }, }; with this configuration cpsw driver can detect link but it cannot establish any communication (tested with dhcp command). When I add to cpsw_slaves dummy slave1 port definition (with e.g. phy_addr = 0) it start working. I forgot to mention that I also update mii_sel register following way: writel(RMII2_MODE_ENABLE | MII2_CLK_FROM_CHIP_PIN | RGMII2_NO_INTERNAL_DELAY | MII1_MODE_NOT_USED , cdev-miisel); mdio bus is working fine (tested with mdio list + mdio read). Pinmux is good as it works with dummy slave1 config. Any ideas what I'm doing wrong or why only slave2 port cannot be used? I grep whole source code but all boards using cpsw use slave1 only or slave1/slave2 configurations. Many thanks. BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] cpsw not working with slave2 port defined only
Hi, I have custom am33xx board with phy connected to slave2 port. I copy'n'paste cpsw setup from /board/BuR/common/common.c but I'm using only slave2 port (RMII mode) so my cpsw_slave_data looks like: static struct cpsw_slave_data cpsw_slaves[] = { { .slave_reg_ofs = 0x308, .sliver_reg_ofs = 0xdc0, .phy_addr = 4, }, }; with this configuration cpsw driver can detect link but it cannot establish any communication (tested with dhcp command). When I add to cpsw_slaves dummy slave1 port definition (with e.g. phy_addr = 0) it start working. mdio bus is working fine (tested with mdio list + mdio read). Pinmux is good as it works with dummy slave1 config. Any ideas what I'm doing wrong or why only slave2 port cannot be used? I grep whole source code but all boards using cpsw use slave1 only or slave1/slave2 configurations. Many thanks. BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] BootDelay
Hi, On Wed, Apr 15, 2015 at 8:51 PM, Ivan Metla metlai...@gmail.com wrote: Hi. I make u-boot for olimex a20-som. I configured it with *_defconfig. Which options I must add to defconfig for change BOOTDELAY from 2 to 0.(When boot running - it is waiting 2 seconds for press any key. I want that it isn't waiting press any key.) Or How can I do it othater way. Add #define CONFIG_BOOTDELAY 0 There are other options for autoboot (disable stop by hitting key and more) please refer to : doc/README.autoboot documentation. My A20-OLinuXino-Antrax_defconfig CONFIG_SPL=y CONFIG_FDTFILE=sun7i-a20-olinuxino-lime2.dtb CONFIG_ARM=y CONFIG_ARCH_SUNXI=y CONFIG_MACH_SUN7I=y CONFIG_DRAM_CLK=480 CONFIG_DRAM_ZQ=127 CONFIG_DRAM_EMR1=4 CONFIG_VIDEO=n CONFIG_VIDEO_LCD_PANEL_PARALLEL=n CONFIG_USB_KEYBOARD=n --- I compile u-boot via commands. make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Antrax_defconfig O=build make CROSS_COMPILE=arm-linux-gnueabihf- O=build -- and then write it to sd-card: dd if=build/u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8 Regards, Ivan Metla ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] falcon mode for signed FIT images
Hi all, is it possible to start FIT signed kernel from SPL (falcon mode)? Thanks, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] watchdog not resetting beaglebone after timeout period
On Thu, Dec 18, 2014 at 9:19 PM, Tom Rini tr...@ti.com wrote: On Thu, Dec 11, 2014 at 11:55:05AM +0100, Belisko Marek wrote: Hi, I'm using latest u-boot master (9b416a9f4ca7cf5ac4d5f7143d67edde7f7d7326) running on beaglebone (white). This board has watchdog enabled by default for 60 secs timeout but in my case it's not resetting board after that amount of time. I did check watchdog registers: I just checked on my BBB and with falcon mode it's tripping the reset. Hmm I don't have BBB by hand but I tested on BB without falcon mode and it's not working. -- Tom BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] watchdog not resetting beaglebone after timeout period
Hi, I'm using latest u-boot master (9b416a9f4ca7cf5ac4d5f7143d67edde7f7d7326) running on beaglebone (white). This board has watchdog enabled by default for 60 secs timeout but in my case it's not resetting board after that amount of time. I did check watchdog registers: U-Boot# md.l 0x44e35000 30 44e35000: 502a0501 ..*P 44e35010: 0010 0001 44e35020: 0020 ffe2005e ffe2 ...^... 44e35030: edcb 44e35040: DD.. 44e35050: and it seems value in register WDT_WCRR doesn't increment - it could mean that 32kHz clock isn't working? Any other ideas what to check? Thanks. BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/11] Minor improvements to secure boot and enable on beaglebone
Dear Simon Glass, On Tue, Jun 3, 2014 at 6:42 AM, Simon Glass s...@chromium.org wrote: Hi Belisko, On 28 April 2014 00:30, Belisko Marek marek.beli...@gmail.com wrote: Hi Simon, On Wed, Apr 16, 2014 at 4:41 PM, Simon Glass s...@chromium.org wrote: This series fixes a few problems that have come up since the secure boot series was merged: - A recent commit broken the assumption that u-boot.bin ends at a known address (thus making things appended to U-Boot inaccessible from the code). This is fixed for Beaglebone and also a new test is added to the Makefile to ensure that it does not break again. All boards have been tested. - A way is needed to provide an externally-build device tree binary for U-Boot. This allows signing to happen outside the U-Boot build system. - The .img files generated by an OMAP build need to include the FDT if one is appended. - Adding signatures to an FDT can cause the FDT to run out of space. The fix is to regenerate the FDT from scratch with different dtc parameters, so pretty painful. Instead, we automatically expand the FDT. The last two commits enable secure boot on Beaglebone (this will have no effect unless signed images are used). This could be moved to a separate configuration if required, or these patches could even be ignored: I've tested this patch series and I found some issues. When I use dtb build from latest 3.15-rc3 kernel I got during signing this errors: Couldn't create signature node: FDT_ERR_NOSPACE Failed to add verification data for 'signature@1' signature node in 'conf@1' image node which was fixed by those 2 small patches: - this one doesn't overwrite return value because upper layer then stop with no space error and doesn't allocate more space --- a/lib/rsa/rsa-sign.c +++ b/lib/rsa/rsa-sign.c @@ -405,7 +405,7 @@ int rsa_add_verify_data(struct image_sign_info *info, void *keydest) if (parent 0) { fprintf(stderr, Couldn't create signature node: %s\n, fdt_strerror(parent)); - return -EINVAL; + return parent; } } --- a/tools/image-host.c +++ b/tools/image-host.c @@ -612,7 +612,7 @@ static int fit_config_process_sig(const char *keydir, void *keydest, if (ret) { printf(Failed to add verification data for '%s' signature node in '%s' image node\n, node_name, conf_name); - return ret == FDT_ERR_NOSPACE ? -ENOSPC : -EIO; + return ret == -FDT_ERR_NOSPACE ? -ENOSPC : -EIO; } } With this small changes I can create signed fit image. Other problem appear during booting. I'm using simple uEnv.txt to get fit image to ram and boot (setenv loadaddr '0x805'; run loadimage; bootm). Booting of kernel fails with data abort: Importing environment from mmc ... Running uenvcmd ... reading /uImage 4322274 bytes read in 585 ms (7 MiB/s) ## Loading kernel from FIT Image at 8050 ... Using 'conf@1' configuration Verifying Hash Integrity ... sha1,rsa2048:dev+ OK Trying 'kernel@1' kernel subimage Description: Linux kernel Type: Kernel Image Compression: uncompressed Data Start: 0x805000e4 Data Size:4289584 Bytes = 4.1 MiB Architecture: ARM OS: Linux Load Address: 0x80008000 Entry Point: 0x80008000 Hash algo:sha1 Hash value: 74d429a5c48d72ce3f569ba7eaa072c8c1eaab20 Verifying Hash Integrity ... sha1+ OK ## Loading fdt from FIT Image at 8050 ... Using 'conf@1' configuration Trying 'fdt@1' fdt subimage Description: Flattened Device Tree blob Type: Flat Device Tree Compression: uncompressed Data Start: 0x80917608 Data Size:29802 Bytes = 29.1 KiB Architecture: ARM Hash algo:sha1 Hash value: e86cfd55c3e869c6b3014c758825b2a1ade3991e Verifying Hash Integrity ... sha1+ OK Booting using the fdt blob at 0x80917608 Loading Kernel Image ... OK Using Device Tree in place at 80917608, end 80921a71 Starting kernel ... data abort pc : [81a80020] lr : [80008008] sp : 8e71b528 ip : 000c fp : 0400 r10: 8f7a3d60 r9 : 8e723f28 r8 : r7 : r6 : 0ffc r5 : 0ffc0004 r4 : 00f7 r3 : fc7391ff r2 : 80917608 r1 : 0e05 r0 : 80917608 Flags: Nzcv IRQs off FIQs on Mode SVC_32 Resetting CPU ... I wasn't able yet track down what is causing this issue but it happened when jumping to kernel image (kernel_entry(0, machid, r2);). Any ideas what to check? Thanks in advance. For this I'm not sure, perhaps your load address is wrong? Yes I've fixed this issue some time ago. What about those two mentioned patches? Without them I cannot create FIT properly. I just sent out a new
Re: [U-Boot] Loading uImage into RAM
Hi Abdullah, On Tue, May 6, 2014 at 10:55 AM, Abdullah YILDIZ abdullah.ma...@gmail.com wrote: I'm trying to understand how u-boot loads zImage into RAM. mkimage is called as mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008040 -d arch/arm/boot/zImage /bootImage/uImage Here, 'a' stands for load address and 'e' stands for entry point (64 bytes are used for wrapping?). However, when loading uImage from u-boot, boot operation starts at address 0x8010. Furthermore, u-boot recognizes the load address and entry point as 0x80008000. Kernel uImage is loaded from NAND to ram at address which $loadaddr points to (check print $loadaddr) or env command which loading kerenl image from NAND. Then by bootm command is copied to address which is specified in mkimage (e.g. 0x80008000). Hope this helps. Loading from NAND 128MiB 3,3V 8-bit, offset 0x1c Image Name: Linux-2.6.27.8 Image Type: ARM Linux Kernel Image (uncompressed) Data Size:1735148 Bytes = 1.7 MB Load Address: 80008000 Entry Point: 80008000 ## Booting kernel from Legacy Image at 8010 ... Image Name: Linux-2.6.27.8 Image Type: ARM Linux Kernel Image (uncompressed) Data Size:1735148 Bytes = 1.7 MB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK Loading Kernel Image ... OK OK Starting kernel ... Could you help me with this? abdullah ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Loading uImage into RAM
Hi Abdullah, On Tue, May 6, 2014 at 11:54 AM, Abdullah YILDIZ abdullah.ma...@gmail.com wrote: Hi Belisko, On Tue, May 6, 2014 at 12:34 PM, Belisko Marek marek.beli...@gmail.com wrote: Hi Abdullah, On Tue, May 6, 2014 at 10:55 AM, Abdullah YILDIZ abdullah.ma...@gmail.com wrote: I'm trying to understand how u-boot loads zImage into RAM. mkimage is called as mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008040 -d arch/arm/boot/zImage /bootImage/uImage Why is entry point different from load address of uImage? It is set to skip 64bytes (0x40) of mkimage header. Here, 'a' stands for load address and 'e' stands for entry point (64 bytes are used for wrapping?). However, when loading uImage from u-boot, boot operation starts at address 0x8010. Furthermore, u-boot recognizes the load address and entry point as 0x80008000. Kernel uImage is loaded from NAND to ram at address which $loadaddr points to (check print $loadaddr) or env command which loading kerenl image from NAND. Then by bootm command is copied to address which is specified in mkimage (e.g. 0x80008000). Hope this helps. Kind regards. abdullah BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Problem building am335x_evm config
Hi Vasisli, On Sun, May 4, 2014 at 12:56 PM, Vasili Galka vvv...@gmail.com wrote: Hi, I'm having some very basic problem with building u-boot. Using clean v2014.04 checkout, I run config: make CROSS_COMPILE=arm-none-eabi- O=out/am335x_evm am335x_evm_config Add to parameters also ARCH=arm Which passes fine. But when I run the actual build after that I'm getting an error: $ make CROSS_COMPILE=arm-none-eabi- O=out/am335x_evm am335x_evm GEN include/autoconf.mk.dep GEN include/autoconf.mk make[1]: *** No rule to make target 'am335x_evm'. Stop. Makefile:138: recipe for target 'sub-make' failed make: *** [sub-make] Error 2 What am I doing wrong? Best regards, Vasili ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Problem building am335x_evm config
Hi Vasili, please do not top post. On Sun, May 4, 2014 at 1:18 PM, Vasili Galka vvv...@gmail.com wrote: Hi Marek, I've followed your advice and tried the following two on clean tree: make ARCH=arm CROSS_COMPILE=arm-none-eabi- O=out/am335x_evm am335x_evm_config make ARCH=arm CROSS_COMPILE=arm-none-eabi- O=out/am335x_evm am335x_evm Unfortunately, this does not help. I'm still getting the same error. Try: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x_evm_defconfig make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- it works for me (please update your CROSS_COMPILE) Best, Vasili On Sun, May 4, 2014 at 2:12 PM, Belisko Marek marek.beli...@gmail.com wrote: Hi Vasisli, On Sun, May 4, 2014 at 12:56 PM, Vasili Galka vvv...@gmail.com wrote: Hi, I'm having some very basic problem with building u-boot. Using clean v2014.04 checkout, I run config: make CROSS_COMPILE=arm-none-eabi- O=out/am335x_evm am335x_evm_config Add to parameters also ARCH=arm Which passes fine. But when I run the actual build after that I'm getting an error: $ make CROSS_COMPILE=arm-none-eabi- O=out/am335x_evm am335x_evm GEN include/autoconf.mk.dep GEN include/autoconf.mk make[1]: *** No rule to make target 'am335x_evm'. Stop. Makefile:138: recipe for target 'sub-make' failed make: *** [sub-make] Error 2 What am I doing wrong? Best regards, Vasili ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/11] Minor improvements to secure boot and enable on beaglebone
Hi Simon, On Wed, Apr 16, 2014 at 4:41 PM, Simon Glass s...@chromium.org wrote: This series fixes a few problems that have come up since the secure boot series was merged: - A recent commit broken the assumption that u-boot.bin ends at a known address (thus making things appended to U-Boot inaccessible from the code). This is fixed for Beaglebone and also a new test is added to the Makefile to ensure that it does not break again. All boards have been tested. - A way is needed to provide an externally-build device tree binary for U-Boot. This allows signing to happen outside the U-Boot build system. - The .img files generated by an OMAP build need to include the FDT if one is appended. - Adding signatures to an FDT can cause the FDT to run out of space. The fix is to regenerate the FDT from scratch with different dtc parameters, so pretty painful. Instead, we automatically expand the FDT. The last two commits enable secure boot on Beaglebone (this will have no effect unless signed images are used). This could be moved to a separate configuration if required, or these patches could even be ignored: I've tested this patch series and I found some issues. When I use dtb build from latest 3.15-rc3 kernel I got during signing this errors: Couldn't create signature node: FDT_ERR_NOSPACE Failed to add verification data for 'signature@1' signature node in 'conf@1' image node which was fixed by those 2 small patches: - this one doesn't overwrite return value because upper layer then stop with no space error and doesn't allocate more space --- a/lib/rsa/rsa-sign.c +++ b/lib/rsa/rsa-sign.c @@ -405,7 +405,7 @@ int rsa_add_verify_data(struct image_sign_info *info, void *keydest) if (parent 0) { fprintf(stderr, Couldn't create signature node: %s\n, fdt_strerror(parent)); - return -EINVAL; + return parent; } } --- a/tools/image-host.c +++ b/tools/image-host.c @@ -612,7 +612,7 @@ static int fit_config_process_sig(const char *keydir, void *keydest, if (ret) { printf(Failed to add verification data for '%s' signature node in '%s' image node\n, node_name, conf_name); - return ret == FDT_ERR_NOSPACE ? -ENOSPC : -EIO; + return ret == -FDT_ERR_NOSPACE ? -ENOSPC : -EIO; } } With this small changes I can create signed fit image. Other problem appear during booting. I'm using simple uEnv.txt to get fit image to ram and boot (setenv loadaddr '0x805'; run loadimage; bootm). Booting of kernel fails with data abort: Importing environment from mmc ... Running uenvcmd ... reading /uImage 4322274 bytes read in 585 ms (7 MiB/s) ## Loading kernel from FIT Image at 8050 ... Using 'conf@1' configuration Verifying Hash Integrity ... sha1,rsa2048:dev+ OK Trying 'kernel@1' kernel subimage Description: Linux kernel Type: Kernel Image Compression: uncompressed Data Start: 0x805000e4 Data Size:4289584 Bytes = 4.1 MiB Architecture: ARM OS: Linux Load Address: 0x80008000 Entry Point: 0x80008000 Hash algo:sha1 Hash value: 74d429a5c48d72ce3f569ba7eaa072c8c1eaab20 Verifying Hash Integrity ... sha1+ OK ## Loading fdt from FIT Image at 8050 ... Using 'conf@1' configuration Trying 'fdt@1' fdt subimage Description: Flattened Device Tree blob Type: Flat Device Tree Compression: uncompressed Data Start: 0x80917608 Data Size:29802 Bytes = 29.1 KiB Architecture: ARM Hash algo:sha1 Hash value: e86cfd55c3e869c6b3014c758825b2a1ade3991e Verifying Hash Integrity ... sha1+ OK Booting using the fdt blob at 0x80917608 Loading Kernel Image ... OK Using Device Tree in place at 80917608, end 80921a71 Starting kernel ... data abort pc : [81a80020] lr : [80008008] sp : 8e71b528 ip : 000c fp : 0400 r10: 8f7a3d60 r9 : 8e723f28 r8 : r7 : r6 : 0ffc r5 : 0ffc0004 r4 : 00f7 r3 : fc7391ff r2 : 80917608 r1 : 0e05 r0 : 80917608 Flags: Nzcv IRQs off FIQs on Mode SVC_32 Resetting CPU ... I wasn't able yet track down what is causing this issue but it happened when jumping to kernel image (kernel_entry(0, machid, r2);). Any ideas what to check? Thanks in advance. am33xx/omap: Enable FIT support am33xx/omap: Enable secure boot with CONFIG_FIT_SIGNATURE This series has been run through buildman: /tools/buildman/buildman -b talk2 -s Summary of 12 commits for 1210 boards (32 threads, 1 job per thread) 01: Prepare v2014.04 blackfin: + bf609-ezkit m68k: + M54455EVB_a66 M5329AFEE M5249EVB M5208EVBE eb_cpu5282 M54451EVB astro_mcf5373l M54418TWR_serial_rmii M54455EVB_intel M5475FFE M5282EVB
Re: [U-Boot] am33xx : bit-flip correction in oob
Hi Pekon, On Thu, Apr 24, 2014 at 1:53 PM, Gupta, Pekon pe...@ti.com wrote: Hi Marek, From: Belisko Marek [mailto:marek.beli...@gmail.com] On Wed, Apr 23, 2014 at 8:04 PM, Gupta, Pekon pe...@ti.com wrote: From: Belisko Marek [mailto:marek.beli...@gmail.com] CC-ing Pekon Gupta which add those changes in commit: 6e562b1106ea6afc78752f50925e87e9dd14f8b4 On Tue, Apr 15, 2014 at 12:47 PM, Belisko Marek marek.beli...@gmail.com wrote: Hi, we're running 2014.04-rc3 on custom am335x board (same configuration as BBB). When spl is loading u-boot from nand flash we can see a lot of messages in console: nand: bit-flip corrected @oob=0 It is always the same position (seems to be first byte in oob). Anybody experienced same problem? I've tested on 2 different flashes and result is same. I was able to track down that read ecc from gpmc return always first byte as 0xFF (in omap_calculate_ecc()) This shouldn't be the case if the page is programmed. Following is the expected ECC layout of BCH8 Thanks for reply and sorry for wrong explanation. I mean read_ecc[0] byte = 0xff. What I found also is that data in read_ecc was completely different from displayed when issue nand dump. I found patch which fixes issue [1]. The u-boot doesn't anymore print bit-flips in oob. I need to fix also spl nand_read_page as when loading u-boot from nand in spl still report issues. One more question. Shouldn;t code for bitflip in oob looks like this: --- a/drivers/mtd/nand/omap_gpmc.c +++ b/drivers/mtd/nand/omap_gpmc.c @@ -403,7 +403,7 @@ static int omap_correct_data_bch(struct mtd_info *mtd, uint8_t *dat, dat[byte_pos] ^= 1 bit_pos; printf(nand: bit-flip corrected @data=%d\n, byte_pos); } else if (byte_pos error_max) { - read_ecc[byte_pos - SECTOR_BYTES] = 1 bit_pos; + read_ecc[byte_pos - SECTOR_BYTES] ^= 1 bit_pos; debug(nand: bit-flip corrected @oob=%d\n, byte_pos - SECTOR_BYTES); } else { Yes absolutely. Please send a patch for this. I think this got missed because read_ecc[] does not reach application layer. Above layers are only interested in data portion, so even if the read_ecc[] is uncorrected it doesn't matter to them. But yes this should be fixed. Thanks for catching this. OK I'll do. [1] - http://e2e.ti.com/support/arm/sitara_arm/f/791/t/259699.aspx Ahh.. Yes, I know of this issue.. The issue is mainly due to a NAND protocol violation in the omap driver since the Random Data Output command (05h-E0h) expects to see only the column address that should be addressed within the already loaded read page into the read buffer. Only 2 address cycles with ALE active should be provided between the 05h and E0h commands. The Page read command expects the full address footprint (2bytes for column address + 3bytes for row address), but once the page is loaded into the read buffer, Random Data Output should be used with only 2bytes for column address. But the mentioned fix is not at right place. This issue is there in nand_base.c: nand_command_lp() which is part of generic NAND framework. So I suggest to use following patch instead. With original patch (or with your) it fix only u-boot but it doesn't fix loading u-boot from SPL as it using custom nand_read_page (in am335x_spl_bch.c) and not from nand_bases there must be other update to fix this issue. Probably something like: --- a/drivers/mtd/nand/am335x_spl_bch.c +++ b/drivers/mtd/nand/am335x_spl_bch.c @@ -64,14 +64,16 @@ static int nand_command(int block, int page, uint32_t offs, NAND_CTRL_ALE | NAND_CTRL_CHANGE); /* A[7:0] */ hwctrl(mtd, (offs 8) 0xff, NAND_CTRL_ALE); /* A[11:9] */ /* Row address */ - hwctrl(mtd, (page_addr 0xff), NAND_CTRL_ALE); /* A[19:12] */ - hwctrl(mtd, ((page_addr 8) 0xff), - NAND_CTRL_ALE); /* A[27:20] */ -#ifdef CONFIG_SYS_NAND_5_ADDR_CYCLE - /* One more address cycle for devices 128MiB */ - hwctrl(mtd, (page_addr 16) 0x0f, - NAND_CTRL_ALE); /* A[31:28] */ -#endif + if (cmd != NAND_CMD_RNDOUT) { + hwctrl(mtd, (page_addr 0xff), NAND_CTRL_ALE); /* A[19:12] */ + hwctrl(mtd, ((page_addr 8) 0xff), NAND_CTRL_ALE); /* A[27:20] */ + + #ifdef CONFIG_SYS_NAND_5_ADDR_CYCLE + /* One more address cycle for devices 128MiB */ + hwctrl(mtd, (page_addr 16) 0x0f, NAND_CTRL_ALE); /* A[31:28] */ + #endif + } + hwctrl(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); -- diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 5d3232c..80256b5 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -674,7 +674,7 @@ static void nand_command_lp(struct mtd_info *mtd, unsigned int command, ctrl = ~NAND_CTRL_CHANGE; chip-cmd_ctrl(mtd, column 8, ctrl
Re: [U-Boot] am33xx : bit-flip correction in oob
Hi Pekon, On Wed, Apr 23, 2014 at 8:04 PM, Gupta, Pekon pe...@ti.com wrote: Hello Marek, From: Belisko Marek [mailto:marek.beli...@gmail.com] CC-ing Pekon Gupta which add those changes in commit: 6e562b1106ea6afc78752f50925e87e9dd14f8b4 On Tue, Apr 15, 2014 at 12:47 PM, Belisko Marek marek.beli...@gmail.com wrote: Hi, we're running 2014.04-rc3 on custom am335x board (same configuration as BBB). When spl is loading u-boot from nand flash we can see a lot of messages in console: nand: bit-flip corrected @oob=0 It is always the same position (seems to be first byte in oob). Anybody experienced same problem? I've tested on 2 different flashes and result is same. I was able to track down that read ecc from gpmc return always first byte as 0xFF (in omap_calculate_ecc()) This shouldn't be the case if the page is programmed. Following is the expected ECC layout of BCH8 Thanks for reply and sorry for wrong explanation. I mean read_ecc[0] byte = 0xff. What I found also is that data in read_ecc was completely different from displayed when issue nand dump. I found patch which fixes issue [1]. The u-boot doesn't anymore print bit-flips in oob. I need to fix also spl nand_read_page as when loading u-boot from nand in spl still report issues. One more question. Shouldn;t code for bitflip in oob looks like this: --- a/drivers/mtd/nand/omap_gpmc.c +++ b/drivers/mtd/nand/omap_gpmc.c @@ -403,7 +403,7 @@ static int omap_correct_data_bch(struct mtd_info *mtd, uint8_t *dat, dat[byte_pos] ^= 1 bit_pos; printf(nand: bit-flip corrected @data=%d\n, byte_pos); } else if (byte_pos error_max) { - read_ecc[byte_pos - SECTOR_BYTES] = 1 bit_pos; + read_ecc[byte_pos - SECTOR_BYTES] ^= 1 bit_pos; debug(nand: bit-flip corrected @oob=%d\n, byte_pos - SECTOR_BYTES); } else { OOB[0]: Bad block marker OOB[1]: Bad block marker OOB[2]: ecc_sector0_byte[0] = read_ecc[0] --- OOB[3]: ecc_sector0_byte[1] OOB[4]: ecc_sector0_byte[2] OOB[5]: ecc_sector0_byte[3] OOB[6]: ecc_sector0_byte[4] OOB[7]: ecc_sector0_byte[5] OOB[8]: ecc_sector0_byte[6] OOB[9]: ecc_sector0_byte[7] OOB[10]: ecc_sector0_byte[8] OOB[11]: ecc_sector0_byte[9] OOB[12]: ecc_sector0_byte[10] OOB[13]: ecc_sector0_byte[11] OOB[14]: ecc_sector0_byte[12] OOB[15]: ecc_sector0_byte[13] OOB[13]: reserved (0x00) OOB[14]: ecc_sector1_byte[0] OOB[15]: ecc_sector1_byte[1] OOB[16]: ecc_sector2_byte[2] OOB[17]: ecc_sector3_byte[3] and thus function omap_correct_data_bch() always trying to repair bit-flips in first oob byte. Can this be caused by flash? Any pointers? In config we're using: #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW #define CONFIG_NAND_OMAP_ELM Something seems to be wrong elsewhere. (1) please use 'nand dump' to check above layout (2) Also please send me your device datasheet (3) If you using x16 device, then you might need to pull-in following patch series.. http://lists.denx.de/pipermail/u-boot/2014-April/176834.html OR Use below hack, just for testing (only for x16 devices).. --- diff --git a/arch/arm/cpu/armv7/am33xx/mem.c b/arch/arm/cpu/armv7/am33xx/mem.c index 56c9e7d..b166a94 100644 --- a/arch/arm/cpu/armv7/am33xx/mem.c +++ b/arch/arm/cpu/armv7/am33xx/mem.c @@ -64,7 +64,7 @@ void gpmc_init(void) u32 base = CONFIG_SYS_FLASH_BASE; #elif defined(CONFIG_NAND) /* configure GPMC for NAND */ - const u32 gpmc_regs[GPMC_MAX_REG] = { M_NAND_GPMC_CONFIG1, + const u32 gpmc_regs[GPMC_MAX_REG] = { M_NAND_GPMC_CONFIG1 | 0x1000, M_NAND_GPMC_CONFIG2, M_NAND_GPMC_CONFIG3, M_NAND_GPMC_CONFIG4, --- with regards, pekon [1] - http://e2e.ti.com/support/arm/sitara_arm/f/791/t/259699.aspx BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] am33xx : bit-flip correction in oob
CC-ing Pekon Gupta which add those changes in commit: 6e562b1106ea6afc78752f50925e87e9dd14f8b4 On Tue, Apr 15, 2014 at 12:47 PM, Belisko Marek marek.beli...@gmail.com wrote: Hi, we're running 2014.04-rc3 on custom am335x board (same configuration as BBB). When spl is loading u-boot from nand flash we can see a lot of messages in console: nand: bit-flip corrected @oob=0 It is always the same position (seems to be first byte in oob). Anybody experienced same problem? I've tested on 2 different flashes and result is same. I was able to track down that read ecc from gpmc return always first byte as 0xFF (in omap_calculate_ecc()) and thus function omap_correct_data_bch() always trying to repair bit-flips in first oob byte. Can this be caused by flash? Any pointers? In config we're using: #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW #define CONFIG_NAND_OMAP_ELM BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com Thanks, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] am33xx : bit-flip correction in oob
Hi, we're running 2014.04-rc3 on custom am335x board (same configuration as BBB). When spl is loading u-boot from nand flash we can see a lot of messages in console: nand: bit-flip corrected @oob=0 It is always the same position (seems to be first byte in oob). Anybody experienced same problem? I've tested on 2 different flashes and result is same. In config we're using: #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW #define CONFIG_NAND_OMAP_ELM BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] beagle-bone fdt booting problem
Hello, On Thu, Mar 27, 2014 at 4:28 PM, Simon Glass s...@chromium.org wrote: Hi, On 26 March 2014 00:10, Belisko Marek marek.beli...@gmail.com wrote: Hi, I'm playing with fdt booting on beaglebone board. I'm using latest u-boot git HEAD (2c072c958bb544c72f0e848375803dbd6971f022) + I've added to am335x_evm confing : #ifndef CONFIG_SPL_BUILD #define CONFIG_OF_CONTROL #define CONFIG_OF_SEPARATE #endif I took beaglebone devicetree from kernel. Then I took patch [1] to build image from u-boot and my compiled DT blob. Booting this image always fails with: No valid FDT found - please append one to U-Boot binary, use u-boot-dtb.bin or define CONFIG_OF_EMBED. For sandbox, use -d file.dtb ** CONFIG_OF_CONTROL defined but no FDT - please see doc/README.fdt-control I poke around this and find out that when CONFIG_OF_SEPARATE is used then fdt_blob is set to address of .__end pointer. When evaluate image with hexdump it seems that fdt blob (in my particular case and configuration) is shifted by 312 bytes from .__end. When I point gd-fdt_blob (hack in code) to that address it boots fine. Any ideas what I'm doing wrong (I must do something wrong as it seems nobody complains :)). [1] - http://git.denx.de/?p=u-boot/u-boot-x86.git;a=commit;h=d4ab2022cdfe098e93819c58188ad36174160872 You might be best taking this from the u-boot-x86.git branch 'bone'. It is a little old but it does work. It was based on that patches just [1] was reworked to fit latest u-boot (applied with errors): diff --git a/Makefile b/Makefile index 538c3bf..0505678 100644 --- a/Makefile +++ b/Makefile @@ -752,8 +752,13 @@ u-boot-dtb.bin: u-boot.bin dts/dt.dtb FORCE quiet_cmd_copy = COPY$@ cmd_copy = cp $ $@ +ifneq ($(DEV_TREE_BIN),) +u-boot.dtb: + cp $(DEV_TREE_BIN) $@ +else u-boot.dtb: dts/dt.dtb $(call cmd,copy) +endif OBJCOPYFLAGS_u-boot.hex := -O ihex @@ -799,7 +804,7 @@ MKIMAGEFLAGS_u-boot.kwb = -n $(srctree)/$(CONFIG_SYS_KWD_CONFIG:%=%) \ MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:%=%) \ -R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:%=%) -T pblimage -u-boot.img u-boot.kwb u-boot.pbl: u-boot.bin FORCE +u-boot.img u-boot.kwb u-boot.pbl: u-boot$(if $(CONFIG_OF_SEPARATE),-dtb,).bin FORCE $(call if_changed,mkimage) u-boot.imx: u-boot.bin The patches for this were never applied unfortunately. I'll update them to mainline again at some point and resubmit. OK. Basically it was working I just hit 2 issues. One with odd skip 312 bytes and second that signature wasn't added to final image and verification was check only sha1 not rsa2048 ( I check when enable debug for some modules): Verifying Hash Integrity ... fit_image_verify_required_sigs: No signature node found: FDT_ERR_NOTFOUND I took some patches from next (which seems fixed signature issue) but it doesn't solve above problem. Regards, Simon BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] beagle-bone fdt booting problem
Hi, I'm playing with fdt booting on beaglebone board. I'm using latest u-boot git HEAD (2c072c958bb544c72f0e848375803dbd6971f022) + I've added to am335x_evm confing : #ifndef CONFIG_SPL_BUILD #define CONFIG_OF_CONTROL #define CONFIG_OF_SEPARATE #endif I took beaglebone devicetree from kernel. Then I took patch [1] to build image from u-boot and my compiled DT blob. Booting this image always fails with: No valid FDT found - please append one to U-Boot binary, use u-boot-dtb.bin or define CONFIG_OF_EMBED. For sandbox, use -d file.dtb ** CONFIG_OF_CONTROL defined but no FDT - please see doc/README.fdt-control I poke around this and find out that when CONFIG_OF_SEPARATE is used then fdt_blob is set to address of .__end pointer. When evaluate image with hexdump it seems that fdt blob (in my particular case and configuration) is shifted by 312 bytes from .__end. When I point gd-fdt_blob (hack in code) to that address it boots fine. Any ideas what I'm doing wrong (I must do something wrong as it seems nobody complains :)). [1] - http://git.denx.de/?p=u-boot/u-boot-x86.git;a=commit;h=d4ab2022cdfe098e93819c58188ad36174160872 BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] question about repetition of some u-boot commands
Hi, just curious. Why some commands entered to u-boot are repeated after processing by pressing Enter key? Like tftp, print Thanks for clarification, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite icq: 290551086 web: http://open-nandra.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot