LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-01-2022, 08:51 PM   #1
j.young
LQ Newbie
 
Registered: Aug 2020
Posts: 15

Rep: Reputation: Disabled
kernel update on a banana pi


I'm setting up gentoo on a banana pi M1+, and I can't get it to boot off a newly compiled kernel. I setup the SD card using this tutorial

http://wiki.gentoo.org/wiki/Banana_P...ile_the_Kernel

with the difference that I compiled natively and didn't cross compile. So far, so good, I can run gentoo linux on the BPI now. But, the kernel from the tutorial is quite old, and I wanted to update. I compiled the new uImage file with an updated source, and copied it over to /boot/uImage. It wouldn't boot up, and produced no messages.

I have tried a number of variations on this, and I'm really stumped. Apparently the BPI and a lot of arm SBCs use a bootloader called u-boot

http://linux-sunxi.org/U-Boot#Compile_U-Boot

When I follow these directions and create a new boot.scr, u-boot seems to ignore it. Interestingly, the setup from the tutorial follows the directions for NAND using uEnv.txt, even though this is an SD card.

It's unclear what the issue is. Does anyone have any thoughts?

Last edited by j.young; 11-01-2022 at 09:05 PM.
 
Old 11-03-2022, 09:53 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,552

Rep: Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610
u-boot definitely uses uEnv.txt. Do it that way. It doesn't care what disk you're on as long as it can get kernel, initrd, & root drive. Mine's a RazPi and I can use or dispense with uboot.
 
Old 11-14-2022, 12:13 PM   #3
j.young
LQ Newbie
 
Registered: Aug 2020
Posts: 15

Original Poster
Rep: Reputation: Disabled
business_kid, thanks, I did some experimenting and that version of uboot is definitely reading uEnv.txt. One limitation was that the version of uboot I was using didn't show any messages or prompts, so it was hard to tell what was going on. So, I compiled a newer version of uboot from this github

https://github.com/andy-shev/u-boot

With the new uboot binary written to the boot sector, I get an actual uboot screen, critically including the error messages. I'm seeing this message

Loading Environment from FAT... *** Warning - bad CRC, using default environment

Interestingly, this new version of uboot seems to need uboot.env. At first I thought uboot.env served the same role as uEnv.txt, but copying uEnv.txt to uboot.env did not change this error. Eventually I found this documentation, which shows that uboot.env is a binary

http://bootlin.com/blog/mkenvimage-u...env-generator/

Following their pattern, I tried to make my own

mkenvimage -s 0x4200 -o uboot.env uboot-env.txt

Using a configuration file uboot-env.txt, which is basically the same as the uEnv.txt file

bootargs=console=ttyS0,115200 console=tty0 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
aload_script=fatload mmc 0 0x43000000 script.bin;
aload_kernel=fatload mmc 0 0x40008000 uImage; bootm 0x40008000;
bootcmd=run aload_script aload_kernel

The error persists, though. Any thoughts?
 
Old 11-15-2022, 08:57 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,552

Rep: Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610
I have a disk backup of my RazPi and there's no uBoot.env file. Mind you, the RazPi does funny things of it's own. The gpu serial loads it's own firmware and the cpu's firmware. Then they both run around like headless chickens, setting switches, turning knobs and pulling levers so actually looking at the kernel is nearly an afterthought.

If it was a RazPi I could try to help. But all the arm SoCs have their own nutty way of doing stuff
 
Old 11-15-2022, 05:18 PM   #5
Guest11
LQ Newbie
 
Registered: Nov 2022
Posts: 1

Rep: Reputation: 0
Thumbs down you will need to use sudo

Quote:
Any thoughts?
get kernel, initrd, & root drive, Load from FAT that you've had bootm 0x40008000 backup. I try to help
~~~~~~~~

Last edited by Guest11; 11-15-2022 at 09:56 PM.
 
  


Reply

Tags
bananapi, kernel, uboot


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] A20 Allwinner/Banana PI sound not working on ARM-current out of the box on kernel 4.8.1 and 4.8.4 SCerovec Slackware - ARM 5 02-23-2019 04:19 PM
LXer: Gentoo-Based Sabayon 16.11 Is Out with Linux Kernel 4.8, Supports Banana Pi SBC LXer Syndicated Linux News 0 10-30-2016 04:01 PM
LXer: Ubuntu Snappy Core Runs on Banana Pi BPI-M2 with Linux Kernel 4.1.6, Download Now LXer Syndicated Linux News 0 09-03-2015 12:22 AM
LXer: Banana Pi: The next generation of single-board computers? LXer Syndicated Linux News 0 04-25-2014 11:14 PM
LXer: VIA Launches its Banana PC, i.e. The $49 Android PC LXer Syndicated Linux News 0 05-22-2012 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration