Skip to content

Commit

Permalink
DLPX-83122 Add arm support to recovery-environment package (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcd1193182 authored Sep 22, 2022
1 parent baf78c5 commit cc70302
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion scripts/recovery_sync
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ for fmt in $(find /etc/ssh -name \*key | sed 's/.*host_\(.*\)_key/\1/'); do
#
cp "/etc/ssh/ssh_host_${fmt}_key" tmp.key
ssh-keygen -p -f tmp.key -N '' -P '' -m PEM
LD_LIBRARY_PATH="./usr/lib/x86_64-linux-gnu" ./usr/lib/dropbear/dropbearconvert \
arch_triple="$(dpkg-architecture -q DEB_HOST_MULTIARCH)"
LD_LIBRARY_PATH="./usr/lib/$arch_triple" ./usr/lib/dropbear/dropbearconvert \
openssh dropbear tmp.key "etc/dropbear/dropbear_${fmt}_host_key"
rm tmp.key
done
Expand Down
9 changes: 6 additions & 3 deletions scripts/stage1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,16 @@ done
ln -rs "$img/bin/busybox" "$img/bin/sh"
ln -rs "$img/bin/sh" "$img/bin/bash"

rsync -aKL "$workdir/lib64/ld-linux-x86-64.so.2" "$img/lib64/"
loader_path="$(readelf -l /bin/ls | grep 'Requesting' | cut -d':' -f2 | tr -d ' ]')"
arch_triple="$(dpkg-architecture -q DEB_HOST_MULTIARCH)"

rsync -aKL "$workdir/$loader_path" "$img/$(dirname $loader_path)"
mkdir -p "$img/usr/share/nginx"
rsync -aKL "$workdir/usr/share/nginx/modules" "$img/usr/share/nginx/"
rsync -aKL "$workdir/etc/nginx" "$img/etc/"
rm "$img/etc/nginx/nginx.conf"
mkdir -p "$img/lib/x86_64-linux-gnu/"
rsync -aKL "$workdir"/lib/x86_64-linux-gnu/libnss* "$img/lib/x86_64-linux-gnu/"
mkdir -p "$img/lib/$arch_triple/"
rsync -aKL "$workdir/lib/$arch_triple"/libnss* "$img/lib/$arch_triple/"
rsync -aK "$workdir/lib/modprobe.d" "$img/lib/"

mkdir -p "$img"/etc/{systemd/network,network,dhcp}
Expand Down

0 comments on commit cc70302

Please sign in to comment.