05-10-2016, 05:48 PM | #1 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
[K1]: Firmware examination
(from v-1.2 ...)
Our first look, something well known: Code:
core2quad arm-k1 $ cd bin core2quad bin $ ls -l total 612 -rwsr-sr-x 1 mszick mszick 620140 2008-03-30 19:14 busybox A quick summary: Code:
core2quad bin $ file * busybox: setuid setgid ELF 32-bit LSB executable, ARM, version 1, statically linked, for GNU/Linux 2.0.0, stripped Try for a bit more detail: Code:
core2quad bin $ readelf -a busybox | less ELF Header: Magic: 7f 45 4c 46 01 01 01 61 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: ARM ABI Version: 0 Type: EXEC (Executable file) Machine: ARM Version: 0x1 Entry point address: 0x80d0 Start of program headers: 52 (bytes into file) Start of section headers: 619540 (bytes into file) Flags: 0x202, has entry point, GNU EABI, software FP Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 3 Size of section headers: 40 (bytes) Number of section headers: 15 Section header string table index: 14 - - - - Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x000000 0x00008000 0x00008000 0x94b64 0x94b64 R E 0x8000 LOAD 0x094b64 0x000a4b64 0x000a4b64 0x02840 0x2317c RW 0x8000 NOTE 0x0000a0 0x000080a0 0x000080a0 0x00020 0x00020 R 0x10 - - - - Notes at offset 0x000000a0 with length 0x00000020: Owner Data size Description GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag) OS: Linux, ABI: 2.0.0 Other than that, a fairly common sort of (early) Linux file. Let's see if it will talk to us: Code:
core2quad bin $ ./busybox BusyBox v1.01 (2008.03.31-00:04+0000) multi-call binary Usage: busybox [function] [arguments]... or: [function] [arguments]... BusyBox is a multi-call binary that combines many common Unix utilities into a single executable. Most people will create a link to busybox for each function they wish to use and BusyBox will act like whatever it was invoked as! Currently defined functions: [, addgroup, adduser, adjtimex, ash, awk, basename, bunzip2, busybox, bzcat, cat, chgrp, chmod, chown, chroot, clear, cmp, cp, crond, crontab, cut, date, dd, delgroup, deluser, df, dirname, dmesg, du, echo, env, expr, false, fdisk, fgrep, find, freeramdisk, getty, grep, gunzip, gzip, halt, head, hexdump, hostname, hwclock, id, ifconfig, ifdown, ifup, init, install, ip, ipaddr, iplink, iproute, kill, killall, klogd, linuxrc, ln, logger, login, logname, logread, losetup, ls, makedevs, md5sum, mkdir, mknod, mktemp, more, mount, mv, nc, netstat, passwd, pidof, ping, pipe_progress, pivot_root, printf, pwd, rdate, readlink, realpath, reboot, renice, reset, rm, rmdir, route, run-parts, sed, seq, sh, sleep, sort, start-stop-daemon, strings, stty, su, sulogin, sync, sysctl, syslogd, tail, tar, tee, telnet, test, time, touch, tr, traceroute, true, tty, udhcpc, umount, uname, uniq, uptime, usleep, vi, wc, wget, which, who, whoami, xargs, yes, zcat core2quad bin $ (For the curious reader, "core2quad" is the name of my development machine, an Intel x86_64, here running in 32-bit mode. And yes, I didn't photoshop the above, my i686 Linux install does run ARM code just fine. I couldn't do much here if it didn't. ) = = = = @geekmaster - first test - duplicate the above. It is statically linked, it should run anywhere on the K1 that you put it. copy /bin/busybox to ??? <wherever> you are trying to run your compiled code from (sd card, usb storage, whatever) - then with that as the current working directory, do ./busybox see if it will talk to you from that location on your K1. I.E: We **know** this thing works, make sure it works for you also. This first test is to eliminate any funky file system options that might be keeping your code from running properly (or at all). Last edited by knc1; 05-10-2016 at 06:01 PM. |
05-10-2016, 07:20 PM | #2 | ||
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
Quote:
Though code compiled with "lenny" libs in my qemu chroot runs in that chroot, code compiled using libs copied from the K1 fails in the chroot (and in the kindle). I really do want to run something custom on my K1, and not just stuff lab126 compiled for my K1... And thanks for looking at the K1 file system. I am anxious to try something on my K1 that was compiled from outside lab126 (such as a "Hello World" program). Last edited by geekmaster; 05-10-2016 at 07:31 PM. |
||
Advert | |
|
05-10-2016, 08:50 PM | #3 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
That is a lot of words, but I can't find the answer to my question -
Can you copy /bin/busybox to the file system location where you can not get **YOUR COMPILED** code to run? And if that is so, what location? = = = = I am trying to help but don't "go imtmp" on me. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free (nook/Kindle/iTunes/DRM-free) Christianish [Xtian Faith Re-Examination Critique] | ATDrake | Deals and Resources (No Self-Promotion or Affiliate Links) | 1 | 12-02-2016 02:26 PM |
Free (nook/Kindle/iTunes/DRM-free) Pursuit of the Holy [Xtian Spiritual Examination] | ATDrake | Deals and Resources (No Self-Promotion or Affiliate Links) | 0 | 05-22-2015 02:29 PM |
Free (nook/Kindle/ePub/DRM-free) Relearning Jesus [Xtian Faith Re-Examination Advice] | ATDrake | Deals and Resources (No Self-Promotion or Affiliate Links) | 1 | 02-27-2015 07:16 AM |
Free (nook/Kindle/iTunes/DRM-free) Let God Change Your Life [Xtian Faith Examination] | ATDrake | Deals and Resources (No Self-Promotion or Affiliate Links) | 0 | 01-15-2015 02:11 AM |
Remove Kindle books for examination | curiousgeorge | Amazon Kindle | 2 | 03-12-2013 10:24 AM |