Please select To the mobile version | Continue to access the desktop computer version
12Next
Return to list New
View: 455|Reply: 11

A Boot-Disk That Allow GT King Pro To Boot Linux UEFI-Arm64 Image

[Copy link]

3

Threads

320

Posts

1113

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
1113
Post time 2022-05-31 22:28:54 | Show all posts |Read mode
Edited by JFL at 2022-06-28 00:06

2022-06-25: OpenSuse Net-Installer
Downloade Link:  https://ufile.io/4mgulcyp   (
File created: 6/22/2022, 11:39:34 PM
  |  

File expires in: 27d 5h 9m 45s )


Instructions/Guide by @tripole:

Minimal netbootdisk image to boot the openSuse aarch64 installer (for Tumbleweed, rolling edition) and install to local SD/USB (can be booted via u-root-bootdisk). The installer image consists of a small 200M FAT partition which holds only the installer kernel, initramfs a small grub.cfg and a few dtb’s. A simple use case is to boot the installer on e.g. a USB and then install openSuse on a large ext4 partition e.g. immediately after the small boot partition on the same USB. (The boot partition can be discarded/reused after the install.)

The install is straightforward but requires a bit of patience on a few blank screens (30s-2m) during the boot/install process and the only things important (on a first install) on e.g. a USB are these:

Use guided partitioning on the whole USB, and make sure to unselect all other install targets (devices) than the USB.
Don’t use LVM.

Use ext4 for the file system on the root partition (so that it can be booted by u-root) and let the installer propose a swap partition (i.e leave this option ticked).
Unselect “Secure boot” and unselect “update nvram".

Near the end of the installation (about 93%) you will likely encounter an error message about the installer being unable to install the EFI directory. This is harmless for us since we don’t use EFI (but uroot+grub) to boot the finished install. Just hit “Ok” to continue. The install will finish and automatically reboot, and then from the u-root boot prompt you can select your new install (openSuse Tumbleweed).

If you want to install instead the stable version of openSuse (currently Leap 15.4) then edit the URL in grub.cfg on the netbootdisk to be
[color=var(--tertiary)]http://download.opensuse.org/ports/aarch64/distribution/leap/15.4/repo/oss



2022-06-21: Clarification
[size=15.008px]“Note: u-root performs grub booting but cannot read all grub+kernel+initrd installations and can only read such installations from FAT16, FAT32, EXT4 and XFS file systems (e.g. ‘inside’ hybrid iso’s).  So strictly it does not read/use EFI binary."
Update: 2022-06-20: New Version Chainloader "u-root-bootdisk_0v25.img.gz"
This new "u-root-bootdisk_0v25" has added [size=15.008px]support to read iso9660 filesystems (“iso’s”, “CD images”).
Update: 2022-06-18: Ubuntu Kinetic Kudu (Repackaged UEFI image -- kinetic-desktop-arm64-220617.3pole.img.xz)
@tripole had repackaged the Ubuntu Kinetic iso image.  Below is the message from @tripole:
[size=15.008px]it is a horrible hack: it is a “repack” (to ext4) of (part of) the iso image to make it bootable by u-root. The install-to-disk function doesn’t work on this repacked version (but perhaps someone can figure out how to solve that). So, this image is just for tasting of the feeling of kinetic.

Update: 2022-06-15 -- Slim Down Non-Chainloader Version: "u-root-bootdisk-nc_0v21.img.gz:
@tripole had released a slim down version of "u-root-bootdisk-nc".  It has been tested to be able to boot from SD Card and USB Flash.

We also found additional link for Fedora Alternate Architecture images.  We have not tested all the Fedora images, but had tried Fedora 36 Workstation and Fedora KDE Plasma.

Update: 2022-06-11 -- Non-Chainloader Version:- "u-root-bootdisk-nc_0v2.img.gz"
@tripole had developed another "u-root-bootdisk-nc_0v2".  The "nc" stands for NO Chainloader, meaning the u-boot.ext is not required for booting up the "u-root-bootdisk".

The advantages of the No Chainloader "u-root-bootdisk" are:
-  Faster Boot Speed
-  Boot from any USB Ports on GT King Pro.
-  Both "u-root-bootdisk-nc_0v2" USB Flash and your UEFI image on USB Flash can be inserted into the GT King Pro USB Ports and power up.
-  Reboot, in a sense work as it will return you to the menu where you select which UEFI image kernel to boot.
-  In theory it will allow more Amlogic TV Boxes to be able to work with this "u-root-bootdisk-nc" as the search for the correct chainloader for the device no longer required.  

The downside with "u-root-bootdisk-nc_0v2" compared to "u-root-bootdisk_0v2" is that HTOP will report that the device has less memory available.  

For example, on my GT King Pro with "u-root-bootdisk_0v2", HTOP will report available RAM as 3.66GB and with 'u-root-bootdisk-nc_0v2", HTOP will report available RAM as 3.23GB.

Update 2022-06-09:

@tripole had a newer version of "u-root-bootdisk_0v2.img.gz".  This newer version will boot significantly faster than the previous version and had a newer boot kernel. He has also included various chainloaders for various Amlogic Device on this image:
/u-boot-ophub
/u-boot-hexdump0815

The chainloaders in /u-boot-ophub is from "Armbian for S9xxx"

Should the default chainloader u-boot.ext not being able to boot on your device you can try the various chainloaders in /u-boot-ophub or /u-boot-hexdump0815 se whether it works on you device.

For further details please refer to README.txt.

The “Fedora 36 Workstation” UEFI raw image runs smoothly.  Do feedback the experience you had with the UEFI images you have tried.  I suppose there are many more linux UEFI images available than the three we had listed below.

Hi Beelink-GT King/Pro Users,
Would like to introduce you to “u-root-bookdisk.img” by @tripole. This “u-root-bootdisk.img” basically will allow Beelink GT King/Pro users to boot some of the linux UEFI-Arm64 images as is. It might also work for other Amlogic Devices with the appropriate dtb. But not all UEFI-Arm64 works though.

Instruction:
  • Flash “u-root-bootdisk.img.gz” on to a USB Flash drive using Rufus or Balena Etcher. The image is small less 300MB (new version size is 105MB)
  • Edit /boot_uroot/extlinux/extlinux.conf to reflect the correct dtb for your device. Already preset for GT King Pro.
  • Download a Linux UEFI-Arm64 image, example “Fedora-Workstation-36-1.5.aarch64.raw.xz” from Download Fedora Workstation.
  • Flash the Linux UEFI-Arm64 image onto USB Flash Drive (Fedora 36 requires a 16GB Flash Driver).
  • Insert the USB Flash with “u-root-bootdisk.img” into OTG USB Port and Power Up. It will proceed to boot the “u-root”. At the stage where it says “Starting kernel…”
  • Insert the USB Flash with Linux UEFI-Arm64 image example “Fedora-Workstation-36-1.5.aarch64.raw.xz” into any of the other USB Port. It will take a while to boot and the screen might even indicate “No Signal” on the HDMI monitor. When the u-root is booted up with the “u-root” logo:
  • Type: boot and hit return. The UEFI-Arm64 image will proceed to boot.


I have personally tested “Fedora 36 Workstation”.  Ethernet, Wifi, Sound and Bluetooth works. But on my GT King Pro to get wifi working, need to copy the missing wifi driver brcm/brcmfmac4356-sdio.txt from another image to [size=14.6667px]/lib/firmware/brcm/

To get sound, you might need to run "g12_sound.sh" and reboot.

Downloads: Updated 2022-06-20

Update 2022-06-20:  "u-root-bootdisk_0v25.img.gz" with [size=15.008px]support to read iso9660 filesystems: https://ufile.io/7dkocza7 (link Uploaded 2022-06-19. Link will expire in 30 days)
Latest "u-root-bootdisk-nc_0v21.img.gz link:  https://ufile.io/bfoh9nc5 (Uploaded on 2022-06-15.  Link will expire in 30 days)
New u-root-bootdisk-nc_0v2.img.gz link: https://ufile.io/hkr6p5zc (Uploaded 2022-06-09.  Link will expire in 30 days from the Upload date)
New u-root-bootdisk_0v2.img.gz link: https://ufile.io/5rf1l9u9  (Uploaded 2022-06-08. Link will expire in 30 days from the Upload date)

Old obselete version1 u-root-bootdisk.img.gz https://ufile.io/bljp7vm3

Repackaged Ubuntu Kinetic Kudu (Ubuntu 22.10) Desktop Image Link:  https://ufile.io/9vv7v5ze (uploaded on 2022-06-18.  Link will expire in 30 days)
Fedora Alternate Architecture Buillds Link:  https://alt.fedoraproject.org/alt/  (link added on 2022-06-15)
Fedora-Workstation-36-1.5.aarch64.raw.xz Download Fedora Workstation
u-root-bootdisk-Start-Booting.jpeg
Fedora_36_Desktop.jpeg
u-root-bootup-successfully.jpeg
Reply

