Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions docs/README.kernel.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,25 +257,25 @@ KERNEL_VERSION=`make -s kernelrelease`
this command:

```bash
ssh admin@$TARGET 'test ! -h /boot/runmode/bzImage && mv /boot/runmode/bzImage /boot/runmode/bzImage-`uname -r`'
ssh root@$TARGET 'test ! -h /boot/runmode/bzImage && mv /boot/runmode/bzImage /boot/runmode/bzImage-`uname -r`'
```

2. Copy the new kernel to the target with SSH.

```bash
scp arch/x86/boot/bzImage admin@$TARGET:/boot/runmode/bzImage-$KERNEL_VERSION
scp arch/x86/boot/bzImage root@$TARGET:/boot/runmode/bzImage-$KERNEL_VERSION
```

Rewrite the symlink used by the bootloader.

```bash
ssh admin@$TARGET ln -sf bzImage-$KERNEL_VERSION /boot/runmode/bzImage
ssh root@$TARGET ln -sf bzImage-$KERNEL_VERSION /boot/runmode/bzImage
```

3. Copy the kernel modules to the target.

```bash
tar cz -C $TEMP_MODULES lib | ssh admin@$TARGET tar xz -C /
tar cz -C $TEMP_MODULES lib | ssh root@$TARGET tar xz -C /
```

Note that the build and source symlinks in the modules directory do
Expand All @@ -290,19 +290,19 @@ KERNEL_VERSION=`make -s kernelrelease`
provides an interactive menu to choose whether to boot into safemode:

```bash
ssh admin@$TARGET fw_setenv bootdelay 5
ssh root@$TARGET fw_setenv bootdelay 5
```

5. Reboot the target.

```bash
ssh admin@$TARGET reboot
ssh root@$TARGET reboot
```

6. (optional) Check version of the updated kernel on the target.

```bash
ssh admin@$TARGET uname -r
ssh root@$TARGET uname -r
```


Expand Down Expand Up @@ -349,9 +349,9 @@ TARGET=<the target's hostname or IP address>
1. Copy the new kernel to the target.

```bash
scp ni-install/arm/boot/ni_zynq_custom_runmodekernel.itb admin@$TARGET:/boot/linux_runmode.itb
scp ni-install/arm/boot/ni_zynq_custom_runmodekernel.itb root@$TARGET:/boot/linux_runmode.itb
cd ni-install/arm/lib/modules/
tar cz lib | ssh admin@$TARGET tar xz -C /
tar cz lib | ssh root@$TARGET tar xz -C /
```

Note that the build and source symlinks in the modules directory do
Expand All @@ -361,13 +361,13 @@ TARGET=<the target's hostname or IP address>
2. Reboot the target.

```bash
ssh admin@$TARGET reboot
ssh root@$TARGET reboot
```

3. (optional) Check version of the updated kernel on the target.

```bash
ssh admin@$TARGET uname -r
ssh root@$TARGET uname -r
```

## Rebuilding NI out-of-tree Drivers with DKMS
Expand Down Expand Up @@ -398,16 +398,16 @@ over the network, saving limited disk space resources.
2. Install sshfs on the target and load the module for fuse.

```bash
ssh admin@$TARGET "opkg update && opkg install sshfs-fuse"
ssh admin@$TARGET modprobe fuse
ssh root@$TARGET "opkg update && opkg install sshfs-fuse"
ssh root@$TARGET modprobe fuse
```

3. Mount the kernel source on the target. Note that user and host
in this case are the values for the host build machine.

```bash
ssh admin@$TARGET mkdir /usr/src/linux
ssh admin@$TARGET sshfs <user>@<host>:<path_to_linux_source> /usr/src/linux
ssh root@$TARGET mkdir /usr/src/linux
ssh root@$TARGET sshfs <user>@<host>:<path_to_linux_source> /usr/src/linux
```

#### With `scp` and `tar`
Expand All @@ -416,8 +416,8 @@ If the target has sufficient disk space, the source can be copied to the
target, as was done earlier when copying the modules to the target.

```bash
ssh admin@$TARGET mkdir /usr/src/linux
tar cz --exclude=./.git --exclude=$TEMP_MODULES . | ssh admin@$TARGET tar xz --no-same-owner -C /usr/src/linux
ssh root@$TARGET mkdir /usr/src/linux
tar cz --exclude=./.git --exclude=$TEMP_MODULES . | ssh root@$TARGET tar xz --no-same-owner -C /usr/src/linux
```

### Using the Source with DKMS
Expand All @@ -426,7 +426,7 @@ The following steps are all run on the target. This can be done either by
opening an ssh session as below or through a serial connection.

```bash
ssh admin@$TARGET
ssh root@$TARGET
```

1. Fix dangling build and source symlinks.
Expand Down
2 changes: 1 addition & 1 deletion scripts/dev/upstream_merge/utils/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def test_safemode_installation(ssh_connection):
current_directory = os.getcwd()
copy = execute_and_stream_cmd_output(
f"scp {current_directory}{BUILD_DIR}{SAFEMODE_IMAGE} "
f"{ssh_connection}:/home/admin"
f"{ssh_connection}:/home/root"
)
if copy[0] != 0:
return copy
Expand Down
4 changes: 2 additions & 2 deletions scripts/tests/provisioning/migrate_vm_to_safemode.expect
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set ipk_feeds [lrange $argv 2 end]
# default, if none is specified.
set vm_host_ip "10.0.2.2"
# Set the login username
set USER admin
set USER root

# boot the VM with the run-vm script
spawn [lindex $argv 0] -- -device e1000,netdev=n1 -netdev user,id=n1,ipv6=off,net=10.0.2.0/24,host=$vm_host_ip
Expand Down Expand Up @@ -101,7 +101,7 @@ expect {
}
}

set USER admin
set USER root

set timeout 90
expect {
Expand Down
2 changes: 1 addition & 1 deletion scripts/tests/provisioning/test_rauc_provision.expect
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set ipk_feeds [lrange $argv 2 end]
# default, if none is specified.
set vm_host_ip "10.0.2.2"
# Set the login username
set USER admin
set USER root

set RE_PROMPT "(admin|root)@.*# $"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set ipk_feeds [lrange $argv 2 end]
# default, if none is specified.
set vm_host_ip "10.0.2.2"
# Set the login username
set USER admin
set USER root

# boot the VM with the run-vm script
spawn [lindex $argv 0] -s -- -device e1000,netdev=n1 -netdev user,id=n1,ipv6=off,net=10.0.2.0/24,host=$vm_host_ip
Expand Down