boot

Android - How to receive the BOOT signal with an application installed on sdcard?

爱⌒轻易说出口 提交于 2019-12-22 16:44:23
问题 I need to start a notification service for an application when the device boots. I have implemented a BroadcastReceiver that listens to the boot signal in order to start the service. However, this works only if the application is not installed on sdcard (because the signal is received before the sdcard is mounted). Is there any solution to keep installing the application on sdcard and yet still receive that signal? Any hack for this? Let me know! Thanks! 回答1: You could either: Register an

Is it possible to shutdown linux kernel and resume in Real Mode?

╄→尐↘猪︶ㄣ 提交于 2019-12-22 07:55:15
问题 Let's say I'd like to start a small linux distro before my ordinary operating system start. BIOS load MBR and execute MBR. MBR locates the active partition which is my linux partition. Linux start and I perform what I need to do. Linux shut down and I switch to Real Mode again. The original partition boot sector is loaded and my ordinary OS start. AFAIK, step 4 will be the difficult task, restore the state on all devices prior to linux, will INT13h be functional? Do I need to restore the

How to detect cold boot versus warm boot on an ARM processor?

不问归期 提交于 2019-12-22 04:43:15
问题 I'm looking for a way to determine whether an ARM processor is booting from a cold boot (i.e. initial power-on) versus a warm boot (i.e. reset assertion without actual power loss). Specifically I'm using an ARM968 core, will be making the determination using C or assembly, and I will use the determination so certain operations only run on the initial power-on and not on subsequent resets. In previous projects I've leveraged external circuitry (e.g. FPGA) to detect the different boot scenarios

引导器之争 lilo and grub

断了今生、忘了曾经 提交于 2019-12-22 01:18:12
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 引导加载程序之争:了解 LILO 和 GRUB From http://www.ibm.com/developerworks/cn/linux/l-bootload.html 对照并比较这两个竞争对手 从普通的桌面用户到 Linux® 系统管理员,大部分 Linux 用户都使用过一种名为引导加载程序的工具。此类工具的不同变种会提供不同层次的支持和功能。在很多情况下,Linux 发行版默认安装的引导加载程序并不总是适合需要;每个引导加载程序的默认设置也是如此。在本文中,Laurence Bonney 讨论了两个流行的引导加载程序 —— LILO 和 GRUB —— 的优点和缺点,并建议了很多配置,以充分发掘机器的潜力。 在不考虑他们的工作或专业情况下,所有 Linux 用户都会使用的是哪个工具?引导加载程序。通过本文了解引导加载程序的工作原理,认识两个流行的引导加载程序 LILO(LInux LOader)和 GNU GRUB(GRand Unified Boot loader), 并研究两者各自的优点和缺点。 什么是引导加载程序? 最简单地讲, 引导加载程序(boot loader) 会引导操作系统。当机器引导它的操作系统时,BIOS 会读取引导介质上最前面的 512 字节(即人们所知的 主引导记录

Test native x86 programs, building bootable images/drives

