Thread: DIY - KeK
View Single Post
Old 08-14-2012, 03:03 PM   #263
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
CoreUtils-8.18-uClibc

Lets see if we can fix the Busybox chroot problem in the above post with this bundle of goodies.

Build notes:
Spoiler:

Code:
core2quad ~ $ cd BLDS/armv6l
core2quad armv6l $ . pset.sh
core2quad armv6l $ ./dev-environment.sh
  * * * *
  Not using distcc.
  Type exit when done.
(armv6l:1) /home # . pset.sh
(armv6l:1) /home # mkdir -p coreutils ; cd coreutils
(armv6l:1) /home/coreutils # wget http://ftp.gnu.org/gnu/coreutils/coreutils-8.18.tar.xz
  Connecting to ftp.gnu.org (208.118.235.20:80)
(armv6l:1) coreutils # xz -d coreutils-8.18.tar.xz
(armv6l:1) coreutils # tar -xf coreutils-8.18.tar
(armv6l:1) coreutils # mkdir cutils8.18 ; cd coreutils-8.18
(armv6l:1) coreutils-8.18 # export FORCE_UNSAFE_CONFIGURE=1
(armv6l:1) coreutils-8.18 # ./configure --prefix=/home --with-gnu-ld --without-gmp
(armv6l:1) coreutils-8.18 # make
(armv6l:1) coreutils-8.18 # make check
  # TOTAL: 487
  # PASS:  308
  # SKIP:  164
  # XFAIL: 0
  # FAIL:  6
  # XPASS: 0
  # ERROR: 9
  (But none of 103 of them seg-faulted, so to continue on ... )

(armv6l:1) coreutils-8.18 # DESTDIR=/home/coreutils/cutils8.18 make install
(armv6l:1) coreutils-8.18 # cd ../cutils8.18/home
(armv6l:1) home # tar -czf ../coreutils-8.18-uClibc.tar.gz .
(armv6l:1) home # cd ..
  (A quicky self-install: )
(armv6l:1) cutils8.18 # tar -C /home -xf coreutils-8.18-uClibc.tar.gz
(armv6l:1) cutils8.18 # cd
(armv6l:1) /home # chroot --version
  chroot (GNU coreutils) 8.18
  Copyright (C) 2012 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.

  Written by Roland McGrath.
(armv6l:1) /home # cd /root ; umount /home ; exit
Restarting system.
core2quad armv6l $


This is another file blob that you just un-pack with /home of the emulator as the current directory. Puts chroot + 102 other small utilities into /home/bin.

Now the $64 million dollar question - Did it fix the above problem?
Spoiler:

Code:
core2quad armv6l $ ./dev-ucore.sh
  * * * *
  Type exit when done.
(armv6l:1) /home # echo 'export PATH=/home/bin:$PATH' > pset.sh
(armv6l:1) /home # . pset.sh
(armv6l:1) /home # wget -O coreutils-8.18-uClibc.tar.gz https://www.mobileread.com/forums/attachment.php?attachmentid=90767&d=1344971028
(armv6l:1) /home #   Connecting to www.mobileread.com (67.205.70.12:80)
( press 'enter' when job is done )
(armv6l:1) /home # tar -xzf coreutils-8.18-uClibc.tar.gz
(armv6l:1) /home # chroot --version
chroot (GNU coreutils) 8.18
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Roland McGrath.
(armv6l:1) /home # mount -t tmpfs tmpfs /home/emd/tmp
(armv6l:1) /home # mount -t tmpfs tmpfs /home/emd/var/tmp
(armv6l:1) /home # mount -t sysfs sysfs /home/emd/sys
(armv6l:1) /home # mount -t proc proc /home/emd/proc
(armv6l:1) /home # mount -o rbind /dev /home/emd/dev
(armv6l:1) /home # chroot /home/emd /bin/sh
Segmentation fault

Answer: No.


Next step: Install our KeK strace in this copy of the emulator image.

But folks, I've had all the fun I can stand today. Maybe more tomorrow.
Attached Files
File Type: gz coreutils-8.18-uClibc.tar.gz (7.41 MB, 255 views)

Last edited by knc1; 08-14-2012 at 03:36 PM.
knc1 is offline   Reply With Quote