Posted by: Wildan Maulana | July 10, 2007

[Draft]Build ngw100 kernel with loop-aes and chipper support

Update :

util-linux : already tested, 100% success
loop-aes : not yet tested

/lib/modules/2.6.18-at1 # modprobe vfat
modprobe: could not parse modules.dep
Clue : http://busybox.net/lists/busybox/2004-April/011222.html

Workaround :

depmod.pl : [FALSE, microperl can’t compile this script] http://www.uclibc.org/cgi-bin/viewcvs.cgi/trunk/busybox/examples/depmod.pl?rev=15581&view=auto
MicroPerl:
http://www.foo.be/docs/tpj/issues/vol5_3/tpj0503-0003.html

Sol :
make ARCH=avr32 CROSS_COMPILE=avr32-linux- INSTALL_MOD_PATH=/nfs modules_install

above command will make module.dep for us …


Please make sure to configure kernel with the following options :

  1. CONFIG_MODULES=y
  2. CONFIG_BLK_DEV_LOOP=v
  3. CONFIG_KMOD=y

root@elekta:/home/wildan# apt-get install module-assistant
root@elekta:/home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a# wget -c http://loop-aes.sourceforge.net/loop-AES-latest.tar.bz2#export LINUX_SOURCE=/home/wildan/netherland-project/kernel-ngw100/linux/linux-2.6.18root@elekta:/home/wildan/netherland-project/kernel-ngw100/linux/linux-2.6.18# cp .config-old .config
root@elekta:/home/wildan/netherland-project/kernel-ngw100/linux/linux-2.6.18# make ARCH=avr32 CROSS_COMPILE=avr32-linux- prepare
#make ARCH=avr32 CROSS_COMPILE=avr32-linux-root@elekta:/home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a# make ARCH=avr32 CROSS_COMPILE=avr32-linux- EXTRA_CIPHERS=y
rm -r -f *.ko tmp-d-kbuild
mkdir tmp-d-kbuild
echo ‘obj-m:=’ >>tmp-d-kbuild/Makefile
cd tmp-d-kbuild && ln -s ../loop.c-2.6.patched patched-loop.c && ln -s ../glue.c ../aes.h ../md5.h .
echo ‘obj-m += loop.o’ >>tmp-d-kbuild/Makefile
cd tmp-d-kbuild && ln -s ../aes.c ../md5.c .
echo ‘loop-y:=patched-loop.o glue.o aes.o md5.o’ >>tmp-d-kbuild/Makefile
echo ‘CFLAGS_aes.o := -DDATA_ALWAYS_ALIGNED=1’ >>tmp-d-kbuild/Makefile
cd tmp-d-kbuild && ln -s ../loop_twofish.c ../loop_serpent.c ../loop_blowfish.c .
echo ‘obj-m += loop_twofish.o loop_serpent.o loop_blowfish.o’ >>tmp-d-kbuild/Makefile
echo ‘EXTRA_CFLAGS:= -DOLD_INVALIDATE_BDEV_INTERFACE’ >>tmp-d-kbuild/Makefile
cd /home/wildan/netherland-project/kernel-ngw100/linux/linux-2.6.18 && make SUBDIRS=/home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild modules
make[1]: Entering directory `/home/wildan/netherland-project/kernel-ngw100/linux/linux-2.6.18′
CC [M] /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/patched-loop.o
/home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/patched-loop.c: In function ‘loop_thread’:
/home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/patched-loop.c:966: warning: ‘x’ may be used uninitialized in this function
CC [M] /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/glue.o
CC [M] /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/aes.o
CC [M] /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/md5.o
LD [M] /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop.o
CC [M] /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop_twofish.o
CC [M] /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop_serpent.o
CC [M] /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop_blowfish.o
Building modules, stage 2.
MODPOST
WARNING: /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop: ‘loop_unregister_transfer’ exported twice. Previous export was in vmlinux
WARNING: /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop: ‘loop_register_transfer’ exported twice. Previous export was in vmlinux
CC /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop.mod.o
LD [M] /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop.ko
CC /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop_blowfish.mod.o
LD [M] /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop_blowfish.ko
CC /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop_serpent.mod.o
LD [M] /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop_serpent.ko
CC /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop_twofish.mod.o
LD [M] /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop_twofish.ko
make[1]: Leaving directory `/home/wildan/netherland-project/kernel-ngw100/linux/linux-2.6.18′
cd /home/wildan/netherland-project/kernel-ngw100/linux/linux-2.6.18 && make SUBDIRS=/home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild modules_install
make[1]: Entering directory `/home/wildan/netherland-project/kernel-ngw100/linux/linux-2.6.18′
INSTALL /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop.ko
INSTALL /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop_blowfish.ko
INSTALL /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop_serpent.ko
INSTALL /home/wildan/netherland-project/encryption/loop-aes/loop-AES-v3.2a/tmp-d-kbuild/loop_twofish.ko
DEPMOD 2.6.18-at0
make[1]: Leaving directory `/home/wildan/netherland-project/kernel-ngw100/linux/linux-2.6.18′
ln -s tmp-d-kbuild/loop.ko .
ln -s tmp-d-kbuild/loop_twofish.ko tmp-d-kbuild/loop_serpent.ko tmp-d-kbuild/loop_blowfish.ko .
sync

Building new mount, umount, losetup, swapon and swapoff

root@elekta:/home/wildan/netherland-project/encryption/util-linux# wget -c ftp://ftp.kernel.org/pub/linux/utils/util-linux/util-linux-2.12r.tar.gz

root@elekta:/home/wildan/netherland-project/encryption/util-linux# tar -xvvzf util-linux-2.12r.tar.gz

root@elekta:/home/wildan/netherland-project/encryption/util-linux# cd util-linux-2.12r
root@elekta:/home/wildan/netherland-project/encryption/util-linux/util-linux-2.12r# root@elekta:/home/wildan/netherland-project/encryption/util-linux/util-linux-2.12r# patch -p1 < ../../loop-aes/loop-AES-v3.2a/util-linux-2.12r.diff
patching file mount/Makefile
patching file mount/aes.c
patching file mount/aes.h
patching file mount/lomount.c
patching file mount/lomount.h
patching file mount/loop.c
patching file mount/loop.h
patching file mount/losetup.8
patching file mount/loumount.c
patching file mount/mount.8
patching file mount/mount.c
patching file mount/mount_by_label.c
patching file mount/rmd160.c
patching file mount/rmd160.h
patching file mount/sha512.c
patching file mount/sha512.h
patching file mount/swapon.8
patching file mount/swapon.c

root@elekta:/home/wildan/netherland-project/encryption/util-linux/util-linux-2.12r# CC=avr32-linux-gcc CFLAGS=-O2 ./configure –host=avr32-linux

configuring util-linux-2.12r

You don’t have <scsi/scsi.h>
You have <linux/blkpg.h>
You have <linux/kd.h>
You have <locale.h>
You have <langinfo.h>
You don’t have <sys/user.h>
You have <asm/page.h>
You don’t have <uuid/uuid.h>
You don’t have <rpcsvc/nfs_prot.h>
You have <asm/types.h>
You have <linux/raw.h>
You have <stdint.h>
You have <sys/io.h>
You have inet_aton()
You have fsync()
You have getdomainname()
You have nanosleep()
You have personality()
You have updwtmp()
You have fseeko()
You have lchown()
You don’t have rpmatch()
You don’t have <term.h>
You don’t have ncurses – I will not make ul and setterm.
You don’t have termcap – I will not make more.
You need -lcrypt
You don’t have native language support
You have __progname
You have <pty.h> and openpty()
You have wide character support
You have SYS_pivot_root
You have a tm_gmtoff field in struct tm
Your rpcgen seems to work
You have zlib
You don’t have blkid

root@elekta:/home/wildan/netherland-project/encryption/util-linux/util-linux-2.12r# make SUBDIRS=”lib mount” CROSS=avr32-linux- CC=avr32-linux-gcc

make[1]: Entering directory `/home/wildan/netherland-project/encryption/util-linux/util-linux-2.12r/lib’
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 err.c -o err.o
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 my_reboot.c -o my_reboot.o
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 setproctitle.c -o setproctitle.o
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 env.c -o env.o
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 carefulputc.c -o carefulputc.o
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 xstrncpy.c -o xstrncpy.o
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 md5.c -o md5.o
make[1]: Leaving directory `/home/wildan/netherland-project/encryption/util-linux/util-linux-2.12r/lib’
make[1]: Entering directory `/home/wildan/netherland-project/encryption/util-linux/util-linux-2.12r/mount’
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS mount.c
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS fstab.c
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS sundries.c
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS xmalloc.c
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS realpath.c
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS mntent.c
mntent.c: In function ‘mangle’:
mntent.c:28: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
mntent.c: In function ‘my_addmntent’:
mntent.c:129: warning: pointer targets in passing argument 1 of ‘mangle’ differ in signedness
mntent.c:130: warning: pointer targets in passing argument 1 of ‘mangle’ differ in signedness
mntent.c:131: warning: pointer targets in passing argument 1 of ‘mangle’ differ in signedness
mntent.c:132: warning: pointer targets in passing argument 1 of ‘mangle’ differ in signedness
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS version.c
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS get_label_uuid.c
get_label_uuid.c: In function ‘is_v1_swap_partition’:
get_label_uuid.c:90: warning: pointer targets in passing argument 2 of ‘store_uuid’ differ in signedness
get_label_uuid.c: In function ‘get_label_uuid’:
get_label_uuid.c:133: warning: pointer targets in passing argument 2 of ‘store_uuid’ differ in signedness
get_label_uuid.c:135: warning: pointer targets in passing argument 2 of ‘store_label’ differ in signedness
get_label_uuid.c:141: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
get_label_uuid.c:142: warning: pointer targets in passing argument 2 of ‘store_uuid’ differ in signedness
get_label_uuid.c:143: warning: pointer targets in passing argument 2 of ‘store_label’ differ in signedness
get_label_uuid.c:149: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
get_label_uuid.c:153: warning: pointer targets in passing argument 2 of ‘store_label’ differ in signedness
get_label_uuid.c:181: warning: pointer targets in passing argument 2 of ‘store_uuid’ differ in signedness
get_label_uuid.c:194: warning: pointer targets in passing argument 1 of ‘reiserfs_magic_version’ differ in signedness
get_label_uuid.c:195: warning: pointer targets in passing argument 2 of ‘store_uuid’ differ in signedness
get_label_uuid.c:197: warning: pointer targets in passing argument 2 of ‘store_label’ differ in signedness
get_label_uuid.c:210: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
get_label_uuid.c:211: warning: pointer targets in passing argument 2 of ‘store_uuid’ differ in signedness
get_label_uuid.c:212: warning: pointer targets in passing argument 2 of ‘store_label’ differ in signedness
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS mount_by_label.c
mount_by_label.c: In function ‘get_spec_by_uuid’:
mount_by_label.c:312: warning: pointer targets in passing argument 2 of ‘get_spec_by_x’ differ in signedness
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS mount_blkid.c
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS mount_guess_fstype.c
mount_guess_fstype.c: In function ‘do_guess_fstype’:
mount_guess_fstype.c:265: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
mount_guess_fstype.c:267: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
mount_guess_fstype.c:274: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
mount_guess_fstype.c:279: warning: pointer targets in passing argument 1 of ‘assemble4be’ differ in signedness
mount_guess_fstype.c:282: warning: pointer targets in passing argument 1 of ‘assemble4be’ differ in signedness
mount_guess_fstype.c:283: warning: pointer targets in passing argument 1 of ‘assemble4be’ differ in signedness
mount_guess_fstype.c:285: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
mount_guess_fstype.c:286: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
mount_guess_fstype.c:287: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
mount_guess_fstype.c:288: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
mount_guess_fstype.c:289: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
mount_guess_fstype.c:290: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
mount_guess_fstype.c:291: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
mount_guess_fstype.c:294: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
mount_guess_fstype.c:295: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
mount_guess_fstype.c:296: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
mount_guess_fstype.c:297: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
mount_guess_fstype.c:392: warning: pointer targets in passing argument 1 of ‘reiserfs_magic_version’ differ in signedness
mount_guess_fstype.c:442: warning: pointer targets in passing argument 1 of ‘reiserfs_magic_version’ differ in signedness
mount_guess_fstype.c:457: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS getusername.c
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS nfsmount.c
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS -Wno-unused nfsmount_xdr.c
nfsmount_xdr.c: In function ‘xdr_mountres3_ok’:
nfsmount_xdr.c:98: warning: dereferencing type-punned pointer will break strict-aliasing rules
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS -Wno-unused nfsmount_clnt.c
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS lomount.c
lomount.c: In function ‘loop_create_random_keys’:
lomount.c:693: warning: pointer targets in passing argument 2 of ‘rd_wr_retry’ differ in signedness
lomount.c:720: warning: pointer targets in passing argument 2 of ‘rd_wr_retry’ differ in signedness
lomount.c:744: warning: pointer targets in passing argument 2 of ‘rd_wr_retry’ differ in signedness
lomount.c:749: warning: pointer targets in passing argument 2 of ‘rd_wr_retry’ differ in signedness
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS loumount.c
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS loop.c
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS sha512.c
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS rmd160.c
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS aes.c
aes.c: In function ‘aes_encrypt’:
aes.c:282: warning: ‘b1[0]’ may be used uninitialized in this function
aes.c:282: warning: ‘b1[1]’ may be used uninitialized in this function
aes.c:282: warning: ‘b1[2]’ may be used uninitialized in this function
aes.c:282: warning: ‘b1[3]’ may be used uninitialized in this function
avr32-linux-gcc -s mount.o fstab.o sundries.o xmalloc.o realpath.o mntent.o version.o get_label_uuid.o mount_by_label.o mount_blkid.o mount_guess_fstype.o getusername.o ../lib/setproctitle.o ../lib/env.o nfsmount.o nfsmount_xdr.o nfsmount_clnt.o lomount.o loumount.o loop.o sha512.o rmd160.o aes.o ../lib/xstrncpy.o -o mount
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS umount.c
avr32-linux-gcc -s umount.o fstab.o sundries.o xmalloc.o realpath.o mntent.o getusername.o get_label_uuid.o mount_by_label.o mount_blkid.o version.o ../lib/env.o loumount.o -o umount
sh swap.configure
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS swapon.c
avr32-linux-gcc -s swapon.o version.o xmalloc.o get_label_uuid.o mount_by_label.o mount_blkid.o loop.o sha512.o ../lib/xstrncpy.o -o swapon
avr32-linux-gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -DHAVE_NFS -DMAIN lomount.c -o main_losetup.o
lomount.c: In function ‘loop_create_random_keys’:
lomount.c:693: warning: pointer targets in passing argument 2 of ‘rd_wr_retry’ differ in signedness
lomount.c:720: warning: pointer targets in passing argument 2 of ‘rd_wr_retry’ differ in signedness
lomount.c:744: warning: pointer targets in passing argument 2 of ‘rd_wr_retry’ differ in signedness
lomount.c:749: warning: pointer targets in passing argument 2 of ‘rd_wr_retry’ differ in signedness
avr32-linux-gcc -s main_losetup.o loumount.o loop.o sha512.o rmd160.o aes.o ../lib/xstrncpy.o -o losetup
avr32-linux-gcc -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -D_FILE_OFFSET_BITS=64 -DSBINDIR=\”/sbin\” -DUSRSBINDIR=\”/usr/sbin\” -DLOGDIR=\”/var/log\” -DVARPATH=\”/var\” -DLOCALEDIR=\”/usr/share/locale\” -O2 -s pivot_root.c -o pivot_root
make[1]: Leaving directory `/home/wildan/netherland-project/encryption/util-linux/util-linux-2.12r/mount’

root@elekta:/home/wildan/netherland-project/encryption/util-linux/util-linux-2.12r# cd mount/
root@elekta:/home/wildan/netherland-project/encryption/util-linux/util-linux-2.12r/mount# install -m 4755 -o root mount umount /nfs/bin/

root@elekta:/home/wildan/netherland-project/encryption/util-linux/util-linux-2.12r/mount# install -m 755 -o root losetup swapon /nfs/sbin/

root@elekta:/home/wildan/netherland-project/encryption/util-linux/util-linux-2.12r/mount# rm -f /nfs/sbin/swapoff && (cd /nfs/sbin/ && ln -s swapon swapoff)

Testing :

testing on i386 (ubuntu machine) :

root@elekta:/home/wildan/netherland-project/encryption/util-linux/util-linux-2.12r/mount# ld mount

ld: warning: unknown architecture of input file `mount’ is incompatible with i386 output
ld: warning: cannot find entry symbol _start; defaulting to 00000000080499e8

testing on avr32/ngw100 :

~ # ldd /bin/mount
ldd: can’t open cache ‘/etc/ld-uClibc.so.cache’
/bin/mount: is setuid
libc.so.0 => /lib/libc.so.0 (0x2aab2000)
ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x2aaab

~ # losetup
usage:
losetup [options] loop_device file # setup
losetup -F [options] loop_device [file] # setup, read /etc/fstab
losetup loop_device # give info
losetup -a # give info of all loops
losetup -d loop_device # delete
losetup -R loop_device # resize
options: -e encryption -o offset -s sizelimit -p passwdfd -T -S pseed
-H phash -I loinit -K gpgkey -G gpghome -C itercountk -v -r
-P cleartextkey

Don’t forget to copy new uImage to tftp root directory …


Resource :1] I make several change on the configuration which can be seen or download on this url : http://wildanm.fisika.ui.edu/netherland/encryption/loop-aes-make-change/


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: