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.
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
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.
Could you explain the problem in more details? What steps do you perform, what is expected outcome and what goes wrong.
gonzo hhanks for your reply, I ask to you here:
https://www.miniand.com/forums/forums/development–3/topics/netbooting-hackberry
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);
Full patch:
http://people.freebsd.org/~gonzo/arm/hackberry/uboot_sunxi_hackberry.diff