{"id":19008475,"url":"https://github.com/jc2k/flash-kernel","last_synced_at":"2025-10-10T22:44:32.171Z","repository":{"id":66768851,"uuid":"67331902","full_name":"Jc2k/flash-kernel","owner":"Jc2k","description":"A fork of flash-kernel that handles Raspberry Pi (for running upstream Debian on them)","archived":false,"fork":false,"pushed_at":"2016-09-04T07:40:42.000Z","size":106,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-01T20:44:39.300Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jc2k.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-04T07:40:29.000Z","updated_at":"2020-04-19T10:26:37.000Z","dependencies_parsed_at":"2023-02-28T21:15:46.998Z","dependency_job_id":null,"html_url":"https://github.com/Jc2k/flash-kernel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jc2k%2Fflash-kernel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jc2k%2Fflash-kernel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jc2k%2Fflash-kernel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jc2k%2Fflash-kernel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jc2k","download_url":"https://codeload.github.com/Jc2k/flash-kernel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240035702,"owners_count":19737602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T18:42:35.042Z","updated_at":"2025-10-10T22:44:27.137Z","avatar_url":"https://github.com/Jc2k.png","language":"Shell","readme":"flash-kernel\n------------\n\nflash-kernel is a script which will put the kernel and initramfs in\nthe boot location of embedded devices that don't load the kernel and\ninitramfs directly from /boot.  flash-kernel supports devices that\nboot from flash memory (hence the name) as well as some devices that\nrequire a special boot image on the disk.\n\nSupported systems\n- - - - - - - - -\n\nThe following systems are supported:\n\n - APM X-Gene Mustang board\n - Buffalo Linkstation Live\n - Buffalo Linkstation Live, version 3 (LS-CHL)\n - Buffalo Linkstation Live with BitTorrent (LS-CHLv2)\n - Buffalo Linkstation LS-QVL\n - Buffalo Linkstation LS-VL\n - Buffalo Linkstation LS-WSXL\n - Buffalo Linkstation LS-WTGL\n - Buffalo Linkstation LS-WVL\n - Buffalo Linkstation LS-WXL\n - Buffalo Linkstation Mini (LS-WSGL)\n - Buffalo Linkstation Pro (LS-GL)\n - Buffalo Linkstation Pro (LS-XHL)\n - Buffalo/Revogear Kurobox Pro\n - D-Link DNS-323\n - Genesi Efika Nettop\n - Genesi Efika Smartbook\n - GLAN Tank\n - GuruPlug\n - HP t5325 Thin Client\n - HP Media Vault mv2120\n - Intel SS4000-E\n - LaCie 2Big Network v2\n - LaCie 5Big Network v2\n - LaCie Internet Space v2\n - LaCie Network Space v2\n - LaCie Network Space Max v2\n - LaCie d2 Network v2\n - Linksys NSLU2\n - Marvell DB-78x00-BP Development Board\n - Marvell OpenRD-Base\n - Marvell OpenRD-Client\n - Marvell OpenRD-Ultimate\n - Neo FreeRunner (GTA02)\n - PlatHome OpenBlocks AX3-4 board\n - Plat'Home OpenBlocks A6\n - QNAP TS-109\n - QNAP TS-110 Turbo NAS\n - QNAP TS-119 Turbo NAS\n - QNAP TS-209\n - QNAP TS-210 Turbo NAS\n - QNAP TS-219 and TS-219P Turbo NAS\n - QNAP TS-409\n - QNAP TS-410 and TS-410U Turbo NAS\n - QNAP TS-419P and TS-419U Turbo NAS\n - Raspberry Pi Model B\n - Raspberry Pi Model B Rev 1\n - Raspberry Pi Model B Rev 2\n - Raspberry Pi Model B Plus\n - Raspberry Pi Model B Plus Rev 1.0\n - Raspberry Pi Model B Plus Rev 1.1\n - Raspberry Pi Model B Plus Rev 1.2\n - Raspberry Pi 2 Model B\n - Raspberry Pi 2 Model B Rev 1.0\n - Raspberry Pi 2 Model B Rev 1.1\n - Raspberry Pi 3 Model B Rev 1.2\n - Seagate FreeAgent DockStar\n - Seagate NAS (2 and 4 bay)\n - Seagate Personal Cloud (1 and 2 bay)\n - SheevaPlug\n - SheevaPlug eSATA\n - Thecus N2100\n - Toshiba AC100\n\nIf you would like to see support for another device, please file a bug\nreport in the Debian Bug Tracking System and include all information\nrelated to the boot process of your device.  Instructions can be found\nat http://bugs.debian.org/\n\n\nTestsuite\n- - - - -\n\nRun the testsuite with:\n    FK_CHECKOUT=. ./test_db\n    FK_CHECKOUT=. ./test_flash-kernel\n    FK_CHECKOUT=. ./test_functions\n\nYou need the devscripts package for the checkbashisms test.\n\n\nDatabase format\n- - - - - - - -\n\nTo accomodate the differences between machines, db/*.db files contain\ninformation on supported machines.  The files look somewhat like\nRFC 2822 data or Debian control data, i.e. header: value pairs,\nwith definitions separated by an empty line.  Comments starting with a\npound are ignored.\n\n/etc/flash-kernel/db is parsed first and allows for local override of\nany field. Note that you must include the \"Machine\" field (including\nmultiple instances if necessary) here as well as the field(s) to be\noverridden.\n\nThe supported fields are:\n\n* Machine: (required) value of the \"Hardware:\" line in /proc/cpuinfo\n  or content of /proc/device-tree/model. Used as a unique\n  identifier. Must be the first field in each stanza. There can be\n  multiple instances of this field (to support system which have both\n  cpuinfo:Hardware and device-tree based identifiers depending on the\n  current kernel) but all instances of the Machine: field must come\n  before any other field in the stanza.\n\n* Kernel-Flavors: (optional) allowed flavors (suffixes) for the to be\n  installed kernel; if the vmlinuz file doesn't end with a listed\n  suffix, installation is aborted\n\n* Machine-Id: (optional) linux mach-type to set before starting vmlinuz;\n  will be set by a small piece of ARM code prepended to the kernel image.\n  This option is ignored if a DTB is to be appended, via either DTB-Append or\n  DTB-Append-From.\n\n* DTB-Id: (optional) specifies the name of the DTB file for this device. If\n  the value begins with a `!' then the field is a script which should be run.\n  The script must produce the DTB filename (and nothing else) on stdout.\n\n* DTB-Append: (optional) when yes the DTB specified by DTB-Id will be appended\n  to the kernel image.\n\n* DTB-Append-From: (optional): Can be used instead of DTB-Append. The argument\n  is a kernel version, if the kernel to be installed is at least this version\n  then the DTB specified named by DTB-Id will be appended to the kernel image.\n  When adding or updating this field remember to consider whether the kernel\n  will require an update to its versioned Breaks: on flash-kernel.\n\n* U-Boot-Kernel-Address, U-Boot-Kernel-Entry-Point, U-Boot-Initrd-Address:\n  (optional) address where to load in (physical) RAM the kernel, entry point\n  and initrd, respectively; this also indicates that U-Boot images should be\n  generated with mkimage\n\n* U-Boot-Script-Address: (optional) like U-Boot-Kernel-Address and\n  U-Boot-Initrd-Address but for an U-Boot boot script; see also\n  U-Boot-Script-Name\n\n* U-Boot-Script-Name: (optional) name of U-Boot boot script to install\n  from the flash-kernel files. @@KERNEL_VERSION@@ will be substituted for the\n  actual kernel version\n\n* Boot-Kernel-Path, Boot-Initrd-Path: (optional) where to put the\n  generated kernel and initrd files on the filesystem; see also\n  Boot-Device\n\n* Boot-Script-Path: (optional) like Boot-Kernel-Path and\n  Boot-Initrd-Path but for an U-Boot boot script; see also\n  U-Boot-Script-Name and Boot-Device\n\n* Boot-DTB-Path: (optional) like Boot-Kernel-Path and Boot-Initrd-Path\n  but for a DTB file. The DTB file named by DTB-Id will be copied\n  here; see also DTB-Id\n\n* Mtd-Kernel, Mtd-Initrd: (optional) Specifies the raw MTD partition\n  name (per /proc/mtd) to use for the kernel and initrd respectively.\n\n* Required-Packages: (optional) list of packages which must be added\n  during installer phase for flash-kernel to work properly; failure to\n  add these packages aborts the installation\n\n* Optional-Packages: (optional) list of packages which should be\n  added during installer pharse for flash-kernel to offer full\n  functionality; failure to add these packages just triggers a warning\n\n* Bootloader-Sets-Incorrect-Root: (optional) when \"yes\" indicates that\n  the bootloader passes a root= value to the kernel and that this\n  should be overriden in the initrd; when \"no\", flash-kernel only sets\n  a default value for the root device, which allows end-users to pass\n  root= to the kernel.\n\n* Method: (optional) indicates how to support this particular machine;\n  the default is \"generic\"; other available methods are: android, multi,\n  redboot, slug, symlink\n\n* Boot-Device: (optional) block device to mount before installing\n  kernel,  initrd and U-Boot script; Boot-Kernel-Path, Boot-Initrd-Path and\n  Boot-Script-Path are then taken relative to this boot device\n\n\nConfiguration\n- - - - - - -\n\nConfiguration files currently supported:\n* /etc/flash-kernel/machine allows skipping the machine auto-detection from\n  /proc/cpuinfo or /proc/dtmodel and forcing a specific Machine.\n\n* /etc/flash-kernel/db allows overriding / adding fields from the Machine\n  database (but it doesn't allow removing fields or entries).\n\n* /etc/flash-kernel/dtbs (directory). If a DTB matching DTB-Id is\n  found here then it will be used in preference to the one shipped by\n  the kernel being installed.\n\n* /etc/flash-kernels/bootscript (directory). The files referenced via\n  the Boot-Script-Name field are installed here.\n\n* /etc/flash-kernel/ubootenv.d can be used to add or override u-boot\n  script snippets. See \"Adding U-Boot Commands for Pre-Boot Execution\"\n  below for more details.\n\n* /etc/default/flash-kernel currently contains the following variables:\n    - LINUX_KERNEL_CMDLINE, which should be used by bootscripts to set kernel\n      options, overriding the firmwares defaults (e.g. u-boot's ${bootargs}).\n    - LINUX_KERNEL_CMDLINE_DEFAULTS, which should be used by bootscripts to set\n      kernel options which should be overrideable by the firmware's defaults\n      (e.g. u-boot's ${bootargs}).\n    - NO_CREATE_DOT_BAK_FILES, which if set to \"true\" or \"yes\" will\n      prevent flash-kernel from creating backup \".bak\" versions of\n      kernel, initrd, and dtb files when installing a new version. The\n      default is to create such backups to aid in recovery from\n      failed updates. If this option is enabled then more complex\n      methods or specialised hardware (e.g. JTAG) may be required to\n      recover.\n    - MTD_BACKUP_DIR, which if set, names a directory to which\n      flash-kernel will write copies of files which would not normally\n      be accessible in the regular filesystem (either written to a\n      rawflash partition or to a firmware partition which is not\n      normally mounted). If unset defaults to\n      /var/backups/flash-kernel. Set to \"none\" to disable.\n\nAdding U-Boot Commands for Pre-Boot Execution\n- - - - - - - - - - - - - - - - - - - - - - -\n\nPackages can drop in files containing U-Boot commands to be executed by a\nplatform's bootscript before starting the OS. These files should be\ndropped in /usr/share/flash-kernel/ubootenv.d. Users can add additional\nstubs, or override stubs provided by packages, by adding files to\n/etc/flash-kernel/ubootenv.d. Files in the /etc path that have the same\nname as files in the /usr path will override the /usr counterparts.\n\nPlatform bootscripts must contain the @@UBOOT_ENV_EXTRA@@ macro for the\ncontents of these stubs to be incorporated.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjc2k%2Fflash-kernel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjc2k%2Fflash-kernel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjc2k%2Fflash-kernel/lists"}