Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker & openwrt #12

Open
changtimwu opened this issue Jul 20, 2015 · 6 comments
Open

docker & openwrt #12

changtimwu opened this issue Jul 20, 2015 · 6 comments

Comments

@changtimwu
Copy link
Owner

you have to increase size first. 20GB isn't enough for openwrt compilation.
https://docs.docker.com/articles/b2d_volume_resize/

@changtimwu
Copy link
Owner Author

my office's is already 100G. Now we can get 100G in a simpler way.
https://coderwall.com/p/w-zk9w/increase-boot2docker-space-allocation-in-osx

I just upgraded boot2docker via boot2docker upgrade

@changtimwu
Copy link
Owner Author

exited docker container's data are still there. roll a exited container back by

docker start
docker attach

@changtimwu
Copy link
Owner Author

create a Dockerfile like this

FROM phusion/baseimage
RUN dpkg --add-architecture i386
RUN apt-get update
RUN apt-get install -y git-core subversion build-essential gcc-multilib lib32stdc++6 lib32z1 libncurses5-dev zlib1g-dev gawk flex gettext wget unzip python libssl-dev

and build it

 docker build -t wrtbuildimg .

@changtimwu
Copy link
Owner Author

create (without run) a data container named owbuild based on image wrtbuild, it would be always mounted on /root/owbuild within the image wrtbuildimg. This data container creates a data volume at /root/owbuild.

docker create -v /root/owbuild --name owbuild wrtbuildimg

check it by docker ps -a. You can see a container named owbuild out there. Its status is stopped but that's ok since we want it to be a data-only container.

f5f821eefd69        wrtbuildimg              "/bin/bash"         20 minutes ago         owbuild 

run(create) a container, inherits data volumes from owbuild

docker run -it     --volumes-from owbuild     wrtbuildimg  /bin/bash

in order to access files from host. We should add -v

docker run -it -v "$HOME/docker/shared:/root/shared"  --volumes-from owbuild wrtbuildimg  /bin/bash

@changtimwu
Copy link
Owner Author

all the openwrt build should be done in /root/owbuild since it's permanent.

cd /root/owbuild
git clone https://github.com/openwrt-mirror/openwrt.git
cd openwrt
 ./scripts/feeds update

To build luci, please run the two

./scripts/feeds update luci
./scripts/feeds install -a -p luci

copy A385's default config and do necessary modify and then build

wget -o .config https://downloads.openwrt.org/snapshots/trunk/mvebu/generic/config 
make menuconfig
make V=1 -j4

remember to turn on sd/mmc options if your root partition is on SD card.

@changtimwu
Copy link
Owner Author

root@ff03fd162011:~/owbuild/openwrt# ls -alh bin/mvebu/ 
total 36M
drwxr-xr-x 3 root root 4.0K Jul 22 06:58 .
drwxr-xr-x 3 root root 4.0K Jul 22 06:28 ..
-rw-r--r-- 1 root root  28M Jul 22 06:56 OpenWrt-Toolchain-mvebu_gcc-4.8-linaro_musl-1.1.10_eabi.Linux-x86_64.tar.bz2
-rw-r--r-- 1 root root  264 Jul 22 06:58 md5sums
-rw-r--r-- 1 root root 3.5M Jul 22 06:57 openwrt-mvebu-385-RD-rootfs.tar.gz
-rw-r--r-- 1 root root 4.8M Jul 22 06:58 openwrt-mvebu-armada-385-rd-squashfs-firmware.bin
drwxr-xr-x 9 root root 4.0K Jul 22 06:58 packages
-rw-r--r-- 1 root root  469 Jul 22 06:58 sha256sums
  • untar openwrt-mvebu-385-RD-rootfs.tar.gz into the SD card or
  • flash openwrt-mvebu-armada-385-rd-squashfs-firmware.bin into the 8MB SPI flash. ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant