View previous topic :: View next topic |
Author |
Message |
mamac l33t
Joined: 29 Feb 2004 Posts: 890
|
Posted: Mon May 29, 2017 10:05 am Post subject: Kernel 4 on BananaPi |
|
|
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 |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3461
|
Posted: Mon May 29, 2017 6:52 pm Post subject: |
|
|
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 |
|
|
mamac l33t
Joined: 29 Feb 2004 Posts: 890
|
Posted: Mon May 29, 2017 7:51 pm Post subject: |
|
|
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 |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3461
|
Posted: Tue May 30, 2017 7:53 pm Post subject: |
|
|
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 |
|
|
mamac l33t
Joined: 29 Feb 2004 Posts: 890
|
Posted: Tue May 30, 2017 8:09 pm Post subject: |
|
|
Thank you.
I ordered a TTL/USB interface in order to get UART output. _________________ Powered by Gentoo Linux since 2003 |
|
Back to top |
|
|
mamac l33t
Joined: 29 Feb 2004 Posts: 890
|
Posted: Wed Jun 07, 2017 8:44 pm Post subject: |
|
|
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 |
|
|
|