New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

uboot update needed.

Got problems with your B2 or B3? Share and get helped!
minkanjin
Posts: 8
Joined: 04 Aug 2012, 18:41

Re: uboot update needed.

Post by minkanjin »

I finally took the plunge, but got mixed results:

The good news is that 1) newer kernel (3.11.6) is booting and 2) flashing uboot still works (so it's possible to revert to the 3TB image).

The bad news is that the MAC address for both ethernet ports are set to 00:00:00:00:00:00. So the b3 can't connect to the network any more. When I revert to the 3TB image, the networks seems to work again.

Any ideas?
ReedWood
Posts: 17
Joined: 08 Nov 2013, 16:06

Post by ReedWood »

Is it happens, the guy who posted on the arm arch froum is me. So if there is anything I can help with, it would be my pleasure. Please not, I am not running the kernel which is right now in the armarch repo, but an older one, as I mentioned in my post over in the armarch forum.
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: uboot update needed.

Post by Ubi »

You can change your mac address in network setup. Can you see if that works?

http://en.wikibooks.org/wiki/Changing_Y ... ress/Linux
minkanjin
Posts: 8
Joined: 04 Aug 2012, 18:41

Re: uboot update needed.

Post by minkanjin »

Ok that workaround seems to work, so it does confirm that the network isn't completely broken. Although I would still like to fix this problem at it's root. Here is part of the new uboot's output during boot:
U-Boot 2013.01-rc1 (Nov 07 2013 - 19:26:18)
BUBBA|3

SoC: Kirkwood 88F6281_A1
DRAM: 512 MiB
WARNING: Caches not enabled
SF: Detected M25P16 with page size 64 KiB, total 2 MiB
In: serial
Out: serial
Err: serial
Net: Net Initialization Skipped
No ethernet found.
88E1116 Initializing on egiga0No such device: egiga0
88E1116 Initializing on egiga1No such device: egiga1
Hit any key to stop autoboot: 1 0
2890296 bytes read
## Booting kernel from Legacy Image at 00800000 ...
Image Name: Linux-3.1.10-22-ARCH
Image Type: ARM Linux Kernel Image (uncompressed)
`Data Size: 2890232 Bytes = 2.8 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
The three lines starting with "No ethernet found." is new. Does that give any clues of what the problem is?
asl
Posts: 23
Joined: 07 Feb 2011, 14:17

Re: uboot update needed.

Post by asl »

Did you ever get networking working in uboot?

I have the same issue:
  • Net: Net Initialization Skipped
    No ethernet found.
Looks like some configuration is missing somewhere.
ReedWood
Posts: 17
Joined: 08 Nov 2013, 16:06

Post by ReedWood »

Well, just type

sudo ifconfig eth0 hw ether 02:01:02:03:04:08

as suggested in the work around. If your use a real root account and not sudo omit the sudo. I am working on it and come back here if I found sth. worth writing about.
asl
Posts: 23
Joined: 07 Feb 2011, 14:17

Re: uboot update needed.

Post by asl »

I think you missed the part about uboot.

Anyway, i went back to the broken u-boot and appended the necessary hacks to turn off the L2 cache so that a modern kernel will boot.

My port for mainline will probably appear in Linux kernel 3.15. You can see the patches here:

http://www.spinics.net/lists/arm-kernel/msg297407.html
ReedWood
Posts: 17
Joined: 08 Nov 2013, 16:06

Post by ReedWood »

Can you please elaborate a little on what your patches mean. Have you disabled the l2 cache in the kernel, such that it works with older u-boot versions? Will this be linux mainline with kernel 3.15. This is quite in a distance. We are at 3.12 right now...

Thank your for clearing this up for me.
asl
Posts: 23
Joined: 07 Feb 2011, 14:17

Re: uboot update needed.

Post by asl »

It is not possible to turn L2 cache off in the kernel. By the time the kernel is running, it is too late, corruption has already happened. There is some discussion of this here:

http://www.spinics.net/lists/arm-kernel/msg297709.html

What i do on my hardware, which has the broken u-boot, is described here:

https://lists.debian.org/debian-arm/201 ... 00128.html

This is not too big an issue. The debian flash-kernel already appends stuff to the kernel, the DT blob. It should not be too hard to append these instructions as well. I've not tested it, but i doubt it does any harm on a machine with a fixed u-boot.

As to the kernel version, v3.13 is likely to be release today. That means the merge window for v3.14 opens also today. However in the ARM world, patches for the merge window need to be merged into the ARM maintainers tree about two weeks before the main merge into Linus's tree. I probably missed this deadline. So the patch will probably get merged into v3.15.
ReedWood
Posts: 17
Joined: 08 Nov 2013, 16:06

Post by ReedWood »

So what I get from [1] is that the fix which "should" end up in the u-boot image but can be moved to the kernel in a way that L2 is disabled before used for the first time, correct? If this ends up in mainline, it would imply, that it should be possible to boot an official kernel, from 3.15 on, using the unfixed u-boot again.

I ask, because right now, I boot a newer version of u-boot using kwboot, and hesitated to flash my B3. If 3.15 work with the original 3T u-boot image from Excito, I would stay there and not falsh.

[1] https://lists.debian.org/debian-arm/201 ... 00128.html
asl
Posts: 23
Joined: 07 Feb 2011, 14:17

Re: uboot update needed.

Post by asl »

Here is how i build the uImage:

Code: Select all

/#!/bin/bash

tmp=$(tempfile)

# disable l2 caches
devio >> $tmp "wl 0xee3f3f11,4" # mrc 15, 1, r3, cr15, cr1, {0}
devio >> $tmp "wl 0xe3c33501,4" # bic r3, r3, #0x400000
devio >> $tmp "wl 0xee2f3f11,4" # mcr 15, 1, r3, cr15, cr1, {0}

# flush caches
devio >> $tmp "wl 0xe3a03000,4" # mov r3, #0
devio >> $tmp "wl 0xee073f17,4" # mcr 15, 0, r3, cr7, cr7, {0}

cat $PWD/arch/arm/boot/zImage >> $tmp
cat $PWD/arch/arm/boot/dts/kirkwood-b3.dtb >> $tmp
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux+dtb -d $tmp /tmp/uImage-b3
Run it inside the root of your kernel sources, You can then tftpboot, or whatever /tmp/uImage-b3.
Remember to enable CONFIG_ARM_APPENDED_DTB.
spitfire
Posts: 4
Joined: 02 Mar 2014, 07:45

Re: uboot update needed.

Post by spitfire »

@asl did you submit that patch? Did it get accepted?
asl
Posts: 23
Joined: 07 Feb 2011, 14:17

Re: uboot update needed.

Post by asl »

spitfire wrote:@asl did you submit that patch? Did it get accepted?
Yes, it is in linux-next now, and should be part of v3.15.
Stryker
Posts: 56
Joined: 17 Oct 2013, 11:03

Re: uboot update needed.

Post by Stryker »

asl wrote:
spitfire wrote:@asl did you submit that patch? Did it get accepted?
Yes, it is in linux-next now, and should be part of v3.15.
So that means the B3 is probably able to boot Kernel 3.15+ without updating the uboot-image?
asl
Posts: 23
Joined: 07 Feb 2011, 14:17

Re: uboot update needed.

Post by asl »

Stryker wrote:
asl wrote:
spitfire wrote:@asl did you submit that patch? Did it get accepted?
Yes, it is in linux-next now, and should be part of v3.15.
So that means the B3 is probably able to boot Kernel 3.15+ without updating the uboot-image?
You need a bit of magic when creating the image. See:

http://lists.debian.org/debian-arm/2012 ... 00128.html
Post Reply