Skip to content

Commit

Permalink
Add module for the xradio - WIP. Issue #7
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Molteno committed May 31, 2022
1 parent fc69fe1 commit a03aa5e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ WORKDIR /build
RUN make ARCH=riscv -C linux O=../linux-build nezha_defconfig
RUN make -j `nproc` -C linux-build ARCH=riscv $CROSS V=0
# Files reside in /build/linux-build/arch/riscv/boot/Image.gz
RUN apt-get install -y kmod
RUN make -j `nproc` -C linux-build ARCH=riscv $CROSS INSTALL_MOD_PATH=/build/modules modules_install



#
Expand All @@ -85,6 +88,15 @@ RUN make -j `nproc` ARCH=riscv $CROSS KSRC=../linux-build modules
RUN ls -l
# Module resides in /build/rtl8723ds/8723ds.ko

WORKDIR /build
COPY kernel/xradio/ ./xradio/
WORKDIR /build/xradio
RUN make ARCH=riscv $CROSS -C /build/linux-build M=$PWD KBUILD_MODPOST_WARN=Y modules
RUN ls -l
# Module resides in /build/xr829/xr829.ko




############################################################################################
#
Expand Down Expand Up @@ -159,21 +171,27 @@ WORKDIR /build
COPY --from=build_kernel /build/linux-build/ ./linux-build/
COPY --from=build_kernel /build/linux/ ./linux/
COPY --from=build_kernel /build/rtl8723ds/8723ds.ko .
COPY --from=build_kernel /build/xradio/xradio_wlan.ko .

WORKDIR /build/linux-build
RUN make ARCH=riscv INSTALL_MOD_PATH=/port/rv64-port modules_install


RUN ls /port/rv64-port/lib/modules/ > /kernel_ver
RUN echo "export MODDIR=$(ls /port/rv64-port/lib/modules/)" > /moddef
RUN ls /port/rv64-port/lib/modules/
RUN . /moddef; echo "Creating wireless module in ${MODDIR}"
RUN . /moddef; install -v -D -p -m 644 /build/8723ds.ko /port/rv64-port/lib/modules/${MODDIR}/kernel/drivers/net/wireless/8723ds.ko
RUN . /moddef; install -v -D -p -m 644 /build/xradio_wlan.ko /port/rv64-port/lib/modules/${MODDIR}/kernel/drivers/net/wireless/xradio_wlan.ko



RUN . /moddef; rm /port/rv64-port/lib/modules/${MODDIR}/build
RUN . /moddef; rm /port/rv64-port/lib/modules/${MODDIR}/source

RUN . /moddef; depmod -a -b /port/rv64-port "${MODDIR}"
RUN echo '8723ds' >> /port/rv64-port/etc/modules
RUN echo 'xradio_wlan' >> /port/rv64-port/etc/modules

# This may not be needed as it should be done by the networking setup.
# RUN cp /etc/resolv.conf /port/rv64-port/etc/resolv.conf
Expand Down
15 changes: 10 additions & 5 deletions kernel/update_kernel_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function add_config() {
add_config 'CONFIG_DEFAULT_HOSTNAME' '"lichee"'
# enable WiFi
add_config 'CONFIG_WIRELESS' 'y'
add_config 'CONFIG_CFG80211' 'm'
add_config 'CONFIG_CFG80211' 'y'
# enable /proc/config.gz
add_config 'CONFIG_IKCONFIG_PROC' 'y'
# There is no LAN. so let there be USB-LAN
Expand Down Expand Up @@ -91,10 +91,15 @@ add_config 'CONFIG_VIDEO_SUNXI_CEDRUS' 'y'
# 1.14" 135×240 SPI LCD screen.
# Sitronix ST7789V controller
#
add_config 'CONFIG_GPIOLIB' 'y'
add_config 'CONFIG_FB' 'y'
add_config 'CONFIG_FB_TFT' 'y'
add_config 'CONFIG_FB_TFT_ST7789V' 'y'
add_config 'DRM_PANEL_MIPI_DBI' 'y'
add_config 'MAC80211' 'y'
add_config 'CRYPTO' 'y'
add_config 'CRYPTO_LIB_ARC4' 'y'
add_config 'CRYPTO_AES' 'y'
add_config 'CRYPTO_CCM' 'y'
add_config 'CRYPTO_GCM' 'y'
add_config 'CRYPTO_CMAC' 'y'
add_config 'CRC32' 'y'

echo "Config File Follows #####################"
cat ${CONF_FILE}

0 comments on commit a03aa5e

Please sign in to comment.