Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jan 2015 10:16:49 -0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        ticso@cicely.de
Cc:        Bernd Walter <ticso@cicely7.cicely.de>, "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
Subject:   Re: Booting on AR9331 based Easylink EL-M150
Message-ID:  <CAJ-VmonBXSPjP7CZ7JyJ4qYc6QwkM4r6=eK4snjSBoD3eu8e5g@mail.gmail.com>
In-Reply-To: <20150111160356.GG46805@cicely7.cicely.de>
References:  <20150111160356.GG46805@cicely7.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

I've had this issue reported by someone else - a tplink AR934x based
thing. I wonder if it's an updated uboot related thing.

So the TL;DR is this.

uboot "bootm" doesn't boot a kernel image - it boots a uboot
application. The application has a uboot header with details about
"where it should be unpacked", "where it should be executed", etc. The
tool that we're using is in ports but from an older uboot. It's
possible the header contents are now .. wrong.

So, the flash address used by the "bootm" comand is 0x9f(blah), and
it'll unpack to wherever it says in the uboot header, and then execute
wherever it says. Everything above is wrong - Load, entry, size, etc -
and so that needs to be debugged.

I have a tplink in a box that has the same issue, so I'll go see what
the story is.



-adrian


On 11 January 2015 at 08:03, Bernd Walter <ticso@cicely7.cicely.de> wrote:
> This is a devboard using an EL-M150 module.
> The module has 64M RAM, but unlike the carambola 2 only 8M SPI flash.
> otherwise it is very similar.
> However, I get into problems starting the kernel.
> I use a kernel build for the carambola 2, which I'd also used on a
> Dragino system, so basicly it is a functional image.
> the Dragino used a earlier address in SPI flash, so I had to modify
> and saveenv:
> setenv bootcmd bootm 0x9F050000
> saveenv
> On the EL-M150 also a different adress is used and a different kernel
> start address.
> Unfortunately it doesn't have a saveenv, so unless I can freely
> change the addresses I will have to rebuild a kernel.
> In the meantime I'd tried with manual set addresses, but failed
> decrompessing the image.
> Somehow before the string "FreeBSD" there is some garbadge, which
> even gets printed when I try booting from erased flash.
>
>       U-Boot 1.1.4  (Nov 26 2014 - 16:34:31)
>
> ********************************************
> *     U-boot for Easylink El-m150          *
> *    Build by huangfc(QQ:343669866)        *
> *    Taobao:http://huangfc.taobao.com      *
> ********************************************
> DRAM:  64 MB
> id read ox100000ff
> FLASH: 8M
>
> In:  serial
> Out: serial
> Err: serial
> Net:   ag7240_enet_initialize...
>
> Interface eth0 MAC address: 00:23:CD:04:1F:32
> s26 reg init
> ag7240_phy_setup
> athrs26_phy_setup ATHR_AUTONEG_ADVERT 4 :6f0
> athrs26_phy_setup ATHR_PHY_CONTROL 4 :4800
> Interface eth0 is up
>
> Interface eth1 MAC address: 00:23:CD:04:1F:32
> athrs26_reg_init_lan
> ag7240_phy_setup
> athrs26_phy_setup ATHR_AUTONEG_ADVERT 0 :de1
> athrs26_phy_setup ATHR_PHY_CONTROL 0 :1000
> athrs26_phy_setup ATHR_AUTONEG_ADVERT 1 :de1
> athrs26_phy_setup ATHR_PHY_CONTROL 1 :1000
> athrs26_phy_setup ATHR_AUTONEG_ADVERT 2 :de1
> athrs26_phy_setup ATHR_PHY_CONTROL 2 :1000
> athrs26_phy_setup ATHR_AUTONEG_ADVERT 3 :de1
> athrs26_phy_setup ATHR_PHY_CONTROL 3 :1000
> Interface eth1 is up
> Hit any key to stop autobooting:   0
>
> Easy-Link> printenv
> bootargs=console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtdparts=ar7240-nor0:128k(u-boot),1024k(kernel),2816k(rootfs),64k(config),64k(ART)
> bootcmd=bootm 0x9F020000
> bootdelay=2
> baudrate=115200
> ipaddr=192.168.1.1
> serverip=192.168.1.100
> bootfile="firmware.bin"
> loadaddr=0x80800000
> ncport=6666
> stdin=serial
> stdout=serial
> stderr=serial
> ethact=eth0
>
> Environment size: 364 bytes
>
> Easy-Link> tftpboot 0x80800000 kernel.CARAMBOLA2.lzma.uImage
> Link down: eth0
> Ethernet mode (duplex/speed): 1/1000 Mbps
>
> TFTP from IP: 10.1.1.9
>       Our IP: 10.1.1.107
>     Filename: 'kernel.CARAMBOLA2.lzma.uImage'
> Load address: 0x80800000
>        Using: eth1
>
>      Loading: ########################################
>               ########################################
>               ########################################
>               ########################################
>               ########################################
>               ########################################
>               ########################################
>               ####################
>
> TFTP transfer complete!
>
> Bytes transferred: 1534515 (0x176a33)
> Easy-Link> boot
> Booting image at: 0x80800000
>
>    Image name:   y/6T? FreeBSD
>    Image type:   MIPS Linux Kernel Image (lzma compressed)
>    Data size:    -1828074981 Bytes = 2352.6 MB
>    Load address: 0x08C0C8DF
>    Entry point:  0x4BBDBC84
>
> Uncompressing kernel image... ## Error: LZMA error num: 1
>
> This example is just loading the kernel, also in a different load
> address than it is done for the carambola and dragino.
> But the problem stays the same if I would use 0x80050000.
> Of course I have no idea if 0x80050000 is unused, therefor I also
> tried 0x80800000.
> The kernel wasn't rebuild and I don't know if the kernel needs
> to know about such an address change, but it seems I already have
> problems with the image format itself.
>
> --
> B.Walter <bernd@bwct.de> http://www.bwct.de
> Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
> _______________________________________________
> freebsd-mips@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-mips
> To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonBXSPjP7CZ7JyJ4qYc6QwkM4r6=eK4snjSBoD3eu8e5g>