mtik_initrd_hacks/init/compile_for_arm.sh
Sergey Sergeev 1f9564198c Finally, support for 7.0b1 has been added.
Everything works ... tested on RB3011.
For the rest of the boards, maybe need to slightly correct the path to the /pub directory.
2019-09-12 00:55:18 +03:00

36 lines
1.4 KiB
Bash
Executable file

#!/bin/bash
#
#(C) Sergey Sergeev aka adron, 2019
#
#OPENWRT_DIR=/home/prog/openwrt/lede-all/2019-openwrt-all/LAST/openwrt
#export STAGING_DIR=$OPENWRT_DIR/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-9.2.0_glibc_eabi
#TOOLCHAIN_PREFIX="arm-openwrt-linux"
#OPENWRT_DIR=/home/prog/openwrt/lede-all/2019-openwrt-all/LAST/openwrt
#export STAGING_DIR=$OPENWRT_DIR/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-9.2.0_musl_eabi
#TOOLCHAIN_PREFIX="arm-openwrt-linux"
#OPENWRT_DIR=/home/prog/openwrt/lede-all/2019-openwrt-all/openwrt-ipq806x
#export STAGING_DIR=$OPENWRT_DIR/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-7.4.0_musl_eabi
#TOOLCHAIN_PREFIX=arm-openwrt-linux
#OPENWRT_DIR=/home/prog/openwrt/lede-all/2019-openwrt-all/openwrt-ipq4xxx
#export STAGING_DIR=${OPENWRT_DIR}/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-7.4.0_musl_eabi
GCC=$STAGING_DIR/bin/${TOOLCHAIN_PREFIX}-gcc
OD=$STAGING_DIR/bin/${TOOLCHAIN_PREFIX}-objdump
OC=$STAGING_DIR/bin/${TOOLCHAIN_PREFIX}-objcopy
LD=$STAGING_DIR/bin/${TOOLCHAIN_PREFIX}-ld
#for 7.0rc1 we need gcc with soft-float ONLY!
#apt-get install gcc-arm-linux-gnueabi
#$GCC -static ./init.c -o ../cpio-fs/init
#$GCC -static ./init.c -o ../cpio-fs/init
arm-linux-gnueabi-gcc -static ./init.c -o ../cpio-fs/init
arm-linux-gnueabi-objcopy --strip-all ../cpio-fs/init ../cpio-fs/init
#$OC --strip-all ../cpio-fs/init ../cpio-fs/init
#exit 0
cd ../
./pack-kernel.sh
./ftp_upload.sh