Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rework of the BPi-M2-Zero patches #957

Merged
merged 4 commits into from May 16, 2018

Conversation

@chwe17
Copy link
Member

@chwe17 chwe17 commented May 11, 2018

Next attempt. :) @zador-blood-stained hint did the trick. The new patches should satisfy you hopefully more.

Changes:

  • Kernel dts was adjusted to Icenowy v5 patch for this board and sy8113b-node was added
  • Kernel patch was renamed to have them both consistent
  • U-Boot dts was adjusted similar and cleaned a bit (removal of sy8113b node)
  • CONFIG_MMC0_CD_PIN="" was added to defconfig to allow the board boot without an ugly hack
  • Makefile for u-boot dts was fixed (dtb instead of dts)

Why it isn't perfect?

This patch will need a rework as soon as we move to 4.17 kernel for the following reasons:

  • pinctrl part is removed from board-specific dts e.g.
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>;

(this trolled me when I tried to use the 4.17 dts directly cause wifi will not work without them and it tooks me some builds to figure that out)

  • due to Armbians naming scheme of patches, sy8113b for CPU voltage switch couldn't be separated properly (47-06-enable-dvfs-bpi-m2-zero.patch will fail due to add-bananapi-m2-zero.patch comes later and therefore it has to be renamed to something like bpi-47-06-enable-dvfs-bpi-m2-zero.patch which messes up the naming scheme more than having it inside the patch). It would also need a third patch which adds the pinctrl stuff so that only two patches have to be removed as soon as we switch to >4.17 with sunxi-next. I prefer to rework this patch rather than reworking (probably) three patches when we reach 4.17.

Why it satisfy me

The patches touching only BPi-M2-Zero files (+ Makefiles):

  • sun8i-h2-plus-bananapi-m2-zero.dts (kernel and u-boot)
  • Sinovoip_BPI_M2_Zero_defconfig
    therefore, chances are low that this will ever break boards we officially support.
  • patches apply without issues with cleaned cache:
    uboot:
[ o.k. ] * [l][c] add-a20-optional-eMMC.patch
[ o.k. ] * [l][c] add-bananapi-m2-zero.patch
[ o.k. ] * [l][c] add-beelink-x2.patch

kernel:

[ o.k. ] * [l][c] add-axp803-DT.patch
[ o.k. ] * [l][c] add-bananapi-m2-zero.patch
[ o.k. ] * [l][c] add-configfs-overlay-for-v4.10.x.patch
  • the board boots without issues (or at least none I can see) and is surprisingly cold (~40°C Idle and my thumb thinks this could be accurate).
  • armbianmonitor -u: http://ix.io/1a2Y
  • bootlog from serial console: http://ix.io/1a31 (boardname looks ugly on the 'welcome screen' but wasn't my decision to have such a long name... :P )

Why the second commit?
During this clean-up I found a small mistake in the u-boot dts makefile which is related to the add-nanopi-m1-plus2-emmc.patch (dts instead of dtb), I fixed this one too, but have no chance to test if this makes a difference (doesn't have the board). Armbians 'create patch' rearranged this patch so that it looks ugly on the github changes but the only change (to my knowledge) is replacing a dts to a dtb in the makefile. :P

@igorpecovnik
Copy link
Member

@igorpecovnik igorpecovnik commented May 12, 2018

I prefer to rework this patch rather than reworking (probably) three patches when we reach 4.17.

You can do it now. Just move to DEV branch. Anyway 4.17-4.18 will be the most of Allwinner and DEV is less problematic in a 1st place.

U-boot is already set to 2018.03
https://github.com/armbian/build/blob/development/config/sources/sunxi_common.inc#L36-L37

@chwe17
Copy link
Member Author

@chwe17 chwe17 commented May 13, 2018

I'll have a look into it the next days.. Seems that my buildmachine doesn't want to build u-boot (my dev branch is 4 commits behind development --> something important to pull for u-boot 2018?)

My new u-boot patch applies without a failure but build crashes:

[ o.k. ] Looking for user patches in [ userpatches/u-boot/u-boot-sunxi-dev ]
[ o.k. ] * [l][c] 0020-sunxi-call-fdt_fixup_ethernet-again-to-set-macaddr-f.patch
[ o.k. ] * [l][c] 4kfix-limit-screen-to-full-hd.patch
[ o.k. ] * [l][c] Add-A20-Olimex-SOM204-EVB-board.patch
[ o.k. ] * [l][c] add-a20-olinuxino-micro-emmc-support.patch
[ o.k. ] * [l][c] add-a20-optional-eMMC.patch
[ o.k. ] * [l][c] add-bananapi-m2-zero.patch
[ o.k. ] * [l][c] add-beelink-x2.patch
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfig Kconfig
.config:140:warning: symbol value '' invalid for SYS_TEXT_BASE
.config:1222:warning: override: reassigning to symbol BOOTDELAY
*
* Restart config...
*
*
* Boot images
*
Enable support for Android Boot Images (ANDROID_BOOT_IMAGE) [N/y/?] n
Support Flattened Image Tree (FIT) [N/y/?] n
Set up board-specific details in device tree before boot (OF_BOARD_SETUP) [Y/?] y
Set up system-specific details in device tree before boot (OF_SYSTEM_SETUP) [N/y/?] n
Update the device-tree stdout alias from U-Boot (OF_STDOUT_VIA_ALIAS) [N/y/?] n
Extra Options (DEPRECATED) (SYS_EXTRA_OPTIONS) []
Text Base (SYS_TEXT_BASE) [] (NEW) aborted!

Console input/output is redirected. Run 'make oldconfig' to update configuration.

scripts/kconfig/Makefile:46: recipe for target 'silentoldconfig' failed
make[2]: *** [silentoldconfig] Error 1
Makefile:479: recipe for target 'silentoldconfig' failed
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.
[ error ] ERROR in function compile_uboot [ compilation.sh:168 ]
[ error ] U-boot compilation failed
[ o.k. ] Process terminated

from a quick view over the u-boot 2018.3 dts files, this patch might not need much adjustments (pinctrl is still used in this u-boot version). Or do I miss something which has changed in u-boot 2018, which is new? The kernelpatch gets more or less obsolete (the only thing needed is a '47-06-bpi-m2-enable-dvfs-zero.patch' for the sy8113b node cause the board is mainlined in the 4.17 Kernel). At least, the current u-boot patch: https://github.com/armbian/build/blob/development/patch/u-boot/u-boot-sunxi-dev/add-bananapi-bpi-m2-zero.patch
should be removed cause it's broken and will never be used :)

Edit: found it... That's why u-boot didn't want to build.. :P

+CONFIG_SYS_TEXT_BASE=0x4a000000

seems there's an issue related to boot.env (see serial bootlog) but the Image boot without issues (without any kernelpatch):
serial bootlog: http://ix.io/1aaU
armbianmonitor -u: http://ix.io/1aaV

@igorpecovnik
Copy link
Member

@igorpecovnik igorpecovnik commented May 14, 2018

Edit: found it... That's why u-boot didn't want to build.. :P****

I don't have any troubles. 2017.03 builds on clean "development" branch source on my host.

the only thing needed is a '47-06-bpi-m2-enable-dvfs-zero.patch

Check this:
#958

@chwe17
Copy link
Member Author

@chwe17 chwe17 commented May 14, 2018

Edit: found it... That's why u-boot didn't want to build.. :P****

I don't have any troubles. 2017.03 builds on clean "development" branch source on my host.

This relates to u-boot 2018, where
https://github.com/chwe17/build/blob/f2be4b47a506751150bf239948a59dfbb4b9f85c/patch/u-boot/u-boot-sunxi-dev/add-bananapi-bpi-zero.patch#L168
is needed for a successful build.

Check this:
#958

added, see: 1a96ead

@chwe17
Copy link
Member Author

@chwe17 chwe17 commented May 15, 2018

@ThomasKaiser Do you still have concerns about the the reworked patches? From the discussion in #954:

If there's someone owning this board, preparing a sane and tested patch to add it as .csc able to provide a boot log of this device and at least one other board of the same family then such patches can IMO go to the development branch.

Both of my OPi0 are at the moment in use and when possible I would like to leave them up. I don't think that this patches can affect any other board, but in case we define this as a must (providing a bootlog of a board of the same family) I can shutdown one of them in the evening.

653d6cd should be merged anyway, this fixes e small mistake made for the nanopi m1 plus 2.

@igorpecovnik
Copy link
Member

@igorpecovnik igorpecovnik commented May 15, 2018

For the future, I would propose that CSC boards get their patch subdirectory and patches remain there by default. This way they can't break others and we can leave them as is until somebody fixes that. I don't have other complaints.

zador-blood-stained added a commit that referenced this issue May 16, 2018
rework of the BPi-M2-Zero patches
@zador-blood-stained zador-blood-stained merged commit 215f81b into armbian:development May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants