##// END OF EJS Templates
more varia
Unknown -
r357:9789f021899d
parent child
Show More
@@ -135,17 +135,17 ln -sf firmware/config.txt "${R}/boot/config.txt"
135 ln -sf firmware/cmdline.txt "${R}/boot/cmdline.txt"
135 ln -sf firmware/cmdline.txt "${R}/boot/cmdline.txt"
136
136
137 # Install and setup kernel modules to load at boot
137 # Install and setup kernel modules to load at boot
138 mkdir -p "${R}/lib/modules-load.d/"
138 mkdir -p "${LIB_DIR}/modules-load.d/"
139 install_readonly files/modules/rpi2.conf "${R}/lib/modules-load.d/rpi2.conf"
139 install_readonly files/modules/rpi2.conf "${LIB_DIR}/modules-load.d/rpi2.conf"
140
140
141 # Load hardware random module at boot
141 # Load hardware random module at boot
142 if [ "$ENABLE_HWRANDOM" = true ] && [ "$BUILD_KERNEL" = false ] ; then
142 if [ "$ENABLE_HWRANDOM" = true ] && [ "$BUILD_KERNEL" = false ] ; then
143 sed -i "s/^# bcm2708_rng/bcm2708_rng/" "${R}/lib/modules-load.d/rpi2.conf"
143 sed -i "s/^# bcm2708_rng/bcm2708_rng/" "${LIB_DIR}/modules-load.d/rpi2.conf"
144 fi
144 fi
145
145
146 # Load sound module at boot
146 # Load sound module at boot
147 if [ "$ENABLE_SOUND" = true ] ; then
147 if [ "$ENABLE_SOUND" = true ] ; then
148 sed -i "s/^# snd_bcm2835/snd_bcm2835/" "${R}/lib/modules-load.d/rpi2.conf"
148 sed -i "s/^# snd_bcm2835/snd_bcm2835/" "${LIB_DIR}/modules-load.d/rpi2.conf"
149 else
149 else
150 echo "dtparam=audio=off" >> "${BOOT_DIR}/config.txt"
150 echo "dtparam=audio=off" >> "${BOOT_DIR}/config.txt"
151 fi
151 fi
@@ -153,16 +153,16 fi
153 # Enable I2C interface
153 # Enable I2C interface
154 if [ "$ENABLE_I2C" = true ] ; then
154 if [ "$ENABLE_I2C" = true ] ; then
155 echo "dtparam=i2c_arm=on" >> "${BOOT_DIR}/config.txt"
155 echo "dtparam=i2c_arm=on" >> "${BOOT_DIR}/config.txt"
156 sed -i "s/^# i2c-bcm2708/i2c-bcm2708/" "${R}/lib/modules-load.d/rpi2.conf"
156 sed -i "s/^# i2c-bcm2708/i2c-bcm2708/" "${LIB_DIR}/modules-load.d/rpi2.conf"
157 sed -i "s/^# i2c-dev/i2c-dev/" "${R}/lib/modules-load.d/rpi2.conf"
157 sed -i "s/^# i2c-dev/i2c-dev/" "${LIB_DIR}/modules-load.d/rpi2.conf"
158 fi
158 fi
159
159
160 # Enable SPI interface
160 # Enable SPI interface
161 if [ "$ENABLE_SPI" = true ] ; then
161 if [ "$ENABLE_SPI" = true ] ; then
162 echo "dtparam=spi=on" >> "${BOOT_DIR}/config.txt"
162 echo "dtparam=spi=on" >> "${BOOT_DIR}/config.txt"
163 echo "spi-bcm2708" >> "${R}/lib/modules-load.d/rpi2.conf"
163 echo "spi-bcm2708" >> "${LIB_DIR}/modules-load.d/rpi2.conf"
164 if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ]; then
164 if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ]; then
165 sed -i "s/spi-bcm2708/spi-bcm2835/" "${R}/lib/modules-load.d/rpi2.conf"
165 sed -i "s/spi-bcm2708/spi-bcm2835/" "${LIB_DIR}/modules-load.d/rpi2.conf"
166 fi
166 fi
167 fi
167 fi
168
168
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant