Shad Ansari | 2f7f9be | 2017-06-07 13:34:53 -0700 | [diff] [blame] | 1 | #! /bin/bash |
| 2 | |
| 3 | #set -x |
| 4 | |
| 5 | HOST_FS_TARGET=${OUT_HOST_DIR}/fs |
| 6 | HOST_OUTPUT_TARGET=${OUT_HOST_DIR}/output |
| 7 | |
| 8 | echo -n "Copying host fs to ${HOST_FS_TARGET}..." |
| 9 | mkdir -p ${HOST_FS_TARGET} |
| 10 | rm -fr ${HOST_FS_TARGET}/* |
| 11 | pushd ${HOST_FS_TARGET} |
| 12 | ln -s ${OUT_HOST_DIR}/linux_modules/* . |
| 13 | ln -s ${TOP_DIR}/host_customized/board/wrx/fs/* . |
| 14 | ln -s ${TOP_DIR}/embedded_binaries/* . |
| 15 | ln -s ${OUT_HOST_DIR}/host_reference/user_appl/bcm_user_appl . |
| 16 | popd |
| 17 | |
| 18 | echo -n "Copying all modules and libraries to ${HOST_OUTPUT_TARGET}..." |
| 19 | mkdir -p ${HOST_OUTPUT_TARGET} |
| 20 | rm -fr ${HOST_OUTPUT_TARGET}/* |
| 21 | pushd ${HOST_OUTPUT_TARGET} |
| 22 | ln -s ${OUT_HOST_DIR}/linux_modules/* . |
| 23 | ln -s `find ${OUT_HOST_DIR} -name 'lib*.a'` . |
| 24 | ln -s ${OUT_HOST_DIR}/host_reference/user_appl/bcm_user_appl . |
| 25 | popd |
| 26 | |
| 27 | # Extract i2c addresses from bcmolt_i2c_devs_addr.h into the tail of a target file called i2c_addrs.sh. svk_init.sh will include i2c_addrs.sh to access i2c addresses. |
| 28 | grep -w "BCM_I2C_DEV_ADDR" ${TOP_DIR}/host_customized/i2c/bcmolt_i2c_devs_addr.h | sed -s "s/BCM_I2C_DEV_ADDR(\(.*\), \(.*\), 0x\(.*\))/\1=\3/" >> ${HOST_FS_TARGET}/i2c_addrs.sh |
| 29 | |
| 30 | echo "Done" |
| 31 | |