Coder Social home page Coder Social logo

solidhal / prawnos Goto Github PK

View Code? Open in Web Editor NEW
114.0 18.0 30.0 481.76 MB

Libre Mainline Kernel and Debian for arm laptops

Home Page: https://www.PrawnOS.com

License: GNU General Public License v2.0

Shell 61.60% Makefile 31.12% JavaScript 0.04% Python 7.24%
root-encryption libreboot linux-kernel

prawnos's Introduction

PrawnOS

PrawnOS

A build system for making blobless Debian and mainline Linux kernel with support for libre ath9k wireless, dmcrypt/LUKS root partition encryption, and graphics acceleration using panfrost

Supports the following Devices:

  • armhf cpu:
    • Asus C201 (C201P) (C201PA) (veyron-speedy)
    • Asus C100 (veyron-minnie)
    • BETA Asus Chromebit CS10 (veyron-mickey)
  • arm64 cpu:
    • BETA Samsung Chromebook Plus V1 (XE513C24) (gru-kevin)
    • ALPHA Asus C101p (gru-bob)

Build Debian filesystem with:

  • No blobs, anywhere.
  • Sources from only main, not contrib or non-free which keeps Debian libre.
  • Currently PrawnOS supports xfce and gnome as choices for desktop enviroment.
  • full root filesystem encryption
  • mesa with support for panfrost for graphics acceleration
  • functional sound, touchpad, keyboard mappings

Build a deblobbed mainline kernel with:

  • Patches for reliable USB on veyron devices.
  • Patches to support the custom GPT partition table required to boot on veyron devices.
  • Support for Atheros AR9271 and AR7010 WiFi dongles.
  • Support for CSR8510 (and possibly other) bluetooth dongles.

Don't want to use one of the two USB ports for the WiFi dongle? check out this

Why

Combined with Libreboot, an AR9271 or AR7010 WiFi dongle, and a libre OS (like Debian with the main repos, the one built by PrawnOS) the Asus c201 is a fully libre machine with no blobs, or microcode, or Intel Management Engine.

WARNING: flashing libreboot to asus c201 chromebooks that have recently been updated to a new version of chromeOS may leave the device in a non-functional (bricked) state.

If you do not have a way to recover your device by using an external flasher as described in the second part of this page https://libreboot.org/docs/install/c201.html it would be safest to wait until this issue is resolved. I have opened a bug with libreboot, which has been archived here https://notabug.org/libreboot/obsolete-repository-preserved-for-historical-purposes/issues/666 If you have any information that may help with debugging, please post it there.

The install process of PrawnOS does not flash your bios, so it is safe to use along with the default coreboot/depthcharge and does not risk bricking your device

What is a blob?

In the world of free and open-source software, the term is used to refer to proprietary device drivers, which are distributed without their source code, exclusively through binary code; in such use, the term binary blob is common. wikipedia

Image Download

If you don't want to or can't build the image, you can find downloads under https://github.com/SolidHal/PrawnOS/releases

Dependencies

Building PrawnOS has been tested on Debian 11 Buster

Debian Bullseye is the only build environment that is supported. These packages are required:

        apt install --no-install-recommends --no-install-suggests \
        bc binfmt-support bison build-essential bzip2 ca-certificates cgpt cmake cpio debhelper \
        debootstrap device-tree-compiler devscripts file flex g++ gawk gcc gcc-aarch64-linux-gnu \
        gcc-arm-none-eabi git gpg gpg-agent kmod libc-dev libncurses-dev libssl-dev lzip make \
        parted patch pbuilder qemu-user-static quilt rsync sudo texinfo u-boot-tools udev \

Build

Clone this Git repo: git clone --recurse-submodules https://github.com/SolidHal/PrawnOS

All make commands required a TARGET=$ARCH to specify either armhf or arm64. See the top of the README for if you don't know which your device is. armhf and arm64 builds can live side by side in the same git checkout.

Build the PrawnOS-*-.img by running sudo make image TARGET=$ARCH

Write to a flash drive or SD card

Write the 2GB image to a flash drive. Make sure to replace $USB_DEVICE with the desired target flash drive or SD card device. If you're not familiar with dd, check out Debian's how to page https://www.debian.org/CD/faq/#write-usb

sudo dd if=PrawnOS-*.img of=/dev/$USB_DEVICE bs=50M status=progress; sync

Enable Developer Mode

Enabling developer mode is required to install PrawnOS. Note that enabling developer mode WILL ERASE ALL LOCALLY STORED DATA.

Shut down

First, shutdown and power off the chromebook. Once powered off, hold the 'ESCAPE' and 'REFRESH' (F3) buttons, and while continuing to hold those two buttons, press and release the 'POWER' button.

First screen

The chromebook should power on and show a white screen, with a message saying: "Chrome OS is missing or damaged. Please insert a recovery USB stick or SD card."

screen1

Press 'CTRL' + 'D' to continue.

Second screen

A second screen will appear, saying: "To turn OS verification OFF, press ENTER. Your system will reboot and local data will be cleared. To go back, press ESC."

screen2

As it says, press 'ENTER'.

Third screen

The third screen will inform you that OS verification is disabled:

screen3

Press 'CTRL' + 'D' to continue.

Fourth screen

Your system is now transitioning to developer mode. You have 30 seconds to cancel this by powering off your chromebook:

screen4

Otherwise, sit back and wait.

Fifth screen

Your chromebook is now erasing local data and preparing developer mode:

screen5

This takes approximately 10 minutes. The system will reboot on its own.

Sixth screen

Your system will again show the 'OS verification is off' screen:

screen3

Press 'CTRL' + 'D' to continue.

Seventh screen

Your chromebook should now show the welcome screen. You'll notice that 'debugging features' are now possible:

screen7

Clicking 'Enable debugging features' doesn't actually work here, so don't try. Instead, press 'CTRL' + 'ALT' + 'REFRESH' (F3) to open a vtty.

Eighth screen

screen8

Log in as 'root', there is no password. Finally, enable booting PrawnOS from USB/SD:

To enable booting unsigned media:

# crossystem dev_boot_signed_only=0

To enable USB booting:

# crossystem dev_boot_usb=1

Finally, reboot or shutdown the system:

# reboot

On each subsequent boot, you'll see the 'OS verification is off' screen.

Booting/Installing PrawnOS

If you haven't enabled developer mode, see Enable Developer Mode

After rebooting/powering on, at the 'OS verification is off' screen, press 'CTRL' + 'U' to boot from USB/SD. Or 'CTRL' + 'D' to boot from the internal emmc.

Installing

There are two ways to use PrawnOS.

The first and recommended option is to install it on a device other than the one you wrote the PrawnOS image to. click here

  • This lets you install PrawnOS to the internal emmc, an SD card or a USB device
  • This allows you to setup root encryption
  • Installing to an external device allows you to try PrawnOS without removing Chrome OS or whatever Linux you are running on your internal storage (emmc), but USB drives especially are a much slower experience as the c201 only has USB 2.0.
  • The internal emmc is much faster than a usb device or sd card for both reads and writes, data from some tests is available in #133
  • If you want to boot from external media, I would suggest using an SD card.

The second option is to boot from the external USB or SD device you wrote the image to, and expand the image to take up the entire device. click here

  • Expanding the PrawnOS image allows you to boot PrawnOS from the same USB or SD device that you wrote the image to
  • Expansion does NOT support root encryption. For root encryption the filesystem must be written after the encrypted root is created.

Install to internal drive (emmc) or to SD card or USB drive

Now on the C201, insert the drive you wrote the PrawnOS image to. Press control+u at boot to boot from the external drive.

If you are running stock coreboot and haven't flashed Libreboot, you will first have to enable developer mode and enable USB / external device booting:

At the prompt, login as root. The password is blank.

Now insert the other USB device or SD card you would like to install PrawnOS on. If you want to boot from the internal emmc, you have nothing to insert! Note: If you are installing to an external device, the filesystem portion may take a loooong time (20 minutes). This is because we are reading from one external device (the boot device) and writing to another external device. This more than saturates the USB and/or SD bus.

WARNING! THIS WILL ERASE YOUR INTERNAL EMMC STORAGE (your Chrome OS install or other Linux install and all of the associated user data) OR WHATEVER EXTERNAL DEVICE YOU CHOOSE AS YOUR INSTALL TARGET. Make sure to back up any data you would like to keep before running this.

Run:

InstallPrawnOS

Choose Install and follow the prompts. This will ask what device you want to install to and setup root encryption with a custom initramfs and dmcrypt/LUKS if you want. If you are curious how the initramfs, and root partition encryption work on PrawnOS check out the Initramfs and Encryption section in DOCUMENTATION.md If you run in to any problems please open an issue. If you install to the internal emmc this will show a bunch of scary red warnings that are a result of the emmc (internal storage) having a few unwritable (bad) blocks at the beginning of the device and the kernel message level being set low for debugging. They don't effect anything long-term. All C201s have these bad blocks at the beginning of the emmc

After the partitioning and the filesystem copy is complete, it will prompt you to install either the xfce4 or the lxqt desktop environment, sound, trackpad, and Xorg configurations It will also prompt you to make a new user that automatically gets sudo privileges.

After reboot, remove the external media you had booted from originally. If you installed to the internal emmc press control+d, if you installed to an external device press control+u

If you press nothing, it will boot to the internal storage by default.

Congratulations! Your computer is now a Prawn! https://sprorgnsm.bandcamp.com/track/the-prawn-song

Expand PrawnOS

Now on the C201, insert the drive you wrote the PrawnOS image to. Press control+u at boot to boot from the external drive.

If you are running stock coreboot and haven't flashed Libreboot, you will first have to enable developer mode and enable USB / external device booting. A quick search should get you some good guides, but if you're having issues feel free to open an issue here on github.

At the prompt, login as root. The password is blank. Run:

InstallPrawnOS

Choose Expand at the prompt

If you run in to any problems please open an issue.

Now you can choose to install the packages, which are either the xfce4 or the lxqt desktop enviroment, sound, trackpad, and Xorg configurations. It will also prompt you to make a new user that automatically gets sudo privileges.

If you choose in install the packages, when installation is complete it will reboot. Press control+u at boot once again, and you'll get to a login screen.

Congratulations! Your computer is now a Prawn! https://sprorgnsm.bandcamp.com/track/the-prawn-song

If you simply want a basic Linux environment with no desktop environment or window manager:

Say no at the prompt to install packages and a desktop environment. Congratulations: you are done! Welcome to PrawnOS. You should probably change the root password and make a user, but I'm not your boss or anything so I'll leave that to you.

Connecting to WiFi in a basic environment

If have a basic environment without xfce or lxqt you can connect to WiFi using nmtui and it's menus to connect; or issue the following nmcli commands:

nmcli device wifi list
nmcli --ask device wifi connect "Network_name" # The --ask will prompt you for the password so it doesn't remain in your shell history 

When that finishes, you should have access to the internet.

Upgrading PrawnOS

The components of PrawnOS are now packaged, making upgrades much easier. You have two options:

build the packages yourself

  • filesystem packages are located under filesystem/packages all can be built by calling make filesystem_packages_clean && make filesystem_packages or they can be built individually by going to the specific package and running make clean && make

once the .deb is built, move it to your PrawnOS device and run sudo apt install ./<package-name>.deb

  • kernel packages are located under kernel/packages the kernel image package can be built by running make in the prawnos-linux-image-armhf directory once the .deb is built, move it to your PrawnOS device and run sudo apt install ./<package-name>.deb

use the PrawnOS APT repo to update the PrawnOS packages automatically

sudo apt upgrade

Upgrade PrawnOS kernel using specific vmlinux.kpart

The kernel flashing script can be found at /etc/prawnos/kernel/FlashKernelPartition.sh Easily flash a specific kernel by running it like this:

/etc/prawnos/kernel/FlashKernelPartition.sh vmlinux.kpart

Documentation

Some useful things can be found in DOCUMENTATION.md including making the coreboot screen less annoying and less beepy

Make options, developer tools

(All of these should be run as root or with sudo to avoid issues) The makefile automates many processes that make debugging the kernel or the filesystem easier. To begin with:

make kernel_config cross compiles make menuconfig Cross compiling is required for any of the Linux kernel make options that edit the kernel config, as the Linux kernel build system makes assumptions that change depending on what platform it is targeting.

make kernel builds just the kernel

make filesystem builds the -BASE filesystem image with no kernel

make initramfs builds the PrawnOS-initramfs.cpio.gz, which can be found in /build

make image builds the initramfs image, builds the kernel, builds the filesystem if a -BASE image doesn't exist, and combines the two into a new PrawnOS.img using kernel_install

make kernel_install Installs a newly built kernel into a previously built PrawnOS.img-BASE.

make write_image PDEV=/dev/sdX Does everything make image does but then also checks /dev/sdX is available and writes the image to it using a sane blocksize and runs sync

You can use the environment variable PRAWNOS_SUITE to use a Debian suite other than Bullseye. For example, to use Debian sid, you can build with sudo PRAWNOS_SUITE=sid make image

You can use the environment variable PRAWNOS_DEBOOTSTRAP_MIRROR to use a non-default Debian mirror with debootstrap. For example, to use Debian's Tor onion service mirror with debootstrap, you can build with sudo PRAWNOS_DEBOOTSTRAP_MIRROR=http://2s4yqjx5ul6okpp3f2gaunr2syex5jgbfpfvhxxbbjwnrsvbk5v3qbid.onion/debian make image.

You can use the environment variable PRAWNOS_KVER to use a non-default kernel version. For example, sudo PRAWNOS_KVER=5.10.61 make image.

Crossystem / mosys

crossystem is installed from the debian repos and mosys (a dependency of crossystem, and all around useful tool) is built and installed as part of the PrawnOS filesystem build.

Warning: running these commands can leave you in a state where you cannot boot.

Specifically, enabling dev_boot_signed_only will prevent PrawnOS from booting, as no key is stored in the bootloader for the PrawnOS Linux kernel Its also a bad idea to disable dev_boot_usb unless you are positive you will always be able to boot to the internal emmc. Unless you are running libreboot, the only way to recover if you get in one of these states is to reinstall chromeos using recovery media

Example crossystem and mosys commands, most require root privileges

Kernels signature verification:

sudo crossystem dev_boot_signed_only=1 enable sudo crossystem dev_boot_signed_only=0 disable

External media boot:

sudo crossystem dev_boot_usb=1 enable sudo crossystem dev_boot_usb=0 disable

Legacy payload boot:

sudo crossystem dev_boot_legacy=1 enable sudo crossystem dev_boot_legacy=0 disable

Default boot medium: sudo crossystem dev_default_boot=disk internal storage sudo crossystem dev_default_boot=usb external media sudo crossystem dev_default_boot=legacy legacy payload

Dump system state: sudo crossystem

View mosys command tree: sudo mosys -t

On older PrawnOS releases or other distributions, you can run the buildCrossystem.sh script located in scripts/InstallScripts/ to build and install mosys and install crossystem

sudo /InstallScripts/buildCrossystem.sh

Build the WiFi dongle into the laptop

Sick of having a USB dongle on the outside of your machine for wi-fi? Want to be able to use two USB devices at once without a hub? Check out the instructions here for the c201: https://github.com/SolidHal/AsusC201-usb-wifi-from-webcam And here for the samsung chromebook plus v1: https://github.com/SolidHal/Samsung_Chromebook_plus_v1_wifi_from_webcam Warning: decent soldering skills required

Troubleshooting

The pulse audio mixer will only run if you are logged in as a non-root account. This is an issue (feature?) of pulse audio

Discussion, Support, and IRC

IRC - You can find PrawnOS on the #prawnos channel on libera

Credits and Legal Information

Thanks to dimkr for his great devsus scripts for the Chrome OS 3.14 kernel, from which PrawnOS took much inspiration https://github.com/dimkr/devsus

Because PrawnOS started as a fork of devsus-3.14, some of this repo's ancient history can be found at https://github.com/SolidHal/devsus/tree/hybrid_debian

PrawnOS is free and unencumbered software released under the terms of the GNU General Public License, version 2; see COPYING for the license text. For a list of its authors and contributors, see AUTHORS.

Github All Releases Built with Spacemacs

prawnos's People

Contributors

alexisgrey avatar anthony-sensors avatar austin987 avatar danielnoiz08 avatar filberg avatar gdallasdye avatar gregordinary avatar herbsmn avatar ifbizo avatar jeremyrand avatar petm5 avatar solidhal avatar spoelstraethan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prawnos's Issues

mmc issue?

Picked up another c201, which has a different emmc. The usual installation isn't working either even if the size is corrected.

chromeos-3.14 config:

CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
CONFIG_MMC_UNSAFE_RESUME=y
# CONFIG_MMC_CLKGATE is not set
# CONFIG_MMC_EMBEDDED_SDIO is not set
# CONFIG_MMC_PARANOID_SD_INIT is not set

#
# MMC/SD/SDIO Card Drivers
#
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_MINORS=16
CONFIG_MMC_BLOCK_BOUNCE=y
# CONFIG_SDIO_UART is not set
CONFIG_MMC_TEST=m
# CONFIG_MMC_FFU is not set

#
# MMC/SD/SDIO Host Controller Drivers
#
# CONFIG_MMC_ARMMMCI is not set
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
# CONFIG_MMC_SDHCI_OF_ARASAN is not set
# CONFIG_MMC_SDHCI_PXAV3 is not set
# CONFIG_MMC_SDHCI_PXAV2 is not set
CONFIG_MMC_DW=y
CONFIG_MMC_DW_IDMAC=y
CONFIG_MMC_DW_PLTFM=y
# CONFIG_MMC_DW_EXYNOS is not set
# CONFIG_MMC_DW_K3 is not set
CONFIG_MMC_DW_ROCKCHIP=y
# CONFIG_MMC_VUB300 is not set
# CONFIG_MMC_USHC is not set
# CONFIG_MEMSTICK is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y

4.9 config:


#
# USB Physical Layer drivers
#
# CONFIG_USB_PHY is not set
# CONFIG_NOP_USB_XCEIV is not set
# CONFIG_USB_GPIO_VBUS is not set
# CONFIG_USB_ISP1301 is not set
CONFIG_USB_ULPI=y
CONFIG_USB_ULPI_VIEWPORT=y
# CONFIG_USB_GADGET is not set
# CONFIG_USB_LED_TRIG is not set
# CONFIG_USB_ULPI_BUS is not set
# CONFIG_UWB is not set
CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
CONFIG_PWRSEQ_EMMC=y
CONFIG_PWRSEQ_SIMPLE=y

#
# MMC/SD/SDIO Card Drivers
#
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_MINORS=256
CONFIG_MMC_BLOCK_BOUNCE=y
# CONFIG_SDIO_UART is not set
# CONFIG_MMC_TEST is not set

#
# MMC/SD/SDIO Host Controller Drivers
#
# CONFIG_MMC_ARMMMCI is not set
# CONFIG_MMC_SDHCI is not set
CONFIG_MMC_DW=y
CONFIG_MMC_DW_PLTFM=y
# CONFIG_MMC_DW_EXYNOS is not set
# CONFIG_MMC_DW_K3 is not set
CONFIG_MMC_DW_ROCKCHIP=y
# CONFIG_MMC_VUB300 is not set
# CONFIG_MMC_USHC is not set
# CONFIG_MMC_USDHI6ROL0 is not set
# CONFIG_MMC_MTK is not set
# CONFIG_MEMSTICK is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
# CONFIG_LEDS_CLASS_FLASH is not set

CONFIG_MMC_BLOCK_MINORS and CONFIG_MMC_DW_IDMAC are different at least

Suggestions for reasonable video playback

The GPU section of libreplanets hardware Workarounds gives some suggestions for better video playback:
https://libreplanet.org/wiki/Hardware/Workarounds

Although the VPU is specifically for video, GPUs often play a role in video playback. However, if there is no GPU available (software rasterisation is used as a fallback), modern video players may have a heavy performance hit from attempting to use this “optimised” path.

One video player which can avoid this issue is mpv. By default, mpv usually requires a GPU or software rasterisation (through OpenGL). However, if it is passed with the --vo x11 option, OpenGL will be avoided for significantly improved performance. For example, instead of:

$ mpv https://static.fsf.org/nosvn/FSF30-video/FSF_30_720p.webm

Use:

$ mpv --vo x11 https://static.fsf.org/nosvn/FSF30-video/FSF_30_720p.webm

mpv will print a warning that “this legacy VO has bad performance. Consider fixing your graphics drivers, or not forcing the x11 VO.”. Ignore the message; counter-intuitively, in the absence of the GPU, this will usually improve performance.

Depending on the type of video, certain software scaling algorithms may be better. For instance, on cartoon-like videos which are predominantly flat-shaded except for edges, the area algorithm may provide a considerable performance boost with minimal loss of quality from the default algorithm. Invoke it by passing the --sws-scaler=area flag, e.g.:

$ mpv --vo x11 --sws-scaler=area https://static.fsf.org/nosvn/FSF30-video/FSF_30_720p.webm

You may prefer the even-faster fast-bilinear algorithm:

$ mpv --vo x11 --sws-scaler=fast-bilinear https://static.fsf.org/nosvn/FSF30-video/FSF_30_720p.webm

For VLC, GPU acceleration can be disabled by navigating to “Tools->Preferences->Video” and setting “Output” to “X11 video output (XCB)”, assuming X11 is in use on your system. VLC may need to be restarted before this settings are enabled. However, with both configured optimally, mpv may still be faster than VLC.

kernel build warning from linux libre deblob scripts

When building the kernel, this warning is thrown

In file included from drivers/input/mouse/elan_i2c_core.c:42:0:
drivers/input/mouse/elan_i2c_core.c: In function 'elan_sysfs_update_fw':
drivers/input/mouse/elan_i2c.h:32:22: warning: too many arguments for format [-Wformat-extra-args]
 #define ETP_FW_NAME  "/*(DEBLOBBED)*/"
                      ^
drivers/input/mouse/elan_i2c_core.c:567:34: note: in expansion of macro 'ETP_FW_NAME'
  fw_name = kasprintf(GFP_KERNEL, ETP_FW_NAME, data->product_id);

I believe this can be fixed by changing this:

#define ETP_FW_NAME		"/*(DEBLOBBED)*/"

to this:

#define ETP_FW_NAME		"(DEBLOBBED)"

Or something similar, need to confirm.

Make script to expand to full usb size

Want to be able to use install image as live image, taking advantage of the full size of the usb drive we are installed on.
Have basic concept in scripts/InstallScripts/InstallToUSB.sh but after reboot usb is not bootable.
Also tried editing partition table with fdisk manually:
fdisk /dev/sda
p
g
n
1
8192
73727
n
2
(enter)
(enter)
w

But the result doesn't boot...

Things to try: Try saying yes to remove ext4 info on part 2?
See what raspbian does to expand in sd cards

Xarchive (filemanager archive creator) dones't make archives

Tried to make an archive from a folder in thunar (xfce's filemanager), which uses xarchiver. After entering the desired file name it just quits without doing anything. Ended up using the terminal like usual, but was annoying.
Am I just using it wrong, or is it broken?

iommu fails to get two clks

rk_iommu ff930300.iommu: Failed to get clk 'aclk': -2
rk_iommu ff940300.iommu: Failed to get clk 'aclk': -2

And later on:
eeors during raw rest, MMU_DTE_ADDR is not functioning
Failed to attached device ff#.vop to IOMMU_mapping
for both numbers above

Might be related to changes in the config for:
the chromeos ec, the hdmi, or the audio

dev-hugepages.mount error

dev-hugepages.mount: Couldn't determine result for ConditionVirtualization=!private-users, assuming failed: No such file or directory

Is thrown late in dmesg during the boot process.

i2c errors when using the touchpad

When using the touchpad, this gets printed in dmesg once an a while:

elan_i2c 4-0015: invalid report id data (ff)

One of the untested patches seems to fix this issue, further testing required.
This doesn't seem to effect functionality of the touchpad.

Add support to USB WIFI htc_7010

Could you please add support for the other Atheros wifi dongles that use the htc_7010 firmware? Right now the binary already gets built, but you need to do the following to install it:

cp PrawnOS/build/open-ath9k-htc-firmware/target_firmware/htc_7010.fw /lib/firmware/ath9k_htc/htc_7010-1.4.0.fw

Note that you need to rename the file to make it work. The device works without any issues thanks to your kernel patch while previously I lost the connection all the time.

By the way, I created the following udev rule to turn off the blinking LED which I found very annoying:
ACTION=="add", ATTRS{idVendor}=="0cf3", ATTRS{idProduct}=="7015", ATTR{brightness}="0"

Thanks!

Fix apt in chroot during fs build

Seems the keyring needs to be imported to the chroot to run apt with gpg. This should speed up building as https is usually slower.

I: Running command: chroot /root/PrawnOS/tmp.j6XBlhR8NR /debootstrap/debootstrap --second-stage
I: Keyring file not available at /usr/share/keyrings/debian-archive-keyring.gpg; switching to https mirror https://deb.debian.org/debian

Suspend is broken

Wake after suspend sometimes fails, even if lockscreen is disabled.

Machine will wake up, but hangs at some point after suspend exit. Sometimes enough time to run dmesg. Sometimes see failure to read sectors on mmc?

test by using sudo systemctl suspend when logged in.

  • happens maybe one in 10 times

Strong indicator is wifi failing to reconnect after wake.
Touching trackpad may improve chance of failure?

Try:
Bring in config changes/improvements, and switch to using cgpt for partiton creation
Hunt down and fix these errors:

[   65.176277] elan_i2c 4-0015: invalid report id data (ff)

may be related to:

[    3.467669] cros-ec-spi spi0.0: Command xfer error (err:-11)
[    3.471141] cros-ec-i2c-tunnel ff110000.spi:ec@0:i2c-tunnel: Error transferring EC i2c message -11

and these messages:

[    1.813426] rockchip-dp ff970000.dp: Link Training Clock Recovery success
[    1.816901] rockchip-dp ff970000.dp: Link Training success!
[    1.928068] rockchip-dp ff970000.dp: Timeout of video streamclk ok
[    1.928091] rockchip-dp ff970000.dp: unable to config video

Make `make filesystem` not "fail"

make filesystem will fail right at the end during the cleanup phase as some of the commands will exit with non zero values depending on the state of $outmnt and outdev. Find a way to have cleanup exit cleanly, which will fix make filesystem

Test if cleanup needs to be ran on successful build, that would simplify fix this fix.

NOTE: This does not affect the build PrawnOS image and is merely cosmetic.

``apt: relocation error`` on fresh install from release image

EDIT: I re-downloaded the image and tried again, and i can't reproduce this. My apologies!

Hi there,

I think this is a fantastic project and i'm really looking forward to future developments. I have a C201PA with libreboot and decided to give this a try after some frustrations with othe libre os's. It boots and installs flawlessly, unfortunately though apt/apt-get error out with:

apt: relocation error: /usr/lib/arm-linux-gnueabihf/libapt-pkg.so.5.0 symbol of [...] version CXXABI_1.3 not defined in file libstdc++.so.6 with link time reference

where the omitted symbol is just garbled stuff. Does this represent a build error? Is there an easy solution? I rather must rely on your images as my other environment is not Debian and so i can't build them for myself.

Test basic functionality

The basic functionality needs to be confirmed.

  • Video
  • HDMI out
  • Sound over hdmi?
  • Speakers
  • Headphone
  • Keyboard
  • Trackpad
  • USB
  • SD card reader
  • Battery management
  • Close lid sleep/hibernate/suspend
  • wireless

mmc get phase invalid clockrate

Early in the boot kernel logs, these get thrown.

[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate
[    0.000000] rockchip_mmc_get_phase: invalid clk rate

I vaguely recall reading on the chrome os kernel somewhere that it is due to certain emmcs not liking the way speed tuning is handled, possibly in the commit logs for https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.14/drivers/clk/rockchip/clk-mmc-phase.c

EDIT: non of the current untested patches fix this

Map function keys to function

The top keys: Brightness controls and volume controls
Should be mapped accordingly.
Since there is no function key on the keyboard, maybe map the "search" key to it?
Otherwise use alt or ctl?

Let the user specify the destination device in InstallToUSB.sh

Right now it is hard coded to /dev/sda which it assumes is the first USB device. If the user wants to write to the sd card, which is /dev/mmcblk0, they have to modify the script.

Lets the user specify the device they would like to write the OS to, possibly from a list. At the very least, give them a hint on how to find what device they want, eg:
/dev/sd... are usb devices, and /dev/mmcblk0 is the sd card

Add icecat

I've put some work into getting icecat to build on armhf, which can be found here https://github.com/SolidHal/icecat-arm

Now need to figure out how to install and/or package as a debian package and install.

This is necessary as firefox doesn't have fsf approval.

Is I2C_CROS_EC_TUNNEL required?

[ 5.048679] cros-ec-spi spi0.0: Command xfer error (err:-11)
[ 5.058672] cros-ec-i2c-tunnel ff110000.spi:ec@0:i2c-tunnel: Error transferring EC i2c message -11

Makes me think it can be disabled, or maybe something is kinda broken

LightLocker Prevents proper wake from sleep

If lock on sleep is enabled in xfce, and the lid is closed, when reopened the screen will be black with just a cursor or some times a couple lines of dmesg and then a cursor. If lock on sleep is disabled sleep and close lid function properly.

Either find a fix for light locker or use an alternative.
Ensure this isn't an xflock bug either.
What does lxqt use to choose a screen locker?

Doesnt work(tm)

I really appreciated your comment on my issue in Devsus.
I build this kernel in debian 9 stretch with all prereqs, and am able to build the img files.

It doesnt pack them correctly when looking at readme.md, it puts two .img files in a img file, and writes that to usb with the dd command.

However, this is a very good idea for a program and I am very interested in using this as a daily driver!
Update: I need to rename dd to debian from librem
and it keeps saying something about files not found when building. I think wifi?
Some of the files not found is
make: Leaving directory '/home/gnu/PrawnOS/linux-4.17.2'
install: cannot stat 'open-ath9k-htc-firmware/target_firmware/htc_9271.fw': No such file or directory

I dont know how to make myself a sudoer so I just use a su terminal. Maybe thats where it went wrong?

Strip non-libre components from debian apt repos

Build a package archive mirror of the debian archive, but without any of the nasty non-libre bits.

Examples:
PureOS (based on Debian) uses https://github.com/lkorigin/laniakea
some further information here https://puri.sm/posts/what-is-pureos-and-how-is-it-built/

Trisquel (Based on Ubuntu) uses Package Helpers https://trisquel.info/en/wiki/package-helpers
Their process is described quite thoroughly here https://trisquel.info/en/wiki/how-trisquel-made

Boot sometimes hangs at "cfg80211: failed to load regulatory.db"

Boot sometimes stops at

[    2.176922] vcc18_lcd: supplied by vcc_18
[    2.179482] ALSA device list:
[    2.181976]   #0: VEYRON-I2S
[    2.184627] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    2.188464] cfg80211: failed to load regulatory.db


If you wait a loooooong time, it will eventually boot.

[    2.184627] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    2.188464] cfg80211: failed to load regulatory.db
[  602.203292] mmc2: Card stuck being busy! mmc_poll_for_busy
[  602.205906] mmc2: cache flush error -110
[  602.708471] dwmmc_rockchip ff0f0000.dwmmc: Busy; trying anyway
[  603.211032] mmc_host mmc2: Timeout sending command (cmd 0x202000 arg 0x0 status 0x80202000)
[  603.229577] mmc_host mmc2: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[  603.324767] mmc_host mmc2: Bus speed (slot 0) = 148500000Hz (slot req 150000000Hz, actual 148500000HZ div = 0)
[  603.585485] dwmmc_rockchip ff0f0000.dwmmc: Successfully tuned phase to 173
[  603.633887] Primary GPT is being ignored, using alternate GPT.
[  603.636626]  mmcblk2: p1 p2
[  603.646121] EXT4-fs (mmcblk2p2): warning: mounting unchecked fs, running e2fsck is recommended
[  603.653761] EXT4-fs (mmcblk2p2): mounted filesystem without journal. Opts: (null)
[  603.656679] VFS: Mounted root (ext4 filesystem) on device 179:2.

Attaching full log for later.

Workaround: Hold power button, reboot.
Loooooong_db_emmc_error.txt

Buffer I/O error / Print_req_error on dd to emmc

Seems like I have one of the emmc chips that has a different layout. Everything works great up to when I dd the image to the emmc. usb created on a linux mint 18.3 64-bit with all required dependencies installed. Here is my partition information. If you need something else, just ask.
----------------Start-------------------
Disk /dev/mmcblk2: 14.7 GiB, 15762194432 bytes, 30785536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 39EBCEA6-6B2F-3843-BE5D-779153C4E211

Device Start End Sectors Size Type
/dev/mmcblk2p1 8704000 30752767 22048768 10.5G Microsoft basic data
/dev/mmcblk2p2 20480 53247 32768 16M ChromeOS kernel
/dev/mmcblk2p3 4509696 8703999 4194304 2G ChromeOS root fs
/dev/mmcblk2p4 53248 86015 32768 16M ChromeOS kernel
/dev/mmcblk2p5 315392 4509695 4194304 2G ChromeOS root fs
/dev/mmcblk2p6 16448 16448 1 512B ChromeOS kernel
/dev/mmcblk2p7 16449 16449 1 512B ChromeOS root fs
/dev/mmcblk2p8 86016 118783 32768 16M Microsoft basic data
/dev/mmcblk2p9 16450 16450 1 512B ChromeOS reserved
/dev/mmcblk2p10 16451 16451 1 512B ChromeOS reserved
/dev/mmcblk2p11 64 16447 16384 8M unknown
/dev/mmcblk2p12 249856 315391 65536 32M EFI System

Partition table entries are not in disk order.
-----------------------End--------------------------

Laptop boots to recovery mode after rebooting.

test HDMI (audio doesn't work)

on kernel 4.9, HDMI didnt show up in dmesg, but now it does on 4.17.2 with new config. Untested, but should work.
Test this

Distorted sound in firefox

After reinstalling the system built from e063a50 (October 9) sound has become distorted on my machine. It worked fine on 5356c58 (September 20). I've looked through the pulseaudio config file but can't see anything strange.

Wifi firmware gets loaded, but first complains about the direct load failing

"Direct firmware load for ath9k_htc/htc_9271-1.4.0.fs failed with error -2"
Kernel then goes on to load the one put in /lib/firmware

Seems like disabling the non-free built in kernel support (which then doesn't work since the blob was removed) should fix this issue, When tested on 4.9 however it didn't seem to move on to find the one in /lib/firmware that the script builds. (this may be related to this experience in the first reference

I have noticed some problems with the interface not being enabled if the ath9k module is plugged in when the board boots. Remove and re-insert it, and it gets detected fine.

Three options:

  1. Try to remove the built in kernel support and make it use the one in /lib/fimrware
  2. Include the built open firmware in the kernel as a blob in CONFIG_EXTRA_FIRMWARE
  3. Keep it as it is, because despite the error message, it works

Some references:
http://developer.servalproject.org/dokuwiki/doku.php?id=content:meshextender:prototyping_on_olinuxino_a13
https://forums.gentoo.org/viewtopic-t-1053114.html (building in external blobs)
http://klimer.eu/2014/05/05/avoiding-kernel-modules-when-external-firmware-is-needed/ (more building in external blobs)
https://www.linuxquestions.org/questions/slackware-14/loading-firmware-into-kernel-at-boot-4175495624/ (ditto)

Openvpn does not work

Two things need to be done for OpenVPN support to work.

Need to add this to Install packages

sudo apt-get install network-manager-openvpn-gnome

and need to add CONFIG_TUN to the kernel config as well

platform regulatory error at boot

platform regulatory.0: Direct firmware load for regulatory.db failed with error -2

Is thrown in dmesg late in the boot propcess. Since it can still load it from another source, this isn't a huge issue and doesn't seem to prevent any functionality.

Add encryption support

It would be nice to be able to encrypt at least a part of the file system, e.g. the home directory, and prompt the user already during the install process.

I tried to set up encryptfs by following this guide, but it doesn't work because modprobe ecryptfs fails (the module can't be found in /lib/modules/4.17.2-gnu/).

An alternative is cryptsetup + luks. Could that easily be set up so that just the kernel partition remains unencrypted?

I'd be happy to try out any good ideas that are suggested here.

USB wifi AR9271 not working

As partially discussed in #31, usb wifi AR9271 seem to not be working.
This was reported while booting off of a usb device, with the wifi dongle plugged in at boot.

Further testing:
install wicd-curses, then attempting to run it hangs with dbus eventually reporting a NoReply.
If the wifi dongle is then removed, there are many many of the following message spammed to dmesg:

dwc2 ff540000.usb: Not Connected

which then gives way to:

usb 1-1: USB disconnect, device number 2
ath: phy0: Failed to wakeup in 500us
ath: phy0: Failed to wakeup in 500us
ath: phy0: Failed to wakeup in 500us
ath: phy0: Failed to wakeup in 500us
usb 1-1: ath9k_htc: USB layer deinitialized

This implies to me that the hang is happening somewhere in the dwc2 driver.

cannot get ec faetures: 0/1

cros-ec-dev cros-ec-dev.0.auto: cannot get ec features: 0/1
cros-ec-dev cros-ec-dev.0.auto: device does not support reading the console log

Use full sources.list

We use a very basic sources.list right now, eventually convert to a full one like this:

deb http://ftp.us.debian.org/debian/ stretch main
deb-src http://ftp.us.debian.org/debian/ stretch main

deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main

# stretch-updates, previously known as 'volatile'
deb http://ftp.us.debian.org/debian/ stretch-updates main
deb-src http://ftp.us.debian.org/debian/ stretch-updates main

Match hosts to hostname

/etc/hostname is set properly by the os build script but
/etc/hosts should have something like
'127.0.0.1 librean'

Otherwise there is an error when using sudo

Add kernel upgrade function

Make new script that writes a bundled, built kernel image to the desired boot disk as a way to upgrade the kernel.
Look into in place kernel upgrades that can be done from the booted system.

Xfce4 window grabbers are TINY

It is very difficult to catch the 1-2 pixels that count as the areas you can grab to resize windows.
Can they be made larger without increasing the visible border?

A workaround is using alt+right click anywhere on the window to resize, or just use the resizing keybindings.

Add instructions for flashing libreboot from within PrawnOS

According to the arch wiki, stock flashrom is NOT recommended for the following reasons:

  • it will not write firmware successfully to the ROM of the Chromebook unless it already been programmed externally (i.e. flashing by another device over SPI with SOIC clip
  • it's missing operations like --wp-disable, --wp-status

See: https://wiki.archlinux.org/index.php/Chrome_OS_devices/Custom_firmware#Manually_with_flashrom

The first issue is much bigger than the second, as it sounds like it straight up will not work for most people as most have not flashed their ROM externally.

So, we need to use chromeos flashrom: https://chromium.googlesource.com/chromiumos/third_party/flashrom/

To build our own we need to know:

  1. what branch to use for the c201, one of the veyron ones or just master?
  2. what config options to be specified.

Don't attempt flashing with any test flashrom builds unless you have a way to program the c201's ROM externally, or you may end up with a machine that won't boot!

Determine if special partition map is required for boot

With issue #17 fixed, determine if the c201 will boot from a usual partition table or if it requires the special "chrome os" style partition table. If it does, something like the format_internal.sh script add here https://github.com/SolidHal/devsus/commit/f69b9a991ca862a09ca0c496aef814080352771c could be useful.
If that doesn't work look at the way the chromeos recovery tool does it. I believe the recovery tool and image can be found here: https://github.com/raphael/linux-samus/wiki/How-do-I-restore-ChromeOS-after-it-has-been-removed%3F

The recovery script downloads a specific image for the c201, which I downloaded already while away.

Bluetooth support

CSR8150 Bluetooth dongles (which cost around $1-2 on eBay and Aliexpress) work with Linux-libre! CONFIG_BT_HCIBTUSB and CONFIG_BT_INTEL result in btusb.ko and btintel.ko, which support this chip bloblessly.

I had this dongle for about a year and only today I had the time and motivation to get my Bluetooth speakers to work with the C201.

To test the dongle: run bluetoothctl (scan, devices, ``pair and connect), install pulseaudio with pulseaudio-module-bluetooth enabled and make the Bluetooth sink the default using pactl. Then, everything including speaker-test will play sound through the speakers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.