ntfs-3g support
parent
73bb56a76e
commit
3cc0f47ede
|
|
@ -1,14 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Automatically determine the architecture we're building on:
|
|
||||||
if [ -z "$MYARCH" ]; then
|
|
||||||
case "$( uname -m )" in
|
|
||||||
i?86) export MYARCH=i486 ;;
|
|
||||||
arm*) export MYARCH=arm ;;
|
|
||||||
# Unless $MYARCH is already set, use uname -m for all other archs:
|
|
||||||
*) export MYARCH=$( uname -m ) ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
ln busybox-$MYARCH ./busybox
|
|
||||||
chmod a+x ./busybox
|
|
||||||
|
|
@ -35,13 +35,14 @@ copy_including_deps()
|
||||||
rm -Rf $INITRAMFS
|
rm -Rf $INITRAMFS
|
||||||
mkdir -p $INITRAMFS/{bin,dev,etc,lib,lib64,mnt,proc,root,run,sbin,sys,tmp,usr,var/log}
|
mkdir -p $INITRAMFS/{bin,dev,etc,lib,lib64,mnt,proc,root,run,sbin,sys,tmp,usr,var/log}
|
||||||
|
|
||||||
rm busybox/busybox
|
cd static
|
||||||
cd busybox
|
|
||||||
./update
|
./update
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
cp busybox/busybox $INITRAMFS/bin
|
cp static/{busybox,mount.ntfs-3g} $INITRAMFS/bin
|
||||||
busybox/busybox | grep , | grep -v Copyright | tr "," " " | while read LINE; do
|
chmod a+x $INITRAMFS/bin/{busybox,mount.ntfs-3g}
|
||||||
|
|
||||||
|
$INITRAMFS/bin/busybox | grep , | grep -v Copyright | tr "," " " | while read LINE; do
|
||||||
for TOOL in $LINE; do
|
for TOOL in $LINE; do
|
||||||
ln -s busybox $INITRAMFS/bin/$TOOL
|
ln -s busybox $INITRAMFS/bin/$TOOL
|
||||||
ln -s ../bin/busybox $INITRAMFS/sbin/$TOOL
|
ln -s ../bin/busybox $INITRAMFS/sbin/$TOOL
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# How to rebuild these static binaries:
|
||||||
|
# - using buildroot scripts <buildroot.uclibc.org>
|
||||||
|
# - unpack buildroot in /usr/src
|
||||||
|
# - copy busybox config (generated by busybox bbconfig) to /usr/src/buildroot-source/package/busybox/busybox-1.20.x.config
|
||||||
|
# - cd /usr/src/buildroot-sources
|
||||||
|
# - make menuconfig
|
||||||
|
# - configure buildroot to compile static libraries, set target processor architecture, and so on
|
||||||
|
# - some manual tweaking is necessary so buildroot properly compiles ntfs-3g driver, sorry
|
||||||
|
# - make
|
||||||
|
# - find static binaries in /usr/src/buildroot-sources/output/target/bin/ etc
|
||||||
|
#
|
||||||
|
|
||||||
|
# Automatically determine the architecture we're building on:
|
||||||
|
if [ -z "$MYARCH" ]; then
|
||||||
|
case "$( uname -m )" in
|
||||||
|
i?86) export MYARCH=i486 ;;
|
||||||
|
arm*) export MYARCH=arm ;;
|
||||||
|
# Unless $MYARCH is already set, use uname -m for all other archs:
|
||||||
|
*) export MYARCH=$( uname -m ) ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
ln -f busybox-$MYARCH ./busybox
|
||||||
|
ln -f mount.ntfs-3g-$MYARCH ./ntfs-3g
|
||||||
|
|
@ -218,9 +218,8 @@ device_bestfs()
|
||||||
PEEK="$(dd if="$1" bs=1k count=1 2>/dev/null | strings)"
|
PEEK="$(dd if="$1" bs=1k count=1 2>/dev/null | strings)"
|
||||||
if [ "$(echo "$PEEK" | egrep -i "FAT[13][26]")" != "" ]; then
|
if [ "$(echo "$PEEK" | egrep -i "FAT[13][26]")" != "" ]; then
|
||||||
echo "-t vfat"
|
echo "-t vfat"
|
||||||
# TODO: this will work only with fuse
|
else if [ "$(echo "$PEEK" | egrep -i 'NTFS')" != "" ]; then
|
||||||
# else if [ "$(echo "$PEEK" | egrep -i 'NTFS')" != "" ]; then
|
echo "-t ntfs-3g"
|
||||||
# echo "-t ntfs-3g"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -265,7 +264,7 @@ find_data()
|
||||||
DATA="$(find_data_try "$2")"
|
DATA="$(find_data_try "$2")"
|
||||||
if [ "$DATA" != "" ]; then
|
if [ "$DATA" != "" ]; then
|
||||||
echo "" >&2
|
echo "" >&2
|
||||||
echo "- found in $(mounted_device "$DATA")" >&2
|
echo "* found in $(mounted_device "$DATA")" >&2
|
||||||
echo "$DATA"
|
echo "$DATA"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
@ -291,7 +290,7 @@ union_append_bundles()
|
||||||
echo_green_star
|
echo_green_star
|
||||||
echo "Adding bundles to union"
|
echo "Adding bundles to union"
|
||||||
ls -1 "$1" | grep '.'$BEXT'$' | sort | while read BUNDLE; do
|
ls -1 "$1" | grep '.'$BEXT'$' | sort | while read BUNDLE; do
|
||||||
echo "- $BUNDLE"
|
echo "* $BUNDLE"
|
||||||
mkdir -p "$2/$BUNDLE"
|
mkdir -p "$2/$BUNDLE"
|
||||||
mount -o loop -t squashfs "$1/$BUNDLE" "$2/$BUNDLE"
|
mount -o loop -t squashfs "$1/$BUNDLE" "$2/$BUNDLE"
|
||||||
mount -o remount,add:1:"$2/$BUNDLE" none "$3"
|
mount -o remount,add:1:"$2/$BUNDLE" none "$3"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue