Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on ARM
  • Search

[SOLVED] Mainline U-Boot, Kernel on BananaPI M2-Ultra

Gentoo on all things ARM. Both 32 bit and 64 bit.
Tell about your hardware and CHOST.
Problems with crossdev targeting ARM hardware go here too.
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
Author
Message
DeIM
Guru
Guru
User avatar
Posts: 465
Joined: Tue Apr 11, 2006 7:03 pm

[SOLVED] Mainline U-Boot, Kernel on BananaPI M2-Ultra

  • Quote

Post by DeIM » Sat Jun 20, 2020 1:33 pm

I'm trying to reinstall gentoo to BananaPI M2-Ultra (sunxi-linux and u-boot works) with use of Mainline U-Boot and Kernel since there is a support.
https://linux-sunxi.org/Sinovoip_Banana_Pi_M2_Ultra
But it's not booting at all - only red led signalizing power is connected and blinking LAN leds if it's connected to network.
I used these steps:

Code: Select all

crossdev --g 9.3.0 --b 2.33.1-r1 --l 2.30-r8 --k 4.4 -S -P -v EXTRA_ECONF="-march=armv7-a -mfpu=neon-vfpv4 -ffast-math" -t armv7a-hardfloat-linux-gnueabi

git clone --branch v2019.10 --depth 1 git://git.denx.de/u-boot.git
make CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- Bananapi_M2_Ultra_defconfig
make CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi-
dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
kernel (gentoo-sources 5.7.2):

Code: Select all

make ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- sunxi_defconfig
make ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- menuconfig
make -j20 ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- zImage
make -j20 ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- dtbs
boot.cmd:

Code: Select all

setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait rootfstype=f2fs panic=10
load mmc 0:1 0x43000000 sun8i-r40-bananapi-m2-ultra.dtb || load mmc 0:1 0x43000000 boot/sun8i-r40-bananapi-m2-ultra.dtb
load mmc 0:1 0x42000000 zImage || load mmc 0:1 0x42000000 boot/zImage
bootz 0x42000000 - 0x43000000

Code: Select all

mkimage -C none -A arm -T script -d boot.cmd boot.scr 
SD card connected to PC:

Code: Select all

Disk /dev/sde: 7.43 GiB, 7969177600 bytes, 15564800 sectors
Disk model: SD  Transcend   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc12e8fe1

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sde1         204800   409599   204800  100M  b W95 FAT32
/dev/sde2         409600 10895359 10485760    5G 83 Linux
/dev/sde3       10895360 15564799  4669440  2.2G 82 Linux swap / Solaris
sde2 is F2FS

fstab:

Code: Select all

/dev/mmcblk0p2		/		f2fs		noatime,nodiratime,discard		0 1
/dev/mmcblk0p3		none		swap		sw		0 0
boot partition:

Code: Select all

-rw-r--r-- 1 deim deim     311 Jun 20 14:55 boot.cmd
-rw-r--r-- 1 user user     295 Jun 19 09:50 boot.cmd~
-rw-r--r-- 1 user user     383 Jun 20 14:56 boot.scr
-rw-r--r-- 1 user user   20469 Jun 16 13:16 sun8i-r40-bananapi-m2-ultra.dtb
-rw-r--r-- 1 user user 3253864 Jun 16 13:17 zImage
Thanks for any help :-)
Last edited by DeIM on Thu Dec 01, 2022 1:28 pm, edited 1 time in total.
Top
Etal
Veteran
Veteran
User avatar
Posts: 1932
Joined: Fri Jul 15, 2005 3:01 pm

Re: Mainline U-Boot, Kernel on BananaPI M2-Ultra

  • Quote

Post by Etal » Fri Dec 18, 2020 1:47 am

DeIM wrote:I'm trying to reinstall gentoo to BananaPI M2-Ultra (sunxi-linux and u-boot works) with use of Mainline U-Boot and Kernel since there is a support.
https://linux-sunxi.org/Sinovoip_Banana_Pi_M2_Ultra
But it's not booting at all - only red led signalizing power is connected and blinking LAN leds if it's connected to network.
I don't own a Banana PI so I can't help you with it specificaly, but I would highly recommend getting a USB to TTL adapter. It will allow you to see what's what's happening during boot and access the u-boot command line.

It cost only a few bucks but it immensely helpful - not only when playing with SBC, but with many devices like routers and NASes which have UART pins that you can connect to to diagnose issues.
Top
DeIM
Guru
Guru
User avatar
Posts: 465
Joined: Tue Apr 11, 2006 7:03 pm

  • Quote

Post by DeIM » Fri Dec 18, 2020 8:00 pm

Etal, many thanks for that. I've ordered one adapter and will give it a try.
Top
DeIM
Guru
Guru
User avatar
Posts: 465
Joined: Tue Apr 11, 2006 7:03 pm

  • Quote

Post by DeIM » Thu Dec 01, 2022 1:27 pm

OK finally solved - connected USB to TTL adapter TX RX <=> RX TX

Code: Select all

screen /dev/ttyUSB0 115200
And it printed boot process.
So nothing else than red led but it's OK.
So I compiled to kernel framebuffer support and initiated console to tty0 and HDMI connected display displays kernel boot process and login prompt.
It looked dead but it wasn't all the time it was OK but needed minimal changes in kernel and boot setup.
I hope everything I need is supported - time will show. Going to install and will see.

Thanks again for suggestion with adapter.
Top
Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Gentoo on ARM”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic