Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use find(1) insead of directly passing /tools/lib to strip(1). #68

Merged
merged 3 commits into from
Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/2-toolchain/34-Stripping_and_Ownership
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# of unneeded debugging symbols.

# Remove debug symbols with:
strip --strip-debug /tools/lib/*
find /tools/lib -type f -exec strip --strip-unneeded {} \;
/usr/bin/strip --strip-unneeded /tools/{,s}bin/*

# Remove the documentation:
Expand Down
18 changes: 8 additions & 10 deletions doc/3-Chroot/005-Kernel_Headers
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,18 @@ patch -Np1 -i ../patches/kernel/include-uapi-linux-swab-Fix-potentially-missing-
# For kernels 5.3.x and newer:
make headers

# There are also some hidden files used by the kernel
# developers and not needed by MLFS that are removed
# from the intermediate directory.
# Kernels up to 5.2.x:
# find dest/include \( -name .install -o -name ..install.cmd \) -exec rm -rvf {} \;

# Kernels 5.3.x and newer:
find usr/include -name '.*' -exec rm -rvf {} \;

# Install Headers
# Kernel up to 5.2.x:
# cp -rv dest/include/* /usr/include

# Kernels 5.2.x and newer:
cp -rv usr/include/* /usr/include
rm -v /usr/include/Makefile

# After installed, there still are also some hidden
# files used by the kernel developers (for what?)
# and not needed by MLFS that now can be removed
# from our /usr/include.
find /usr/include -name '.*' -exec rm -vf {} \;

# The Makefile present also won't be used
rm -v /usr/include/Makefile