不羁的心 提交于 2019-12-21 23:24:08
问题 I have the next problem: I'm working with NASM and building some native and compiling it on this way: nasm -f bin source -o out I'm getting my native program for x86. And now the most interesting, how can I make it bootable and then test it? As I think there are 3 ways to make bootable ( but for me, all they has failed :( ) using mkbt utility ( or another soft which is similar ) to write it to floppy disk building ISO image, with editing bootable sector in it manually write memory sector to

PXE批量部署Linux之六:ipxe和pxelinux互相chainload

孤人 提交于 2019-12-21 22:49:59
pxelinux chain iPXE: label chainload menu label Chainload iPXE kernel ipxe.lkrn initrd boot.ipxe ipxe.lkrn made from: cd ipxe/src make bin/ipxe.lkrn boot.ipxe和ipxe.lkrn在tftp同级目录 boot.ipxe需要加dhcp ipxe.lkrn可以和undionly,kpxe一样加参数编译 make bin/ipxe.lkrn EMBED=demo.ipxe cat demo.ipxe #!ipxe dhcp chain http://kickstart.share.demo/ks/boot.ipxe iPXE chain pxelinux: 参考 http://ipxe.org/cmd/chain :chainload chain pxelinux.0 pxelinux.0和undionly.kpxe同在tftp根目录 chain tftp://kickstart.share.demo/pxelinux.0 chain http://kickstart.share.demo/pxelinux.0 || goto shell :shell shell || goto error 来源: 51CTO 作者: a_jkou

spring boot 入门一 构建spring boot 工程

主宰稳场 提交于 2019-12-21 20:53:58
最近在学习Spring boot,所以想通过博客的形式和大家分享学习的过程,同时也为了更好的学习技术,下面直接进入Spring boot的世界。 简介 spring boot 它的设计目的就是为例简化开发,开启了各种自动装配,你不想写各种配置文件,引入相关的依赖就能迅速搭建起一个web工程。 开发环境 IDE:IDEA JDK:1.8 MAVEN:3.X 快速构建 打开Idea-> new Project ->Spring Initializr ->填写group、artifact ->钩上web(开启web功能)->点下一步,这样一个基础的spring boot项目就构建好了。 在命令行环境下 通过 tree命令查看项目的目录结构: src ├─main │ ├─java │ │ └─org │ │ └─pangu │ │ └─springbootdemo │ └─resources │ ├─static │ └─templates └─test └─java └─org └─pangu └─springbootdemo 功能演示 新建一个HelloController类 import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind

Springboot 系列(五)Spring Boot web 开发之静态资源和模版引擎

帅比萌擦擦* 提交于 2019-12-21 11:57:39
前言 Spring Boot 天生的适合 web 应用开发,它可以快速的嵌入 Tomcat, Jetty 或 Netty 用于包含一个 HTTP 服务器。且开发十分简单,只需要引入 web 开发所需的包,然后编写业务代码即可。 自动配置原理? 在进行 web 开发之前让我再来回顾一下自动配置,可以参考系列文章第三篇。Spring Boot 为 Spring MVC 提供了自动配置,添加了如下的功能: 视图解析的支持。 静态资源映射,WebJars 的支持。 转换器 Converter 的支持。 自定义 Favicon 的支持。 等等 在引入每个包时候我们需要思考是如何实现自动配置的,以及我们能自己来配置哪些东西,这样开发起来才会得心应手。 关于 Spring Boot Web 开发的更详细介绍可以参考官方文档。 1. JSON 格式转换 Spring Boot 默认使用 Jackson 进行 JSON 化处理,如果想要切换成 FastJson 可以首先从 官方文档 里查询信息。从这里知道对于 ResponseBody 的渲染主要是通过 HttpMessageConverters, 而首先引入FastJson Pom依赖并排除 Spring Boot 自带的 Jackson。 <dependency> <groupId>org.springframework.boot<

Android获取ROOT权限的通用方法

隐身守侯 提交于 2019-12-21 11:11:46
背景 自从Android问世以后,给手机获取ROOT权限变成了玩机爱好者老生常谈的话题。拥有手机,却不能拥有操作手机的最高权限,这对于手机爱好者而言,这怎么可以忍?所以无论Android升到什么什么版本,总要有人想要给手机获取ROOT权限。但是,获取ROOT权限的过程终究还是麻烦的,纵然你豪情万丈,对于某些手机你还是拿它没办法。针对ROOT难,修改系统难,@topjohnwu大佬做出了一个伟大的东西:Magisk。它解决了ROOT难,修改系统难的问题。本文使用Magisk,来说一下获取ROOT权限的通用方法。 准备 (1) 下载MagiskManager安装到手机 https://github.com/topjohnwu/Magisk/releases (2) 用电脑下载自己手机的刷机包,必须是手机当前使用的刷机包。下载好以后,把boot.img解压出来备用 (3) 下载adb和fastboot,解压出来,放在电脑的指定目录,并放入环境变量 https://www.lanzous.com/i7iuidg (4) 解锁(bootloader锁)手机,在开发者选项里勾选USB调试 操作流程 在电脑资源管理器找到你boot.img存放目录,在资源管理器地址栏输入cmd并回车 在弹出的cmd窗口中输入以下命令并回车: adb push boot.img /sdcard boot

linux内核编译

*爱你&永不变心* 提交于 2019-12-21 11:02:42
环境介绍 发行版为Debian 6.0,内核版本为2.6.32-5-686。基本开发环境已具备。 要编译的内核版本为4.3。 内核源码 从 http://www.kernel.org 网站下载内核源码linux-4.3.tar.xz,并解压: xz -dc linux-4.3.tar.xz | tar xvf - 主要参考目录中的README文档说明。 内核编译 为了使编译生成的内容与源码放到不同目录,需要使用O(字母“欧”)参数。 假设内核原码位置为:/home/migney/kernel/linux-4.3;编译生成的内容放到:/home/migney/kernel/build-4.3。 1、内核配置 如果之前编译过,需要先将之前内容清空,然后配置内核: mkdir /home/migney/kernel/build-4.3 cd /home/migney/kernel/linux-4.3 # 清除之前编译生成的内容 make mrproper # 内核配置 make O=/home/migney/kernel/build-4.3 menuconfig 在打开的界面进行相应的配置,保存退出。这一步会生成.config文件。 2、编译 make O=/home/migney/kernel/build-4.3 这会生成各modules、内核镜像等等内容。 3、安装模块 make O