텔넷 쓰려고 iptime 펌웨어 건들고 있는데.....

jisoohero의 이미지

텔넷을 요즘에는 아예 커맨드를 빼놓고 출시하더군요 그래서 직접 넣으려 하는데 리팩이 어렵네요.....
비지박스랑 펌웨어 첨부합니다 비지박스를 /bin에 넣어서 주시면 감사하겠습니다

Processor : ARMv7 Processor rev 0 (v7l)
processor : 0
BogoMIPS : 1599.07

processor : 1
BogoMIPS : 1595.80

Features : swp half thumb fastmult edsp
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc09
CPU revision : 0

Hardware : Northstar Prototype
Revision : 0000
Serial : 0000000000000000

armv7인것 같네요

https://busybox.net/downloads/binaries/latest/busybox-armv7l
(요건 비지박스)
http://download.iptime.co.kr/online_upgrade/a5004ns_kr_9_986.bin
(요건 펌웨어)

bushi의 이미지

만드는 법이야 여기저기 있으니 넘어가고, 주의점을 알려드리겠습니다.

schoi0@sel-schoi0-d2 IPTIME]$ sed "s@hsqs@\nsquash\n@g" < a5004ns_kr_9_986.bin > x
 
[schoi0@sel-schoi0-d2 IPTIME]$ grep -abo squash x
2082537:squash
 
[schoi0@sel-schoi0-d2 IPTIME]$ dd if=a5004ns_kr_9_986.bin of=x bs=2082536 skip=1 
10+1 records in
10+1 records out
22210896 bytes (22 MB) copied, 0.0132369 s, 1.7 GB/s
 
[schoi0@sel-schoi0-d2 IPTIME]$ file x
x: Squashfs filesystem, little endian, version 4.0, 22207634 bytes, 1637 inodes, blocksize: 131072 bytes, created: Mon Dec 26 09:42:17 2016
[schoi0@sel-schoi0-d2 IPTIME]$ 
[schoi0@sel-schoi0-d2 IPTIME]$ mkdir t
[schoi0@sel-schoi0-d2 IPTIME]$ sudo mount x t -oloop
[schoi0@sel-schoi0-d2 IPTIME]$ find t/ -executable -name "*telnet*"
t/usr/sbin/telnetd
 
[schoi0@sel-schoi0-d2 IPTIME]$ t/usr/sbin/telnetd 
/lib/ld-uClibc.so.0: No such file or directory
[schoi0@sel-schoi0-d2 IPTIME]$ 
[schoi0@sel-schoi0-d2 IPTIME]$ QEMU_LD_PREFIX=`pwd`/t t/usr/sbin/telnetd 
telnetd: applet not found
[schoi0@sel-schoi0-d2 IPTIME]$ 
[schoi0@sel-schoi0-d2 IPTIME]$ ls -l t/usr/sbin/telnetd 
lrwxrwxrwx. 1 root root 17 10월 15  2015 t/usr/sbin/telnetd -> ../../bin/busybox
[schoi0@sel-schoi0-d2 IPTIME]$ 
[schoi0@sel-schoi0-d2 IPTIME]$ QEMU_LD_PREFIX=`pwd`/t t/bin/busybox
BusyBox v1.7.2 (2016-01-06 09:59:42 KST) multi-call binary
Copyright (C) 1998-2006  Erik Andersen, Rob Landley, and others.
Licensed under GPLv2.  See source distribution for full notice.
 
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, arp, ash, basename, bunzip2,
	bzcat, cat, chgrp, chmod, chown, clear, cp, cut, date,
	dd, delgroup, deluser, df, dirname, dmesg, du, echo, egrep,
	env, expr, false, fgrep, find, free, grep, gunzip, gzip,
	halt, head, hostid, hostname, hwclock, id, ifconfig, insmod,
	kill, killall, klogd, less, ln, logread, losetup, ls,
	lsmod, lzmacat, mkdir, mkfifo, mknod, mkswap, more, mount,
	mv, netstat, passwd, pidof, ping, ping6, pivot_root, poweroff,
	printf, ps, pwd, rdate, reboot, reset, rm, rmdir, rmmod,
	route, sed, sh, sleep, swapoff, swapon, sync, sysctl,
	syslogd, tail, tar, test, time, top, touch, true, umount,
	uname, uncompress, unlzma, unzip, uptime, usleep, vi,
	wget, xargs, yes, zcat, flash_eraseall
 
[schoi0@sel-schoi0-d2 IPTIME]$ 
[schoi0@sel-schoi0-d2 IPTIME]$ QEMU_LD_PREFIX=`pwd`/t t/bin/busybox | grep telnet
[schoi0@sel-schoi0-d2 IPTIME]$ 
[schoi0@sel-schoi0-d2 IPTIME]$ file t/bin/busybox
t/bin/busybox: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), stripped
[schoi0@sel-schoi0-d2 IPTIME]$
 
[schoi0@sel-schoi0-d2 IPTIME]$ curl -s <a href="https://busybox.net/downloads/binaries/latest/busybox-armv7l" rel="nofollow">https://busybox.net/downloads/binaries/latest/busybox-armv7l</a> > busybox
[schoi0@sel-schoi0-d2 IPTIME]$ 
[schoi0@sel-schoi0-d2 IPTIME]$ file busybox
busybox: ELF 32-bit LSB executable, ARM, EABI4 version 1 (SYSV), statically linked, stripped
[schoi0@sel-schoi0-d2 IPTIME]$ 
[schoi0@sel-schoi0-d2 IPTIME]$ chmod u+x busybox 
[schoi0@sel-schoi0-d2 IPTIME]$ ls -l busybox 
-rwxrw-r--. 1 schoi0 schoi0 1109128 12월 29 22:37 busybox
 
[schoi0@sel-schoi0-d2 IPTIME]$ for cmd in `env QEMU_LD_PREFIX=$PWD/t t/bin/busybox | sed -n "/\[\[/,/flash_eraseall/p"|tr -d " \t\n"|tr "," " "`; do [ ${cmd:0:1} = "[" ] && cmd="\\["; ./busybox | grep $cmd >/dev/null || echo "command \"$cmd\" is not in your new busybox."; done
command "lzmacat" is not in your new busybox.
command "uncompress" is not in your new busybox.
command "flash_eraseall" is not in your new busybox.
 
[schoi0@sel-schoi0-d2 IPTIME]$ sudo umount t
jisoohero의 이미지

리팩에서 막혔는데... 그리고 mksquashfs로 하면되긴 하는데 squashfs는 r/w마운트가 안되지 않나요?

Fe.head의 이미지

좋은 자료 감사합니다.

그냥 보고만 있습니다만..
qemu를 저렇게 쓸수 있는거 처음 알았습니다.

고작 블로킹 하나, 고작 25점 중에 1점, 고작 부활동
"만약 그 순간이 온다면 그때가 네가 배구에 빠지는 순간이야"

bushi의 이미지

qemu 뿐만 아니라 wine 도 패키지 설치하면 커널 binfmt 에 등록이 되기 때문에... windows 의 PE exe파일도 그냥 직접 실행가능합니다.
지금보니 java 도 등록되어 있네요...

익명 사용자의 이미지

리팩 성공하신 분 있으시면 소개 부탁드립니다.

bushi의 이미지

"방법이 여기저기 널렸다" 는 말은 취소하겠습니다.
예전엔 squash fs 의 비공식 lzma 지원패치 때문에 preamble 이 괴상했던 것 빼고는 별 특이점이 없었는데,
지금 다시보니 많이 달라졌습니다.
원판인 openwrt 가 바뀌어서 따라 갔는지 어쨌는지는 알 수 없지만... iptime 만의 고유한 컨테이너를 만들었을 가능성이 높다고 생각됩니다.

직접 이것저것 시도해보세요.
벽돌이 되더라도 감수하시고... 성공했다고해서 게시판 같은 곳에 올리지 마시고요.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.