用chroot測試SDK,make時出現下面的錯誤
cat: /proc/cpuinfo: No such file or directory
解決,
sudo mount --bind /proc <chroot dir>/proc
2017年4月25日 星期二
2017年4月21日 星期五
Build openWRT Image
- sudo tar -Jxv -f xxx-openwrt-sdk-xxx.tar.bz2
- apt-get install subversion
apt-get install wget
apt-get install libncurses5-dev
apt-get install zlib1g-dev
apt-get install gawk
apt-get install unzip
apt-get install python
apt-get install git
apt-get install file - git init
- cp util-linux-2.24.1.tar.xz到dl目錄
- make menuconfig
- make V=s (第一次要連網)
- 因util-linux-2.24.1.tar.xz已從server拿掉,自行下載copy到dl目錄。
-
遇到底下錯誤要先做git init
ramips_mt7621/base-files/ipkg-ramips_24kec/base-files/etc/banner
cat: /home/work/openwrt-sdk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7621/base-files/ipkg-ramips_24kec/base-files/etc/sdk.version: No such file or directory
測試SDK是否能在不同版本的Ubuntu使用(chroot)
使用chroot測試
sudo debootstrap --arch amd64 --keyring=/etc/apt/trusted.gpg lucid /home/victor/Workspace/hisilicon http://old-releases.ubuntu.com/ubuntu/
Bind Filesystem
/etc/fstab
/dev /home/XXX/xenial/dev auto bind 0 0
/dev/pts /home/XXX/xenial/dev/pts auto bind 0 0
/proc /home/XXX/xenial/proc auto bind 0 0
- sudo apt-get install schroot debootstrap
- 增加下面描述至/etc/schroot/schroot.conf
[xenial]
description=Ubuntu Xenial (LTS)
directory=/home/XXX/xenial
users=XXX //主體使用者名稱
groups=XXX //主體使用者群組
root-groups=root
aliases=unstable,default - mkdir /home/XXX/xenial
- sudo debootstrap --variant=buildd --arch amd64 xenial /home/XXX/xenial http://archive.ubuntu.com/ubuntu/
or
sudo debootstrap --arch amd64 xenial /home/XXX/xenial http://archive.ubuntu.com/ubuntu/ - sudo mkdir /home/XXX/xenial/home/XXX
- schroot -c xenial -u XXX
- exit
- 安裝sudo and language
sudo chroot /home/XXX/xenial
apt-get install sudo
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales
exit - 增加user and group
sudo chroot /home/XXX/xenial /bin/bash
groupadd XXX
useradd -g XXX XXX
passwd XXX
exit
sudo debootstrap --arch amd64 --keyring=/etc/apt/trusted.gpg lucid /home/victor/Workspace/hisilicon http://old-releases.ubuntu.com/ubuntu/
Bind Filesystem
/etc/fstab
/dev /home/XXX/xenial/dev auto bind 0 0
/dev/pts /home/XXX/xenial/dev/pts auto bind 0 0
/proc /home/XXX/xenial/proc auto bind 0 0
訂閱:
文章 (Atom)