Package Details: aml-flash-tool 4.9-6

Git Clone URL: https://aur.archlinux.org/aml-flash-tool.git (read-only, click to copy)
Package Base: aml-flash-tool
Description: Linux version of Amlogic USB Burning Tool.
Upstream URL: https://github.com/khadas/utils/tree/master/aml-flash-tool
Keywords: amlogic usb-burning-tool
Licenses: unknown
Provides: aml-flash
Submitter: yjun
Maintainer: yjun
Last Packager: yjun
Votes: 2
Popularity: 0.000025
First Submitted: 2023-07-30 14:53 (UTC)
Last Updated: 2025-09-16 17:14 (UTC)

Latest Comments

1 2 Next › Last »

yjun commented on 2025-09-16 17:15 (UTC)

@hcore fixed. :)

hcore commented on 2025-09-15 14:10 (UTC)

The next line was giving me issues, so I updated it as follows

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

sha256sum 532e14eefa7574e541736b172068f862ddf6a2b4d294e74be83528143dcf1e4d

yjun commented on 2025-04-13 09:49 (UTC)

@Best Fixed.

Best commented on 2025-04-13 09:28 (UTC)

need git dependency

xenobro commented on 2025-04-08 18:43 (UTC)

@yjun Just tested the new version here, problem solved! Thanks!

yjun commented on 2025-04-08 14:36 (UTC)

@xenobro sorry for slow response, Fixed. :)

xenobro commented on 2025-04-03 19:19 (UTC) (edited on 2025-04-03 19:58 (UTC) by xenobro)

\Ok, I think I know what's happening: the patch is supposed to find this chunk of code at line 432 in aml-flash-tool/flash-tool:

 print_debug ""
 print_debug "Parsing image configuration files"
 print_debug "---------------------------------"
 source /etc/lsb-release
 if linux-version compare $DISTRIB_RELEASE ge 19.10; then
     platform_conf_name=`awk '/sub_type="platform"/{gsub("file=","",$1); gsub(/"/,"",$1); print $1}' $tmp_dir/image.cfg`
     print_debug "platform_conf_name  = $platform_conf_name"
     ddr_filename=`awk '/sub_type="DDR"/{gsub("file=","",$1); gsub(/"/,"",$1); print $1}' $tmp_dir/image.cfg`

And change it to

 print_debug ""
 print_debug "Parsing image configuration files"
 print_debug "---------------------------------"
 # source /etc/lsb-release
 if echo "BTW, I use Arch" >> /dev/null 2>&1; then
     platform_conf_name=`awk '/sub_type="platform"/{gsub("file=","",$1); gsub(/"/,"",$1); print $1}' $tmp_dir/image.cfg`
     print_debug "platform_conf_name  = $platform_conf_name"
     ddr_filename=`awk '/sub_type="DDR"/{gsub("file=","",$1); gsub(/"/,"",$1); print $1}' $tmp_dir/image.cfg`

But last week, 2025-03-24, commit fcf0458 changed that chunk to line 435 and altered it to

 print_debug ""
 print_debug "Parsing image configuration files"
 print_debug "---------------------------------"

 if [ -e /etc/lsb-release ]; then
     source /etc/lsb-release
 fi

 if [ $host_os = Linux ] && linux-version compare $DISTRIB_RELEASE ge 19.10; then
     platform_conf_name=`awk '/sub_type="platform"/{gsub("file=","",$1); gsub(/"/,"",$1); print $1}' $tmp_dir/image.cfg`
     print_debug "platform_conf_name  = $platform_conf_name"
     ddr_filename=`awk '/sub_type="DDR"/{gsub("file=","",$1); gsub(/"/,"",$1); print $1}' $tmp_dir/image.cfg`

So I found a workaround: in 0001-BTW_I-use-Arch.patch, change

...
@@ -432,8 +432,8 @@
...
-source /etc/lsb-release
-if linux-version compare $DISTRIB_RELEASE ge 19.10; then
...

to

...
@@ -435,12 +435,8 @@
...
-
-if [ -e /etc/lsb-release ]; then
-       source /etc/lsb-release
-fi
-
-if [ $host_os = Linux ] && linux-version compare $DISTRIB_RELEASE ge 19.10; then
...

Then you have to change the patch's sha256sum in PKGBUILD from

...
            'd9a1e81742452298b4181470a3791910c781fdbfaba55c301cb9578a165c61f6')
...

to

...
            '7d7f0fb50632ff1afa8f7683830921e29bbcdd90518ea2c5e0c11f0c15e0e878')
...

At last, just run makepkg -si as usual and it will compile.

Now can someone who understand this better check if this is correct? And if it is, incorporate it into the package? Otherwise, how can we message the package maintainer to fix this?

Sorry for the long post and thank you very much.

xenobro commented on 2025-04-02 19:09 (UTC) (edited on 2025-04-02 19:14 (UTC) by xenobro)

I'm having the same problem as @dongfengweixiao, makepkg -si fails with:

==> Starting prepare()...
patching file aml-flash-tool/flash-tool
Hunk #1 FAILED at 432.
1 out of 1 hunk FAILED -- saving rejects to file aml-flash-tool/flash-tool.rej
==> ERROR: A failure occurred in prepare().
    Aborting...

Can somebody please help?

dongfengweixiao commented on 2025-04-01 01:10 (UTC)

patching file aml-flash-tool/flash-tool Hunk #1 FAILED at 432. 1 out of 1 hunk FAILED -- saving rejects to file aml-flash-tool/flash-tool.rej

yjun commented on 2023-09-06 14:36 (UTC)

@snackattack I think it's a good idea, so I use the aml-update script to wrap the update command[1].

[1] https://aur.archlinux.org/cgit/aur.git/commit/?h=aml-flash-tool&id=6ae592d5752cfb0a7faf15c927be030b4a64adb8