extlinux bootloader
#3
Thanks, tophneal, for the tip about the 3.3V UART cable -- I would have been victimized by the 5v version in the store for sure, cause it says pinebook-- they ought to make it clear that it's not for pinebook pro up there.

I have noticed that these pine64 devices are not the same from release to release:  my January dispatch PBP has the debian-mate; but the next dispatch is shipping with manjaro; the pinephone turned from a distro-neutral "braveheart" to a distrocentric "UBports".   With the /boot/extlinux folder present on my PBP,  it seemed feasible to wonder whether the debian/mate developers of the January dispatch tried a new bootloader on the PBP.

My PBP definitely arrived with a /boot directory, and in that directory was folder called "extlinux," and in there was "extlinux.conf".  The contents of /boot/extlinux/extlinux.conf , before I touched it, are as follows:

Code:
root@Debian-Desktop:~#   cat /boot/extlinux/extlinux.conf

timeout 10
default PINEBOOKPRO
menu title boot prev kernel

label PINEBOOKPRO
 kernel /Image
 fdt /rk3399-pinebookpro.dtb
 append consloe=ttyS2,1500000n8 rw root=/dev/mmcblk1p2 rootwait rootfstype=ext4 panic=10 init=/sbin/init coherent_pool=1M ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#} cgroup_enable=cpuset cgroup_memory=1  cgroup_enable=memory swapaccount=1 zswap.enabled=1 video=HDMI-A-1:1920x1080@60 video=eDP-1:1920x1080@60 quiet loglevel=3 vga=current

label PINEBOOKPRO-prev-kernel
 kernel /Image.bak
 fdt /rk3399-pinebookpro.dtb.bak
 append console=ttyS2,1500000n8 rw root=/dev/mmcblk1p2 rootwait rootfstype=ext4 panic=10 init=/sbin/init coherent_pool=1M ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#} cgroup_enable=cpuset cgroup_memory=1  cgroup_enable=memory swapaccount=1 zswap.enabled=1 video=HDMI-A-1:1920x1080@60 video=eDP-1:1920x1080@60 quiet loglevel=3 vga=current

Never having seen or heard of extlinux.conf, I searched for it with swisscows.ch, and yielded these fine links:

http://shallowsky.com/linux/extlinux.html
https://superuser.com/questions/743802/h...h-extlinux
https://linux.die.net/man/1/extlinux

All of this looks like the extlinux.conf file that was on my PBP, and none of it looks like Das U-Boot.  Perhaps Das-Uboot is on there as well, and there are two bootloaders.  Is that possible?  

So what I did to get my microSD card boot was as follows:
  • inserted blank 64GB microSD which the sytem recognized as /dev/mmcblk0
  • used dd like this:    dd if=/dev/mmcblk1 of=/dev/mmcblk0 status=progress  (I only waited for a few hundred MB to transfer, and then used ctrl-c to cancel). This, I figured transferred whatever bootloader is on there to the microSD card as well as the partition table.  
  • used fdisk to remove the second partition, because it was a copy of the internal mmcblk1p2, which was on a 128GB card instead of my 64G, so it was too big.  I just deleted the second partition, then added it again, and wrote the partition table
  • used mkfs.ext4 to create an ext4 file system
  • created a mountpoint for the microsd called /dragon  (because I like dragons), and then mounted this new ext4 partition to /dragon
  • created the directory /dragon/boot, and mounted /dev/mmcblk0p1 there (the clone of what was on the internal sdcard's first partition).
  • downloaded Pat.Volkerding's "installpkg" script from slackware, and made a symlink from /usr/bin/du to /bin/du, because P.V.'s script calls /bin/du, but debian has du at /usr/bin/du.
  • downloaded slarm64-current
  • then I installed slarm64 to /dragon, using the installpkg script, with the flag --root /dragon.
  • then I did the mount -o bind for /proc and /sys to /dragon/proc and /dragon/sys
  • I copied /etc/fstab, /etc/hosts, and /etc/resolv.conf to /dragon/etc/
  • then I chrooted into /dragon and changed the hostname, and gave the root user a password, and, very importantly, I edited /boot/extlinux/extlinux.conf, and I added a label for SLARM64, which was identical to the PINEBOOKPRO label, except that the root device was changed to /dev/mmcblk0p2; I also changed the default to SLARM64.
After exiting the chroot and rebooting, slarm64 on the microSD booted.  

I don't know how it would have booted without editing extlinux.conf.  I might have made /var or /tmp at /mmcbk0p2, and had the rootfs at /mmcblk0p3 -- how would the bootloader know which partition on my microSD card contains the rootfs, if I don't tell it?  

I'm happy.  The unofficial port of Slackware to arm64, Slarm64, is booting on my PBP.  But as far as I can tell, it's using extlinux, and not das-uboot. 

Do you have a "/boot/extlinux/extlinux.conf" on your PInebookPro?

Just trying to figure this extlinux stuff out.  As far as I can tell, I made a bootable microSD without ever touching das U-Boot.


Messages In This Thread
extlinux bootloader - by globaltree - 04-29-2020, 12:10 PM
RE: extlinux bootloader - by tophneal - 04-29-2020, 12:54 PM
RE: extlinux bootloader - by globaltree - 05-02-2020, 07:49 PM
RE: extlinux bootloader - by wdt - 05-02-2020, 11:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pinebook pro won't boot after bootloader installation jwensouls 4 937 08-21-2024, 04:17 AM
Last Post: KC9UDX
  Suspend/Resume Broken with Bootloader on SPI Flash xp19375 2 1,630 03-24-2023, 04:25 PM
Last Post: srs5694
  Bootloader: SD card boot quirks crazyquark 1 1,391 10-04-2022, 12:27 PM
Last Post: elitegamercody
  bootloader menu to pick a kernel - what is the current situation in in early 2022? maxtothemax 4 3,776 02-05-2022, 03:04 PM
Last Post: maxtothemax
  extlinux.conf file error, can it be edited in bootloader? Abandoned Brain 2 3,132 09-26-2021, 01:28 PM
Last Post: Abandoned Brain

Forum Jump:


Users browsing this thread: 1 Guest(s)