Skip to content

aml-flash-tool on Linux #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 27, 2025
Merged

aml-flash-tool on Linux #30

merged 2 commits into from
Apr 27, 2025

Conversation

bumerc77
Copy link
Contributor

@bumerc77 bumerc77 commented Apr 8, 2025

Test: OS: Ubuntu 24.04

Currently, this instruction

if [ $host_os = Linux ] && linux-version compare $DISTRIB_RELEASE ge 19.10; then

is not valid.

Debug

#!/bin/bash
set -x
trap read debug

...

++ uname -o

  • host_os=GNU/Linux
    ++ read

++ uname -m
++ grep -i x86

  • host_machine=x86_64
    ++ read

  • '[' '!' -z GNU/Linux ']'
    ++ read

  • '[' GNU/Linux = Darwin ']'
    ++ read

  • '[' '!' -z x86_64 ']'
    ++ read

  • SYSTEM=linux-x86
    ++ read

  • EXE=
    ++ read

  • print_debug 'host_os = GNU/Linux'

  • [[ 1 == 1 ]]

  • echo -e '\033[0;33mhost_os = GNU/Linux\033[m'
    host_os = GNU/Linux
    ++ read

...

  • '[' GNU/Linux = Ubuntu ']'
    ++ read

++ awk '/sub_type="platform"/{gsub("file=","",$1); gsub(/"/,"",$1); print $1}' /tmp/aml-flash-tool-8b4y/image.cfg
awk: cmd. line:1: warning: regexp escape sequence `"' is not a known regexp operator

...

Debug

[ $host_os != Darwin ] solves it.
otherwise uname -s should be used for Linux.

Background: This is useful for installing *.zip packages, such as LineageOS.

This allows you to bypass some installation steps
(connecting the keyboard to the device, ADB and recovery steps, etc.).
In other words, after flashing the <aml_install_package>,
the final installation is performed entirely via the fastboot terminal.
@viraniac
Copy link
Contributor

@bumerc77 The utils: aml-flash-tool: Fix awk warnings on Ubuntu 24.04 commit should no longer be required now that we have merged another PR. Could you please rebase and revise the PR to only include the fastboot change?

@bumerc77
Copy link
Contributor Author

@viraniac Sure

@numbqq numbqq merged commit 6132bdd into khadas:master Apr 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants