aiemassfiria / Handsomemod-uf896

A fork of OpenWrt-based "Handsomemod" operating system targeted to the ["UF896" stick-format WiFi/LTE router](https://forum.openwrt.org/t/131712).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README.md last updated on: 2022-10-18.

HandsomeMod logo 00_-_topside.jpg

HandsomeMod router operating system for "OpenStick" UF896.

This repository is a fork of the "uf896"-branch of "kirdesde/Handsomemod", which itself is based on "HandsomeMod/HandsomeMod".

It is an operating system based on OpenWrt, but with many changes and additions.

As "kirdesde/Handsomemod", this repository too is especially targeted at supporting the UF896 LTE/WiFi routers which come in the form factor of an USB stick. A discussion about this devices with links to further projects can be found here on the OpenWrt forum.

The purpose of this repository is to have a place for my modifications and fixes I apply for the UF896 support.

Photographs (*click* to open):

00_-_topside.jpg 01_-_PCB_SoCside.jpg 02_-_PCB_SIMside.jpg 03_-_PCB_SoCside-with-antenna-and-heatsink-attached.jpg 04_-_PCB_SIMside-with-antenna-attached.jpg 05_-_bottomside.jpg 06_-_cover_open_typesticker.jpg

It is based on OpenWrt 21.02 and heavily modified. It uses a Linux kernel version 5.10.33.

Building

In general, the building instructions from the OpenWrt project apply, but different repositories are used.

To build the firmware for the UF896 from this repository, use the following steps:

  1. Make sure you have the OpenWrt build requirements fulfilled.
    On Arch Linux and Arch based distributions, installing the AUR package "openwrt-devel" does pull in all needed dependencies.
  2. Clone this repository: git clone https://github.com/dreirund/Handsomemod-uf896.git.
  3. cd into the clone: cd Handsomemod-uf896.
  4. Generate feeds.conf from the default: cp feeds.conf.default feeds.conf.
  5. Make sure that in the feeds.conf the following feeds are enabled (note that the "packages" feed comes from HandsomeMod and not from OpenWrt, and also note the extra "handsomefeed" feed):
    src-git packages https://github.com/HandsomeMod/packages.git
    src-git luci https://git.openwrt.org/project/luci.git;openwrt-21.02
    src-git routing https://git.openwrt.org/feed/routing.git;openwrt-21.02
    src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-21.02
    src-git handsomefeed https://github.com/HandsomeMod/handsomefeed.git
    
    (Other feeds might be available as well.)
  6. Install packages from the feeds: ./scripts/feeds update -a && ./scripts/feeds install -a.
  7. Select the default configuration for the UF896:
    1. make menuconfig,
    2. Select the following options:
      1. Target System: Qualcomm Msm89xx Soc (CONFIG_TARGET_msm89xx=y),
      2. Subtarget: Msm8916 Soc based Targets (CONFIG_TARGET_msm89xx_msm8916=y),
      3. Target Profile: Openstick UF896 (CONFIG_TARGET_msm89xx_msm8916_DEVICE_openstick_uf896=y),
      4. Select Save and then Exit the configuration (do not do further configurations now).
    3. Generate default configuration for the selected target: make defconfig.
  8. If you want, configure options to your liking now: make menuconfig.
  9. Build the firmware image: make.

You can also use example .config (that is my .config I use on the device) and example feeds.conf from the sample/ directory.

For more build options and troubleshooting, refer to the OpenWrt build system usage and other documentation at OpenWrt.org.

Installing

(Instructions taken from → here. Not guaranteed to work -- I myself am currently stuck at fastboot erase rootfs because my device does not has a partition with that name, see → here.)

Carry out the following from a computer where the device is connected to via USB.

Prerequisites:

Have OpenStick installed (or at least the partitions prepared for it), the images generate here assume that the device has been prepared for OpenStick operating system before!

More detailed instructions on this step hopefully soon.

Pre-cautions work:

  1. Before conneting the device, make sure that there is currently no other device in fastboot mode connected, otherwise you can damage the other device:
    fastboot devices
    should return nothing.
  2. Connect the device, and check that
    fastboot devices
    now returns something which looks similar to
    0ec38c91 fastboot
    
    (The ID can vary).

If that is given, proceed:

Install instructions:

  1. Erase boot partition:
    fastboot erase boot
  2. Write boot image:
    fastboot flash boot handsomemod-msm89xx-msm8916-openstick_uf896-squashfs-boot.img
  3. Erase rootfs partition:
    fastboot erase rootfs
  4. Write system image:
    fastboot flash rootfs handsomemod-msm89xx-msm8916-openstick_uf896-squashfs-system.img
  5. Reboot:
    fastboot reboot
  6. "OpenWrt" (HandsomeMod) should boot now (red led is blinking).
  7. push the sysupgrade image to the device (this is imported, as this sets up the loop device for the rootfs overlay)
    (Note: adbd is part of the handsome feeds utils package, Make sure you have CONFIG_PACKAGE_android-tools-adbd=y!)
    adb push handsomemod-msm89xx-msm8916-openstick_uf896-squashfs-sysupgrade.bin /tmp
  8. Execute sysupgrade:
    adb shell
    sysupgrade /tmp/handsomemod-msm89xx-msm8916-openstick_uf896-squashfs-sysupgrade.bin
  9. After reboot you should have a working openwrt incl. overlay fs
  10. Thanks to the usb gadget mode the device has ethernet connectivity over usb
  11. Please note, it's also part of the handsome feeds utils to setup and activate a default wifi AP (unencrypted). You can disable this after the last reboot (or disable it in the build config)

State of this repository

This is work in progress and might not work as expected. The main work to make this work has been carried out by the upstream projects "kirdesde/Handsomemod" and "HandsomeMod/HandsomeMod", many thanks to them.

License

HandsomeMod itself (i.e. the code that is directly provided by the HandsomeMod repositories) is licensed under GPL-2.0.

Building a HandsomeMod firmware might pull in other, external software, which might have it's own licensing.

Original upstream README

Here to the original README.md from the upstream repository, as of 2022-08.

About

A fork of OpenWrt-based "Handsomemod" operating system targeted to the ["UF896" stick-format WiFi/LTE router](https://forum.openwrt.org/t/131712).

License:Other


Languages

Language:C 67.2%Language:Makefile 15.0%Language:Shell 6.9%Language:Roff 5.1%Language:Perl 2.5%Language:Assembly 1.3%Language:M4 1.0%Language:C++ 0.4%Language:Python 0.4%Language:Yacc 0.1%Language:Lex 0.1%Language:Awk 0.0%Language:CMake 0.0%