Netbooting Hackberry A10 (Allwinner A10)

February 10, 2013 — 8 Comments

Last few weeks I’ve been acting as a reviewer for Ganbold Tsagaankhuu’s port of FreeBSD for Cubieboard so in order to provide more valuable input and less naysaying I decided to get A10-based device to test his changes. So I ordered Hackberry from miniand.com. I’m not great fan of pushing SD cards back and forth so first thing I do with my SoCs is get them netbooting. That’s where fun begins.

Long story short – I had to get latest official u-boot, merge network driver (sunxi_wemac) from hno’s u-boot and add some GPIO magic to emac initialization. Namely – configure pin H19 (emac_power) as function 1 and set its value to 1. Only then I got net-related commands working properly.

If you’re interested in building your own bootable SD card: fetch these files. uEnv.txt and boot.scr are tailored to my needs so you might want to change them. mksd.sh does all the job, just make sure you use proper device name for SD card.

gonzo

Posts

8 responses to Netbooting Hackberry A10 (Allwinner A10)

  1. Hi,
    I have a question about the uEnv.txt file.
    Where can i find a guide or a list of all the commands that can be used?

    For example i know that there are commands that set the resolution or the ip address, i would like to know what other command i could use.

    Thanks

  2. Please can you explain some more details? I can get IP and uImage from the server, but hackberry is getting again and again the same values all time without boot.

  3. Does this come close to what you did?

    diff –git a/drivers/net/sunxi_wemac.c b/drivers/net/sunxi_wemac.c
    index 1db3529..5b3f524 100644
    — a/drivers/net/sunxi_wemac.c
    +++ b/drivers/net/sunxi_wemac.c
    @@ -507,6 +507,12 @@ int sunxi_wemac_initialize(void)
    memset(dev, 0, sizeof(*dev));
    memset(priv, 0, sizeof(struct wemac_eth_dev));

    +#ifdef CONFIG_HACKBERRY
    + /* Enable emac_power on Hackberry A10 as described in
    + http://kernelnomicon.org/?p%3D298 */
    + gpio_direction_output(SUNXI_GPH(19), 1);
    +#endif
    +
    /* Map SRAM to EMAC */
    setbits_le32(&sram->ctrl1, 0×5 << 2);

  4. I have your u-boot image running on a Cubieboard. I am trying to netboot Linux using it. I have a kernel that works when uploaded via ymodem on the originial u-boot, but when loading via TFTP or ymodem in your u-boot the kernel starts, but crashes when settting up sunxi-gpio. Perhaps some small difference between Hackberry and Cubieboard? Applying your patch to the cubieboard branch of u-boot failed. Do you have a suggestion on an easy fix to get your u-boot to properly load a Linux kernel on Cubieboard? SInce they are both the same MCU, I wonder if your u-boot does load a Linux kernel at all, because then I might switch to a Hackberry just as easy…

    • I figured it out, one should also install script.bin into TFTP and load that 0×1000000 bytes before the kernel. The script.bin can be made using fex2bin from sunxi-tools.

Leave a Reply

*

Text formatting is available via select HTML. <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>