##// END OF EJS Templates
a
Unknown -
r683:a2fb2688e75a
parent child
Show More
@@ -75,14 +75,14 chroot_install_cc() {
75 if [ -z "${COMPILER_PACKAGES}" ] ; then
75 if [ -z "${COMPILER_PACKAGES}" ] ; then
76 COMPILER_PACKAGES=$(chroot_exec apt-get -s install g++ make bc | grep "^Inst " | awk -v ORS=" " '{ print $2 }')
76 COMPILER_PACKAGES=$(chroot_exec apt-get -s install g++ make bc | grep "^Inst " | awk -v ORS=" " '{ print $2 }')
77 # Install COMPILER_PACKAGES in chroot - NEVER do "${COMPILER_PACKAGES}" -> breaks uboot
77 # Install COMPILER_PACKAGES in chroot - NEVER do "${COMPILER_PACKAGES}" -> breaks uboot
78 chroot_exec apt-get -q -y --allow-unauthenticated --no-install-recommends install ${COMPILER_PACKAGES}
78 chroot_exec apt-get -q -y --allow-unauthenticated --no-install-recommends install "${COMPILER_PACKAGES}"
79 fi
79 fi
80 }
80 }
81
81
82 chroot_remove_cc() {
82 chroot_remove_cc() {
83 # Remove c/c++ build environment from the chroot
83 # Remove c/c++ build environment from the chroot
84 if [ -n "${COMPILER_PACKAGES}" ] ; then
84 if [ -n "${COMPILER_PACKAGES}" ] ; then
85 chroot_exec apt-get -qq -y --auto-remove purge ${COMPILER_PACKAGES}
85 chroot_exec apt-get -qq -y --auto-remove purge "${COMPILER_PACKAGES}"
86 COMPILER_PACKAGES=""
86 COMPILER_PACKAGES=""
87 fi
87 fi
88 }
88 }
@@ -92,8 +92,8 cdr2mask ()
92 {
92 {
93 # Number of args to shift, 255..255, first non-255 byte, zeroes
93 # Number of args to shift, 255..255, first non-255 byte, zeroes
94 set -- $(( 5 - ($1 / 8) )) 255 255 255 255 $(( (255 << (8 - ($1 % 8))) & 255 )) 0 0 0
94 set -- $(( 5 - ($1 / 8) )) 255 255 255 255 $(( (255 << (8 - ($1 % 8))) & 255 )) 0 0 0
95 [ $1 -gt 1 ] && shift $1 || shift
95 [ "$1" -gt 1 ] && shift "$1" || shift
96 echo ${1-0}.${2-0}.${3-0}.${4-0}
96 echo "${1-0}"."${2-0}"."${3-0}"."${4-0}"
97 }
97 }
98
98
99 # GPL v2.0 - #https://github.com/sakaki-/bcmrpi3-kernel-bis/blob/master/conform_config.sh
99 # GPL v2.0 - #https://github.com/sakaki-/bcmrpi3-kernel-bis/blob/master/conform_config.sh
@@ -101,7 +101,7 set_kernel_config() {
101 # flag as $1, value to set as $2, config must exist at "./.config"
101 # flag as $1, value to set as $2, config must exist at "./.config"
102 TGT="CONFIG_${1#CONFIG_}"
102 TGT="CONFIG_${1#CONFIG_}"
103 REP="${2}"
103 REP="${2}"
104 if [ grep -q "^${TGT}[^_]" .config ] ; then
104 if grep -q "^${TGT}[^_]" .config ; then
105 sed -i "s/^\(${TGT}=.*\|# ${TGT} is not set\)/${TGT}=${REP}/" .config
105 sed -i "s/^\(${TGT}=.*\|# ${TGT} is not set\)/${TGT}=${REP}/" .config
106 else
106 else
107 echo "${TGT}"="${2}" >> .config
107 echo "${TGT}"="${2}" >> .config
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant