SecKatie / u-boot-rockchip

1 stars 5 forks source link

Truncate error #1

Open phodina opened 1 year ago

phodina commented 1 year ago

Hi @JoshuaMulliken , I'm packaging the u-boot for PostmarketOS and there is an error:

truncate: invalid number '%8'
    7 make: *** [Makefile:920: u-boot.bin] Error 1
    8 make: *** Waiting for unfinished jobs....
pkgname=u-boot-pinenote
pkgver=1
pkgrel=0
pkgdesc="u-boot bootloader for the rk3566"
url="https://github.com/JoshuaMulliken/pinenote_uboot"
arch="aarch64"
license="GPL-2.0-or-later OFL-1.1 BSD-2-Clause BSD-3-Clause eCos-2.0 IBM-pibs
    ISC LGPL-2.0-only LGPL-2.1-only X11"
options="!check"

makedepends="$depends_dev bc dtc python3-dev swig bison flex  openssl-dev bash make"

# source
_commit="d8ed6eadf8596a0dce71f062eabc9e925812a0bf"
_repo="pinenote_uboot"
_rkcommit="ac64b3e9e57a7712187dc1bb6e83841232214ac8"
_rkrepo="rockchip_mirrors"
_ubcommit="7df3eae9f756665e01016a182d33ddf9dd244b1d"
_ubrepo="u-boot-rockchip"

builddir=$srcdir/$_repo-$_commit

source="
    $pkgname-$_commit.tar.gz::https://github.com/JoshuaMulliken/pinenote_uboot/archive/$_commit.tar.gz
    $_rkrepo-$_rkcommit.tar.gz::https://github.com/JeffyCN/rockchip_mirrors/archive/$_rkcommit.tar.gz
    $_ubrepo-$_ubcommit.tar.gz::https://github.com/JoshuaMulliken/u-boot-rockchip/archive/$_ubcommit.tar.gz
"

prepare() {
    default_prepare

    # Remove submodule empty dirs
    rmdir "$srcdir/$_repo-$_commit/rkbin"
    rmdir "$srcdir/$_repo-$_commit/u-boot-rockchip"

    sed -i "s/export CROSS_COMPILE=aarch64-linux-gnu-//" "$srcdir/$_repo-$_commit/build.sh"

    mv "$srcdir/$_rkrepo-$_rkcommit/" "$srcdir/$_repo-$_commit/rkbin"
    mv "$srcdir/$_ubrepo-$_ubcommit/" "$srcdir/$_repo-$_commit/u-boot-rockchip"
}

build() {
    cd $builddir
    ./build.sh
    }

package() {
    install -D -m644 build/u-boot-rockchip.bin \
        "$pkgdir"/usr/share/u-boot/pine64-rockpro64/u-boot-rockchip.bin
    install -D -m755 "$srcdir"/update-u-boot "$pkgdir"/usr/sbin/update-u-boot
}

sha512sums="
7018fa702a866e4d9731d2598f9043069403ae7a84c726f87d734c4931da3f7310e1c6be9717fcfd9fc2a73be991d4460e7e1491959950464c0d1f12464835b2  u-boot-pinenote-d8ed6eadf8596a0dce71f062eabc9e925812a0bf.tar.gz
81b82b347ad4df8bf1e84d7ee563fa9a6cfa56a55ceb1e8a24ca117b28b00cd98b6cef87db322904b4f86a4b6459af0a62447b25813654a64a844fd27f7413e8  rockchip_mirrors-ac64b3e9e57a7712187dc1bb6e83841232214ac8.tar.gz
3247dfc6d36ae05aa89cdfde099dbdfdb220dfd089967f556759f58b01882f08adf2b412f2b1e80d0cc9551fc9d1aff818f78696b3764562a50b749a1c6120bc  u-boot-rockchip-7df3eae9f756665e01016a182d33ddf9dd244b1d.tar.gz
"

If I build it ouside it works find and I get the binaries.

phodina commented 1 year ago

And then there's another issue with truncate If I comment out the first one:

********boot_merger ver 1.2********
  11 Info:Pack loader ok.
  12 pack loader okay! Input: /home/pmos/build/src/pinenote_uboot-d8ed6eadf8596a0dce71f062eabc9e925812a0bf/rkbin/RKBOOT/                    RK3566MINIALL_ULTRA.ini
  13 /home/pmos/build/src/pinenote_uboot-d8ed6eadf8596a0dce71f062eabc9e925812a0bf/u-boot-rockchip
  14 truncate: invalid number '%2048K'
  15 Build uboot failed!
SecKatie commented 1 year ago

Hey @phodina I have not seen that error before. I am sorry it has been a bit since I dealt with this project.