update stripping and update rootfs.txt
This commit is contained in:
1 parent
eb538f5ff4
commit
0607b2d222
6 files changed
+12
-11
No files matched your search
@@ -14,6 +14,7 @@ opt
|
|||||||
proc
|
proc
|
||||||
root
|
root
|
||||||
srv
|
srv
|
||||||
|
srv/ftp
|
||||||
sys
|
sys
|
||||||
usr
|
usr
|
||||||
usr/bin
|
usr/bin
|
||||||
|
|||||||
@@ -13,11 +13,11 @@
|
|||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
build)
|
build)
|
||||||
# rootfs
|
rootfs
|
||||||
if [ "$image_usable_enable" = "true" ]; then
|
if [ "$image_usable_enable" = "true" ]; then
|
||||||
sdroot_usable
|
sdroot_usable
|
||||||
fi
|
fi
|
||||||
# sdroot
|
sdroot
|
||||||
# kernel_with_rootfs
|
# kernel_with_rootfs
|
||||||
# uboot
|
# uboot
|
||||||
# busybox_rootfs
|
# busybox_rootfs
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ dropbear() {
|
|||||||
make DESTDIR=$rootfspath install
|
make DESTDIR=$rootfspath install
|
||||||
check $? "Installing to rootfs dropbear"
|
check $? "Installing to rootfs dropbear"
|
||||||
rm -rv $rootfspath/usr/include $rootfspath/usr/share/man $rootfspath/usr/lib/{pkgconfig,libz.a}
|
rm -rv $rootfspath/usr/include $rootfspath/usr/share/man $rootfspath/usr/lib/{pkgconfig,libz.a}
|
||||||
${CROSS_COMPILE}-strip $rootfspath/usr/bin/*
|
${CROSS_COMPILE}-strip --strip-unneeded $rootfspath/usr/bin/*
|
||||||
mkdir -pv $build/rootfs/etc/dropbear
|
mkdir -pv $build/rootfs/etc/dropbear
|
||||||
# check $? "Installing to rootfs zlib"
|
# check $? "Installing to rootfs zlib"
|
||||||
}
|
}
|
||||||
+6
-6
@@ -24,12 +24,12 @@ sdroot() {
|
|||||||
uboot
|
uboot
|
||||||
printf "$GREEN** Creating rootfs.ext4\n$RESET"
|
printf "$GREEN** Creating rootfs.ext4\n$RESET"
|
||||||
cd $out
|
cd $out
|
||||||
rawsdrootsize=$(du -sh $sdroot)
|
rawsdrootsize=$(du -s $sdroot)
|
||||||
echo $rawsdrootsize
|
echo $rawsdrootsize
|
||||||
sdrootsize=(${rawsdrootsize//./ })
|
sdrootsize=(${rawsdrootsize// / })
|
||||||
echo $sdrootsize
|
echo $sdrootsize
|
||||||
echo $(($sdrootsize+2))
|
echo $(($sdrootsize+2))
|
||||||
dd if=/dev/zero of=rootfs.ext4 bs=1M count=$(($sdrootsize+3))
|
dd if=/dev/zero of=rootfs.ext4 bs=1K count=$(($sdrootsize+3000))
|
||||||
check $? "Write zero rootfs.ext4"
|
check $? "Write zero rootfs.ext4"
|
||||||
mkfs.ext4 rootfs.ext4
|
mkfs.ext4 rootfs.ext4
|
||||||
check $? "Creating ext4 filesystem"
|
check $? "Creating ext4 filesystem"
|
||||||
@@ -73,12 +73,12 @@ sdroot_usable() {
|
|||||||
uboot
|
uboot
|
||||||
printf "$GREEN** Creating rootfs.ext4\n$RESET"
|
printf "$GREEN** Creating rootfs.ext4\n$RESET"
|
||||||
cd $out
|
cd $out
|
||||||
rawsdrootsize=$(du -sh $sdroot)
|
rawsdrootsize=$(du -s $sdroot)
|
||||||
echo $rawsdrootsize
|
echo $rawsdrootsize
|
||||||
sdrootsize=(${rawsdrootsize//M/ })
|
sdrootsize=(${rawsdrootsize// / })
|
||||||
echo $sdrootsize
|
echo $sdrootsize
|
||||||
echo $(($sdrootsize+2))
|
echo $(($sdrootsize+2))
|
||||||
dd if=/dev/zero of=rootfs.ext4 bs=1M count=$(($sdrootsize+3))
|
dd if=/dev/zero of=rootfs.ext4 bs=1K count=$(($sdrootsize+3000))
|
||||||
check $? "Write zero rootfs.ext4"
|
check $? "Write zero rootfs.ext4"
|
||||||
mkfs.ext4 rootfs.ext4
|
mkfs.ext4 rootfs.ext4
|
||||||
check $? "Creating ext4 filesystem"
|
check $? "Creating ext4 filesystem"
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ uclibc() {
|
|||||||
find -name \*.a -delete # &>> $fulllogfile
|
find -name \*.a -delete # &>> $fulllogfile
|
||||||
find -name \*.o -delete
|
find -name \*.o -delete
|
||||||
rm -v $rootfspath/usr/lib/libc.so
|
rm -v $rootfspath/usr/lib/libc.so
|
||||||
${CROSS_COMPILE}-strip --strip-unneeded $rootfspath/usr/lib/* $rootfspath/usr/bin/* # &>> $fulllogfile
|
${CROSS_COMPILE}-strip --strip-unneeded $rootfspath/usr/lib/* $rootfspath/usr/bin/* # &>> $fulllogfile $rootfspath/usr/lib/*
|
||||||
rm -rv $rootfspath/usr/include
|
rm -rv $rootfspath/usr/include
|
||||||
cd $root
|
cd $root
|
||||||
check $? "Build and install uclibc"
|
check $? "Build and install uclibc"
|
||||||
|
|||||||
+1
-1
@@ -17,6 +17,6 @@ zlib() {
|
|||||||
check $? "Build zlib"
|
check $? "Build zlib"
|
||||||
make DESTDIR=$rootfspath install
|
make DESTDIR=$rootfspath install
|
||||||
rm -rv $rootfspath/usr/include $rootfspath/usr/share/man $rootfspath/usr/lib/{pkgconfig,libz.a}
|
rm -rv $rootfspath/usr/include $rootfspath/usr/share/man $rootfspath/usr/lib/{pkgconfig,libz.a}
|
||||||
${CROSS_COMPILE}-strip $rootfspath/usr/lib/libz.so.1.3.1
|
${CROSS_COMPILE}-strip --strip-unneeded $rootfspath/usr/lib/libz.so.1.3.1
|
||||||
check $? "Installing to rootfs zlib"
|
check $? "Installing to rootfs zlib"
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user