Use magic Report

5

Threads

197

Posts

1594

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
1594
Post time 2022-06-02 13:57:05 | Show all posts
Edited by darkstar at 2022-06-02 14:01

Thank you JFL,

This is a nice work, I checked it and it is pretty useful.
2022-05-31:

Boot disk for TV boxes (e.g. Amlogic) using u-root for chainloading.

With this disk (which is just a proof-of-concept), you can use the ordinary
u-boot (including the vendor/built in parts on emmc) to boot into u-root,
which is a Linux kexec based boot loader and general swiss army knife thingy
(think busybox). From u-root, you can then easily boot into an UEFI image
of a Linux ARM64 distro (w/ valid grub setup, see below) on another SD/USB:
By issuing the command "boot" at the u-root prompt a scan over partitions for
bootable kernels is initated and the results are presented in a menu (with
bootarg options). The user can then select and boot any of these. (Many other
commands are available in u-root, hit tab at the u-root prompt to see a list.)

/Tripole

Remark: This disk does not contain any "hidden" stuff (like in the first 444
bytes in sector 0 or in the 1MB gap to sector 2048) so you can also equally
well just copy the files here onto a freashly created FAT32 (vfat) partition
of, say, 250MB on some SD/USB (and set the bootable flag, I guess).

Caveats: Our suggested method of booting with u-root uses the "boot" command
which relies on the u-root function Localboot() which scans for grub configs.
Therefore, a valid grub config must exist for this method to work but u-root
is also capable of scanning for other configs, e.g. syslinux (see the docs).

This bootdisk has been tested on Ugoos Am6 and Beelink GT King Pro (thx JFL!).

Usage
=====

(1) Flash this image to a SD/USB (or copy the files to a FAT32 bootable part.).
(2) Edit extlinux/extlinux.conf to point to the right dtb file for your box.
(3) Copy the right u-boot binary for your box (found in the dir "u-boot")
    over to the name "u-boot.ext" (in the root dir). (If you cannot find a
    suitable u-boot.bin for your box, check e.g. hexdump0815's repo below).
(4) Insert this image into your TV box along with some other USB image of a
    Linux ARM64 distro packaged as a UEFI+grub image.
(5) Boot your box. You should end up at the command prompt in u-root.
    (To see the available commands there, hit tab.)
(6) At the u-root command prompt, type: boot <enter>.
(7) u-root now scans the USB bus and your other UEFI image(s) should be found.
    You will be presented with a menu of choices (boot, boot safe mode etc).
(8) Select a boot option and boot (be patient, the screen may be blank for
    up to 30s while the new kernel is booting). (If the screen goes blank for
    along time and you can still at this point reboot with Ctrl-Alt-Del then
    you at least lnow that the kernel has booted but video is not working.)

Origin of files
===============

u-boot.ext
----------
The u-boot.ext file here is the (unzipped and renamed version of the) file
g12a-u-boot.bin.gz from hexdump0815 in his release at
https://github.com/hexdump0815/u-boot-misc/releases/tag/200926-01
There are may other u-boot.bin files at hexdump0815's github repo.

Image-5.10.8-1, script files
----------------------------
The kernel image file Image-5.10.8-1, the associated modules and the boot
script files (aml_autoscript, s905_autoscript) are from Manjaro
https://manjaro.org/ (The kernel build flavor is linux-vim).

vmlinuz-5.10.118-ophub, dtbs
----------------------------
The kernel image file vmlinuz-5.10.118-ophub, the modules and the dtbs are
from ophub's github repo https://github.com/ophub/amlogic-s9xxx-armbian

Note: The kernel modules (Manjaro/ophub) are not needed to use u-boot, they
are just included in case someone wants to use u-root in more advanced ways.

initramfs-u-root*.img.gz
------------------------
The initramfs-*img.gz files are gzipped cpio archives of with code for a boot
loader which are built by me using the u-root code+framework from
https://github.com/u-root/u-root
Documentation about u-root can be found at the github repo and at
http://book.linuxboot.org
The different versions of initramfs-* contain builds with more or less of the
functions in u-root. The oldest version is initramfs-u-root.img.gz and the
newer versions are initramfs-u-root-*-v0.8.1.img.gz where the "all" version
includes everything of u-root. (Not all versions of u-root work well with all
versions of kernels, even recent ones; I have included two kernels.)

Disclaimer
==========

I put no restrictions on what you can do with the contents of this disk (and
virtually all the stuff here I have borrowed from others anyway, see above).
I hope that it can be useful and that others can take this proof-of-concept
and build on it and improve it, so please share this disk.
Also, use at your own risk (don't blame me if your box burns).

Reply Support Not support

Use magic Report

3

Threads

320

Posts

1113

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
1113
 Author| Post time 2022-06-02 20:31:25 | Show all posts
Edited by JFL at 2022-06-02 20:37
darkstar replied at 2022-06-02 13:57
Thank you JFL,

This is a nice work, I checked it and it is pretty useful.

Hi @darkstar,

The work is done by @tripole.  He suggested that I share it with Beelink users and hopefully, developer like yourself might pick it up and enhanced on it.

Per my understanding from @tripole, this is currently a proof of concept work but so far it works great on Fedora_36 Workstation UEFI image.  Hopefully in future with more contributions from the community this proof of concept work will flourish into something that allow GT King Pro/Amlogic Devices to be able to boot up any of the generic UEFI images.
Reply Support Not support

Use magic Report

5

Threads

160

Posts

902

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
902
Post time 2022-06-09 14:59:35 | Show all posts
Hi @jfl @darkstar

Wow great project, thanks @jfl for sharing.

Is it possible to have a boot menu to choose which system to boot on?
I have for example:
-Android on Emmc
-Coreelec on SD card
-Armbian on USB and SD Card

For the moment it is the sd card which has priority.
On Coreelec there is a command to restart the box under Android it works well.

On Android I use "reboot to libreelec.apk" it works fine too.

On the other hand, when I'm on Coreelec (SD card) and I want to restart my Armbian (SD card too) that's where the problems begin.. switching from one to the other is not easy and I often have to force several times the "reboot to libreelec" from Android after a while it works again and Armbian starts, but with Armbian there is no way to directly restart under Android.

The top would be to have at startup a menu to choose whether to boot on Emmc or on SD card or on USB.
This u-root seems to be able to allow this kind of menu..


Reply Support Not support

Use magic Report

3

Threads

320

Posts

1113

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
1113
 Author| Post time 2022-06-09 18:26:24 | Show all posts
gtkingpro.ac2n replied at 2022-06-09 14:59
Hi @jfl @darkstar

Wow great project, thanks @jfl for sharing.

At the moment this "u-root-bootdisk" was meant to allow users to be able to boot some "UEFI images" where it will not normally boot on GT King Pro or other Amlogic Device.  

With "u-root-bootdisk" on USB Flash, I don't seem to be able to see the Emmc.  You can try to burn the "u-root-bootdisk.img" on an SD Card in try.  I suppose u-root-bootdisk on SD Card might give better options especially for GT King Pro users.

I will refer your question to @tripole.
Reply Support Not support

Use magic Report

3

Threads

320

Posts

1113

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
1113
 Author| Post time 2022-06-09 22:52:39 | Show all posts
An updated version of the "u-root-bootdisk.img" had been released.  Please refer to the first post.
Reply Support Not support

Use magic Report

5

Threads

160

Posts

902

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
902
Post time 2022-06-10 00:29:52 | Show all posts
Thank @JFL
Looks promising, I'll give it a try on SD-card..
Reply Support Not support

Use magic Report

3

Threads

320

Posts

1113

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
1113
 Author| Post time 2022-06-11 20:01:53 | Show all posts
New version "u-root-bootdisk-nc.img.gz" available.  Non-Chainloader Version.

Faster boot speed and can boot from any of the GT King Pro USB Port.

Please refer to the first post.
Reply Support Not support

Use magic Report

3

Threads

320

Posts

1113

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
1113
 Author| Post time 2022-06-15 20:45:00 | Show all posts
Edited by JFL at 2022-06-17 21:16

Hi All,

Updated a new slim down version of Non-Chainloader "u-root-bootdisk-nc_0v21.img.gz" and added new link for Fedora Alternate Architecture for aarch64.  Please refer to the first post.


If you all had tried out other UEFI images that works with "u-root-bootdisk", do provide the link and your experience.

Reply Support Not support

Use magic Report

3

Threads

320

Posts

1113

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
1113
 Author| Post time 2022-06-18 23:03:13 | Show all posts
Hi All,

Updated the first post with a new link for repackaged Ubuntu-Kinetic Kudu.
Reply Support Not support

Use magic Report

12Next
Return to list New
You have to log in before you can reply Login | Sign up

Points Rules

Quick Reply To Top Return to the list