%files
%{hal_rootstrap_install_path}/etc/*
+%{hal_rootstrap_install_path}/lib/*
%{hal_rootstrap_install_path}/%{_lib}/*
%{hal_rootstrap_install_path}/usr/share/*
%{hal_rootstrap_install_path}/%{_libdir}/*
<rpm accept="glibc-locale" arch="armv7l"/>
<rpm accept="glibc-profile" arch="armv7l"/>
</target>
+
<necessary>
<file>/etc/ld.so.conf</file>
<file>/lib/ld-2.30.so</file>
- <file>/lib/ld-linux.so.3</file>
- <file>/lib/ld-linux-aarch64.so.1</file>
<file>/lib/libanl-2.30.so</file>
<file>/lib/libanl.so.1</file>
<file>/lib/libBrokenLocale-2.30.so</file>
<file>/lib/libthread_db.so.1</file>
<file>/lib/libutil-2.30.so</file>
<file>/lib/libutil.so.1</file>
- <file>/lib/ld-linux-aarch64.so.1</file>
<file>/usr/include/aio.h</file>
<file>/usr/include/aliases.h</file>
<file>/usr/include/alloca.h</file>
<file>/usr/include/glob.h</file>
<file>/usr/include/gnu/libc-version.h</file>
<file>/usr/include/gnu/lib-names.h</file>
- <file>/usr/include/gnu/lib-names-soft.h</file>
- <file>/usr/include/gnu/lib-names-lp64.h</file>
<file>/usr/include/gnu/stubs.h</file>
- <file>/usr/include/gnu/stubs-soft.h</file>
- <file>/usr/include/gnu/stubs-lp64.h</file>
<file>/usr/include/gnu-versions.h</file>
<file>/usr/include/grp.h</file>
<file>/usr/include/gshadow.h</file>
<file>/usr/include/sys/fsuid.h</file>
<file>/usr/include/sys/gmon.h</file>
<file>/usr/include/sys/gmon_out.h</file>
- <file>/usr/include/sys/ifunc.h</file>
<file>/usr/include/sys/inotify.h</file>
<file>/usr/include/sys/ioctl.h</file>
<file>/usr/include/sys/ipc.h</file>
<file>/usr/lib/libutil.so</file>
<file>/usr/lib/Mcrt1.o</file>
<file>/usr/lib/Scrt1.o</file>
+
+ <file_32>/lib/ld-linux.so.3</file_32>
+ <file_32>/usr/include/gnu/lib-names-soft.h</file_32>
+ <file_32>/usr/include/gnu/stubs-soft.h</file_32>
+
+ <file_64>/lib64/ld-linux-aarch64.so.1</file_64>
+ <file_64>/lib/ld-linux-aarch64.so.1</file_64>
+ <file_64>/usr/include/gnu/lib-names-lp64.h</file_64>
+ <file_64>/usr/include/gnu/stubs-lp64.h</file_64>
+ <file_64>/usr/include/sys/ifunc.h$</file_64>
</necessary>
+
<unnecessary>
</unnecessary>
<include_path>/usr/include</include_path>
<file>/usr/lib/libgthread-2.0.so</file>
<file>/usr/lib/libgthread-2.0.so.0</file>
<file>/usr/lib/libgthread-2.0.so.0.7800.4</file>
- <file>/usr/share/gdb/auto-load/usr/lib/libglib-2.0.so.0.7800.4-gdb.py</file>
- <file>/usr/share/gdb/auto-load/usr/lib/libgobject-2.0.so.0.7800.4-gdb.py</file>
+
+ <file_32>/usr/share/gdb/auto-load/usr/lib/libglib-2.0.so.0.7800.4-gdb.py</file_32>
+ <file_32>/usr/share/gdb/auto-load/usr/lib/libgobject-2.0.so.0.7800.4-gdb.py</file_32>
+
+ <file_64>/usr/share/gdb/auto-load/usr/lib64/libglib-2.0.so.0.7800.4-gdb.py</file_64>
+ <file_64>/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.7800.4-gdb.py</file_64>
</necessary>
<include_path>/usr/include/gio-unix-2.0</include_path>
-exec xmlstarlet ed -L -u //rootstrap/target/rpm/@arch -v "armv7l" {} \; \
-exec xmlstarlet ed -L -u //rootstrap/library_path -v "/usr/lib" {} \; \
-exec sed -i "s@<file>/usr/lib64/@<file>/usr/lib/@" {} \; \
--exec sed -i "s@<file>/usr/share/gdb/auto-load/usr/lib64/@<file>/usr/share/gdb/auto-load/usr/lib/@" {} \; \
-exec sed -i "s@<file>/lib64/@<file>/lib32/@" {} \; \
-exec sed -i "s@<include_path>/usr/lib64/@<include_path>/usr/lib32/@" {} \;
-exec xmlstarlet ed -L -u //rootstrap/target/rpm/@arch -v "aarch64" {} \; \
-exec xmlstarlet ed -L -u //rootstrap/library_path -v "/usr/lib64" {} \; \
-exec sed -i "s@<file>/usr/lib/@<file>/usr/lib64/@" {} \; \
--exec sed -i "s@<file>/usr/share/gdb/auto-load/usr/lib/@<file>/usr/share/gdb/auto-load/usr/lib64/@" {} \; \
-exec sed -i "s@<file>/lib/@<file>/lib64/@" {} \; \
-exec sed -i "s@<include_path>/usr/lib/@<include_path>/usr/lib64/@" {} \;
# Post Script
#git checkout ./make_rootstrap_64.sh
#sed -i "s/asm-arm/asm-arm64/g" make_rootstrap_64.sh
-sed -i "s/asm-x86/asm-ia64/g" make_rootstrap_64.sh
+#sed -i "s/asm-x86/asm-ia64/g" make_rootstrap_64.sh
#git checkout ./script/rootstrap_gen_1.0_64.sh
#POSTLINKER_PATH=${PWD_BACKUP}"/script/postlinker"
local dest_dir=$2
local xml_file=$3
local copy_error=0
- local files=()
local dest_path=""
+ local -a files
+ local -a necessary_files
log "***************** $FUNCNAME *****************"
ALL=$(xmlstarlet sel -t -m "//necessary[count(file)=1]" -v "./file/text()" ${xml_file})
return 1
else
log "+ copy necessary files .."
- for i in $(xmlstarlet sel -t -m "//necessary/file" -o "." -v "text()" -o " " -n ${xml_file}); do
+ necessary_files=($(xmlstarlet sel -t -m "//necessary/file" -o "." -v "text()" -o " " -n ${xml_file}))
+ necessary_files+=($(xmlstarlet sel -t -m "//necessary/file_32" -o "." -v "text()" -o " " -n ${xml_file}))
+ for i in ${necessary_files[@]}; do
cd ${src_dir}
log "+ copy file from [${i}]"
files=($(ls ${i}))
local dest_dir=$2
local xml_file=$3
local copy_error=0
- local files=()
local dest_path=""
+ local -a files
+ local -a necessary_files
log "***************** $FUNCNAME *****************"
ALL=$(xmlstarlet sel -t -m "//necessary[count(file)=1]" -v "./file/text()" ${xml_file})
return 1
else
log "+ copy necessary files .."
- for i in $(xmlstarlet sel -t -m "//necessary/file" -o "." -v "text()" -o " " -n ${xml_file}); do
+ necessary_files=($(xmlstarlet sel -t -m "//necessary/file" -o "." -v "text()" -o " " -n ${xml_file}))
+ necessary_files+=($(xmlstarlet sel -t -m "//necessary/file_64" -o "." -v "text()" -o " " -n ${xml_file}))
+ for i in ${necessary_files[@]}; do
cd ${src_dir}
log "+ copy file from [${i}]"
files=($(ls ${i}))