blob: 7cffbf3cc1cbcb30287ea1750de3a73d1f9df658 [file] [log] [blame]
Shad Ansari2f7f9be2017-06-07 13:34:53 -07001#! /bin/bash
2
3#set -x
4
5HOST_FS_TARGET=${OUT_HOST_DIR}/fs
6HOST_OUTPUT_TARGET=${OUT_HOST_DIR}/output
7
8echo -n "Copying host fs to ${HOST_FS_TARGET}..."
9mkdir -p ${HOST_FS_TARGET}
10rm -fr ${HOST_FS_TARGET}/*
11pushd ${HOST_FS_TARGET}
12ln -s ${OUT_HOST_DIR}/linux_modules/* .
13ln -s ${TOP_DIR}/host_customized/board/wrx/fs/* .
14ln -s ${TOP_DIR}/embedded_binaries/* .
15ln -s ${OUT_HOST_DIR}/host_reference/user_appl/bcm_user_appl .
16popd
17
18echo -n "Copying all modules and libraries to ${HOST_OUTPUT_TARGET}..."
19mkdir -p ${HOST_OUTPUT_TARGET}
20rm -fr ${HOST_OUTPUT_TARGET}/*
21pushd ${HOST_OUTPUT_TARGET}
22ln -s ${OUT_HOST_DIR}/linux_modules/* .
23ln -s `find ${OUT_HOST_DIR} -name 'lib*.a'` .
24ln -s ${OUT_HOST_DIR}/host_reference/user_appl/bcm_user_appl .
25popd
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.
28grep -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
30echo "Done"
31