aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Expand)AuthorAgeFilesLines
* build: introduce per feed repository supportJohn Crispin2014-08-063-1/+38
* scripts/om-fwupgradecfg-gen.sh: add support for the OM5PJohn Crispin2014-07-201-2/+2
* scripts/abs2rel.pl: remove, it is unusedFelix Fietkau2014-07-041-16/+0
* scripts: unset GREP_OPTIONS in env and feeds (fixes #16924)Felix Fietkau2014-06-302-0/+2
* scripts/ubinize-image.sh: fix ubinize-image.sh when used with --kernelJohn Crispin2014-06-291-0/+1
* make UbinizeImage work nicely without a kernel volumeImre Kaloz2014-06-271-10/+4
* scripts/ubinize-image.sh: fix parameter handlingJohn Crispin2014-06-261-24/+27
* scripts/metadata.pl: avoid adding depends and select for the same symbolFelix Fietkau2014-06-121-1/+1
* kernel: add a NAND_SUPPORT symbolJohn Crispin2014-06-111-0/+1
* scripts: add ubinize-image.sh to generate ubi imagesJohn Crispin2014-06-111-0/+113
* build: add a feature flag for low-memory systemsFelix Fietkau2014-06-021-0/+1
* scripts/bundle-libraries: fall back to only copying binaries if ldd is unavai...Felix Fietkau2014-06-021-21/+20
* metadata.pl: suppress profile config.in code for targets that have subtargets...Felix Fietkau2014-06-011-1/+4
* scripts/metadata.pl: fix ignoring missing host dependenciesFelix Fietkau2014-03-131-1/+2
* scripts/metadata.pl: remove sdk specific config symbol overrideFelix Fietkau2014-03-131-8/+1
* scripts/config: make wildcard include with no results non-fatalFelix Fietkau2014-03-102-0/+14
* scripts/kconfig.pl: Indicate which file we couldn't openJohn Crispin2014-01-191-1/+1
* scripts/download.pl: prefer the GNU mirror redirect over the primary site (#1...Felix Fietkau2013-12-131-1/+1
* add a feature flag for device tree supportImre Kaloz2013-11-221-0/+1
* scripts/gen-dependencies.sh: prevent zero-length dep.* files from accumulatin...Felix Fietkau2013-11-191-1/+1
* build: fix build on Mac OS X 10.9Felix Fietkau2013-10-281-0/+12
* ipkg-make-index: use more backwards-compatible openssl call for SHA256Steven Barth2013-10-171-1/+1
* build: drop FIT option until we actually need itLuka Perkov2013-10-171-1/+0
* build: add menuconfig option for building FIT imagesLuka Perkov2013-10-161-0/+1
* build: move mkits.sh script to more common placeLuka Perkov2013-10-161-0/+115
* opkg: add support for SHA256 verificationSteven Barth2013-10-041-0/+2
* scripts/gen-dependencies.sh: use the cross readelf (#12940)Felix Fietkau2013-09-291-1/+1
* build: include the cpu type as part of the toolchain/target directory nameFelix Fietkau2013-09-261-0/+11
* feeds: enable cloning of specific git commitLuka Perkov2013-09-251-2/+8
* scripts/feeds: ensure that --ff is enabledFlorian Fainelli2013-09-021-1/+1
* scripts/checkpatch.pl: Fix whitespace errorsVasilis Tsiligiannis2013-08-311-20/+20
* scripts/{cleanfile,cleanpatch}: Add scripts for cleaning up file and patch wh...Vasilis Tsiligiannis2013-08-312-0/+434
* scripts/checkpatch.pl: Remove checks for __setup's documentationVasilis Tsiligiannis2013-08-311-26/+0
* scripts/checkpatch.pl: Remove check for deprecated featuresVasilis Tsiligiannis2013-08-311-37/+0
* scripts/checkpatch.pl: Introduce 'checkpatch.pl' scriptVasilis Tsiligiannis2013-08-311-0/+3553
* build: process transitive dependencies after local dependenciesFelix Fietkau2013-08-041-1/+7
* build: suppress conditional dependencies if there are unconditional dependenc...Felix Fietkau2013-08-041-0/+1
* kernel: add a new global config symbol for enabling rfkill support (can be en...Felix Fietkau2013-07-211-0/+1
* scripts/metadata.pl: emit dependencies for package/kernel/linuxFelix Fietkau2013-07-191-1/+1
* scripts/gen-dependencies.sh: clean up temp filesFelix Fietkau2013-07-191-0/+1
* scripts: change metadata.pm and metadata.pl to not emit "default m if ALL" Kc...Jo-Philipp Wich2013-07-182-3/+7
* gen-dependencies.sh: sort kmod dependenciesFelix Fietkau2013-07-181-1/+1
* build: implement kernel module dependency trackingFelix Fietkau2013-07-181-0/+10
* metadata.pl: use alphabetical order for menuconfig categories, also fixes ran...Jo-Philipp Wich2013-07-161-1/+1
* [scripts/downloads.pl] remove broken mirrors for linux kernelMirko Vogt2013-07-141-4/+0
* scripts/download.pl: use HTTP instead of FTP for the default GNU siteFelix Fietkau2013-07-091-1/+1
* metadata.pl: fixpath exclusion of kernel packagesJohn Crispin2013-06-291-1/+1
* target: split jffs2 NAND out of jffs2Jonas Gorski2013-06-051-1/+2
* feeds: fix check for core packages that are not in the package/ toplevel dire...Jo-Philipp Wich2013-05-291-1/+10
* build: clean up stale files from a previous build when installing a package b...Felix Fietkau2013-05-291-0/+24
array * * If the chunk type is -ve then chunk consists of one of a number of * metadata types. See definitions of XC_SAVE_ID_* below. * * If chunk type is 0 then body phase is complete. * * TAIL PHASE * ---------- * * Content differs for PV and HVM guests. * * HVM TAIL: * * "Magic" pages: * uint64_t : I/O req PFN * uint64_t : Buffered I/O req PFN * uint64_t : Store PFN * Xen HVM Context: * uint32_t : Length of context in bytes * bytes : Context data * Qemu context: * char[21] : Signature: * "QemuDeviceModelRecord" : Read Qemu save data until EOF * "RemusDeviceModelState" : uint32_t length field followed by that many * bytes of Qemu save data * * PV TAIL: * * Unmapped PFN list : list of all the PFNs that were not in map at the close * unsigned int : Number of unmapped pages * unsigned long[] : PFNs of unmapped pages * * VCPU context data : A series of VCPU records, one per present VCPU * Maximum and present map supplied in XC_SAVE_ID_VCPUINFO * bytes: : VCPU context structure. Size is determined by size * provided in extended-info header * bytes[128] : Extended VCPU context (present IFF "extv" block * present in extended-info header) * * Shared Info Page : 4096 bytes of shared info page */ #define XC_SAVE_ID_ENABLE_VERIFY_MODE -1 /* Switch to validation phase. */ #define XC_SAVE_ID_VCPU_INFO -2 /* Additional VCPU info */ #define XC_SAVE_ID_HVM_IDENT_PT -3 /* (HVM-only) */ #define XC_SAVE_ID_HVM_VM86_TSS -4 /* (HVM-only) */ #define XC_SAVE_ID_TMEM -5 #define XC_SAVE_ID_TMEM_EXTRA -6 #define XC_SAVE_ID_TSC_INFO -7 #define XC_SAVE_ID_HVM_CONSOLE_PFN -8 /* (HVM-only) */ #define XC_SAVE_ID_LAST_CHECKPOINT -9 /* Commit to restoring after completion of current iteration. */ /* ** We process save/restore/migrate in batches of pages; the below ** determines how many pages we (at maximum) deal with in each batch. */ #define MAX_BATCH_SIZE 1024 /* up to 1024 pages (4MB) at a time */ /* When pinning page tables at the end of restore, we also use batching. */ #define MAX_PIN_BATCH 1024 /* ** Determine various platform information required for save/restore, in ** particular: ** ** - the maximum MFN on this machine, used to compute the size of ** the M2P table; ** ** - the starting virtual address of the the hypervisor; we use this ** to determine which parts of guest address space(s) do and don't ** require canonicalization during save/restore; and ** ** - the number of page-table levels for save/ restore. This should ** be a property of the domain, but for the moment we just read it ** from the hypervisor. ** ** - The width of a guest word (unsigned long), in bytes. ** ** Returns 1 on success, 0 on failure. */ static inline int get_platform_info(xc_interface *xch, uint32_t dom, /* OUT */ unsigned long *max_mfn, /* OUT */ unsigned long *hvirt_start, /* OUT */ unsigned int *pt_levels, /* OUT */ unsigned int *guest_width) { xen_capabilities_info_t xen_caps = ""; xen_platform_parameters_t xen_params; DECLARE_DOMCTL; if (xc_version(xch, XENVER_platform_parameters, &xen_params) != 0) return 0; if (xc_version(xch, XENVER_capabilities, &xen_caps) != 0) return 0; *max_mfn = xc_maximum_ram_page(xch); *hvirt_start = xen_params.virt_start; memset(&domctl, 0, sizeof(domctl)); domctl.domain = dom; domctl.cmd = XEN_DOMCTL_get_address_size; if ( do_domctl(xch, &domctl) != 0 ) return 0; *guest_width = domctl.u.address_size.size / 8; /* 64-bit tools will see the 64-bit hvirt_start, but 32-bit guests * will be using the compat one. */ if ( *guest_width < sizeof (unsigned long) ) /* XXX need to fix up a way of extracting this value from Xen if * XXX it becomes variable for domU */ *hvirt_start = 0xf5800000; if (strstr(xen_caps, "xen-3.0-x86_64")) /* Depends on whether it's a compat 32-on-64 guest */ *pt_levels = ( (*guest_width == 8) ? 4 : 3 ); else if (strstr(xen_caps, "xen-3.0-x86_32p")) *pt_levels = 3; else if (strstr(xen_caps, "xen-3.0-x86_32")) *pt_levels = 2; else return 0; return 1; } /* ** Save/restore deal with the mfn_to_pfn (M2P) and pfn_to_mfn (P2M) tables. ** The M2P simply holds the corresponding PFN, while the top bit of a P2M ** entry tell us whether or not the the PFN is currently mapped. */ #define PFN_TO_KB(_pfn) ((_pfn) << (PAGE_SHIFT - 10)) /* ** The M2P is made up of some number of 'chunks' of at least 2MB in size. ** The below definitions and utility function(s) deal with mapping the M2P ** regarldess of the underlying machine memory size or architecture. */ #define M2P_SHIFT L2_PAGETABLE_SHIFT_PAE #define M2P_CHUNK_SIZE (1 << M2P_SHIFT) #define M2P_SIZE(_m) ROUNDUP(((_m) * sizeof(xen_pfn_t)), M2P_SHIFT) #define M2P_CHUNKS(_m) (M2P_SIZE((_m)) >> M2P_SHIFT) /* Returns TRUE if the PFN is currently mapped */ #define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL)) #define GET_FIELD(_p, _f) ((dinfo->guest_width==8) ? ((_p)->x64._f) : ((_p)->x32._f)) #define SET_FIELD(_p, _f, _v) do { \ if (dinfo->guest_width == 8) \ (_p)->x64._f = (_v); \ else \ (_p)->x32._f = (_v); \ } while (0) #define UNFOLD_CR3(_c) \ ((uint64_t)((dinfo->guest_width == 8) \ ? ((_c) >> 12) \ : (((uint32_t)(_c) >> 12) | ((uint32_t)(_c) << 20)))) #define FOLD_CR3(_c) \ ((uint64_t)((dinfo->guest_width == 8) \ ? ((uint64_t)(_c)) << 12 \ : (((uint32_t)(_c) << 12) | ((uint32_t)(_c) >> 20)))) #define MEMCPY_FIELD(_d, _s, _f) do { \ if (dinfo->guest_width == 8) \ memcpy(&(_d)->x64._f, &(_s)->x64._f,sizeof((_d)->x64._f)); \ else \ memcpy(&(_d)->x32._f, &(_s)->x32._f,sizeof((_d)->x32._f)); \ } while (0) #define MEMSET_ARRAY_FIELD(_p, _f, _v) do { \ if (dinfo->guest_width == 8) \ memset(&(_p)->x64._f[0], (_v), sizeof((_p)->x64._f)); \ else \ memset(&(_p)->x32._f[0], (_v), sizeof((_p)->x32._f)); \ } while (0) #ifndef MAX #define MAX(_a, _b) ((_a) >= (_b) ? (_a) : (_b)) #endif #ifndef MIN #define MIN(_a, _b) ((_a) <= (_b) ? (_a) : (_b)) #endif