找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 17170|回复: 16

[Debian] 用debootstrap在openwrt上安装debian squeeze,构建编译环境

[复制链接]
发表于 2011-6-24 23:02 | 显示全部楼层 |阅读模式
环境:336固件
用到的相关软件:
debootstrap binutils objdump libbfd
1、opkg 安装 objdump
   因为debootstrap安装debian时,需要用的dpkg或者ar来解包deb软件包,考虑到dpkg安装需要的空间较大,转用ar,而ar在binutils软件包中,ar的运行需要libbfd库支持。因此先安装objdump,连支持库libbfd也安装了
   root@OpenWrt :~#opkg update
   root@OpenWrt:~#opkg install objdump
2、解包binutils,获得ar可执行文件
   opkg安装binutils需要6M多的空间,而我们只需要其中一个ar,所以我只解包取出其中的ar文件
   root@OpenWrt:~#mkdir /mnt/sda1/temp
   root@OpenWrt:~#cd /mnt/sda1/temp
###  wget取得binutils_2.19.1-3_brcm63xx.ipk
   root@OpenWrt:/mnt/sda1/temp# wget http://downloads.openwrt.org/bac ... 19.1-3_brcm63xx.ipk
###  解包binutils_2.19.1-3_brcm63xx.ipk (ipk包实际只是个tgz包,可以用tar解开)
   root@OpenWrt:/mnt/sda1/temp# tar zxvf binutils_2.19.1-3_brcm63xx.ipk
###  解包  data.tar.gz ,获得ar
   root@OpenWrt:/mnt/sda1/temp# tar zxvf data.tar.gz
### 解开后,当前目录usr里面有bin mips-openwrt-linux-uclibc/bin两层目录,里面都有ar,我用了mips-openwrt-linux-uclibc/bin/ar
### 复制ar到/usr/bin里
   root@OpenWrt:/cp usr/mips-openwrt-linux-uclibc/bin/ar  /usr/bin
### 试试ar能否执行
   root@OpenWrt:/mnt/sda1/temp# ar
Usage: ar [emulation options] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...
       ar -M [<mri-script]
commands:
ar 搞掂了
3、安装debootstrap
    debootstrap在RC-4的源上有,需要修改opkg设置
    root@OpenWrt:/vi /etc/opkg.conf
    ###将源修改为下面地址 ,保存
    src/gz packages http://downloads.openwrt.org/bac ... 4/brcm63xx/packages
    ###安装debootstrap
    root@OpenWrt:/opkg updat
    root@OpenWrt:/opkg install debootstrap
    ###安装完后,最好修改原来的源地址设置。
4、安装debian
    root@OpenWrt:~# mkdir /mnt/sda1/debian_mips
    root@OpenWrt:~# debootstrap  --arch=mips --variant=minbase  squeeze /mnt/sda1/debian_mips http://mirrors.geekbone.org/debian/
    ###等等等。。。。。若干十分钟后,安装完成后,就有了一个debain了。
5、chroot进行debian
    root@OpenWrt:~#mount -o bind /proc /mnt/sda1/debian_mips/proc
    root@OpenWrt:~#mount -o bind /dev /mnt/sda1/debian_mips/dev
    root@OpenWrt:~#chroot /mnt/sda1/debian_mips /bin/bash
    ###chroot后,apt-get update,mount磁盘。。。等等等等,之后的事情,就看你的需要了。。。exit退回openwrt环境。

评分

参与人数 1恩山币 -3 收起 理由
axishero -3 抄袭,骗分

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
发表于 2011-6-25 08:14 | 显示全部楼层
环境:336固件
用到的相关软件:
debootstrap binutils objdump libbfd
1、opkg 安装 objdump
   因为debootstrap安装debian时,需要用的dpkg或者ar来解包deb软件包,考虑到dpkg安装需要的空间较大,转用ar,而a ...
kokoro 发表于 2011-6-24 23:02

完全是抄袭他人博客的帖子,也不注明出处!骗分?
http://domiso.tk/?post=26
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-6-25 09:47 | 显示全部楼层
完全是抄袭他人博客的帖子,也不注明出处!骗分?
http://domiso.tk/?post=26
axishero 发表于 2011-6-25 08:14



兄弟啊,我两个好朋友的私人blog相继挂了,所以我才贴过来的~~~~~~

只为了保护一些稀缺信息~~~~~~~~

可能我没有说明出处是我不好,但是我依然要转,否则真的到时候就翻不到了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-6-25 10:42 | 显示全部楼层
兄弟啊,我两个好朋友的私人blog相继挂了,所以我才贴过来的~~~~~~

kokoro 发表于 2011-6-25 09:47


还在狡辩!既然是转帖,就该注明是转帖,出处在哪。

只有你这样不尊重原创的人,才会去捧老鹰的打包固件。

另外告诉你,西数绿盘不是垃圾,不会用的人才是垃圾!我已经挂PT半年多了,啥事都没有。

我的西数2T绿盘是4K绝对错不了,显示512k是因为我按对称格式化了,想知道怎么对称格式化问谷歌帝去。

点评

顶!  发表于 2014-6-10 08:34
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-6-25 21:44 | 显示全部楼层
还在狡辩!既然是转帖,就该注明是转帖,出处在哪。

只有你这样不尊重原创的人,才会去捧老鹰的打包固件。

另外告诉你,西数绿盘不是垃圾,不会用的人才是垃圾!我已经挂PT半年多了,啥事都没有。

我的 ...
axishero 发表于 2011-6-25 10:42



当然可以用咯,就是折腾啊,我买个硬盘,但是我不想还要用到谷歌解决对齐问题
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-6-25 21:55 | 显示全部楼层
我是domiso.tk的博主.
没关系啦,能带给大家有用的信息就好~~~~分享是开心,快乐的~~~
握握手~~~~
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-6-26 00:42 | 显示全部楼层
当然可以用咯,就是折腾啊,我买个硬盘,但是我不想还要用到谷歌解决对齐问题
kokoro 发表于 2011-6-25 21:44

什么是折腾?win7能很好的支持高级格式化,默认分区就是对称的,linux分区只要指定是从64的倍数开始也是对称,难吗,只能说明你太懒或者太笨, 本人不稀饭gz某飞线帝的那个范儿。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-6-26 09:52 | 显示全部楼层
什么是折腾?win7能很好的支持高级格式化,默认分区就是对称的,linux分区只要指定是从64的倍数开始也是对称,难吗,只能说明你太懒或者太笨, 本人不稀饭gz某飞线帝的那个范儿。
axishero 发表于 2011-6-26 00:42



我现在用的就是win7 64,你觉得我不清楚吗?

ears确实是有固件问题的,我身边的一个朋友硬盘当掉之后,告诉亲口和我说的,如何坏的原因。和修复的几乎不可能。悲剧的

就是它坏块多了之后,坏块列表填满了,再有新的坏块出来,就死循环~~~~~很悲剧的~~~~~~~无法读取,无法擦除,换pcb数据全丢~~~~~~~~甚至连刷写固件都不可。非常纠结的
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-6-26 09:53 | 显示全部楼层
而且许多挂机的人 用winxp也是大有人在的,这问题很蛋疼的,你不用不等于别人不用啊~~~~~~
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-10-2 13:19 | 显示全部楼层
1# kokoro


卡在着一步了
debootstrap  --arch=mips --variant=minbase  squeeze /mnt/sda1/debian_mips http://mirrors.geekbone.org/debian/
  1. root@OpenWrt:~# debootstrap --arch=mips --variant=buildd squeeze /mnt/debian htt
  2. p://mirrors.163.com/debian/
  3. I: Retrieving Release
  4. E: Invalid Release file, no valid components
复制代码
怎么解决?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-10-2 17:36 | 显示全部楼层
楼主太悲催了, 费这么大劲居然被骂抄袭...

debootstrap不用你这么麻烦的, 看这里:
http://hi.baidu.com/myeyre/blog/ ... df3a85a1ec9c34.html
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-10-2 18:46 | 显示全部楼层
1# kokoro


卡在着一步了
root@OpenWrt:~# debootstrap --arch=mips --variant=buildd squeeze /mnt/debian htt
p://mirrors.163.com/debian/
I: Retrieving Release
E: Invalid Release file, no valid c ...
Ferrets 发表于 2011-10-2 13:19

你连命令都复制错了  --variant=minbase
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-10-4 23:32 | 显示全部楼层
12# axishero


结果是一样的……
查询help 的结果是

  1.       --variant=X            use variant X of the bootstrap scripts
  2.                              (currently supported variants: buildd, fakechroot,
  3.                               scratchbox)
复制代码
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-10-10 03:55 | 显示全部楼层
W: Failure trying to run: chroot /mnt/sda1/debian_mips dpkg --force-depends --install /var/cache/apt/archives/base-files_6.0squeeze3_mips.deb /var/cache/apt/archives/base-passwd_3.5.22_mips.deb
这个是咋回事啊~~
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-12-20 10:48 | 显示全部楼层
本帖最后由 hxzyf 于 2011-12-20 11:41 编辑

debootstrap  --arch=mips --variant=minbase  squeeze /mnt/sd
a1/debian_mips http://mirrors.geekbone.org/debian/
I: Retrieving Release
I: Retrieving Packages
就卡在这里啦!几天啦!
换了不同的源都不行啊
安装debian日志debootstrap.log文件内容!
wget: server returned error: HTTP/1.1 404 Not Found
wget: server returned error: HTTP/1.1 404 Not Found
wget: server returned error: HTTP/1.1 404 Not Found
wget: server returned error: HTTP/1.1 404 Not Found
wget: server returned error: HTTP/1.1 404 Not Found
wget: cannot connect to remote host (123.58.173.106): Connection refused
wget: cannot connect to remote host: Network is unreachable
wget: server returned error: HTTP/1.1 404 Not Found
wget: server returned error: HTTP/1.1 404 Not Found
wget: server returned error: HTTP/1.1 404 Not Found
wget: server returned error: HTTP/1.1 404 Not Found
wget: server returned error: HTTP/1.1 404 Not Found
wget: server returned error: HTTP/1.1 404 Not Found
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-3-29 14:15

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表