Skip to content

Commit

Permalink
feat: enable usb + usb network adapters
Browse files Browse the repository at this point in the history
This PR enables USB 2.0/3.0 devices in the kernel. It also, then,
enables the use of usb network adapters. This is useful in a baremetal
scenario where I'm using a usb-c to ethernet adapter for the node. The
options I explicitly enabled were: `CONFIG_USB`, `CONFIG_USB_XHCI_HCD`,
`CONFIG_USB_NET_DRIVERS`, and finally `CONFIG_USB_RTL8152`. All others
were added automatically by menuconfig.

Also added in a readme for how to make kernel config changes.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
  • Loading branch information
rsmitty authored and andrewrynhard committed Feb 12, 2020
1 parent 2cf024b commit 32d9f21
Show file tree
Hide file tree
Showing 2 changed files with 251 additions and 7 deletions.
32 changes: 32 additions & 0 deletions kernel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Kernel

## Customizing the kernel

High-level notes:

- In pkg.yaml, comment out the `build` and `install` steps
- At the bottom of pkg.yaml, change the finalize step from

```yaml
finalize:
- from: /rootfs
to: /
```
to
```yaml
finalize:
- from: /
to: /
```
- Create a local image with `docker buildx build -t kernel --target kernel -f Pkgfile --load .`
- Run the kernel image we created: `docker run --rm -it --entrypoint=/toolchain/bin/bash kernel`
- Set path: `export PATH=/toolchain/bin:/bin`
- Change to build dir: `cd /tmp/build/0`
- Make changes to kernel settings with `make menuconfig` and save upon exiting
- With the container still running, copy the config out to local disk: `docker cp $CONTAINER_ID:/tmp/build/0/.config config-amd64`
- Revert your changes to pkg.yaml
- Build and push a test image with `make USERNAME=rsmitty PUSH=true kernel`
- PR upstream (when ready) and profit
Loading

0 comments on commit 32d9f21

Please sign in to comment.