Merge pull request #134 from oremj/symlink_usr

Symlink /{bin,sbin,lib64} to /usr/.
This commit is contained in:
Michael Marineau 2013-11-22 19:04:57 -08:00
commit 8f44f49060
2 changed files with 16 additions and 1 deletions

View File

@ -169,9 +169,18 @@ create_base_image() {
# Locales and info pages # Locales and info pages
usr/share/{i18n,info,locale} usr/share/{i18n,info,locale}
) )
mkdir -p "${root_fs_dir}"/sbin "${root_fs_dir}"/lib64
lbzip2 -dc "${LIBC_PATH}" | \ lbzip2 -dc "${LIBC_PATH}" | \
sudo tar xpf - -C "${root_fs_dir}" ./usr/${CHOST} \ sudo tar xpf - -C "${root_fs_dir}" ./usr/${CHOST} \
--strip-components=3 "${libc_excludes[@]/#/--exclude=}" --strip-components=3 "${libc_excludes[@]/#/--exclude=}" \
--exclude=${CHOST}/sbin --exclude=${CHOST}/lib64
lbzip2 -dc "${LIBC_PATH}" | \
sudo tar xpf - -C "${root_fs_dir}"/lib64 ./usr/${CHOST}/lib64 \
--strip-components=4 "${libc_excludes[@]/#/--exclude=}"
lbzip2 -dc "${LIBC_PATH}" | \
sudo tar xpf - -C "${root_fs_dir}"/sbin ./usr/${CHOST}/sbin \
--strip-components=4 "${libc_excludes[@]/#/--exclude=}"
board_ctarget=$(get_ctarget_from_board "${BOARD}") board_ctarget=$(get_ctarget_from_board "${BOARD}")
for atom in $(portageq match / cross-$board_ctarget/gcc); do for atom in $(portageq match / cross-$board_ctarget/gcc); do

View File

@ -117,8 +117,14 @@ install_toolchain_in_board() {
if [ "${CHOST}" != "$FLAGS_toolchain" ] ; then if [ "${CHOST}" != "$FLAGS_toolchain" ] ; then
local libc_path="${PKGDIR}/cross-${FLAGS_toolchain}/${libc_tar}" local libc_path="${PKGDIR}/cross-${FLAGS_toolchain}/${libc_tar}"
cmds=( cmds=(
"mkdir -p '${BOARD_ROOT}/lib64' '${BOARD_ROOT}/sbin'"
"tar jxpf '${libc_path}' -C '${BOARD_ROOT}' --exclude=lib \ "tar jxpf '${libc_path}' -C '${BOARD_ROOT}' --exclude=lib \
--exclude=${FLAGS_toolchain}/lib64 --exclude=${FLAGS_toolchain}/sbin \
'./usr/${FLAGS_toolchain}' --strip-components=3" './usr/${FLAGS_toolchain}' --strip-components=3"
"tar jxpf '${libc_path}' -C '${BOARD_ROOT}/lib64' --exclude=lib \
'./usr/${FLAGS_toolchain}/lib64' --strip-components=4"
"tar jxpf '${libc_path}' -C '${BOARD_ROOT}/sbin' --exclude=lib \
'./usr/${FLAGS_toolchain}/sbin' --strip-components=4"
"mkdir -p '${BOARD_ROOT}/usr/lib/debug'" "mkdir -p '${BOARD_ROOT}/usr/lib/debug'"
"tar jxpf '${libc_path}' -C '${BOARD_ROOT}/usr/lib/debug' \ "tar jxpf '${libc_path}' -C '${BOARD_ROOT}/usr/lib/debug' \
'./usr/lib/debug/usr/${FLAGS_toolchain}' --strip-components=6 \ './usr/lib/debug/usr/${FLAGS_toolchain}' --strip-components=6 \