A fully Go userland with Linux bootloaders! u-root can create a one-binary root file system (initramfs) containing a busybox-like set of tools written in Go.

u-root

Build Status codecov Go Report Card GoDoc Slack License

Description

u-root embodies four different projects.

  • Go versions of many standard Linux tools, such as ls, cp, or shutdown. See cmds/core for most of these.

  • A way to compile many Go programs into a single binary with busybox mode.

  • A way to create initramfs (an archive of files) to use with Linux kernels.

  • Go bootloaders that use kexec to boot Linux or multiboot kernels such as ESXi, Xen, or tboot. They are meant to be used with LinuxBoot. With that, parsers for GRUB config files or syslinux config files are to make transition to LinuxBoot easier.

⚠️ Go Modules are Broken ⚠️

u-root itself builds fine with modules. When adding commands to your busybox which are outside u-root, make sure to export GO111MODULE=off both when geting the command (so that the command is found under $GOPATH/src and when running the u-root command (so that you can run the u-root command from any directory).

For example:

GO111MODULE=off go get github.com/nsf/godit
GO111MODULE=off u-root all github.com/nsf/godit

Usage

Make sure your Go version is >=1.15. Make sure your GOPATH is set up correctly.

Download and install u-root:

go get github.com/u-root/u-root

You can now use the u-root command to build an initramfs. Here are some examples:

# Build an initramfs of all the Go cmds in ./cmds/core/... (default)
u-root

# Generate an archive with bootloaders
#
# core and boot are templates that expand to sets of commands
u-root core boot

# Generate an archive with only these given commands
u-root cmds/core/{init,ls,ip,dhclient,wget,cat,elvish}

# Generate an archive with all of the core tools with some exceptions
u-root core -cmds/core/{ls,losetup}

# Generate an archive with a tool outside of u-root
u-root cmds/core/{init,ls,elvish} github.com/u-root/cpu/cmds/cpud

The default set of packages included is all packages in github.com/u-root/u-root/cmds/core/....

In addition to using paths to specify Go source packages to include, you may also use Go package import paths (e.g. golang.org/x/tools/imports) to include commands. Only the main package and its dependencies in those source directories will be included. For example:

You can build the initramfs built by u-root into the kernel via the CONFIG_INITRAMFS_SOURCE config variable or you can load it separately via an option in for example Grub or the QEMU command line or coreboot config variable.

Extra Files

You may also include additional files in the initramfs using the -files flag. If you add binaries with -files are listed, their ldd dependencies will be included as well. As example for Debian, you want to add two kernel modules for testing, executing your currently booted kernel:

NOTE: these files will be placed in the $HOME dir in the initramfs.

u-root -files "$HOME/hello.ko $HOME/hello2.ko"
qemu-system-x86_64 -kernel /boot/vmlinuz-$(uname -r) -initrd /tmp/initramfs.linux_amd64.cpio

To specify the location in the initramfs, use : . For example:

u-root -files "root-fs/usr/bin/runc:usr/bin/run"

Init and Uinit

u-root has a very simple (exchangable) init system controlled by the -initcmd and -uinitcmd command-line flags.

  • -initcmd determines what /init is symlinked to. -initcmd may be a u-root command name or a symlink target.
  • -uinitcmd is run by the default u-root init after some basic file system setup. There is no default, users should optionally supply their own. -uinitcmd may be a u-root command name with arguments or a symlink target with arguments.
  • After running a uinit (if there is one), init will start a shell determined by the -defaultsh argument.

We expect most users to keep their -initcmd as init, but to supply their own uinit for additional initialization or to immediately load another operating system.

All three command-line args accept both a u-root command name or a target symlink path. Only -uinitcmd accepts command-line arguments, however. For example,

../bbin/echo # lrwxrwxrwx 0 root root 9 Dec 31 1969 init -> bbin/init qemu-system-x86_64 -kernel $KERNEL -initrd /tmp/initramfs.linux_amd64.cpio -nographic -append "console=ttyS0" # ... # [ 0.848021] Freeing unused kernel memory: 896K # 2020/05/01 04:04:39 Welcome to u-root! # _ # _ _ _ __ ___ ___ | |_ # | | | |____| '__/ _ \ / _ \| __| # | |_| |____| | | (_) | (_) | |_ # \__,_| |_| \___/ \___/ \__| # # Go Gopher # ~/> ">
u-root -uinitcmd="echo Go Gopher" ./cmds/core/{init,echo,elvish}

cpio -ivt < /tmp/initramfs.linux_amd64.cpio
# ...
# lrwxrwxrwx   0 root     root           12 Dec 31  1969 bin/uinit -> ../bbin/echo
# lrwxrwxrwx   0 root     root            9 Dec 31  1969 init -> bbin/init

qemu-system-x86_64 -kernel $KERNEL -initrd /tmp/initramfs.linux_amd64.cpio -nographic -append "console=ttyS0"
# ...
# [    0.848021] Freeing unused kernel memory: 896K
# 2020/05/01 04:04:39 Welcome to u-root!
#                              _
#   _   _      _ __ ___   ___ | |_
#  | | | |____| '__/ _ \ / _ \| __|
#  | |_| |____| | | (_) | (_) | |_
#   \__,_|    |_|  \___/ \___/ \__|
#
# Go Gopher
# ~/>

Passing command line arguments like above is equivalent to passing the arguments to uinit via a flags file in /etc/uinit.flags, see Extra Files.

Additionally, you can pass arguments to uinit via the uroot.uinitargs kernel parameters, for example:

../bbin/echo # lrwxrwxrwx 0 root root 9 Dec 31 1969 init -> bbin/init qemu-system-x86_64 -kernel $KERNEL -initrd /tmp/initramfs.linux_amd64.cpio -nographic -append "console=ttyS0 uroot.uinitargs=Go" # ... # [ 0.848021] Freeing unused kernel memory: 896K # 2020/05/01 04:04:39 Welcome to u-root! # _ # _ _ _ __ ___ ___ | |_ # | | | |____| '__/ _ \ / _ \| __| # | |_| |____| | | (_) | (_) | |_ # \__,_| |_| \___/ \___/ \__| # # Go Gopher # ~/> ">
u-root -uinitcmd="echo Gopher" ./cmds/core/{init,echo,elvish}

cpio -ivt < /tmp/initramfs.linux_amd64.cpio
# ...
# lrwxrwxrwx   0 root     root           12 Dec 31  1969 bin/uinit -> ../bbin/echo
# lrwxrwxrwx   0 root     root            9 Dec 31  1969 init -> bbin/init

qemu-system-x86_64 -kernel $KERNEL -initrd /tmp/initramfs.linux_amd64.cpio -nographic -append "console=ttyS0 uroot.uinitargs=Go"
# ...
# [    0.848021] Freeing unused kernel memory: 896K
# 2020/05/01 04:04:39 Welcome to u-root!
#                              _
#   _   _      _ __ ___   ___ | |_
#  | | | |____| '__/ _ \ / _ \| __|
#  | |_| |____| | | (_) | (_) | |_
#   \__,_|    |_|  \___/ \___/ \__|
#
# Go Gopher
# ~/>

Note the order of the passed arguments in the above example.

The command you name must be present in the command set. The following will not work:

u-root -uinitcmd="echo Go Gopher" ./cmds/core/{init,elvish}
# 2020/04/30 21:05:57 could not create symlink from "bin/uinit" to "echo": command or path "echo" not included in u-root build: specify -uinitcmd="" to ignore this error and build without a uinit

You can also refer to non-u-root-commands; they will be added as symlinks. We don't presume to know whether your symlink target is correct or not.

This will build, but not work unless you add a /bin/foobar to the initramfs.

u-root -uinitcmd="/bin/foobar Go Gopher" ./cmds/core/{init,elvish}

This will boot the same as the above.

u-root -uinitcmd="/bin/foobar Go Gopher" -files /bin/echo:bin/foobar ./cmds/core/{init,elvish}

This will bypass the regular u-root init and just launch a shell:

">
u-root -initcmd=elvish ./cmds/core/{elvish,ls}

cpio -ivt < /tmp/initramfs.linux_amd64.cpio
# ...
# lrwxrwxrwx   0 root     root            9 Dec 31  1969 init -> bbin/elvish

qemu-system-x86_64 -kernel $KERNEL -initrd /tmp/initramfs.linux_amd64.cpio -nographic -append "console=ttyS0"
# ...
# [    0.848021] Freeing unused kernel memory: 896K
# failed to put myself in foreground: ioctl: inappropriate ioctl for device
# ~/>

(It fails to do that because some initialization is missing when the shell is started without a proper init.)

Cross Compilation (targeting different architectures and OSes)

Cross-OS and -architecture compilation comes for free with Go. In fact, every PR to the u-root repo is built against the following architectures: amd64, x86 (i.e. 32bit), mipsle, armv7, arm64, and ppc64le.

Further, we run integration tests on linux/amd64, freebsd/amd64 and linux/arm64, using several CI systems. If you need to add another CI system, processor or OS, please let us know.

To cross compile for an ARM, on Linux:

GOARCH=arm u-root

If you are on OSX, and wish to build for Linux on AMD64:

GOOS=linux GOARCH=amd64 u-root

Testing in QEMU

A good way to test the initramfs generated by u-root is with qemu:

qemu-system-x86_64 -nographic -kernel path/to/kernel -initrd /tmp/initramfs.linux_amd64.cpio

Note that you do not have to build a special kernel on your own, it is sufficient to use an existing one. Usually you can find one in /boot.

If you quickly need to obtain a kernel, for example, when you are on a non-Linux system, you can assemble a URL to download one through Arch Linux's iPXE menu file. It would download from ${mirrorurl}iso/${release}/arch/boot/x86_64/vmlinuz, so just search for a mirror URL you prefer and a release version, for example, http://mirror.rackspace.com/archlinux/iso/2019.10.01/arch/boot/x86_64/vmlinuz.

Framebuffer

For framebuffer support, append a VESA mode via the vga kernel parameter:

qemu-system-x86_64 \
  -kernel path/to/kernel \
  -initrd /tmp/initramfs.linux_amd64.cpio \
  -append "vga=786"

For a list of modes, refer to the Linux kernel documentation.

Entropy / Random Number Generator

Some utilities, e.g., dhclient, require entropy to be present. For a speedy virtualized random number generator, the kernel should have the following:

CONFIG_VIRTIO_PCI=y
CONFIG_HW_RANDOM_VIRTIO=y
CONFIG_CRYPTO_DEV_VIRTIO=y

Then you can run your kernel in QEMU with a virtio-rng-pci device:

qemu-system-x86_64 \
    -device virtio-rng-pci \
    -kernel vmlinuz \
    -initrd /tmp/initramfs.linux_amd64.cpio

In addition, you can pass your host's RNG:

qemu-system-x86_64 \
    -object rng-random,filename=/dev/urandom,id=rng0 \
    -device virtio-rng-pci,rng=rng0 \
    -kernel vmlinuz \
    -initrd /tmp/initramfs.linux_amd64.cpio

SystemBoot

SystemBoot is a set of bootloaders written in Go. It is meant to be a distribution for LinuxBoot to create a system firmware + bootloader. All of these use kexec to boot. The commands are in cmds/boot.

  • pxeboot: a network boot client that uses DHCP and HTTP or TFTP to get a boot configuration which can be parsed as PXELinux or iPXE configuration files to get a boot program.

  • boot: finds all bootable kernels on local disk, shows a menu, and boots them. Supports (basic) GRUB, (basic) syslinux, (non-EFI) BootLoaderSpec, and ESXi configurations.

  • fbnetboot: a network boot client that uses DHCP and HTTP to get a boot program based on Linux, and boots it. To be merged with pxeboot.

  • localboot: a tool that finds bootable kernel configurations on the local disks and boots them.

  • systemboot: a wrapper around fbnetboot and localboot that just mimicks a BIOS/UEFI BDS behaviour, by looping between network booting and local booting. Use -uinitcmd argument to the u-root build tool to make it the boot program.

This project started as a loose collection of programs in u-root by various LinuxBoot contributors, as well as a personal experiment by Andrea Barberio that has since been merged in. It is now an effort of a broader community and graduated to a real project for system firmwares.

More detailed information about the build process for a full LinuxBoot firmware image using u-root/systemboot and coreboot can be found in the LinuxBoot book chapter about LinuxBoot using coreboot, u-root and systemboot.

You can build systemboot like this:

u-root -build=bb -uinitcmd=systemboot core github.com/u-root/u-root/cmds/boot/{systemboot,localboot,fbnetboot}

Compression

You can compress the initramfs. However, for xz compression, the kernel has some restrictions on the compression options and it is suggested to align the file to 512 byte boundaries:

xz --check=crc32 -9 --lzma2=dict=1MiB \
   --stdout /tmp/initramfs.linux_amd64.cpio \
   | dd conv=sync bs=512 \
   of=/tmp/initramfs.linux_amd64.cpio.xz

Getting Packages of TinyCore

Using the tcz command included in u-root, you can install tinycore linux packages for things you want.

You can use QEMU NAT to allow you to fetch packages. Let's suppose, for example, you want bash. Once u-root is running, you can do this:

% tcz bash

The tcz command computes and fetches all dependencies. If you can't get to tinycorelinux.net, or you want package fetching to be faster, you can run your own server for tinycore packages.

You can do this to get a local server using the u-root srvfiles command:

% srvfiles -p 80 -d path-to-local-tinycore-packages

Of course you have to fetch all those packages first somehow :-)

Build an Embeddable U-root

You can build this environment into a kernel as an initramfs, and further embed that into firmware as a coreboot payload.

In the kernel and coreboot case, you need to configure ethernet. We have a dhclient command that works for both ipv4 and ipv6. Since v6 does not yet work that well for most people, a typical invocation looks like this:

% dhclient -ipv4 -ipv6=false

Or, on newer linux kernels (> 4.x) boot with ip=dhcp in the command line, assuming your kernel is configured to work that way.

Build Modes

u-root can create an initramfs in two different modes, specified by -build:

  • bb mode: One busybox-like binary comprising all the Go tools you ask to include. See here for how it works.

    In this mode, u-root copies and rewrites the source of the tools you asked to include to be able to compile everything into one busybox-like binary.

  • binary mode: each specified binary is compiled separately and all binaries are added to the initramfs.

Updating Dependencies

go get -u
go mod tidy
go mod vendor

Hardware

If you want to see u-root on real hardware, this board is a good start.

Contributions

For information about contributing, including how we sign off commits, please see CONTRIBUTING.md.

Improving existing commands (e.g., additional currently unsupported flags) is very welcome. In this case it is not even required to build an initramfs, just enter the cmds/ directory and start coding. A list of commands that are on the roadmap can be found here.

Comments
  • Strategy for keeping Elvish updated to upstream?

    Strategy for keeping Elvish updated to upstream?

    Hi, I am the main developer of Elvish here, and I noticed that the Elvish version in u-root is now pretty old; there has been a lot of changes recently.

    I am interested in hearing about your strategy of keeping Elvish updated. So far there seems to be two main divergences:

    • u-root's fork does not have the daemon.

      This can be avoided by some refactoring on Elvish's end; in the internal API the daemon is already optional. It requires some more work to be able to a version of Elvish without the daemon from the same codebase though, but it should be doable.

    • u-root's fork does not use reflect.Value.Call.

      This is much harder to conciliate. I expect that you may need to continue redoing this change when merging Elvish.

    I can see some other smaller divergences - these that can be upstreamed instead of committed in u-root's fork (and I encourage you to do so!).

  • cover pkg/ipmi 2 try

    cover pkg/ipmi 2 try

    • Abstract syscall implementation behind interface
    • Hide syscalls behind interface to improve testability
    • Add mock tests for ipmi
    • Add vm tests for ipmi Signed-off-by: Christopher Meis [email protected]
  • Enable dead code elimination to reduce binary size

    Enable dead code elimination to reduce binary size

    Go's dead code elimination algorithm is described and implemented here. TLDR is: elimination of unused public methods at link time will be inhibited if reflection function calling are used anywhere.

    quick and dirty experiment shows that if DCE remains enabled, the uncompressed CPIO image size of just core goes down by ~2.3M: 15165376 -> 12707776, a 16% reduction. with all exp commands, it's about the same: 19130524 - 16562332, about 14%

    current uses of reflection in u-root are:

    1. elvish, to invoke built-in functions (here).
    2. dmidecode, to parse structs (addressed by #1476)
    3. text/template - uses reflection in struct attribute access, used in go/doc package, which is imported by go/build package.

    (3) is the toughest to address, it's all in go core libraries. but the payoff is significant, might be worth exploring.

  • block: fix FilterGUID

    block: fix FilterGUID

    Hey @insomniacslk @tfg13 @pmazzini do y'all use this logic? Because it is broken as far as I can tell. Take a look at this small change emphasizing what this actually does.

    Since the only usage of this doesn't do what the code seems to think it does -- can I get rid of this function and fix it so it returns the partition?

  • Source mode possibly broken

    Source mode possibly broken

    I'm playing around with u-root as a replacement for Dracut in rapido (https://github.com/rapido-linux/rapido)

    I currently encounter the following error on boot:

    /usr/bin/qemu-kvm -smp cpus=2 -m 512 -kernel <bzImage> -initrd ./initrds/myinitrd -append 'ip=192.168.1.1:::255.255.255.0:rapido1 rd.systemd.unit=emergency rd.shell=1 console=ttyS0 rd.lvm=0 rd.luks=0' -pidfile ./initrds/rapido_vm1.pid -device e1000,netdev=nw1,mac=<mac> -netdev tap,id=nw1,script=no,downscript=no,ifname=tap0 -nographic
    ...
    package github.com/u-root/u-root/cmds/installcommand
            imports runtime: open /go/src/runtime/asm_ppc64x.h: no such file or directory
    2018/07/27 16:25:30 exit status 1
    2018/07/27 16:25:30 init: No suitable executable found in [/inito /bbin/uinit /buildbin/uinit /bbin/sh /bbin/rush /buildbin/sh /buildbin/rush]
    2018/07/27 16:25:30 init: Waiting for orphaned children
    2018/07/27 16:25:30 init: All commands exited
    2018/07/27 16:25:30 init: Syncing filesystems
    2018/07/27 16:25:30 init: Exiting...
    

    The image was generated by current master (569a17126131f2f320dd70ec9151a262e9e25846) on openSUSE Leap 42.3 with go 1.9.7 via:

    u-root (master)> ./u-root -format=cpio -build=source -o myinitrd ./cmds/{ls,ip,dhclient,cat,init,rush,installcommand}
    2018/07/27 18:24:26 Disabling CGO for u-root...
    2018/07/27 18:24:26 Build environment: GOARCH=amd64 GOOS=linux GOROOT=/usr/lib64/go/1.9 GOPATH=/home/ddiss/go:/usr/share/go/1.9/contrib CGO_ENABLED=0
    2018/07/27 18:24:26 Filename is initramfs.cpio
    2018/07/27 18:24:26 Collecting package files and dependencies...
    2018/07/27 18:24:28 Building go toolchain...
    2018/07/27 18:24:58 Successfully wrote initramfs.
    

    I'm not very familiar with Go, so would appreciate if someone could point me in the right direction here.

  • Support more ways to load kernel modules early

    Support more ways to load kernel modules early

    This path implements two new ways of loading kernel modules early. Sometimes building monolithic kernels are not really feasible and people use their kernel and kernel modules included int he initrd image. This brings problems like how to supply the desired driver into /lib/modules/*.ko as you would need to have an explicit -file parameter for each module.

    This introduces two new ways to get around this:

    • Through configuration files in /etc/modules-load.d
    • Through modules_load kernel parameter

    These options are popularized through the systemd project and documented here;

    https://www.freedesktop.org/software/systemd/man/kernel-command-line.html#modules_load= https://www.freedesktop.org/software/systemd/man/modules-load.d.html

    I'm also wondering if we'd be interested in supporting a new u-root argument -module which would create a /etc/modules-load.d/default.conf file in the initrd, but this can come later.

  • Added pkg/mei

    Added pkg/mei

    Package mei adds a wrapper to MEI, the Intel ME Interface. See https://www.kernel.org/doc/Documentation/misc-devices/mei/mei.txt . This is a partial implementation that exposes an MEI client and an MKHI client on top of it.

    Signed-off-by: Andrea Barberio [email protected]

  • No network interface / kernel modules

    No network interface / kernel modules

    I booted up u-root bb build with qemu, but there is no network interface (only unconfigured "lo") and no network drivers.

    Is there some more documentation how to get a working network interface up with dhcp? Maybe additional modules are needed ("/lib/" is empty)?

  • cpio: fix to allow a same file as source for multiple extra files

    cpio: fix to allow a same file as source for multiple extra files

    If a same file is specified as source for multiple extra files, e.g. -files 'README.md:a.txt' -files 'README.md:b.txt', the contents of the second and subsequent files, e.g. b.txt, are empty. This is because ReaderAt is not initialized after the second time if the inode of source is duplicated.

    $ go run . -files 'README.md:a.txt' -files 'README.md:b.txt' cmds/core/{init,elvish}
    $ lsinitramfs -l /tmp/initramfs.linux_amd64.cpio
    -rw-rw-r--   0 root     root        16228 Jan  1  1970 a.txt # file is written successfully.
    -rw-rw-r--   0 root     root            0 Jan  1  1970 b.txt # file is empty.
    
  • Switch to upstream elvish

    Switch to upstream elvish

    This change does the following:

    • Move u-root's fork of elvish to exp/felvish
    • Import the new elvish as core/elvish
    • Update vendor directory with new dependencies

    Size difference:

    With go version 1.13:
    16571556 new_elvish.cpio
     4398452 new_elvish.cpio.xz
    15309988 old_elvish.cpio
     4052772 old_elvish.cpio.xz
    
    With go version 1.16:
    13679780 new_elvish.cpio
     3519348 new_elvish.cpio.xz
    11701412 old_elvish.cpio
     3059740 old_elvish.cpio.xz
    

    Signed-off-by: Ryan O'Leary [email protected]

  • refactor boot commands to use pkg/boot and avoid unnecessary file copy

    refactor boot commands to use pkg/boot and avoid unnecessary file copy

    This relates to: https://github.com/u-root/u-root/issues/751 https://github.com/u-root/u-root/issues/1054 https://github.com/u-root/u-root/pull/1283 https://github.com/u-root/u-root/pull/1241

    I'm currently starting from the boot/boot command as it uses less packages so almost everything is in the same file.

  • Strace package doesn't work with Chrome/Firefox

    Strace package doesn't work with Chrome/Firefox

    Describe the bug When using the Strace package to trace Chromium-browser or Firefox, it fails and produces the error: "Trace/breakpoint trap (core dumped)" Additionally using the program in u-root/cmds/core/strace/ still produces the same error. When you monitor the system processes, you can notice the program runs for a few seconds, then crashes. The application (Chromium browser or Firefox) doesn't open

    The final 3 lines :

    [pid 505226] X execve(0x0 <nil>, [], []) = 0x0 (5.130738ms)
    PID 505226 got signal SIGTRAP (trace/breakpoint trap) (5)
    PID 505226 exited from signal SIGTRAP (trace/breakpoint trap) (5)
    

    To Reproduce Trace Chromium-browser or Firefox using the U-root strace package.

    Expected behavior The tracing to happen without crashing. The application (Chromium browser or Firefox) to open, similar to the C-based strace.

    Additional context I also used other, smaller programs to test the u-root package, and they all worked without any problems.

  • Search for extlinux.conf under /boot/extlinux

    Search for extlinux.conf under /boot/extlinux

    Is your feature request related to a problem? Please describe. Many distributions will install extlinux.conf under /boot/extlinux, but the current syslinux implementation does not look there, preventing a host from being able to boot.

    Examples:

    • https://wiki.syslinux.org/wiki/index.php?title=EXTLINUX
    • https://wiki.gentoo.org/wiki/Syslinux#EXTLINUX

    Describe the solution you'd like Add /boot/extlinux to the list of directories searched for when parsing syslinux configs.

    Describe alternatives you've considered N/A

    Additional context N/A

  • [mktemp] Remove hard coded /tmp in mktemp_test.go

    [mktemp] Remove hard coded /tmp in mktemp_test.go

    As written, the tests in mktemp_test.go will fail when tmpdir is not /tmp because /tmp is hard coded in the test cases. This can be seen by executing: $ export TMPDIR=$(mktemp -d); go test, which will fail.

    This PR changes the hard-coded /tmp references in mktemp_test.go to use os.TempDir(). The code in mktemp.go is updated to use os.TempDir() as well as it is backwards compatible with the current os.Getenv("TMPDIR") usage: "TempDir returns the default directory to use for temporary files. On Unix systems, it returns $TMPDIR if non-empty, else /tmp. On Windows, it uses GetTempPath, returning the first non-empty value from %TMP%, %TEMP%, %USERPROFILE%, or the Windows directory. On Plan 9, it returns /tmp."

    Signed-off-by: Avi Brender [email protected]

  • The `dt` package cannot be used on GOOS != linux.

    The `dt` package cannot be used on GOOS != linux.

    The naming of fdt_linux.go currently prevent us from upgrading the u-root package in our bare metal bootloader.

    This happens because naming the file with the _linux suffix tells Go to only load the file with GOOS=linux while we use GOOS=tamago.

    I think this is a bug as there is no reason why the dt package should be forced only on GOOS=linux.

    Would you mind renaming the file so that we can upgrade your package?

    Thanks!

  • Releases Matrix

    Releases Matrix

    Hi,

    I have only one question. Could be possible create on README.md a description of the active releases/branches and differences?

    I saw that the last release is v0.10.0 but there are tags already with 1.0.1, 7.0.0 etc.

    Thanks in advance for your feedback and for all your work with u-root

Execute a binary from memory, without touching the disk. Linux only.
Execute a binary from memory, without touching the disk. Linux only.

Memit Execute a binary from memory, without touching the disk. Linux only. Available as both a Go module and a binary. Using the Go module The Command

Jan 5, 2023
Automatically set GOMAXPROCS to match Linux container CPU quota.

automaxprocs Automatically set GOMAXPROCS to match Linux container CPU quota. Installation go get -u go.uber.org/automaxprocs Quick Start import _ "go

Dec 29, 2022
Go-Utils is a library containing a collection of Golang utilities

Go-Utils is a library containing a collection of Golang utilities

Jun 2, 2022
Like tools/cmd/stringer with bitmask features

Bitmasker Bitmasker is a tool used to automate the creation of helper methods when dealing with bitmask-type constant flags. Given the name of an unsi

Nov 25, 2021
Elf binary infector written in Golang

Elf binary infector written in Golang. It can be used for infecting executables of type ET_DYN and ET_EXEC with a payload of your creation. Utilizing the classic elf text segment padding algorithm by Silvio Cesar, your payload (parasite) will run before native functionality of the binary effectively backooring the binary.

Dec 30, 2022
Julia Set Generator Written In Golang
 Julia Set Generator Written In Golang

Julia Set Generator Written In Golang This is a simple (naive) Julia Set generator written in Golang. The project utilizes concurrent workers to speed

Nov 5, 2021
dqlx is a fully featured DGraph Schema and Query Builder for Go.

dqlx is a fully featured DGraph Schema and Query Builder for Go. It aims to simplify the interaction with the awesome Dgraph database allowing you to fluently compose any queries and mutations of any complexity. It also comes with a rich Schema builder to easily develop and maintain your Dgraph schema.

Dec 17, 2022
Fully featured, spec-compliant HTML5 server-sent events library

go-sse Lightweight, fully spec-compliant HTML5 server-sent events library. Table of contents go-sse Table of contents Installation and usage Implement

Dec 5, 2022
get windows system call number dynamically, it doesn't need the system call table.

GetSyscallID get windows system call number dynamically, it doesn't need the system call table. Try download go get github.com/akkuman/getsyscallid/cm

Jun 1, 2022
A utility library to do files/io/bytes processing/parsing in file-system or network.

goreader A utility library to do files/io/bytes processing/parsing in file-system or network. These features are really common to be implemented for a

Nov 1, 2021
Flock is a project which provides a Go solution for system level file locks for all platforms Golang supports.

Flock is a project which provides a Go solution for system level file locks for all platforms Golang supports.

Feb 8, 2022
Cogger is a standalone binary and a golang library that reads an internally tiled geotiff

Cogger is a standalone binary and a golang library that reads an internally tiled geotiff (optionally with overviews and masks) and rewrites it

Dec 12, 2022
This library provides an ASTERIX Frame(binary data) decoding/parsing(json,xml) capabilities for Go.

GoAsterix This library provides an ASTERIX Frame(binary data) decoding/parsing(json,xml) capabilities for Go. ASTERIX ASTERIX (All Purpose Structured

Dec 13, 2022
A set of instrumentation features for collecting relevant tracing data as well as secure an application

Go Agent goagent provides a set of instrumentation features for collecting relevant tracing data as well as secure an application by blocking requests

Dec 21, 2021
redis-util business-friendly encapsulation of redis operations, such as the common cache set get operation

redis-util 方便业务使用的redis操作封装,比如常见的缓存set get操作, 一行代码搞定,不像开源库需要写好多行 使用方法

Oct 22, 2021
Simple utility to get/set the PWM duty cycle and to measure the RPM for a fan connected to the 4-pin header on the CM4IO.

cm4iofan Simple utility to get/set the PWM duty cycle and to measure the RPM for a fan connected to the 4-pin header on the CM4IO. Requirements Enable

Mar 31, 2022
This Go package allows you to set handler functions that run when named events occur

This Go package allows you to set handler functions that run when named events occur

Feb 10, 2022
Golang 1.18+ Generics implementation of Set methods

Golang Generics: Set A golang 1.18+ implementation of Set using Go generics Installation $ go get -u github.com/chrispappas/golang-generics-set Quick

Oct 26, 2022
safe and easy casting from one type to another in Go

cast Easy and safe casting from one type to another in Go Don’t Panic! ... Cast What is Cast? Cast is a library to convert between different go types

Jan 1, 2023