Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

[Linux] Unable to build firmware - Syntax error: Unterminated quoted string

49

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
49

【Linux】 Unable to build firmware - Syntax error: Unterminated quoted string

Posted at 2/15/2023 12:36:15      View:2290 | Replies:2        Print      Only Author   [Copy Link] 1#
  • Type: Self-Compiled Firmware
  • SDK Package Name: rk3588_repo_sdk_v1.0.2a.7z
  • Last Commit: 0000-00-00 00:00:00
  • Modification Content: arm64: dts: rk3588 compatible:rk3588j,rk3588m and rk3588 can use the same firmware
  • Log: log.zip
Problem description and steps to reproduce:
I have Linux SDK rk3588_repo_sdk_v1.0.2a.7z.  I am compiling directly on my AIO-3588SJD4 board.  I have followed the instructions as posted in the README-IMPORTANT.md file and have completed STEP 1 (init repo sdk).  For step 2, there are no firmware compilation instructions for the AIO-3588SJD4.  Instead, I am following these instructions:
https://wiki.t-firefly.com/en/iC ... compile_ubuntu.html

I completed these steps:
3.2. Compile SDK
3.2.1. Precompile Configuration


3.2.2. Build
3.2.2.1. Automatic compilation
Download: Ubuntu rootfs(64-bit),put in SDK path
7z x ubuntu-aarch64-rootfs.7z
mkdir ubuntu_rootfs
mv ubuntu-aarch64-rootfs.img ubuntu_rootfs/rootfs.img
start compiling

./build.sh

The build is failing (full log attached):
/home/firefly/upload/rk3588_repo_sdk_v1.0.2a/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc: 2: Syntax error: Unterminated quoted string
/bin/sh: 1: /home/firefly/upload/rk3588_repo_sdk_v1.0.2a/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc: Exec format error
dirname: missing operand

It looks like there is an unterminated quoted string in a script file, however the file it points in the logs:
/home/firefly/upload/rk3588_repo_sdk_v1.0.2a/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc
is a binary file (non-text).  I am unsure where to look to understand where the actual error is coming from (which script?).  How can I proceed to buld the firmware and get past this error?



log.zip

1.1 KB, Down times: 0

Reply

Use props Report

49

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
49
Posted at 2/15/2023 14:18:48        Only Author  2#
It seems like the initial problem is that the SDK is meant to be compiled on X86 architecture?  I just noticed this:
/prebuilts/gcc/linux-x86

I've moved to building this on my x86 desktop and I am able to progress past this error.  I am hitting a new error now:

  INSTALL drivers/net/usb/r8152.ko
  INSTALL drivers/net/usb/rtl8150.ko
  INSTALL drivers/net/veth.ko
  INSTALL drivers/net/vxlan.ko
  INSTALL drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmdhd.ko
  INSTALL drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_static_buf.ko
  INSTALL drivers/net/wireless/rockchip_wlan/rtl8821cu/8821cu.ko
  INSTALL drivers/net/wireless/virt_wifi.ko
  INSTALL drivers/scsi/scsi_mod.ko
  INSTALL drivers/scsi/scsi_transport_spi.ko
  INSTALL drivers/scsi/sd_mod.ko
  INSTALL drivers/scsi/sr_mod.ko
  INSTALL drivers/scsi/virtio_scsi.ko
  INSTALL drivers/usb/storage/uas.ko
  INSTALL drivers/usb/storage/usb-storage.ko
  INSTALL drivers/vhost/vhost_net.ko
  INSTALL net/netfilter/ipvs/ip_vs.ko
  INSTALL net/netfilter/ipvs/ip_vs_rr.ko
  INSTALL net/netfilter/xt_ipvs.ko
  DEPMOD  5.10.110
Invalid filesystem option set: has_journal,extent,huge_file,flex_bg,metadata_csum,metadata_csum_seed,64bit,dir_nlink,extra_isize,orphan_file
ERROR: Running build_extboot failed!
ERROR: exit code 1 from line 829:

    fakeroot ${TOP_DIR}/device/rockchip/common/mkfs.ext4 -Fq -L "boot" -d $EXTBOOT_DIR $EXTBOOT_IMG

I am trying to build this config:
aio-3588q-BE45-A1-ubuntu.mk
Reply

Use props Report

49

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
49
Posted at 2/15/2023 15:12:55        Only Author  3#
Ok, I was able to get this working.  A couple points to help others if they run into similar issues:
- You need to build the firmware on an X86 machine.  At least for me, it seems that is currently the only supported architecture for prebuilt binaries and it was looking for linux-x86 folder
- You are best to build this using Ubuntu (I used Ubuntu-Jammy).  I originally tried to compile this on Arch-Linux but ran into issues like the one above.  It's possible/likely the dependency packages mentioned in the documentation are missing certain things and don't map 1-1 on non-Ubuntu or Debian based distro's
- You will probably hit some additional errors, but you can work through them by installing the missing packages that weren't listed in the docs. For me, I also had to install these packages bc flex bison
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list