Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Mainline U-Boot, Kernel on BananaPI M2-Ultra
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
DeIM
Guru
Guru


Joined: 11 Apr 2006
Posts: 442

PostPosted: Sat Jun 20, 2020 1:33 pm    Post subject: [SOLVED] Mainline U-Boot, Kernel on BananaPI M2-Ultra Reply with quote

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:
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:
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:
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:
mkimage -C none -A arm -T script -d boot.cmd boot.scr


SD card connected to PC:
Code:
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:
/dev/mmcblk0p2      /      f2fs      noatime,nodiratime,discard      0 1
/dev/mmcblk0p3      none      swap      sw      0 0


boot partition:
Code:
-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
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1932

PostPosted: Fri Dec 18, 2020 1:47 am    Post subject: Re: Mainline U-Boot, Kernel on BananaPI M2-Ultra Reply with quote

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.
Back to top
View user's profile Send private message
DeIM
Guru
Guru


Joined: 11 Apr 2006
Posts: 442

PostPosted: Fri Dec 18, 2020 8:00 pm    Post subject: Reply with quote

Etal, many thanks for that. I've ordered one adapter and will give it a try.
Back to top
View user's profile Send private message
DeIM
Guru
Guru


Joined: 11 Apr 2006
Posts: 442

PostPosted: Thu Dec 01, 2022 1:27 pm    Post subject: Reply with quote

OK finally solved - connected USB to TTL adapter TX RX <=> RX TX
Code:
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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum