Jump to content

mirkobe_89

Members
  • Posts

    3
  • Joined

  • Last visited

Community Answers

  1. mirkobe_89's post in Updated uboot causes Armbian kernel hang during boot. was marked as the answer   
    Hi,
    I've been finally able to boot armbian from emmc on banana pi p2 zero, and I'm going to share how I solved my issues.
     
    Basically, somehow it seems that the bootloader was actually the culprit of my issue.
    I compiled a new bootloader from armbian sources (following these instructions https://docs.armbian.com/Developer-Guide_Build-Preparation/), after applying 2 patches. I'm sharing the full procedure, I think it would be the clearest explanation possible.
     
    git clone --depth 1 https://github.com/armbian/build; cd build;  
    copy files banana_dts.patch and banana_defconfig.patch (attached below) inside both the userpatches folder and the userpatches/u-boot (perhaps only this last folder is usefull, I don't know) ./compile.sh BOARD=bananapim2zero Done!

    NOTE: This last command will build a full boot+kernel image. Since I was interested on the bootloader only, I extracted the first 4M from that image with dd command, and saved it into a u-boot-with-spl.bin file. Perhaps it would have been faster and easier to build directly the bootloader only through the command (which I did not try): ./compile.sh BOARD=bananapim2zero 'compile_uboot'  
    Here are the 2 patch files:
    banana_dts.patch:
    diff --git a/arch/arm/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/dts/sun8i-h2-plus-bananapi-m2-zero.dts index d277d043..be57ce08 100644 --- a/arch/arm/dts/sun8i-h2-plus-bananapi-m2-zero.dts +++ b/arch/arm/dts/sun8i-h2-plus-bananapi-m2-zero.dts @@ -107,6 +107,25 @@ }; }; +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_8bit_pins>; + vmmc-supply = <&reg_vcc3v3>; + vqmmc-supply = <&reg_vcc3v3>; + bus-width = <8>; + non-removable; + status = "okay"; +}; + + +&mmc2_8bit_pins { + pins = "PC5\0PC6\0PC8\0PC9\0PC10\0PC11\0PC12\0PC13\0PC14\0PC15\0PC16"; + function = "mmc2"; + drive-strength = < 0x1e >; + bias-pull-up; + phandle = < 0x54 >; +}; + &ohci0 { status = "okay"; };  
    banana_defconfig.patch:
    diff --git a/configs/bananapi_m2_zero_defconfig b/configs/bananapi_m2_zero_defconfig index 09d0517c..e47e7808 100644 --- a/configs/bananapi_m2_zero_defconfig +++ b/configs/bananapi_m2_zero_defconfig @@ -6,3 +6,6 @@ CONFIG_DRAM_CLK=408 CONFIG_MMC0_CD_PIN="" CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-bananapi-m2-zero" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_VIDEO_DE2=n +CONFIG_MMC_SUNXI_SLOT_EXTRA=2 +CONFIG_SUN8I_EMAC=y  
    BR
     
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines