Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel 4 on BananaPi
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
mamac
l33t
l33t


Joined: 29 Feb 2004
Posts: 890

PostPosted: Mon May 29, 2017 10:05 am    Post subject: Kernel 4 on BananaPi Reply with quote

Hello,

I have Gentoo running on a BananaPi with Kernel 3 from https://wiki.gentoo.org/wiki/Banana_Pi_the_Gentoo_Way.

I would like to upgrade the kernel to version 4 but it doesn't boot, here is what I do:

- emerge u-boot-tools
- clone raspberry linux kernel
- use the default sunxi config from arch/arm/configs
- build the kernel
- copy arch/arm/boot/uImage to replace the one that is currently in /boot

The result is the green light blinking every 2 seconds and no signal on the HDMI display so I can't see what happens.

I also tried to use the config from the Armbian distro which is a kernel 4 but the generated image doesn't work (even though the armbian image boots correctly)

I suspect u-boot not working with the new built image but I'm not sure what to do...

Any suggestion ?

Thank you!
_________________
Powered by Gentoo Linux since 2003
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3467

PostPosted: Mon May 29, 2017 6:52 pm    Post subject: Reply with quote

For starters, get any USB <-> UART converter. They are dirt cheap, I bought mine at something around 3$ and honestly without it I'd never figure out what the problem was.
You do need a reasonably new uboot. AFAIK old versions (that often come pre-installed) do not work for new kernels. One thing that's really easy to forget is dtb. There is another make target for building it.
I remember I had some issues finding the naming conventions used by uboot. Say, it wouldn't put the pieces together, and documentation on this part was rather scarce.
Still, that 2 pin serial console if your friend. Uboot becomes much more talkactive once you start collecting its output.
Back to top
View user's profile Send private message
mamac
l33t
l33t


Joined: 29 Feb 2004
Posts: 890

PostPosted: Mon May 29, 2017 7:51 pm    Post subject: Reply with quote

I though I could do without reading the UART output but I agree I will have to connect to it :-)

What do you mean by "One thing that's really easy to forget is dtb" ?

I found some documentation hereL http://linux-sunxi.org/Mainline_Kernel_Howto
It says to use .dtb instead of script.bin.
_________________
Powered by Gentoo Linux since 2003
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3467

PostPosted: Tue May 30, 2017 7:53 pm    Post subject: Reply with quote

Quote:
It says to use .dtb instead of script.bin.
Exactly.
AFAIK script.bin is the ancient way that doesn't really work those days. Currently it's dtb that lets the kernel know how to use hardware interfaces, so it's specific to both, kernel version and hardware.
Anyway, you have to explicitly build that dtb and point uboot to it.
Also, a quick tip on building the kernel: there are targets like uImage or zImage. Uboot can launch them directly (unlike Image file - I think this is the "default" target all guides refer, and then tell you to use some script to convert the Image into uImage - didn't work for me.)
Back to top
View user's profile Send private message
mamac
l33t
l33t


Joined: 29 Feb 2004
Posts: 890

PostPosted: Tue May 30, 2017 8:09 pm    Post subject: Reply with quote

Thank you.
I ordered a TTL/USB interface in order to get UART output.
_________________
Powered by Gentoo Linux since 2003
Back to top
View user's profile Send private message
mamac
l33t
l33t


Joined: 29 Feb 2004
Posts: 890

PostPosted: Wed Jun 07, 2017 8:44 pm    Post subject: Reply with quote

I received the TTL/USB interface and get the output:
Code:
U-Boot SPL 2014.04-10733-gbb5691c (Mar 01 2015 - 14:02:16)
Board: BananaPi
DRAM: 1024 MiB
CPU: 960000000Hz, AXI/AHB/APB: 3/2/2
spl: not an uImage at 1600


U-Boot 2014.04-10733-gbb5691c (Mar 01 2015 - 14:02:16) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Board: BananaPi
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   dwmac.1c50000
Hit any key to stop autoboot:  0
reading uEnv.txt
343 bytes read in 17 ms (19.5 KiB/s)
Loaded environment from uEnv.txt
Running uenvcmd ...
reading script.bin
50972 bytes read in 30 ms (1.6 MiB/s)
reading zImage
3653448 bytes read in 245 ms (14.2 MiB/s)
Wrong Image Format for bootm command
ERROR: can't get kernel image!
reading boot.scr
** Unable to read file boot.scr **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading script.bin
50972 bytes read in 30 ms (1.6 MiB/s)
reading uImage
** Unable to read file uImage **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **


I need to dig into this and get the right kernel image format.
_________________
Powered by Gentoo Linux since 2003
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