Jump to content

BPI-M3 build


divis1969

Recommended Posts

Hi,

 

I'm wondering can I build the armbian for BPI-M3?

I've tried this way:

./compile.sh BOARD=bananapim3

 

It fails on rootfs creation (I've tried to select CLI Xenial or Jessie):

[ error ] ERROR in function create_rootfs_cache [ debootstrap-ng.sh:137 ]
[ error ] Debootstrap base system first stage failed

 

Can it be fixed?

Link to comment
Share on other sites

5 hours ago, divis1969 said:

Can it be fixed?

 

M3 is in  WIP / "work in (no) progress" stage - "fixing" means months of work with resources we don't have. Some limited (server usage) version of image might become available in few months - with mainline kernel only. Check A83T http://linux-sunxi.org/Linux_mainlining_effort

Link to comment
Share on other sites

7 hours ago, divis1969 said:

What is the exact status of the M3 build? Can it at least boot? I've got a board few days ago and I've tried to build it and boot from SD - it does not boot.


Unknown. Months ago I was able to boot, but only one core was running ... make sure to attach serial console, because HDMI out might not be done at all.

Link to comment
Share on other sites

18 hours ago, divis1969 said:

What is the exact status of the M3 build?

Another customer of poor M3 hardware - but there is hope and with some diligence it will run.

 

First read - just read NO actions - now you know what you have.

 

Now you can follow "autosevo  David Coles-Dobay" he is  looking for some combatants :)

Like here

or in here

I hope this is of any help for you.

Link to comment
Share on other sites

Actually device starts with the banana-pi (Sinovoip's) build (Desktop Ubuntu Mate, ), so I supposed it can also run the Armbian.

If I got correctly, I should not rely the device boots to CLI with network (to use ssh) and I probably need to debug with serial console.

It would be great to understand what is the best kernel (I mean where to get it) to start with. Armbian is currently using https://github.com/megous/linux/ , branch linux-sun8i-dev.

Is it the best choice? What about mainline?

 

Link to comment
Share on other sites

On 14.06.2017 at 1:00 PM, divis1969 said:

Do you know which kernel (3.4) is used by banana-pi.org for this device (http://www.banana-pi.org/m3-download.html) ?

Can I try to build an image with this kernel?

No. If you want Armbian then mainline is the only option. And as igor already posted, you can check the https://linux-sunxi.org/Linux_mainlining_effort#Status_Matrix to have an idea about A83T support in mainline - TL;DR pretty much nothing is supported and since there are no interesting boards based on this SoC the development is very slow compared to more popular ones (H3, H5, A64).

Link to comment
Share on other sites

32 minutes ago, zador.blood.stained said:

If you want Armbian then mainline is the only option.

But why can I build A20 (bananapi) with both 3.4 and mainline? What is the reason for this limitation?

Actually, I would try to do some development for this board if this is possible (i.e. no HW debugger is needed and I can use the console) and I'm asking for the best starting point.

If I can start with 3.4 - great, I hope it is much easier to port board-specific drivers to the mainline if I have something working. This, of course, good is the chipset can boot (at least) on mainline.

Link to comment
Share on other sites

15 minutes ago, divis1969 said:

But why can I build A20 (bananapi) with both 3.4 and mainline? What is the reason for this limitation?

Different u-boot and kernel sources, that are in much better shape due to development efforts put into them a long time ago. There are no good enough u-boot and kernel sources for A83T to base Armbian images on, and nobody is interested in wasting much time with this chip and board.

Link to comment
Share on other sites

Is it possible to provide more details?

I'm not familiar with uboot (yet), but how this could affect the kernel start up?

As for the kernel - the same question: what features could prevent armbian to boot?

Link to comment
Share on other sites

28 minutes ago, divis1969 said:

Is it possible to provide more details?

I can't provide any details about the legacy kernel for A83T, but I can say that Armbian is not about building images for any existing board, but about unificaion of the build process, trying to provide quality and support which includes, for example, kernel optimizations.

 

31 minutes ago, divis1969 said:

I'm not familiar with uboot (yet), but how this could affect the kernel start up?

it won't affect the startup, but may affect unification, quality and and support aspects of Armbian images that are marked "stable"

 

32 minutes ago, divis1969 said:

As for the kernel - the same question: what features could prevent armbian to boot?

Armbian is 99% based on upstream Debian/Ubuntu distributions, so it will boot.

Link to comment
Share on other sites

I've finally started to debug the Armbian build (flashed to SD) with console.

RIght before this I've flashed the emmc with the 'minimal-preview' image from BPI (http://forum.banana-pi.org/t/bpi-m3-new-image-ubuntu-16-04-xenial-minimal-preview-bpi-m3-img-2016-07-10/1988)

Am I right U-Boot is trying to boot from it (see the attachment)?

U-boot loaded from SD
Boot script loaded from mmc

If so, is it possible to switch back to SD boot without cleaning the emmc?

minicom.cap

Link to comment
Share on other sites

It looks like the patch failed:

Processing file /parentroot/devel/project/bananapi/armbian/lib/patch/kernel/sun8i-dev/board_bananapim3/a83t-banana-m3.patch
1 out of 1 hunk FAILED -- saving rejects to file arch/arm/boot/dts/Makefile.rej

 

Link to comment
Share on other sites

It looks I was not patient to wait for first boot complete. I've set 'verbose=7' in armbianEnv.txt and now can boot to login screen (though I cannot log in, something wrong with TXD on my USB/Serial dongle).

I've tried to log in via ssh, but was not able to do this.

Kernel logs shows there is an error while initializing the Ethernet driver

[    4.613168] sun8i-emac 1c30000.ethernet (unnamed net_device) (uninitialized): Could not find a MDIO node
[    4.622735] sun8i-emac: probe of 1c30000.ethernet failed with error -22

Most likely the a83 DTS is not correct. For example, H3 dts :

        emac: ethernet@1c30000 {
            compatible = "allwinner,sun8i-h3-emac";
            syscon = <&syscon>;
            reg = <0x01c30000 0x104>;
            interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
            resets = <&ccu RST_BUS_EMAC>;
            reset-names = "ahb";
            clocks = <&ccu CLK_BUS_EMAC>;
            clock-names = "ahb";
            #address-cells = <1>;
            #size-cells = <0>;
            status = "disabled";
            mdio: mdio {
                #address-cells = <1>;
                #size-cells = <0>;
                int_mii_phy: ethernet-phy@1 {
                    reg = <1>;
                    clocks = <&ccu CLK_BUS_EPHY>;
                    resets = <&ccu RST_BUS_EPHY>;
                };
            };
        };

Whereas A83:

        emac: ethernet@1c30000 {
            compatible = "allwinner,sun8i-a83t-emac";
            reg = <0x01c30000 0x104>, <0x01c00030 0x4>;
            reg-names = "emac", "syscon";
            interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
            clocks = <&bus_gates 17>;
            clock-names = "ahb";
            resets = <&ahb_reset 17>;
            reset-names = "ahb";
            #address-cells = <1>;
            #size-cells = <0>;
        };

Does anybody know where can I get the correct DTS for A83 emac driver?

Link to comment
Share on other sites

Thanks for the tip.

I've tried to modify the patch for m3 to include this patch. The build is ok, kernel log does not show any issue while booting, but the board seems dos not get the IP via DHCP (I cannot see it on a router).

I will try to get the logs from the board (I did not try yet simultaneously connect to debug port and attach the network cable), perhaps it will give me some clue. 

 

Actually, I did modified the patch to match the 4.11 version of a83 DTS. But the original patch seems for the mainline kernel. I'm wondering, can I build it instead of the 3rd party dev kernel currently used by m3 WIP? Is is enough to replace the URL of the kernel repo?

Link to comment
Share on other sites

I'm wondering are those patches from Patchwork are applicable to some specific git repo, branch?

I'v tried to apply patches for bananapi m3 (https://patchwork.kernel.org/patch/9762011/,  https://patchwork.kernel.org/patch/9762017/https://patchwork.kernel.org/patch/9762019/https://patchwork.kernel.org/patch/9762021/) to vanilla kernel, but the last one fails:

Error: arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts:87.1-6 Label or path mmc0 not found
Error: arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts:97.1-6 Label or path mmc2 not found
 

Obviously it depends on some specific version of sun8i-a83t.dtsi, but I do not know how/where to get it. Should I try to find appropriate patch in this Patchwork?

Link to comment
Share on other sites

Thanks! This repo is ok: patches applied successfully (though I had deleted most of the patches provided by Armbian, except the packaging-4.x-DEV-with-postinstall-scripts.patch which was corrected a little).

I've built Armbian (console Xenial) and network works pretty good.

 

Did not find any file under /sys/class/thermal/

Perhaps it needs to be ported from somewhere. Was it implemented somewhere already? In Sinovoip 3.4 maybe?

Link to comment
Share on other sites

10 hours ago, divis1969 said:

Did not find any file under /sys/class/thermal/

Perhaps it needs to be ported from somewhere. Was it implemented somewhere already? In Sinovoip 3.4 maybe?

 

I would say this is far the most developed kernel for this board on this planet. There are of course few other people working on it, but Sinovoip is not among them. Mainline kernel is community work and Chen-Yu Tsai is probably the most active on A83T/R40. Things are simply not finished yet. That's why we tag those kernels as (private) development branches.

 

If you booted the board and have ethernet working, you are already very lucky. Can you provide boot logs to see how far things are?

 

armbianmonitor -u

BTW: You are welcome to adjust changes to our builds script. https://github.com/armbian/build We don't have the capacity to fix everything that pops out.

Link to comment
Share on other sites

1 hour ago, Igor said:

I would say this is far the most developed kernel for this board on this planet.

The most developed mainline kernel. There is also a BSP/vendors kernel that may have better support for some hardware features, but nobody except for the vendor is interested in it, especially for less popular devices such as M3.

Link to comment
Share on other sites

2 hours ago, Igor said:

Can you provide boot logs to see how far things are?

Ok, I'll collect it. 

I was able to change the root passwd, add new user (from the debug console) and was able later to connect/login the device by ssh.

 

2 hours ago, Igor said:

BTW: You are welcome to adjust changes to our builds script. https://github.com/armbian/build We don't have the capacity to fix everything that pops out.

Ok. Actually, the change will need significant corrections - I did not try to modify the patches (that are mostly applicable for other devices), I simply removed those files. And I suppose I wont be able to do this correctly. 

 

I have one more issue: I've tried to upgrade the device (sudo apt update; sudo apt upgrade) and this seems replaced the kernel and dtb packages (and device does not boot again). How can I prevent this? Should I modify the locally built package version somehow?

Link to comment
Share on other sites

Most patches, except packaging, are most likely deprecated. Just remove them.

There is an option to freeze kernel packages in armbian-config. This prevent upgrading from our beta repository where support for this chip does not exists ...

Wrote on mobile

Link to comment
Share on other sites

armbianmonitor -u: http://sprunge.us/GGRN

 

Pull requiest: https://github.com/armbian/build/pull/734

 

As for the thermal sensor, it looks like thermal zone needs appropriate device tree implementation, similar to this:

https://github.com/wens/linux/blob/sunxi-next/arch/arm/boot/dts/sun8i-a33.dtsi#L276

https://github.com/wens/linux/blob/sunxi-next/arch/arm/boot/dts/sun8i-a33.dtsi#L394

 

Nobody seen such patch for a83t?

Link to comment
Share on other sites

31 minutes ago, divis1969 said:

Assuming I've already built the code, how can I re-build the armbian with no code checkout/reset and no patch applied?

I need to alter the DTS directly in the kernel source with patches applied before.


Sources are always reset at the start but you have a chance to edit sources just before compilation if you enable:

CREATE_PATCHES="yes"                   # wait that you make changes to uboot and kernel source and creates patches

a patch in output/patch with your changes will be created. You can remove all default patches or just use them all.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines