[U-Boot] WARNING: Caches not enabled on openrd based board
Hi U-Booters, I get the following warning when I boot our openrd based board: U-Boot 2012.07 (Aug 17 2012 - 10:45:29) OpenRD-Base SoC: Kirkwood 88F6281_A1 DRAM: 128 MiB WARNING: Caches not enabled NAND: 512 MiB I am running the latest code from git with a small number of changes to make it work with our hardware. (In particular we have had to rewrite board/Marvell/openrd/kwbimage.cfg.) My question is: does the warning about caches affect only U-Boot (in which case I don't mind) or will it also affect Linux? TIA, Alex ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] WARNING: Caches not enabled on openrd based board
On Aug 17, 2012 4:26 PM, Lukasz Majewski l.majew...@samsung.com wrote: On Fri, 17 Aug 2012 12:16:56 +0100 Alex Zeffertt azeffe...@cambridgesys.com wrote: Hi U-Booters, I get the following warning when I boot our openrd based board: U-Boot 2012.07 (Aug 17 2012 - 10:45:29) OpenRD-Base SoC: Kirkwood 88F6281_A1 DRAM: 128 MiB WARNING: Caches not enabled NAND: 512 MiB I am running the latest code from git with a small number of changes to make it work with our hardware. (In particular we have had to rewrite board/Marvell/openrd/kwbimage.cfg.) My question is: does the warning about caches affect only U-Boot (in which case I don't mind) or will it also affect Linux? As fair as I know, it will only affect u-boot. If I remember correctly, caches are disabled (and fulshed) just before passing execution to linux. Those caches are disabled, since some time ago it turns out, that many drivers had problems with unaligned buffers allocation. Ah yes. I remember hitting that problem myself with the openrd board gig eth driver. And that does appear to have been resolved as you say. Thanks for the explanation. Alex TIA, Alex ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- Best regards, Lukasz Majewski Samsung Poland RD Center | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ubifsmount reports Error reading superblock, but linux can mount FS
On 8 March 2012 18:18, Wolfgang Denk w...@denx.de wrote: In message CANNiwJ+91o+A5Ef6w9V0g=rvj1ya939+zztsnka4dmr67of...@mail.gmail.com you wrote: I've now managed to repro this problem and add some debug. It looks like u-boot is simply running out of memory whilst trying to mount a filesystem that needs recovery. (Error -12 is -ENOMEM.) The partition it is mounting is 240MB, but only about 40MB full. Can you please try out and test what happens when you increase the size of the malloc arena? include/configs/openrd.h includes include/configs/mv-common.h which sets CONFIG_SYS_MALLOC_LEN to 1 MiB - try changing it to 4 MiB. Thanks Wolfgang, that worked! Is there any reason why you would not set this variable to the maximum possible. For example, is this memory available to the kernel after it is booted? How do you know how big this might need to be in order to mount a filesystem that needs recovery? Regards, Alex ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ubifsmount reports Error reading superblock, but linux can mount FS
On 9 March 2012 14:02, Wolfgang Denk w...@denx.de wrote: In message canniwjkrexiobfia_1v_-qgmov_a59ce0adcvfk1xlmfkre...@mail.gmail.com you wrote: ... How do you know how big this might need to be in order to mount a filesystem that needs recovery? I don't know of ways to determine this in advance. Eventually all we can do is thry what you did: increase the malloc arena when it turns out to be too small. If you are willing to invest a little more time, it would be interesting to test how much memory is actually needed on your system. I know that 1MiB was too little and 4MiB was enough. However, I don't know whether a filesystem corruption could occur that caused ubifsmount to require more than 4MiB. For that reason I made the malloc area 64MiB. This is half my total RAM, which leaves the other half for downloading images. Regards, Alex ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ubifsmount reports Error reading superblock, but linux can mount FS
I've been comparing the linux and u-boot implementations, and it looks like the following fix is in the kernel but not in u-boot. I don't really understand it, but it looks like a candidate. Might porting this change to u-boot fix the issue? Hard to tell. Might be worth a try, if its not too complicated. It would be great if you could report the outcome of this. And best to send this patch to the list as well. Thanks, I've ported that one changeset to u-boot. (I first tried updating u-boot/fs/ubifs to the latest kernel code but this was too difficult without any real understanding.) Unfortunately I've got to wait for a repro before I can tell if it fixes the issue... so I may go quiet for a few weeks. Regards, Alex ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ubifsmount reports Error reading superblock, but linux can mount FS
On 7 March 2012 14:42, Alex Zeffertt azeffe...@cambridgesys.com wrote: Hi u-booters, I have a short script in my u-boot environment which chooses which of two ubifs partitions to boot by attempting to read a release file in each one. Unfortunately, after an unclean shutdown sometimes the ubifsmount fails. (By unclean shutdown I mean that the board was power cycled while doing some low bandwidth logging.) The strange thing is that Linux has no problem mounting the partition as its root filesystem. This is very confusing because it looks like the ubifs implementation in u-boot is just a copy of the one in Linux. Has anyone else seen this problem? I've now managed to repro this problem and add some debug. It looks like u-boot is simply running out of memory whilst trying to mount a filesystem that needs recovery. (Error -12 is -ENOMEM.) The partition it is mounting is 240MB, but only about 40MB full. The debug output is below after the ubifsmount command: U-Boot 2011.06-9-g3b6754e-dirty (Mar 08 2012 - 16:30:13) OpenRD-Base SoC: Kirkwood 88F6281_A1 DRAM: 128 MiB NAND: 512 MiB In:serial Out: serial Err: serial Net: egiga0 88E6351 Initialized on egiga0 Marvell ubi part rootfs 2048 Creating 1 MTD partitions on nand0: 0x0100-0x1000 : mtd=2 UBI: attaching mtd1 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size:126976 bytes UBI: smallest flash I/O unit:2048 UBI: sub-page size: 512 UBI: VID header offset: 2048 (aligned 2048) UBI: data offset:4096 UBI: attached mtd1 to ubi0 UBI: MTD device name:mtd=2 UBI: MTD device size:240 MiB UBI: number of good PEBs:1913 UBI: number of bad PEBs: 7 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold:4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 1 UBI: available PEBs: 0 UBI: total number of reserved PEBs: 1913 UBI: number of PEBs reserved for bad PEB handling: 19 UBI: max/mean erase counter: 7/1 Marvell ubifsmount rootfs UBIFS: recovery needed UBIFS error (pid 0): replay_bud: insert_node failed: err=-12 UBIFS error (pid 0): replay_buds: replay_bud failed: err=-12 UBIFS error (pid 0): ubifs_replay_journal: replay_buds failed: err=-12 UBIFS error (pid 0): mount_ubifs: ubifs_replay_journal failed: err=-12 UBIFS error (pid 0): ubifs_fill_super: mount_ubifs failed: err=-12 UBIFS error (pid 0): ubifs_get_sb: ubifs_fill_super failed: err=-12 Error reading superblock on volume 'ubi:rootfs'! Marvell Does this help explain the issue? Regards, Alex ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] ubifsmount reports Error reading superblock, but linux can mount FS
Hi u-booters, I have a short script in my u-boot environment which chooses which of two ubifs partitions to boot by attempting to read a release file in each one. Unfortunately, after an unclean shutdown sometimes the ubifsmount fails. (By unclean shutdown I mean that the board was power cycled while doing some low bandwidth logging.) The strange thing is that Linux has no problem mounting the partition as its root filesystem. This is very confusing because it looks like the ubifs implementation in u-boot is just a copy of the one in Linux. Has anyone else seen this problem? Regards, Alex PS My kernel is linux-3.0.0/armv5tel and the full u-boot trace is below: U-Boot 2011.06 (Feb 10 2012 - 12:29:06) OpenRD-Base SoC: Kirkwood 88F6281_A1 DRAM: 128 MiB NAND: 512 MiB *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: egiga0 88E6351 Initialized on egiga0 Hit any key to stop autoboot: 0 Creating 1 MTD partitions on nand0: 0x0100-0x1000 : mtd=2 UBI: attaching mtd1 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 126976 bytes UBI: smallest flash I/O unit: 2048 UBI: sub-page size: 512 UBI: VID header offset: 2048 (aligned 2048) UBI: data offset: 4096 UBI: attached mtd1 to ubi0 UBI: MTD device name: mtd=2 UBI: MTD device size: 240 MiB UBI: number of good PEBs: 1913 UBI: number of bad PEBs: 7 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 1 UBI: available PEBs: 0 UBI: total number of reserved PEBs: 1913 UBI: number of PEBs reserved for bad PEB handling: 19 UBI: max/mean erase counter: 7/1 UBIFS: recovery needed Error reading superblock on volume 'ubi:rootfs'! UBI: mtd1 is detached from ubi0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ubifsmount reports Error reading superblock, but linux can mount FS
On 7 March 2012 14:42, Alex Zeffertt azeffe...@cambridgesys.com wrote: Hi u-booters, I have a short script in my u-boot environment which chooses which of two ubifs partitions to boot by attempting to read a release file in each one. Unfortunately, after an unclean shutdown sometimes the ubifsmount fails. (By unclean shutdown I mean that the board was power cycled while doing some low bandwidth logging.) The strange thing is that Linux has no problem mounting the partition as its root filesystem. This is very confusing because it looks like the ubifs implementation in u-boot is just a copy of the one in Linux. Has anyone else seen this problem? Regards, Alex PS My kernel is linux-3.0.0/armv5tel and the full u-boot trace is below: U-Boot 2011.06 (Feb 10 2012 - 12:29:06) OpenRD-Base SoC: Kirkwood 88F6281_A1 DRAM: 128 MiB NAND: 512 MiB *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: egiga0 88E6351 Initialized on egiga0 Hit any key to stop autoboot: 0 Creating 1 MTD partitions on nand0: 0x0100-0x1000 : mtd=2 UBI: attaching mtd1 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 126976 bytes UBI: smallest flash I/O unit: 2048 UBI: sub-page size: 512 UBI: VID header offset: 2048 (aligned 2048) UBI: data offset: 4096 UBI: attached mtd1 to ubi0 UBI: MTD device name: mtd=2 UBI: MTD device size: 240 MiB UBI: number of good PEBs: 1913 UBI: number of bad PEBs: 7 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 1 UBI: available PEBs: 0 UBI: total number of reserved PEBs: 1913 UBI: number of PEBs reserved for bad PEB handling: 19 UBI: max/mean erase counter: 7/1 UBIFS: recovery needed Error reading superblock on volume 'ubi:rootfs'! UBI: mtd1 is detached from ubi0 I've been comparing the linux and u-boot implementations, and it looks like the following fix is in the kernel but not in u-boot. I don't really understand it, but it looks like a candidate. Might porting this change to u-boot fix the issue? - Alex commit 2ef13294d29bcfb306e0d360f1b97f37b647b0c0 Author: Artem Bityutskiy artem.bityuts...@nokia.com Date: Sun Sep 19 18:34:26 2010 +0300 UBIFS: introduce new flags for RO mounts Commit 2fde99cb55fb9d9b88180512a5e8a5d939d27fec UBIFS: mark VFS SB RO too introduced regression. This commit made UBIFS set the 'MS_RDONLY' flag in the VFS superblock when it switches to R/O mode due to an error. This was done to make VFS show the R/O UBIFS flag in /proc/mounts. However, several places in UBIFS relied on the 'MS_RDONLY' flag and assume this flag can only change when we re-mount. For example, 'ubifs_put_super()'. This patch introduces new UBIFS flag - 'c-ro_mount' which changes only when we re-mount, and preserves the way UBIFS was originally mounted (R/W or R/O). This allows us to de-initialize UBIFS cleanly in 'ubifs_put_super()'. This patch also changes all 'ubifs_assert(!c-ro_media)' assertions to 'ubifs_assert(!c-ro_media !c-ro_mount)', because we never should write anything if the FS was mounter R/O. All the places where we test for 'MS_RDONLY' flag in the VFS SB were changed and now we test the 'c-ro_mount' flag instead, because it preserves the original UBIFS mount type, unlike the 'MS_RDONLY' flag. Signed-off-by: Artem Bityutskiy artem.bityuts...@nokia.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] hush saveenv problem
Hi list, I've enabled hush on my openrd based board because I need the test command to choose how to boot (see patch below). When I start u-boot for the first time I get the expected *** Warning - bad CRC, using default environment output, and everything works fine. However, if I run saveenv and then power cycle the board it hangs with no output. I have checked that saveenv does create a default environment at 0x6 exactly as expected (i.e. it places a 4 byte CRC followed by a load of ASCII characters.) I have also checked that no u-boot code between 0x0 and 0x6 gets altered. I have no idea why hush + saveenv causes the board to hang at the next power cycle. This problem only occurs when the hush shell is configured. Thanks in advance for any help, Alex Zeffertt -- diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h index 3f5fcc6..c859744 100644 --- a/include/configs/mv-common.h +++ b/include/configs/mv-common.h @@ -84,6 +84,8 @@ #define CONFIG_INITRD_TAG 1 /* enable INITRD tag */ #define CONFIG_SETUP_MEMORY_TAGS 1 /* enable memory tag */ +#define CONFIG_SYS_HUSH_PARSER 1 /* use hush command parser */ +#define CONFIG_SYS_PROMPT_HUSH_PS2 #define CONFIG_SYS_PROMPT Marvell /* Command Prompt */ #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buff Size */ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] openrd-based board : linux hangs in calibrate_delay();
Hi all, I am playing with a new board which is based on OpenRD-base. I have got u-boot up and running but half of the time when I start Linux it hangs in init/calibrate.c:calibrate_delay(). (I found this out using the LEDs because we have no UART at that stage!) Is there something that needs to be done in u-boot that would stop this intermittent failure? Thanks in advance, Alex ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] openrd_ultimate GigEth ports not working
On 25 July 2011 18:14, Ralph Metzler r...@metzlerbros.de wrote: Alex Zeffertt writes: and then I burn the .kwb file into the flash using openocd. Unfortunately I cannot get the Gig Eth ports to work in u-boot at the moment. When I run the following at the command prompt the console just hangs and I have to reboot: Marvell setenv ipaddr 192.168.1.1 Marvell ping 192.168.1.30 ... board hangs ... Has anybody else seen this issue? I see something similar with the Seagate Dockstar (also Kirkwood) when using dhcp. It also hangs. I did not test ping. The 2011.06 snapshot works fine. -Ralph Thanks Ralph, I can confirm that the issue is the same with OpenRD Ultimate. I.e. ethernet is not working in HEAD but it is fine on tag v2011.06. Alex ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] openrd_ultimate GigEth ports not working
git bisect says: c2dd0d45540397704de9b13287417d21049d34c6 is the first bad commit commit c2dd0d45540397704de9b13287417d21049d34c6 Author: Aneesh V ane...@ti.com Date: Thu Jun 16 23:30:49 2011 + armv7: integrate cache maintenance support - Enable I-cache on bootup - Enable MMU and D-cache immediately after relocation - Do necessary initialization before enabling d-cache and MMU - Changes to cleanup_before_linux() - Make changes according to the new framework Signed-off-by: Aneesh V ane...@ti.com :04 04 2e80477b0d05ad168feb89ef0e00d9bbd79b0cd0 5505c5f890b2af6e9b54bba915fdf3368abdfb16 M arch Thanks, Alex On 26 July 2011 12:09, Wolfgang Denk w...@denx.de wrote: Dear Alex Zeffertt, In message canniwjkvykei0qmrc8v5lvtar+q8czyetycpqdjzv34htcl...@mail.gmail.com you wrote: I can confirm that the issue is the same with OpenRD Ultimate. I.e. ethernet is not working in HEAD but it is fine on tag v2011.06. And what says git bisect ? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Superior ability breeds superior ambition. -- Spock, Space Seed, stardate 3141.9 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] openrd_ultimate GigEth ports not working
Hi list, I've just bought an OpenRD Ultimate board and I've managed to get u-boot running on it. I am building it like this, using the latest u-boot GIT repo: make mrproper CROSS_COMPILE=arm-none-linux-gnueabi- make openrd_ultimate_config CROSS_COMPILE=arm-none-linux-gnueabi- make u-boot.kwb CROSS_COMPILE=arm-none-linux-gnueabi- and then I burn the .kwb file into the flash using openocd. Unfortunately I cannot get the Gig Eth ports to work in u-boot at the moment. When I run the following at the command prompt the console just hangs and I have to reboot: Marvell setenv ipaddr 192.168.1.1 Marvell ping 192.168.1.30 ... board hangs ... Has anybody else seen this issue? Thanks in advance for any help you can give. Alex ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot