boot

Passing Linux boot opts to Init

回眸只為那壹抹淺笑 提交于 2019-12-06 12:47:20
I would like to pass some parameters to a customized Linux init via the boot options configured in the bootloader at boot. I've written test init's in both Python and C. The Python version is able to see anything in the kernel boot options that doesn't have a '=' or '.' in it. The values are found in sys.argv. However, the C program doesn't seem to get passed the values. I would have thought the sys.argv list in Python was generated by parsing the **argv array. Below are the test scripts and screen shots that will hopefully help clarify. the kernel boot line is: kernel /grub/linux-2.6.38.4

痞子衡嵌入式:恩智浦i.MX RTxxx系列MCU启动那些事(1)- Boot简介

送分小仙女□ 提交于 2019-12-06 12:35:25
  大家好,我是痞子衡,是正经搞技术的痞子。今天痞子衡给大家介绍的是 恩智浦i.MX RTxxx系列MCU的BootROM功能简介 。   截止目前为止i.MX RTxxx系列已公布的芯片仅有一款i.MXRT600(还有几款正在研发测试之中),所以本文的研究对象主要是i.MXRT600,i.MXRT600是i.MXRTxxx系列的开山之作,功能模块非常全面,其BootROM特性基本可以涵盖i.MXRTxxx系列特性。 一、Boot基本原理   关于Boot基本原理,痞子衡在 《 飞思卡尔i.MX RTyyyy系列MCU启动那些事(1)- Boot简介 》 文章里介绍得很详细,Boot原理是个通用的概念,此处不再赘述。 二、i.MXRTxxx Boot   在第一部分里讲了Boot基本原理以及各种Boot方式,那么i.MXRTxxx Boot到底属于哪一种?在回答这个问题之前我们先看一下i.MXRT600的system memory map:   从memory map里可以看到,i.MXRTxxx支持存储类型一共有三种:一是256KB的ROM(即BootROM)、二是总容量4.5MB的RAM(有两个映射起始地址0x00000000/0x20000000)、三是分配给外部存储器接口控制器(QSPI)的128MB区域。看到这里你应该明白了, i.MXRTxxx

Run shell script after XServer is started?

我们两清 提交于 2019-12-06 11:54:33
问题 How to run shell script when XServer is started and lightdm also. I tried with init.d and rc.local in /etc directory, but my script is calling an gui application so that the reason I need to run it after XServer is started. I am using Debian Jessie. 回答1: According to this link .xinitrc in your home directory will be read and executed, otherwise the default /etc/X11/xinit/xinitrc is used. So you should be able to create this file and have the shell script started. 来源: https://stackoverflow.com

Spring Boot笔记(四) springboot 集成 @Scheduled 定时任务

那年仲夏 提交于 2019-12-06 10:54:43
1、在SpringBoot 项目中使用 @Scheduled 注解执行定时任务: 配置pom.xml 依赖: 一般情况下,SpringBoot 的 相关依赖,如: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> 是有包含对应 @Scheduled 定时注解启动所需要的jar包的,如下: import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; 2、创建定时类 (1)@Component : 将当前类实例化注入到容器中 (2)定时器的生效要素: @Scheduled(cron="0/5 * * * * ? ") //每5秒执行一次 在程序启动时,定时器会开始计时,并根据设定时间执行设置好的任务内容, 线程的执行是以单线程进行 ; (3)创建以下定时类 package com.example.poiutis.quartz; import com.example.poiutis.common.SystemLogHandler; import

SpringBoot第一节

谁说胖子不能爱 提交于 2019-12-06 10:35:06
1.创建一个StringInitializr项目(步骤如下)   (1)      (2)      (3)      (4)    2、DemoApplication类 package com.example.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; @SpringBootApplication(exclude= {DataSourceAutoConfiguration.class}) public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } } 3、创建Controller类 package com.example.demo.controller; import org.springframework.stereotype

SpringBoot

爷,独闯天下 提交于 2019-12-06 10:32:40
一、 SpringBoot 简介   Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程。该框架使用了特定的方式来进行配置,从而使开发人员不再需要定义样板化的配置。 二、SpringBoot 特性   1. SpringBoot并不是对Spring功能上的增强,而是提供了一种快速创建独立的Spring应用程序的框架   2. 嵌入的Tomcat,无需部署WAR文件   3. 简化Maven配置   4. 自动配置Spring   5. 绝对没有代码生成和对XML没有要求配置   6.备受关注,是下一代框架,已经是不争的事实,不需要学习springmvc   7.微服务的入门级微框架,springboot是springcloud的基础 三、SpringBoot小案例   1、Project03Application package com.springboot.project03; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.web.bind.annotation

Android widget update called twice after device boot

拟墨画扇 提交于 2019-12-06 09:40:41
After device reboot I receive first APPWIDGET_ENABLED and then twice APPWIDGET_UPDATE. I spent quite some hours googling this without result. Is anybody experiencing the same? Have you found a way to avoid calling the update twice? Here's some code: <receiver android:name=".Widget" android:label="@string/app_name"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/button_widget_provider" /> </receiver> public void onReceive(final Context context, final Intent intent) {

Spring Boot使用@Scheduled定时器任务

 ̄綄美尐妖づ 提交于 2019-12-06 09:30:57
Spring Boot使用@Scheduled定时器任务 摘要: Spring Boot之使用@Scheduled定时器任务 假设我们已经搭建好了一个基于Spring Boot项目,首先我们要在Application中设置启用定时任务功能@EnableScheduling。 启动定时任务 package com.scheduling; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.scheduling.annotation.EnableScheduling; @SpringBootApplication @EnableScheduling public class Application { public static void main(String[] args) throws Exception { SpringApplication.run(Application.class); } } 其中 @EnableScheduling 注解的作用是发现注解@Scheduled的任务并后台执行。 定时任务具体实现类

Spring Boot一些基础配置

耗尽温柔 提交于 2019-12-06 08:53:17
1.定制banner,Spring Boot项目在启动的时候会有一个默认的启动图案: . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v1.5.9.RELEASE) 我们可以把这个图案修改为自己想要的。在src/main/resources目录下新建banner.txt文件,然后将自己的图案黏贴进去即可。ASCII图案可通过网站 http://www.network-science.de/ascii/ 一键生成,比如输入mrbird生成图案后复制到banner.txt,启动项目,eclipse控制台输出如下: _ _ _ _ _ _ / \ / \ / \ / \ / \ / \ ( m | r | b | i | r | d ) \_/ \_/ \_/ \_/ \_/ \_/ ... 2017-08-12 10:11:25.952 INFO 7160 ---