Boot custom kernel on PineBook Pro
#1
Hi!

I am tring to boot my custom non-linux kernel on the PineBook Pro. I've downloaded an image with archlinux and written it on SD card. I can successfully boot archlinux from it. I've tried to put my kernel on the SD card, set the path to my (stripped with bitnutils) kernel in extlinux.conf, but after reboot, I get my default Manjaro system.

Most likely it is not an issue of kernel itself. Otherwise I think that main system won't boot. I think that extlinux can't read/boot the kernel and returns the execution to the main loader.

I've tried to enable menu prompt for extlinux but can't see an effect.

I also have a serial cable connected, but the output during boot looks like mess, don't know why. Linux shell works just fine. See photo [Image: Eb1EuBjWkAENgMt?format=jpg&name=medium]

What I am missing? Is there a way how to see extlinux boot information on the PineBook Pro?

Thanks in advance!
#2
>I've tried to enable menu prompt for extlinux but can't see an effect.
Despite the name, extlinux has NOTHING to do with syslinux, so, no menu
Just an alternative to boot.txt/boot.scr, no compiling needed
So, you have to figure out messages from uboot via serial
#3
(07-05-2020, 01:09 PM)wdt Wrote: >I've tried to enable menu prompt for extlinux but can't see an effect.
Despite the name, extlinux has NOTHING to do with syslinux, so, no menu
Just an alternative to boot.txt/boot.scr, no compiling needed
So, you have to figure out messages from uboot via serial

Thank you for your reply! How can I make the uboot messages readable? I've attached a photo to the topic with what I see in the serial console. Can it be an issue of the attached TX cable?
#4
Try again with photo link, serial is 1.5Mb/s BTW
#5
if you are trying to run your own OS the FIRST TIME, maybe instead of that extlinux stuff, you just go a more controllable way - interrupt uboot by pressing a key, and type manually that stuff needed to run your OS:

Code:
load mmc n0:m0 <addr0> <pathtodtb>
fdt addr <addr0>
fdt resize
load mmc n1:m1 <addr1> <pathtokernel>
booti <addr1> - <addr0>
nX:mX correspond, of course, to the uboot numbers of storage devices, where appropriate files reside. if for example dtb is on eMMC and your OS is on SD, then X0 != X1.
and of course, as wdt said - the UART on rk3399 is running at 1500000 baud/sec
ANT - my hobby OS for x86 and ARM.
#6
Thank you very much guys!

uboot messages become readable on speed 1.5Mb/s
I was able to load from SD and boot my binary kernel with following sequence:
Code:
load 1:1 0x200000 /boot/kernel-file
go 0x200000
Time to find out why it does not work  Big Grin
#7
because you overwrite uboot itself. 00 20 00 00 is the "start" of SDRAM on rockchip SoCs, in fact, it's 0, but they "reserve" 2MB for whatever. try something higher. like 02 00 00 00. and use booti. because this should work on 64 bit ARM consistently. what isn't the case for bootm and I am not sure about go. but with go, you aren't able to get DT. how are you gonna discover devices without any configuration? hardcode for every machine? nono. don't forget to insert a header at the beginning of your kernel, loader. whatever, because booti does expect it. it's lame, yes, but it's how linux wants and how uboot obediently follows. you can read about that header format in the linux documentation. boot/arm64 section. and if that is not enough, that header expects your code is position independent! doh. at least its start. OR, BETTER of any of this lamery, USE UBOOT'S UEFI interface! you will be freed of these hassles. but, you'll need to revamp your design and supply a UEFI OS loader. it's a PE executable, easily compiled with MSVC (for x86, x64, arm32, arm64). it's much better, believe me.
ANT - my hobby OS for x86 and ARM.
#8
(07-06-2020, 02:25 PM)z4v4l Wrote: because you overwrite uboot itself. 00 20 00 00 is the "start" of SDRAM on rockchip SoCs, in fact, it's 0, but they "reserve" 2MB for whatever. try something higher. like 02 00 00 00. and use booti. because this should work on 64 bit ARM consistently. what isn't the case for bootm and I am not sure about go. but with go, you aren't able to get DT. how are you gonna discover devices without any configuration? hardcode for every machine? nono. don't forget to insert a header at the beginning of your kernel, loader. whatever, because booti does expect it. it's lame, yes, but it's how linux wants and how uboot obediently follows. you can read about that header format in the linux documentation. boot/arm64 section. and if that is not enough, that header expects your code is position independent! doh. at least its start. OR, BETTER of any of this lamery, USE UBOOT'S UEFI interface! you will be freed of these hassles. but, you'll need to revamp your design and supply a UEFI OS loader. it's a PE executable, easily compiled with MSVC (for x86, x64, arm32, arm64). it's much better, believe me.
All true. At this moment I want to hardcode DT for every machine. Later will see. Adding header will require some additional efforts and build system tweak. I also would like to postpone it a bit. The code is position independent.

I'll try higher address. Thanks for the tip.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Video Editing Is Possible On The PineBook Pro! ImmyChan 9 5,506 11-23-2023, 01:11 PM
Last Post: RRman
  Various freezes during boot & while running several Linux distros - hardware error? donuts 1 87 11-22-2023, 11:47 AM
Last Post: fxc
  Happy eMMC and SDcard OS usage for Pinebook Pro Newbies... Paulie420 42 54,185 11-20-2023, 06:22 PM
Last Post: wdt
  Selling my Pinebook Pro with a bootable NVMe WD SSD drive pinemouth 0 351 09-27-2023, 08:53 PM
Last Post: pinemouth
  Cannot boot to Kali SD card after uboot upgrade jbradley419 4 502 09-19-2023, 08:48 AM
Last Post: dachalife
  After update, multiple problems, pinebook pro. jd50i 1 554 09-16-2023, 09:41 AM
Last Post: jd50i
  Will it be possible to upgrade the Pinebook Pro if/when a newer model is released? Rat24 4 704 09-15-2023, 03:00 PM
Last Post: KC9UDX
  Dead Pinebook Pro Keyboard Keys calinb 2 560 09-02-2023, 12:31 PM
Last Post: calinb
  Use SD to install new OS over pinebook debian Rudy558 11 8,966 08-18-2023, 04:16 AM
Last Post: bayoca8590
  Does latest Tow-Boot install/work correctly for everyone? tophneal 4 980 08-03-2023, 03:30 PM
Last Post: tophneal

Forum Jump:


Users browsing this thread: 1 Guest(s)