2

ラズベリーパイ(ビットコインマイナーに使用)に事前構成済みのLinuxディストリビューションがあります。問題は、このディストリビューションが非常に最小限であり、基本的なコマンド用のビジーボックスしかないことです。パッケージ マネージャーはなく、gcc コンパイラさえありません。したがって、私の目標は、gcc コンパイラをインストールして、さらに進んで他のソフトウェアをインストールできるようにすることです。

だから私は基本的にbusyboxからのこれらのコマンドに限定されています:

root@raspberrypi:~# ls /bin
addgroup             fgrep                ping6
adduser              grep                 ps
ash                  gunzip               pwd
busybox              gzip                 rm
cat                  hostname             rmdir
chattr               ip                   sed
chgrp                kill                 sh
chmod                ln                   sleep
chown                login                stty
cp                   ls                   su
cpio                 mkdir                sync
date                 mknod                tar
dd                   mktemp               tinylogin
delgroup             more                 touch
deluser              mount                true
df                   mountpoint           umount
dmesg                mountpoint.sysvinit  uname
dnsdomainname        mv                   usleep
dumpkmap             netstat              vi
echo                 pidof                zcat
egrep                pidof.sysvinit
false                ping
root@raspberrypi:~# ls -l /usr/bin
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 [ -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 [[ -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 ar -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 awk -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 basename -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 bunzip2 -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 bzcat -> /bin/busybox
-rwxr-xr-x    1 root     root        302368 Apr 22  2014 cgminer
-rwxrwxr-x    1 root     root          4179 Apr 18  2014 cherryd
lrwxrwxrwx    1 root     root            17 Feb 21 14:30 chvt -> /usr/bin/chvt.kbd
-rwxr-xr-x    1 root     root          6860 Feb 19 12:23 chvt.kbd
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 clear -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 cmp -> /bin/busybox
-rwxr-xr-x    1 root     root          4304 Mar 11 03:18 cracklib-check
-rwxr-xr-x    1 root     root           218 Mar 11 03:18 cracklib-format
-rwxr-xr-x    1 root     root          4796 Mar 11 03:18 cracklib-packer
-rwxr-xr-x    1 root     root          3968 Mar 11 03:18 cracklib-unpacker
-rwxr-xr-x    1 root     root           990 Mar 11 03:18 create-cracklib-dict
-rwxr-xr-x    1 root     root        135908 Mar 28 12:33 curl
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 cut -> /bin/busybox
lrwxrwxrwx    1 root     root            23 Feb 21 14:37 dbclient -> /usr/sbin/dropbearmulti
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 dc -> /bin/busybox
-rwxr-xr-x    1 root     root         13372 Feb 19 12:24 ddcmon
lrwxrwxrwx    1 root     root            22 Feb 21 14:30 deallocvt -> /usr/bin/deallocvt.kbd
-rwxr-xr-x    1 root     root          7352 Feb 19 12:23 deallocvt.kbd
-rwxr-xr-x    1 root     root         64815 Feb 19 12:24 decode-dimms
-rwxr-xr-x    1 root     root          6104 Feb 19 12:24 decode-edid
-rwxr-xr-x    1 root     root          5650 Feb 19 12:24 decode-vaio
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 diff -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 dirname -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 du -> /bin/busybox
-rwxr-xr-x    1 root     root         58744 Feb 19 12:23 dumpkeys
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 dumpleases -> /bin/busybox
-rwxr-xr-x    1 root     root           287 Feb 19 12:24 easy_install
-rwxr-xr-x    1 root     root           295 Feb 19 12:24 easy_install-2.7
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 env -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 expr -> /bin/busybox
lrwxrwxrwx    1 root     root            22 Feb 21 14:30 fgconsole -> /usr/bin/fgconsole.kbd
-rwxr-xr-x    1 root     root          7460 Feb 19 12:23 fgconsole.kbd
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 find -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 flock -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 free -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 fuser -> /bin/busybox
-rwxr-xr-x    1 root     root          7736 Feb 19 12:23 getkeycodes
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 groups -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 head -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 hexdump -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 id -> /bin/busybox
-rwxr-xr-x    1 root     root          7936 Feb 19 12:23 kbd_mode
-rwxr-xr-x    1 root     root          8492 Feb 19 12:23 kbdrate
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 killall -> /bin/busybox
lrwxrwxrwx    1 root     root            22 Feb 21 14:32 last -> /usr/bin/last.sysvinit
-rwxr-xr-x    1 root     root         14048 Feb 19 12:15 last.sysvinit
lrwxrwxrwx    1 root     root             4 Feb 21 14:32 lastb -> last
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 less -> /bin/busybox
-rwxr-xr-x    1 root     root         85348 Feb 19 12:23 loadkeys
-rwxr-xr-x    1 root     root         19952 Feb 19 12:23 loadunimap
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 logger -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 logname -> /bin/busybox
-rwxr-xr-x    1 root     root          1229 Feb 19 12:24 mako-render
-rwxr-xr-x    1 root     root         15000 Feb 19 12:23 mapscrn
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 md5sum -> /bin/busybox
lrwxrwxrwx    1 root     root            22 Feb 21 14:32 mesg -> /usr/bin/mesg.sysvinit
-rwxr-xr-x    1 root     root          6532 Feb 19 12:15 mesg.sysvinit
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 microcom -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 mkfifo -> /bin/busybox
-rwxr-xr-x    1 root     root         18056 Mar 11 03:20 mkhomedir_helper
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 nc -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 nohup -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 nslookup -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 od -> /bin/busybox
-rwxr-xr-x    1 root     root        488032 Apr 18  2014 openssl
lrwxrwxrwx    1 root     root            19 Feb 21 14:30 openvt -> /usr/bin/openvt.kbd
-rwxr-xr-x    1 root     root         12084 Feb 19 12:23 openvt.kbd
-rwxr-xr-x    1 root     root          9852 Mar 11 03:20 pam_tally
-rwxr-xr-x    1 root     root          9872 Mar 11 03:20 pam_tally2
-rwxr-xr-x    1 root     root          9904 Mar 11 03:20 pam_timestamp_check
lrwxrwxrwx    1 root     root            14 Feb 21 14:30 passwd -> /bin/tinylogin
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 patch -> /bin/busybox
lrwxrwxrwx    1 root     root            10 Feb 21 14:37 perl -> perl5.14.3
-rwxr-xr-x    1 root     root          8768 Feb 19 12:25 perl5.14.3
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 printf -> /bin/busybox
lrwxrwxrwx    1 root     root             9 Feb 21 14:30 psfaddtable -> psfxtable
lrwxrwxrwx    1 root     root             9 Feb 21 14:30 psfgettable -> psfxtable
lrwxrwxrwx    1 root     root             9 Feb 21 14:30 psfstriptable -> psfxtable
-rwxr-xr-x    1 root     root         16844 Feb 19 12:23 psfxtable
lrwxrwxrwx    1 root     root            28 Feb 21 14:32 psplash -> /usr/bin/psplash-raspberrypi
-rwxr-xr-x    1 root     root         50484 Feb 19 12:16 psplash-default
-rwxr-xr-x    1 root     root        113760 Feb 19 12:16 psplash-raspberrypi
-rwxr-xr-x    1 root     root          5516 Feb 19 12:16 psplash-write
lrwxrwxrwx    1 root     root             7 Feb 21 14:37 python -> python2
lrwxrwxrwx    1 root     root            14 Feb 21 14:37 python-config -> python2-config
lrwxrwxrwx    1 root     root             9 Feb 21 14:37 python2 -> python2.7
lrwxrwxrwx    1 root     root            16 Feb 21 14:37 python2-config -> python2.7-config
-rwxr-xr-x    1 root     root          6268 Apr 18  2014 python2.7
-rwxr-xr-x    1 root     root          1618 Feb 19 12:19 python2.7-config
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 readlink -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 realpath -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 renice -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 reset -> /bin/busybox
-rwxr-xr-x    1 root     root         11882 Feb 19 12:24 rpio
-rwxr-xr-x    1 root     root         16597 Feb 19 12:24 rpio-curses
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 run-parts -> /bin/busybox
lrwxrwxrwx    1 root     root            23 Feb 21 14:37 scp -> /usr/sbin/dropbearmulti
lrwxrwxrwx    1 root     root            12 Mar 11 02:22 screen -> screen-4.0.3
-rwxr-xr-x    1 root     root        312200 Mar 11 02:22 screen-4.0.3
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 seq -> /bin/busybox
-rwxr-xr-x    1 root     root         33868 Feb 19 12:23 setfont
-rwxr-xr-x    1 root     root          7276 Feb 19 12:23 setkeycodes
-rwxr-xr-x    1 root     root          8768 Feb 19 12:23 setleds
-rwxr-xr-x    1 root     root          6900 Feb 19 12:23 setmetamode
-rwxr-xr-x    1 root     root         14260 Feb 19 12:23 showconsolefont
-rwxr-xr-x    1 root     root         10020 Feb 19 12:23 showkey
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 sort -> /bin/busybox
-rwxr-xr-x    1 root     root         49100 Feb 19 12:13 sqlite3
lrwxrwxrwx    1 root     root            23 Feb 21 14:37 ssh -> /usr/sbin/dropbearmulti
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 stat -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 strings -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 tail -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 tee -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 telnet -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 test -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 tftp -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 time -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 top -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 tr -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 traceroute -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 tty -> /bin/busybox
-rwxr-xr-x    1 root     root        137588 Feb 19 12:23 udevadm
-rwxr-xr-x    1 root     root          2425 Feb 19 12:23 unicode_start
-rwxr-xr-x    1 root     root           363 Feb 19 12:23 unicode_stop
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 uniq -> /bin/busybox
-rwxr-xr-x    1 root     root         26424 Mar 11 03:20 unix_chkpwd
-rwxr-xr-x    1 root     root         26412 Mar 11 03:20 unix_update
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 unzip -> /bin/busybox
-rwxr-xr-x    1 root     root          4267 Feb 19 12:09 update-alternatives
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 uptime -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 users -> /bin/busybox
lrwxrwxrwx    1 root     root            26 Feb 21 14:32 utmpdump -> /usr/bin/utmpdump.sysvinit
-rwxr-xr-x    1 root     root          9568 Feb 19 12:15 utmpdump.sysvinit
lrwxrwxrwx    1 root     root            14 Feb 21 14:30 vlock -> /bin/tinylogin
lrwxrwxrwx    1 root     root            22 Feb 21 14:32 wall -> /usr/bin/wall.sysvinit
-rwxr-xr-x    1 root     root         10764 Feb 19 12:15 wall.sysvinit
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 watch -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 wc -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 wget -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 which -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 who -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 whoami -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 xargs -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 yes -> /bin/busybox

私がこれまでに試したことは 、より多くのコマンド、特に rpm を含む新しい busybox をここからダウンロードすることです (まだ dpkg はありません)。

root@raspberrypi:~# ./busybox-armv7l
BusyBox v1.21.1 (2013-07-08 10:26:30 CDT) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2012.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list[-full]
   or: busybox --install [-s] [DIR]
   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:
        [, [[, acpid, add-shell, addgroup, adduser, adjtimex, arp, arping, ash, awk, base64,
        basename, beep, blkid, blockdev, bootchartd, brctl, bunzip2, bzcat, bzip2, cal, cat,
        catv, chat, chattr, chgrp, chmod, chown, chpasswd, chpst, chroot, chrt, chvt, cksum,
        clear, cmp, comm, conspy, cp, cpio, crond, crontab, cryptpw, cttyhack, cut, date, dc, dd,
        deallocvt, delgroup, deluser, depmod, devmem, df, dhcprelay, diff, dirname, dmesg, dnsd,
        dnsdomainname, dos2unix, du, dumpkmap, dumpleases, echo, ed, egrep, eject, env, envdir,
        envuidgid, ether-wake, expand, expr, fakeidentd, false, fbset, fbsplash, fdflush,
        fdformat, fdisk, fgconsole, fgrep, find, findfs, flock, fold, free, freeramdisk, fsck,
        fsck.minix, fsync, ftpd, ftpget, ftpput, fuser, getopt, getty, grep, groups, gunzip,
        gzip, halt, hd, hdparm, head, hexdump, hostid, hostname, httpd, hush, hwclock, id,
        ifconfig, ifdown, ifenslave, ifplugd, ifup, inetd, init, insmod, install, ionice, iostat,
        ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kbd_mode, kill,
        killall, killall5, klogd, last, less, linux32, linux64, linuxrc, ln, loadfont, loadkmap,
        logger, login, logname, logread, losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lsof, lspci,
        lsusb, lzcat, lzma, lzop, lzopcat, makedevs, makemime, man, md5sum, mdev, mesg, microcom,
        mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.minix, mkfs.vfat, mknod, mkpasswd,
        mkswap, mktemp, modinfo, modprobe, more, mount, mountpoint, mpstat, mt, mv, nameif,
        nanddump, nandwrite, nbd-client, nc, netstat, nice, nmeter, nohup, nslookup, ntpd, od,
        openvt, passwd, patch, pgrep, pidof, ping, ping6, pipe_progress, pivot_root, pkill, pmap,
        popmaildir, poweroff, powertop, printenv, printf, ps, pscan, pstree, pwd, pwdx,
        raidautorun, rdate, rdev, readahead, readlink, readprofile, realpath, reboot, reformime,
        remove-shell, renice, reset, resize, rev, rm, rmdir, rmmod, route, rpm, rpm2cpio,
        rtcwake, run-parts, runlevel, runsv, runsvdir, rx, script, scriptreplay, sed, sendmail,
        seq, setarch, setconsole, setfont, setkeycodes, setlogcons, setserial, setsid, setuidgid,
        sh, sha1sum, sha256sum, sha3sum, sha512sum, showkey, slattach, sleep, smemcap, softlimit,
        sort, split, start-stop-daemon, stat, strings, stty, su, sulogin, sum, sv, svlogd,
        swapoff, swapon, switch_root, sync, sysctl, syslogd, tac, tail, tar, tcpsvd, tee, telnet,
        telnetd, test, tftp, tftpd, time, timeout, top, touch, tr, traceroute, traceroute6, true,
        tty, ttysize, tunctl, udhcpc, udhcpd, udpsvd, umount, uname, unexpand, uniq, unix2dos,
        unlzma, unlzop, unxz, unzip, uptime, users, usleep, uudecode, uuencode, vconfig, vi,
        vlock, volname, wall, watch, watchdog, wc, wget, which, who, whoami, whois, xargs, xz,
        xzcat, yes, zcat, zcip

ここからいくつかの gcc rpm をダウンロードしました http://rpmfind.net/linux/rpm2html/search.php?query=gcc&submit=Search+...&system=&arch= しかし、何らかの理由で gcc が実行されません

root@raspberrypi:~# ./busybox-armv7l rpm -i gcc-4.8.2-1.fc20.armv7hl.rpm
root@raspberrypi:~# find / -name gcc
/usr/bin/gcc
/usr/share/doc/gcc
/usr/lib/gcc
/usr/libexec/gcc
/opt/STM/STLinux-2.4/devkit/armv7/target/usr/bin/gcc
/opt/STM/STLinux-2.4/devkit/armv7/target/usr/lib/gcc
/opt/STM/STLinux-2.4/devkit/armv7/target/usr/libexec/gcc
root@raspberrypi:~# cd /usr/bin
root@raspberrypi:/usr/bin# ./gcc
-sh: ./gcc: not found
root@raspberrypi:/usr/bin# ls -l
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 [ -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 [[ -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 ar -> /bin/busybox
-rwxr-xr-x    1 root     root        562184 Mar 29 02:30 arm-linux-gnu-cpp
-rwxr-xr-x    1 root     root        562184 Mar 29 02:30 arm-linux-gnu-gcc
-rwxr-xr-x    1 root     root        257596 Mar 29 02:30 arm-linux-gnu-gcov
-rwxr-xr-x    2 root     root        622224 Oct 17 10:53 armv7hl-redhat-linux-gnueabi-gcc
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 awk -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 basename -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 bunzip2 -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 bzcat -> /bin/busybox
-rwxr-xr-x    1 root     root           224 Oct 17 10:52 c89
-rwxr-xr-x    1 root     root           215 Oct 17 10:52 c99
lrwxrwxrwx    1 root     root             3 Apr 10 21:31 cc -> gcc
-rwxr-xr-x    1 root     root        302368 Apr 22  2014 cgminer
-rwxrwxr-x    1 root     root          4179 Apr 18  2014 cherryd
lrwxrwxrwx    1 root     root            17 Feb 21 14:30 chvt -> /usr/bin/chvt.kbd
-rwxr-xr-x    1 root     root          6860 Feb 19 12:23 chvt.kbd
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 clear -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 cmp -> /bin/busybox
-rwxr-xr-x    1 root     root          4304 Mar 11 03:18 cracklib-check
-rwxr-xr-x    1 root     root           218 Mar 11 03:18 cracklib-format
-rwxr-xr-x    1 root     root          4796 Mar 11 03:18 cracklib-packer
-rwxr-xr-x    1 root     root          3968 Mar 11 03:18 cracklib-unpacker
-rwxr-xr-x    1 root     root           990 Mar 11 03:18 create-cracklib-dict
....
-rwxr-xr-x    1 root     root           287 Feb 19 12:24 easy_install
-rwxr-xr-x    1 root     root           295 Feb 19 12:24 easy_install-2.7
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 env -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 expr -> /bin/busybox
lrwxrwxrwx    1 root     root            22 Feb 21 14:30 fgconsole -> /usr/bin/fgconsole.kbd
-rwxr-xr-x    1 root     root          7460 Feb 19 12:23 fgconsole.kbd
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 find -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 flock -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 free -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 fuser -> /bin/busybox
-rwxr-xr-x    2 root     root        622224 Oct 17 10:53 gcc
-rwxr-xr-x    1 root     root         25900 Oct 17 10:54 gcc-ar
-rwxr-xr-x    1 root     root         25856 Oct 17 10:53 gcc-nm
-rwxr-xr-x    1 root     root         25864 Oct 17 10:54 gcc-ranlib
-rwxr-xr-x    1 root     root        260996 Oct 17 10:54 gcov
-rwxr-xr-x    1 root     root          7736 Feb 19 12:23 getkeycodes
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 groups -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 head -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 hexdump -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 id -> /bin/busybox
-rwxr-xr-x    1 root     root          7936 Feb 19 12:23 kbd_mode
-rwxr-xr-x    1 root     root          8492 Feb 19 12:23 kbdrate
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 killall -> /bin/busybox
lrwxrwxrwx    1 root     root            22 Feb 21 14:32 last -> /usr/bin/last.sysvinit
-rwxr-xr-x    1 root     root         14048 Feb 19 12:15 last.sysvinit
lrwxrwxrwx    1 root     root             4 Feb 21 14:32 lastb -> last
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 less -> /bin/busybox
-rwxr-xr-x    1 root     root         85348 Feb 19 12:23 loadkeys
-rwxr-xr-x    1 root     root         19952 Feb 19 12:23 loadunimap
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 logger -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 logname -> /bin/busybox
-rwxr-xr-x    1 root     root          1229 Feb 19 12:24 mako-render
-rwxr-xr-x    1 root     root         15000 Feb 19 12:23 mapscrn
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 md5sum -> /bin/busybox
lrwxrwxrwx    1 root     root            22 Feb 21 14:32 mesg -> /usr/bin/mesg.sysvinit
-rwxr-xr-x    1 root     root          6532 Feb 19 12:15 mesg.sysvinit
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 microcom -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 mkfifo -> /bin/busybox
-rwxr-xr-x    1 root     root         18056 Mar 11 03:20 mkhomedir_helper
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 nc -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 nohup -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 nslookup -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 od -> /bin/busybox
-rwxr-xr-x    1 root     root        488032 Apr 18  2014 openssl
lrwxrwxrwx    1 root     root            19 Feb 21 14:30 openvt -> /usr/bin/openvt.kbd
-rwxr-xr-x    1 root     root         12084 Feb 19 12:23 openvt.kbd
-rwxr-xr-x    1 root     root          9852 Mar 11 03:20 pam_tally
-rwxr-xr-x    1 root     root          9872 Mar 11 03:20 pam_tally2
-rwxr-xr-x    1 root     root          9904 Mar 11 03:20 pam_timestamp_check
lrwxrwxrwx    1 root     root            14 Feb 21 14:30 passwd -> /bin/tinylogin
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 patch -> /bin/busybox
lrwxrwxrwx    1 root     root            10 Feb 21 14:37 perl -> perl5.14.3
-rwxr-xr-x    1 root     root          8768 Feb 19 12:25 perl5.14.3
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 printf -> /bin/busybox
lrwxrwxrwx    1 root     root             9 Feb 21 14:30 psfaddtable -> psfxtable
lrwxrwxrwx    1 root     root             9 Feb 21 14:30 psfgettable -> psfxtable
lrwxrwxrwx    1 root     root             9 Feb 21 14:30 psfstriptable -> psfxtable
-rwxr-xr-x    1 root     root         16844 Feb 19 12:23 psfxtable
lrwxrwxrwx    1 root     root            28 Feb 21 14:32 psplash -> /usr/bin/psplash-raspberrypi
-rwxr-xr-x    1 root     root         50484 Feb 19 12:16 psplash-default
-rwxr-xr-x    1 root     root        113760 Feb 19 12:16 psplash-raspberrypi
-rwxr-xr-x    1 root     root          5516 Feb 19 12:16 psplash-write
lrwxrwxrwx    1 root     root             7 Feb 21 14:37 python -> python2
lrwxrwxrwx    1 root     root            14 Feb 21 14:37 python-config -> python2-config
lrwxrwxrwx    1 root     root             9 Feb 21 14:37 python2 -> python2.7
lrwxrwxrwx    1 root     root            16 Feb 21 14:37 python2-config -> python2.7-config
-rwxr-xr-x    1 root     root          6268 Apr 18  2014 python2.7
-rwxr-xr-x    1 root     root          1618 Feb 19 12:19 python2.7-config
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 readlink -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 realpath -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 renice -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 reset -> /bin/busybox
-rwxr-xr-x    1 root     root         11882 Feb 19 12:24 rpio
-rwxr-xr-x    1 root     root         16597 Feb 19 12:24 rpio-curses
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 run-parts -> /bin/busybox
lrwxrwxrwx    1 root     root            23 Feb 21 14:37 scp -> /usr/sbin/dropbearmulti
lrwxrwxrwx    1 root     root            12 Mar 11 02:22 screen -> screen-4.0.3
-rwxr-xr-x    1 root     root        312200 Mar 11 02:22 screen-4.0.3
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 seq -> /bin/busybox
-rwxr-xr-x    1 root     root         33868 Feb 19 12:23 setfont
-rwxr-xr-x    1 root     root          7276 Feb 19 12:23 setkeycodes
-rwxr-xr-x    1 root     root          8768 Feb 19 12:23 setleds
-rwxr-xr-x    1 root     root          6900 Feb 19 12:23 setmetamode
-rwxr-xr-x    1 root     root         14260 Feb 19 12:23 showconsolefont
-rwxr-xr-x    1 root     root         10020 Feb 19 12:23 showkey
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 sort -> /bin/busybox
-rwxr-xr-x    1 root     root         49100 Feb 19 12:13 sqlite3
.....
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 tty -> /bin/busybox
-rwxr-xr-x    1 root     root        137588 Feb 19 12:23 udevadm
-rwxr-xr-x    1 root     root          2425 Feb 19 12:23 unicode_start
-rwxr-xr-x    1 root     root           363 Feb 19 12:23 unicode_stop
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 uniq -> /bin/busybox
-rwxr-xr-x    1 root     root         26424 Mar 11 03:20 unix_chkpwd
-rwxr-xr-x    1 root     root         26412 Mar 11 03:20 unix_update
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 unzip -> /bin/busybox
-rwxr-xr-x    1 root     root          4267 Feb 19 12:09 update-alternatives
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 uptime -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 users -> /bin/busybox
lrwxrwxrwx    1 root     root            26 Feb 21 14:32 utmpdump -> /usr/bin/utmpdump.sysvinit
-rwxr-xr-x    1 root     root          9568 Feb 19 12:15 utmpdump.sysvinit
lrwxrwxrwx    1 root     root            14 Feb 21 14:30 vlock -> /bin/tinylogin
lrwxrwxrwx    1 root     root            22 Feb 21 14:32 wall -> /usr/bin/wall.sysvinit
-rwxr-xr-x    1 root     root         10764 Feb 19 12:15 wall.sysvinit
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 watch -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 wc -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 wget -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 which -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 who -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 whoami -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 xargs -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 21 14:30 yes -> /bin/busybox

また、apt-get を取得するために apt-rpm をインストールしようとしましたが、共有ライブラリがありません

root@raspberrypi:~# apt-get
apt-get: error while loading shared libraries: /usr/lib/liblua-5.1.so: internal error

誰かがこれについて私を助けることができますか??

4

1 に答える 1

4

この投稿に「yocto」のタグを付けました。したがって、私がアドバイスできる唯一のことは、この素晴らしいツールを使用することです:)ツールをraspiからコンパイルするのではなく、キラーLinuxマシンからコンパイルしたい場合:)

まず、前提条件がすべて揃っていることを確認してください。フェドーラの場合:

sudo yum install gawk make wget tar bzip2 gzip python unzip perl patch \
     diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \
     ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue socat

Ubuntu / Debian の場合:

sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
 build-essential chrpath socat

その後、git://git.yoctoproject.org/poky から yocto を取得できます。

git clone git://git.yoctoproject.org/poky -b daisy

次に、raspberrypi レイヤーとその依存関係を取得する必要があります。

cd poky
git clone http://git.yoctoproject.org/git/meta-raspberrypi -b daisy
git clone git://git.openembedded.org/meta-openembedded -b daisy

次に、ビルド環境をセットアップします。

source oe-init-build-env rpi-build

ここで、rpi-build はビルド ディレクトリの名前になり、任意の名前にすることができます。これにより、yocto を使用するために必要なすべての環境変数がセットアップされ、新しく作成されたビルド ディレクトリに移動します。

conf/bblayers.conf を編集し、必要なレイヤーを BBLAYERS に追加します。次のようになります。

BBLAYERS ?= " \                                                                 
  /path/to/poky/meta \                      
  /path/to/poky/meta-yocto \                
  /path/to/poky/meta-yocto-bsp \            
  /path/to/poky/meta-openembedded/meta-oe \ 
  /path/to/poky/meta-raspberrypi \                            
"

次に、conf/local.conf を編集して、MACHINE 変数を raspberrypi に設定します。

MACHINE ?= "raspberrypi"

次のように変更して、デフォルトの rpm の代わりに deb ファイルを生成するように yocto に指示することもできます。

PACKAGE_CLASSES ?= "package_rpm"

に:

PACKAGE_CLASSES ?= "package_deb"

ビルドに dpkg をすばやく存在させるには、conf/local.conf に次の行を追加するだけです。

CORE_IMAGE_EXTRA_INSTALL="dpkg"

基本的なイメージを作成します。

bitbake rpi-basic-image

これには時間がかかります....実際にはかなりの時間がかかります (yocto はルートファイルシステム全体を生成し、ソースをダウンロードしてコンパイルし、それぞれの deb パッケージを作成し、フラッシュ可能な s イメージを生成します)。

その間、結果のイメージにソフトウェアを追加する方法やカスタマイズする方法を理解するために、yocto のドキュメントを読むことをお勧めします。yocto がどのように機能するかを説明することは、stackoverflow の答えになるだけではありません。ドキュメントを読んで少し練習する必要があります。

しかし、理解しておくべき重要なことは、yocto がレシピを提供するということです。基本的に、レシピにはパッケージの入手方法とコンパイル方法が記載されています。領収書の簡単な例は、次の場所にあります。

meta/recipes-devtools/rpm/rpmresolve_1.0.bb

yocto の良いところは、独自のレシピを簡単に追加できることです。レイヤーはレシピのスーパーセットを提供し、カスタマイズも可能にします。ここでは、raspberry ボードのサポートを追加するために、raspberrypi レイヤーを追加しました。ラズベリー層は、カーネルの構成に必要なすべてのレシピ、およびブートローダーなどを提供します...

コンパイルが完了したら、結果の sd イメージをフラッシュするには、次のようにします。

dd bs=4M if=/path/to/rpi-build/tmp/deploy/images/raspberrypi/rpi-basic-image-raspberrypi.rpi-sdimg of=/dev/sd?

どこで「sd?」(マウントされていない)SDカードです(必要に応じて保存することを検討してください)SDカードをraspiに差し込み、起動します。

raspi ip を見つけるために、開いている ssh ポートについてネットワークをスキャンできます。

nmap -p 22 --open -sV YOU_SUBNET_ADDRESS/SUBNET_SIZE

例:

nmap -p 22 --open -sV 192.168.1.0/24


ssh root@RASPI-IP

そして出来上がり!

次回新しいパッケージをビルドする必要がある場合は、次のことができます。

bitbake package-name

そして、結果の.debファイル(tmp/work/armv6-vfp-poky-linux-gnueabi/PACKAGE_NAME/PACKAGE_VERSION/deploy-debs/armv6-vfp/PACKAGE.ipkから)をraspiにscpし、dpkgを使用してインストールします. rpi-basic-image に基づいて独自のイメージを作成し、独自に選択したパッケージを追加することもできます。

htop の例:

bitbake htop
scp ./tmp/work/armv6-vfp-poky-linux-gnueabi/htop/1.0.3-r0/deploy-debs/armv6-vfp/htop_1.0.3-r0_armv6-vfp.deb root@myraspi

yocto は、クロス コンパイル プロセスを容易にするのに非常に役立ちます。

ソース: https://github.com/djwillis/meta-raspberrypi https://yoctoproject.org

カモウ

于 2014-11-06T23:28:03.880 に答える