sipeed / LonganPi-3H-SDK

LonganPi 3H SDK
GNU General Public License v3.0
28 stars 14 forks source link

Tailscale #32

Open thbeh opened 5 months ago

thbeh commented 5 months ago

Hi, I am attempting to install Tailscale but have an error saying the TUN module is unavailable. Do I need to make a new image and include the TUN module in the kernel, or is it something that I have missed? Thanks

wu-yue-yu commented 5 months ago

I guess so, I'll update a defconfig with TUN enabled later.

thbeh commented 5 months ago

Ok. Thanks

wu-yue-yu commented 5 months ago

33 should fix this.

thbeh commented 5 months ago

@wu-yue-yu, thanks for the update. I have cloned the latest code, and during mkrootfs, I encountered the following error

I: automatically chosen mode: unshare I: arm64 cannot be executed, falling back to qemu-user Can't exec "/usr/sbin/update-binfmts": No such file or directory at /usr/bin/mmdebstrap line 1923. readline() on closed filehandle $fh at /usr/bin/mmdebstrap line 1924. Use of uninitialized value $binfmts in scalar chomp at /usr/bin/mmdebstrap line 1924. Use of uninitialized value $binfmts in string eq at /usr/bin/mmdebstrap line 1926. E: qemu-aarch64 is not a supported binfmt name at /usr/bin/mmdebstrap line 126. main::error("qemu-aarch64 is not a supported binfmt name") called at /usr/bin/mmdebstrap line 1926 main::main() called at /usr/bin/mmdebstrap line 2400

I have tested both in ubuntu 20.04 and 22.04 with both physical and virtual server. Am I missing anything?

lonerkim commented 5 months ago

have you tried

sudo apt-get install binfmt-support qemu-user-static

?

thbeh commented 5 months ago

Yes, it works after the apt install. Out of curiousity, what is the difference between mkrootfs and mkrootfs-ubuntu?

thbeh commented 5 months ago

During mkrootfs, i saw some of these, dpkg: warning: ignoring pre-dependency problem and also awk is need.

wu-yue-yu commented 5 months ago

Yes, it works after the apt install. Out of curiousity, what is the difference between mkrootfs and mkrootfs-ubuntu?

The mkrootfs.sh is to build debian rootfs, while the mkrootfs-ubuntu is to build ubuntu rootfs.

wu-yue-yu commented 5 months ago

@wu-yue-yu, thanks for the update. I have cloned the latest code, and during mkrootfs, I encountered the following error

I: automatically chosen mode: unshare I: arm64 cannot be executed, falling back to qemu-user Can't exec "/usr/sbin/update-binfmts": No such file or directory at /usr/bin/mmdebstrap line 1923. readline() on closed filehandle $fh at /usr/bin/mmdebstrap line 1924. Use of uninitialized value $binfmts in scalar chomp at /usr/bin/mmdebstrap line 1924. Use of uninitialized value $binfmts in string eq at /usr/bin/mmdebstrap line 1926. E: qemu-aarch64 is not a supported binfmt name at /usr/bin/mmdebstrap line 126. main::error("qemu-aarch64 is not a supported binfmt name") called at /usr/bin/mmdebstrap line 1926 main::main() called at /usr/bin/mmdebstrap line 2400

I have tested both in ubuntu 20.04 and 22.04 with both physical and virtual server. Am I missing anything?

The virtual server may have some problem when running mkrootfs script, I tested on Ubuntu22.04 on lxd. You may need do some configuration according the virtual server you use. My configurations for lxd are listed below:

Screenshot from 2024-03-12 09-43-27 Screenshot from 2024-03-12 09-44-39

wu-yue-yu commented 5 months ago

Also, I have tested the SDK on my WSL2 Ubuntu-22.04, which runs on Win11. There may be build steps of WSL2 in this repo if you need.

thbeh commented 5 months ago

During mkrootfs, i saw some of these, dpkg: warning: ignoring pre-dependency problem and also awk is need.

@wu-yue-yu

wu-yue-yu commented 5 months ago

During mkrootfs, i saw some of these, dpkg: warning: ignoring pre-dependency problem and also awk is need.

@wu-yue-yu

I guess we can just simply ignore these warnings of pre-dependency problem. See output of mmdebstrap --help:

...
--include=pkg1[,pkg2,...]
            Comma or whitespace separated list of packages which will be
            installed in addition to the packages installed by the specified
            variant. The direct and indirect hard dependencies will also be
            installed...
...
thbeh commented 5 months ago

Everything is working well. One more question. How to build a cli version of Debian. Sorry for being such a nuisance. Thanks in advance.

wu-yue-yu commented 5 months ago

Everything is working well. One more question. How to build a cli version of Debian. Sorry for being such a nuisance. Thanks in advance.

You can just delete the software packages which install xfce and other GUI stuff: connman-gtk chromium linux-cpupower task-xfce-desktop xfce4-terminal xfce4-screenshooter fonts-noto-core fonts-noto-cjk fonts-noto-mono fonts-noto-ui-core tango-icon-theme

thbeh commented 5 months ago

Looks good now, with the cli only image. Had to add a couple of packages though.

@wu-yue-yu & @lonerkim, thanks for all your help.

thbeh commented 5 months ago

I have a new question. Where would be the best place to compile a new USB Wi-Fi driver, or is there a way to create a patch for ASUS USB-AC53?

@wu-yue-yu

thbeh commented 5 months ago

I have a new question. Where would be the best place to compile a new USB Wi-Fi driver, or is there a way to create a patch for ASUS USB-AC53?

@wu-yue-yu

Please ignore. Thanks