Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Mon-ius/mentohust-lede-makefile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

3 Steps To Build a Mentohust Package(.ipk) under Openwrt/LEDE Via Docker

Make life more stupid.

Warning

Do not build as root!!! 💩 💩 💩

1st. Install Docker CE && Get LEDE BUILDROOT via hub

  1. Install docker CE
  2. Using a LEDE environment via docker
  • Run command docker search lede.

    You might be showed like this : image 1

  • Choose a repository whatever you like,and type docker pull [Name] pull into local.

  • Run it!

    For example,I choose acrisliu/lede and use command below:

    docker search

    docker pull acrisliu/lede

    docker run -it acrisliu/lede

    And you will notice where you are. image 1

2nd. Copy Makefile into package

if you cannot understand makefile,you should better learn openwrt start before.

  1. change dir into package/,make a mentohust dictionary. (Must Do)
  • mkdir -p package/mentohust
  1. Download Makefile into package/mentohust/ via wget .
  1. Download Makefile into package/mentohust/ via git clone .(optional)

3rd. Build mentohust package(.ipk)

  1. Change dictionry back into repository started.
  2. Choose your config,type Y or type N.
  • make menuconfig you only need to change Target System , Subtarget , Target profile , Press Y in SDK and Toolchain Section . For example,I use rasberrypi 3 model B,it's target system is 'BCM270'. image 2
  1. Enter into NetWork->CERNET,type M to export ipk. image 3
  2. Save config and exit.
  3. Run make package/mentohust/clean and make package/mentohust/compile that depends on your CPU Core Numbers .
  4. Use find command to get .ipk file,find bin/ -name 'mentohust*.ipk'
  5. Finish!

Conclusion

These are all commands use in Ubuntu LTS.

sudo apt-get update

sudo apt-get install docker-ce

docker pull acrisliu/lede

docker run -it acrisliu/lede

git clone https://github.com/Mon-ius/mentohust-lede-makefile.git

cp -r mentohust-lede-makefile/mentohust package/

make menuconfig

make -j 5

make package/mentohust/clean

make package/mentohust/compile

find bin/ -name 'libcap*.ipk' find bin/ -name 'mentohust*.ipk'

Advanced Operation

Docker

- docker run --name lede -it
- docker attach lede
- docker ps 
- docker ps -a
- docker start lede
- docker stop lede
- docker rm lede
- docker cp [name]:/path/to/.ipk .

LEDE SDK

- docker pull nemoalex/openwrt-buildroot
- docker image ls
- docker run --name lede -it nemoalex/openwrt-buildroot 
- wget 'https://downloads.openwrt.org/releases/17.01.4/targets/brcm2708/bcm2710/lede-sdk-17.01.4-brcm2708-bcm2710_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64.tar.xz'
- tar -xf *.tar.xz
- rm *.tar.xz
- mkdir -p lede-sdk-17.01.4-brcm2708-bcm2710_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64/package/mentohust
- wget "https://raw.githubusercontent.com/Mon-ius/mentohust-lede-makefile/master/mentohust/Makefile" -O lede-sdk-17.01.4-brcm2708-bcm2710_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64/package/mentohust/Makefile
- make menuconfig
- make package/mentohust/compile
- find bin/ -name 'mentohust*.ipk'

Back to top