Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:additional-software:imagebuilder [2021/12/20 01:06] – [Troubleshooting] clarify log > logged output someothertimedocs:guide-user:additional-software:imagebuilder [2024/04/01 16:18] – [Arch / Manjaro / EndeavourOS] sixx
Line 27: Line 27:
 Example dependencies in the most common distros: Example dependencies in the most common distros:
  
-==== Arch / Manjaro ====+==== Arch ====
 <code bash> <code bash>
 sudo pacman -S --needed base-devel ncurses zlib gawk git gettext \ sudo pacman -S --needed base-devel ncurses zlib gawk git gettext \
Line 33: Line 33:
 </code> </code>
  
-==== CentOS / Fedora ====+==== Fedora ====
 <code bash> <code bash>
 sudo dnf install git gawk gettext ncurses-devel zlib-devel \ sudo dnf install git gawk gettext ncurses-devel zlib-devel \
 openssl-devel libxslt wget which @c-development @development-tools \ openssl-devel libxslt wget which @c-development @development-tools \
-@development-libs zlib-static which python3+@development-libs zlib-static which python3 perl
 </code> </code>
  
-==== Debian / Ubuntu ====+==== Debian 12+ / Ubuntu / Mint ====
 <code bash> <code bash>
-sudo apt install build-essential libncurses5-dev libncursesw5-dev \ +sudo apt install build-essential libncurses-dev zlib1g-dev gawk git 
-zlib1g-dev gawk git gettext libssl-dev xsltproc rsync wget unzip python+gettext libssl-dev xsltproc rsync wget unzip python3 python3-distutils
 </code> </code>
  
 +==== WSL ====
 +This method is NOT OFFICIALLY supported.
 +But it works.
 +
 +[[docs:guide-developer:toolchain:wsl|Build system setup WSL]]
 ===== Obtaining the Image Builder ===== ===== Obtaining the Image Builder =====
 You can download an archive that contains the **Image Builder**, it is usually located in the same download page where you find the firmware image for your device. You can download an archive that contains the **Image Builder**, it is usually located in the same download page where you find the firmware image for your device.
Line 75: Line 80:
 | ''BIN_DIR'' | Alternative output directory for the images | | ''BIN_DIR'' | Alternative output directory for the images |
 | ''EXTRA_IMAGE_NAME'' | Add this to the output image filename (sanitized) | | ''EXTRA_IMAGE_NAME'' | Add this to the output image filename (sanitized) |
-| ''DISABLED_SERVICES''The names of services from ''/etc/init.d'' to disable, e.g. ''dhcp'' for dnsmasq |+| ''DISABLED_SERVICES''A list of services to disable |
  
 Run ''make help'' to get [[docs:guide-user:additional-software:imagebuilder#detailed_help|detailed help]]. Run ''make help'' to get [[docs:guide-user:additional-software:imagebuilder#detailed_help|detailed help]].
Line 140: Line 145:
  
 <code bash> <code bash>
-make image PROFILE="profile-name" PACKAGES="pkg1 pkg2 pkg3 -pkg4 -pkg5 -pkg6" FILES="files"+make image 
 +PROFILE="profile-name" 
 +PACKAGES="pkg1 pkg2 pkg3 -pkg4 -pkg5 -pkg6" 
 +FILES="files" \ 
 +DISABLED_SERVICES="svc1 svc2 svc3"
 </code> </code>
  
Line 161: Line 170:
 scp root@192.168.1.1:/etc/config/wireless files/etc/config/ scp root@192.168.1.1:/etc/config/wireless files/etc/config/
 scp root@192.168.1.1:/etc/config/firewall files/etc/config/ scp root@192.168.1.1:/etc/config/firewall files/etc/config/
-make image PROFILE="wl500gp" PACKAGES="nano openvpn -ppp -ppp-mod-pppoe" FILES="files"+make image 
 +PROFILE="wl500gp" 
 +PACKAGES="nano openvpn -ppp -ppp-mod-pppoe" 
 +FILES="files" \ 
 +DISABLED_SERVICES="dnsmasq firewall odhcpd"
 </code> </code>
  
Line 275: Line 288:
 The ''repositories.conf'' in an imagebuilder you compile from source will lack the "Remote package repositories" links. The ''repositories.conf'' in an imagebuilder you compile from source will lack the "Remote package repositories" links.
  
-If you want to add a custom local repository, copy the ''%%src custom file:///usr/src/openwrt/bin/ramips/packages%%'' line and modify it to point to the local folder you have your packages and package lists in.+If you want to add a custom local repository, copy the ''%%src custom file:///usr/src/openwrt/bin/ramips/packages%%'' line and modify it to point to the local folder where you have your packages and package lists ([[https://downloads.openwrt.org/releases/21.02.3/targets/ramips/mt7621/packages/Packages|example package list]]).
 If you have problems with using you local repository because the "Signature check failed" then remove the line ''option check_signature'' from ''repositories.conf'' If you have problems with using you local repository because the "Signature check failed" then remove the line ''option check_signature'' from ''repositories.conf''
  
Line 291: Line 304:
 cat << "EOF" > files/etc/uci-defaults/99-custom cat << "EOF" > files/etc/uci-defaults/99-custom
 USER_NAME="admin" USER_NAME="admin"
-USER_GROUP="admin" 
 USER_SSHPUB="SSH_PUBLIC_KEY" USER_SSHPUB="SSH_PUBLIC_KEY"
 USER_SHELL="/bin/ash" USER_SHELL="/bin/ash"
 SUDO_USER="root" SUDO_USER="root"
 SUDO_GROUP="sudo" SUDO_GROUP="sudo"
-SUDO_GID="27+groupadd -r "${SUDO_GROUP}
-uci set dropbear.@dropbear[0].PasswordAuth="0" +useradd -m -G "${SUDO_GROUP}-s "${USER_SHELL}" "${USER_NAME}"
-uci set dropbear.@dropbear[0].RootPasswordAuth="0" +
-uci commit dropbear +
-/etc/init.d/dropbear restart+
 passwd -l "${SUDO_USER}" passwd -l "${SUDO_USER}"
-groupadd -r -g "${SUDO_GID}" "${SUDO_GROUP}" 
-touch /etc/environment 
 cat << EOI > /etc/sudoers.d/00-custom cat << EOI > /etc/sudoers.d/00-custom
 %${SUDO_GROUP} ALL=(ALL) ALL %${SUDO_GROUP} ALL=(ALL) ALL
 EOI EOI
-groupadd "${USER_GROUP}" 
-useradd -m -g "${USER_GROUP}" -G "${SUDO_GROUP}" \ 
--s "${USER_SHELL}" "${USER_NAME}" 
-passwd -d "${USER_NAME}" 
 USER_HOME="$(eval echo ~"${USER_NAME}")" USER_HOME="$(eval echo ~"${USER_NAME}")"
 mkdir -p "${USER_HOME}"/.ssh mkdir -p "${USER_HOME}"/.ssh
Line 316: Line 319:
 ${USER_SSHPUB} ${USER_SSHPUB}
 EOI EOI
-chown -R "${USER_NAME}:${USER_GROUP}" "${USER_HOME}+uci set dropbear.@dropbear[0].PasswordAuth="0
-chmod -R go= "${USER_HOME}"+uci set dropbear.@dropbear[0].RootPasswordAuth="0" 
 +uci commit dropbear 
 +/etc/init.d/dropbear restart
 EOF EOF
-make image FILES="files" PACKAGES="nano shadow sudo"+make image 
 +FILES="files" 
 +PACKAGES="nano shadow sudo"
 </code> </code>
  
  • Last modified: 2024/09/20 19:32
  • by lessload