mirror of
https://github.com/femtofox/femtofox.git
synced 2026-11-25 09:26:28 -05:00
Merge pull request #328 from femtofox/OSC
Fixed compiler. Removed apt cleanout from build.
This commit is contained in:
commit
822485e6aa
2 changed files with 19 additions and 1 deletions
|
|
@ -100,6 +100,20 @@ sudo chage -d 0 femto
|
|||
usermod -a -G tty femto
|
||||
usermod -a -G dialout femto
|
||||
|
||||
# Ensure libgcc_s.so and libc_nonshared.a exist
|
||||
mkdir -p /usr/lib/gcc/arm-linux-gnueabihf/11/
|
||||
ln -sf /usr/lib/arm-linux-gnueabihf/libgcc_s.so.1 /usr/lib/gcc/arm-linux-gnueabihf/11/libgcc_s.so
|
||||
ln -sf /usr/lib/arm-linux-gnueabihf/libgcc_s.so.1 /lib/libgcc_s.so.1
|
||||
ln -sf /usr/lib/gcc/arm-linux-gnueabihf/11/libgcc_s.so /usr/lib/libgcc.so
|
||||
|
||||
# Add library paths
|
||||
echo "/usr/lib/gcc/arm-linux-gnueabihf/11" | tee -a /etc/ld.so.conf.d/gcc.conf
|
||||
ldconfig
|
||||
|
||||
# Back up libc_nonshared.a because build.sh removes it
|
||||
cp /usr/lib/arm-linux-gnueabihf/libc_nonshared.a /usr/lib/arm-linux-gnueabihf/libc_nonshared.a.keep
|
||||
|
||||
echo "Cleaning up chroot..."
|
||||
apt clean && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* && rm -rf /var/tmp/* && find /var/log -type f -exec truncate -s 0 {} + && : > /root/.bash_history && history -c
|
||||
rm -rf /tmp/* && rm -rf /var/tmp/* && find /var/log -type f -exec truncate -s 0 {} + && : > /root/.bash_history && history -c
|
||||
|
||||
exit
|
||||
|
|
|
|||
|
|
@ -99,6 +99,10 @@ else
|
|||
log_message "TERM, LANG and NCURSES_NO_UTF8_ACS already present in .bashrc, skipping"
|
||||
fi
|
||||
|
||||
# Fix Compiler
|
||||
log_message "Fixing Compiler."
|
||||
cp /usr/lib/arm-linux-gnueabihf/libc_nonshared.a.keep /usr/lib/arm-linux-gnueabihf/libc_nonshared.a
|
||||
|
||||
# Add a cheeky alias to .bash_aliases
|
||||
if ! grep -Fxq "alias sfc='sudo femto-config'" /home/femto/.bashrc; then # Check if the lines are already in .bash_aliases
|
||||
echo "alias sfc='sudo femto-config'" >> /home/femto/.bashrc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue