#!/bin/bash -e #--------------------------------------------------------------------- # Steps involved in updating a copy of this directory to a new kernel # release: #--------------------------------------------------------------------- # 1. Edit this script. Go to the "kernel release parameters" section # and: # # Set NEWREL to the new upstream kernel release [#.#.#] # Set NEWDATE to the new 6-digit date [######] # Set NEWBITS to 32 for 32-bit or 64 for 64-bit # # For example: # # NEWREL=5.10.12 # NEWDATE=210202 # NEWBITS=64 #--------------------------------------------------------------------- # 2. Obtain the appropriate Linux source tarball and put it in this # directory. The filename should be equal to: # # linux-$NEWREL.tar.xz # # where NEWREL is the same as specified in this script. #--------------------------------------------------------------------- # 3. Set your terminal program window dimensions to at least 80x25. #--------------------------------------------------------------------- # 4. Run this script interactively in its directory. Don't redirect # input or output. For example: # # bash -e ./update-kernel.sh # You'll be taken to a kernel configuration screen. Use the left and # right arrow keys to select Exit; then press Enter to Exit. #--------------------------------------------------------------------- # 5. cd /ram/kernelsbuilt/ #--------------------------------------------------------------------- # 6. cd into the appropriate subdirectory. #--------------------------------------------------------------------- # 7. This command should now build a kernel: # # bash ./build-kernel.sh --run >& build.log & #--------------------------------------------------------------------- # 8. If the build is successful, the sub-directory that you were in # will be moved from "/ram/kernelsbuilt/" into "/kernelsbuilt/". #--------------------------------------------------------------------- # 9. Some final installation steps are required. See the comments in # "build-kernel.sh". #--------------------------------------------------------------------- # Kernel release/version parameters. NEWREL=6.9.12 NEWDATE=240801 NEWBITS=32 #--------------------------------------------------------------------- set -e CFGLOCAL="-$NEWDATE-$NEWBITS" # Delete old output tarballs. rm -fr kernel-*.tar.* sed -e "s/-[0-9][0-9][0-9][0-9][0-9][0-9]-[36][24]/$CFGLOCAL/g" \ -e "s/Revision: [0-9][0-9][0-9][0-9][0-9][0-9]/Revision: $NEWDATE/g" \ -e "s/\([ =]\)[56]\.[0-9][0-9]*\.[0-9][0-9]*/\1$NEWREL/g" \ -i \ build-kernel.sh \ config-info.txt \ config.kernel \ prepare-kernel-sources.sh \ readme.txt \ || exit 1 bash prepare-kernel-sources.sh || exit 1 foo=`pwd` mkdir -p /ram/kernelsbuilt cd /ram/kernelsbuilt rm -fr kernel$CFGLOCAL tar jxf $foo/kernel$CFGLOCAL.tar.bz2 || exit 1 cd kernel$CFGLOCAL #--------------------------------------------------------------------- # End of file.