and rename it gadgetkernel.tgz
Step 1. Copy New Kernel to SD Card
Copy the new kernel file over to the boot directory of the Jessie Lite card. After you're done burning the SD image, don't eject it just yet. Drag the kernel.tgz file over to the SD card. This way you can ferry the kernel into your Pi without needing network
Step 2. Log into your Pi Zero
Insert the SD into your Pi Zero, connect the console cable, power the Pi & log into via the USB console.
Step 3. Uncompress new kernel package
Uncompress and install the kernel .tgz file
run the following commands:
- cd ~
- sudo mv /boot/gadgetkernel.tgz .
- tar -xvzf gadgetkernel.tgz
You'll see a long stream of file names ending with tmp/boot/kernel.img
Step 4. Backup and Install new Kernel
Run
- sudo mv /boot/kernel.img /boot/kernelbackup.img
to make a backup of the current kernel. Now run
- sudo mv tmp/boot/kernel.img /boot
You may see complaints about preserving ownership, you can ignore them
Step 5. Install Overlays & Modules
Run the commands to install the new overlays & modules
- sudo mv tmp/boot/overlays/* /boot/overlays
- sudo mv tmp/boot/*dtb /boot
- sudo cp -R tmp/boot/modules/lib/* /lib
Gadget Serial!
Now we'll tell the Pi we want to use the g_serial module
Run
- sudo nano /etc/modules
and add g_serial on a single line at the end, then save
Gadget Ethernet!
Now we'll tell the Pi we want to use the g_ether module
Run
- sudo nano /etc/modules
and add g_ether on a single line at the end, then save
Text editor powered by tinymce.