Thank You for your continued support and contributions!
rockbox_build: image: debian container_name: rockbox_build entrypoint: /bin/bash command: "-c 'while true; do sleep 60; done'" volumes: - ${docker_config_path}/rockbox_build:/config restart: unless-stopped
docker exec -it rockbox_build bash
#!/usr/bin/env bashgithub_user_name="rockbox"github_repo_name="rockbox"#target="ipod6g"arm_targets=("ipodvideo" "ipod6g")rockbox_dir="/config/rockbox"build_dir="${rockbox_dir}/build"cd /config || exitinstall_dependencies(){ apt update apt-get install -y \ build-essential \ git \ perl \ curl \ texinfo \ flex \ bison \ bzip2 \ gzip \ zip \ patch \ automake \ libtool \ libtool-bin \ autoconf \ libmpc-dev \ gawk \ python3 \ python3-lzo \ python3-setuptools \ mtd-utils \ xorriso \ wget \ subversion \ libncurses5-dev \ texlive-latex-base \ texlive-binaries \ texlive-latex-extra \ tex4ht \ texlive-fonts-recommended \ lmodern \ texlive-base \ libsdl1.2-dev \ libsdl1.2debian #latex-xcolor \}update_git_repo(){ if [[ ! -d "$rockbox_dir" ]] then git clone "https://github.com/${github_user_name}/${github_repo_name}.git" else cd "$rockbox_dir" || exit #git pull origin master git remote update if git status | grep -q 'Your branch is behind' then git pull origin master cd /config || exit fi fi}check_gcc_version(){ if ! command -v arm-elf-eabi-gcc >/dev/null || ! arm-elf-eabi-gcc -v 2>&1 | grep -q 'version 4.9.4'; then return 1; fi}initialise_toolchain(){ cd "$rockbox_dir" || exit #shellcheck disable=SC2016 sed -i 's/tool="$tool -fLo "/tool="$tool -fLko "/' ./tools/rockboxdev.sh ## patch curl to allow invalid certs #shellcheck disable=SC2016 sed -i 's/tool="$tool-T 60 -O "/tool="$tool --no-check-certificate -T 60 -O "/' ./tools/rockboxdev.sh ## patch wget to allow invalid certs mkdir -p "$rockbox_cross_compiler_dir" ./tools/rockboxdev.sh --target="a" "--prefix=$rockbox_cross_compiler_dir"}verify_toolchain(){ ## Check if the cross compilation binary exists, and if it is the right version. ## The rbclient docker image supplies the older version of 4.4.4 instead of 4.9.4 ## 1) Check if the image has the right version (with default PATH) ## 2) Check if we have previously compiled the toolchain to a dir ## 3) Finally, compile the toolchain if necessary. if ! check_gcc_version then rockbox_cross_compiler_dir="/config/toolchain" export PATH="${rockbox_cross_compiler_dir}/bin:$PATH" if ! check_gcc_version then initialise_toolchain fi fi}build_rockbox(){ target="$1" mkdir -p "$build_dir" && cd "$build_dir" || exit ## Build rockbox ../tools/configure --target="$target" --type="n" make clean make -j"$(nproc)" ## Make the zip zip_name="rockbox-full.zip" make fullzip custom_zip_name="$(basename "$zip_name" .zip)-$target-$github_user_name-$(date +'%Y%m%d').zip" cp "$zip_name" "/config/$custom_zip_name"}build_bootloader(){ target="$1" mkdir -p "$build_dir" && cd "$build_dir" || exit ## Make the bootloader ../tools/configure --target="$target" --type="b" make clean make -j"$(nproc)" cp "bootloader-$target.ipod" "/config/bootloader-$target-$github_user_name-$(date +'%Y%m%d').ipod"}install_dependenciesupdate_git_repoverify_toolchainfor build_target in "${arm_targets[@]}"do build_rockbox "$build_target" build_bootloader "$build_target"done
I made the greadlink changes myself and then gave up when I patched everything and realised as chris said, that the cross compilation fails. I went down the rabbit hole and tried different compilers but eventually got out of my depth.
Quote from: rockbox_dev123 on September 27, 2023, 02:47:05 PMI made the greadlink changes myself and then gave up when I patched everything and realised as chris said, that the cross compilation fails. I went down the rabbit hole and tried different compilers but eventually got out of my depth.I have a toolchain bump to GCC 8.5 sitting in gerrit, that should have a better shot of successfully building on MacOS. (I've been holding it off until we get the 4.0 release out)(See https://gerrit.rockbox.org/r/c/rockbox/+/4676 )
$ git clone https://gerrit.rockbox.org/r/rockbox $ cd rockbox/$ git fetch https://gerrit.rockbox.org/r/rockbox refs/changes/76/4676/34 && git checkout -b change-4676 FETCH_HEAD$ sed -i '' 's/readlink/greadlink/g' tools/rockboxdev.sh
- build "binutils" "arm-elf-eabi" "2.37" "" "$binopts --disable-werror" "isl"+ build "binutils" "arm-elf-eabi" "2.37" "" "$binopts --disable-werror" "gmp isl"
checking dependency style of g++... /bin/sh ../../gcc-8.5.0/gcc/../move-if-change tmp-mlib.h multilib.hecho timestamp > s-mlibUndefined symbols for architecture arm64: "_arm_abi", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_arch3m", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_arch4", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_arch5", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_arch5e", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_arch6", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_arch6k", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_arch6m", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_arch7", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_arch7em", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_arch8", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_arch_arm_hwdiv", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_arch_iwmmxt", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_arch_lpae", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_arch_notm", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_arch_thumb2", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_base_arch", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_disable_literal_pool", referenced from: ___cxx_global_var_init in gencondmd.o "_arm_restrict_it", referenced from: ___cxx_global_var_init in gencondmd.o "_flag_pic", referenced from: ___cxx_global_var_init in gencondmd.o "_operands", referenced from: ___cxx_global_var_init in gencondmd.o "_optimize_size", referenced from: ___cxx_global_var_init in gencondmd.o "_reload_completed", referenced from: ___cxx_global_var_init in gencondmd.o "_reload_in_progress", referenced from: ___cxx_global_var_init in gencondmd.o "_target_flags", referenced from: ___cxx_global_var_init in gencondmd.o "_this_target_rtl", referenced from: ___cxx_global_var_init in gencondmd.o "_unaligned_access", referenced from: ___cxx_global_var_init in gencondmd.o "_use_cmse", referenced from: ___cxx_global_var_init in gencondmd.old: symbol(s) not found for architecture arm64clang: error: linker command failed with exit code 1 (use -v to see invocation)gmake[2]: *** [Makefile:2870: build/gencondmd] Error 1
EDIT: I believe gcc would need to be updated to at least 11 to have arm64-apple-darwin support.
Page created in 0.071 seconds with 21 queries.