#Cara membuat file IPK (Compile)

1 messages · Page 1 of 1 (latest)

spiral cipher
#

Untuk kalian yang ingin mencoba membuat file IPK (Compile). Bisa mengikuti cara saya.

#
  1. Install sistem operasi Linux, (Recomended menggunakan Ubuntu atau Lubuntu) | Bisa juga menggunakan VirtualBox atau apapun itu yang terpenting sudah ada OSnya
#
  1. Lakukan perintah ini untuk mengupdate OSnya
sudo apt update && sudo apt upgrade -y
#
  1. Lakukan instalasi pendukung
sudo apt update && sudo apt install build-essential clang flex bison g++ gawk gcc-multilib g++-multilib gettext git libncurses-dev libssl-dev python3-distutils rsync unzip zlib1g-dev file wget tar
#
  1. Download SDK sesuai target yang ingin di compile di https://downloads.openwrt.org/
    Example
https://downloads.openwrt.org/releases/23.05.2/targets/x86/64/openwrt-sdk-23.05.2-x86-64_gcc-12.3.0_musl.Linux-x86_64.tar.xz

Download dengan perintah

wget https://downloads.openwrt.org/releases/23.05.2/targets/x86/64/openwrt-sdk-23.05.2-x86-64_gcc-12.3.0_musl.Linux-x86_64.tar.xz

Note : Untuk compile IPK dengan target ALL. Direkomendasikan menggunakan SDK x86

#
  1. Buat folder dan extrack SDK yang sudah di download dengan perintah
    Membuat folder
mkdir <namafolder>

Extrack SDK

tar -xf <namafile> -C <namafolder> --strip-components=1

Example

tar -xf openwrt-sdk-23.05.2-x86-64_gcc-12.3.0_musl.Linux-x86_64.tar.xz -C IPK --strip-components=1
#
  1. Masuk ke dalam folder IPK, update feeds dan install feeds SDK
cd <namafolder>
./scripts/feeds update -a

Opsional | Kita bisa saja menginstall semua feeds yang sudah terupdate dengan cara

./scripts/feeds install -a

Tetapi itu sangatlah lama, saya lebih merekomendasikan install saja yang diperlukan. Contoh saya ingin compile luci-app-cloudflared dengan LUCI_DEPENDS=+cloudflared
Ya tinggal install itu saja dengan perintah

./scripts/feeds install cloudflared
#
  1. Upload coding file yang ingin di compile bisa dengan FileBrowser, atau apapun itu pada folder package

Note: Untuk susunan file bisa lihat pada luci-app-example.

Atau nanti saya akan share dibawah bagaimana susunannya

#
  1. Compile IPK dengan perintah
make package/<namaipk>/compile

Example

make package/luci-app-cloudflared/compile

Note: Bila tidak berhasil, gunakan V=Sc atau V=s untuk melihat pada bagian apa yang bermasalah

Example

make package/luci-app-cloudflared/compile V=Sc
#
  1. Bila berhasil. File IPK akan ada pada folder bin | Telusuri saja sendiri ok
#

CC: @dusk bramble @gilded kestrel

#

Istilah yang digunakan untuk compile file
Folder htdocs | Untuk memasukkan file pada folder www /www
Folder luasrc | Untuk memasukkan file pada folder lua /usr/lib/lua/luci/
Folder root | Untuk memasukkan file pada root /

#

Susunan file coding LUA

#controller
luasrc/controller/<file_controller>

#cbi
luasrc/model/cbi/<file_cbi>

#view
luasrc/view/<file_view>

#config
root/etc/config/<file_config>

#init.d
root/etc/config/init.d/<file_init>

#uci
root/etc/config/uci-defaults/<file_uci>

#acl.d untuk akses
root/usr/share/rpcd/acl.d/<nama_ipk>.json

Note: Untuk file yang lebih dari 1 lebih baik membuat folder dengan nama ipk. Jangan langsung pada folder yang satu

Example

#controller
luasrc/controller/gpioled.lua

#cbi
luasrc/model/cbi/gpioled/base.lua 
luasrc/model/cbi/gpioled/logs.lua

#view
luasrc/view/gpioled/ad-mon.htm
luasrc/view/gpioled/ad-status.htm
luasrc/view/gpioled/id-status.htm
luasrc/view/gpioled/logs.htm
luasrc/view/gpioled/pwr-status.htm

#config
root/etc/config/gpioled

#init.d
root/etc/config/init.d/gpioled

#uci
root/etc/config/uci-defaults/40_luci-gpioled

#acl.d untuk akses
root/usr/share/rpcd/acl.d/luci-app-gpioled.json
#

Susunan file coding JS

#view
htdocs/luci-static/resources/view/<file_js>

#overview
htdocs/luci-static/resources/view/status/include/<file_js>

#config
root/etc/config/<file_config>

#menu.d untuk menu
root/usr/share/luci/menu.d/<nama_ipk>.json

#acl.d untuk akses
root/usr/share/rpcd/acl.d/<nama_ipk>.json

Example

#view
htdocs/luci-static/resources/view/ipinfo.js

#overview
htdocs/luci-static/resources/view/status/include/01_ipinfo.js

#config
root/etc/config/ipinfo

#menu.d untuk menu
root/usr/share/luci/menu.d/luci-app-ipinfo.json

#acl.d untuk akses
root/usr/share/rpcd/acl.d/luci-app-ipinfo.json
#

Untuk file makefile. Saya rekomendasikan jangan buat sendiri, tetapi ambil dari resources yang sudah ada saja. Karena file Makefile terkadang error entah kenapa jika kita membuat sendiri

#

Jika ada yang ingin ditanyakan, silahkan di dalam sini saja. Thanks

gilded kestrel
#

@spiral cipher Baru mulai setup lagi Mbah. Abis install ulang PC

spiral cipher
#

Coba lihat dulu susunan filenya..

Ditata dulu sebelum coba compile

gilded kestrel
#

Capek juga balikin settingan seperti PC sebelumnya, banyak bet yang musti di config

spiral cipher
gilded kestrel
#

Ini juga virtualbox kog mbah

dusk bramble
#

sider ijin nyimak 🙏

gilded kestrel
#

Cuman Ane abis ganti nvme

#

Sekalian aja install ulang

spiral cipher
#

Eh iya ya bener...

Tapi ngapain pake destop jirr.. Mode cli aja

spiral cipher
gilded kestrel
dusk bramble
gilded kestrel
#

buat install app lain2 juga hihihi

spiral cipher
dusk bramble
#

enak wsl pake cli 🗿

gilded kestrel
#

Nih biang kerok yang bikin terpaksa nambah penyimpanan. Drive C capek ngebersihin

spiral cipher
gilded kestrel
spiral cipher
dusk bramble
gilded kestrel
spiral cipher
gilded kestrel
spiral cipher
spiral cipher
dusk bramble
#

ku matiin wsl biyuhh,, lega langsung

spiral cipher
gilded kestrel
#

Ni pada pake linux apa aja mbah, ane gonta ganti linux tetep balik lagi ke MX linux 21

spiral cipher
gilded kestrel
#

Linux MX23 buat ngebuild gagal2 muilu

spiral cipher
#

Sama archlinux

dusk bramble
#

untuk desktop enak linux mint 🗿

spiral cipher
spiral cipher
gilded kestrel
spiral cipher
gilded kestrel
#

Wah gk ane SS kemarin

spiral cipher
#

Feeling saya mah yaa pasti Makefilenya 😂

gilded kestrel
#

3x ane install MX23 gk berhasil build

gilded kestrel
#

Iya kayaknya, makefilenya not found bla bla

spiral cipher
gilded kestrel
#

gk ada waktu buat ngefix lagi akhirnya balik MX21

spiral cipher
dusk bramble
#

wakaowakowakowakwak

gilded kestrel
#

Build pake manjaro bisa gk ya?

dusk bramble
#

aslinnya sih,, gara2 vscode pake spasi, ndak tab hahaha

spiral cipher
gilded kestrel
#

Tapi takut corrupt lagi ane. wkwkwk

dusk bramble
#
gilded kestrel
#

pernah pake manjaro lama trus corupt, kampret dah

dusk bramble
spiral cipher
#

Paling aman sih pake ubuntu selama saya bermain di openwrt

dusk bramble
#

hooh, base ubuntu aman

spiral cipher
#

Pas pake arch anjirr lah banyak banget paket yang harus kita cari sendiri

dusk bramble
#

full supprot bang

gilded kestrel
#

Tp kl gk buat openwrt mantul juga mbah manjaro. GG jg itu Distro

spiral cipher
#

Makasih @dusk bramble atas arahannya

spiral cipher
dusk bramble
#

waduh 🗿

spiral cipher
#

Eh tapi wsl ada yang openwrt ga sih

spiral cipher
dusk bramble
#

fix 10menit build kernel @brisk wagon

spiral cipher
# spiral cipher Eh tapi wsl ada yang openwrt ga sih
dusk bramble
#

samain aja requirement ama ubuntu,, sama aja kok

spiral cipher
#

Kalau build sih pasti bisa..

dusk bramble
spiral cipher
dusk bramble
spiral cipher
#

Gimana ini mbah @gilded kestrel udah selesai belum?

spiral cipher
dusk bramble
#

🗿 yakali openwrt dibuat subsystem,, mending virtualbox njir

#

coba htop, muncul 16 core tuh 🤣

spiral cipher
#

kwkwkwk udah di hapus juga

gilded kestrel
spiral cipher
gilded kestrel
bitter mason
#

ipk itu bisa diinstal utk semua prosesor(x86, amlogic mediatek) kah?

spiral cipher
bitter mason
spiral cipher
empty citrus
#

@spiral cipher om app stat fix ipk nya ada kah

spiral cipher
sinful junco
#

@spiral cipher om, bisa ngga sih cross compile python untuk luci lua?