diff --git a/boards/arm/stm32/photon/include/nsh_romfsimg.h b/boards/arm/stm32/photon/include/nsh_romfsimg.h new file mode 100644 index 00000000000..274ca6d2c30 --- /dev/null +++ b/boards/arm/stm32/photon/include/nsh_romfsimg.h @@ -0,0 +1,25 @@ +/**************************************************************************** + * boards/arm/stm32/photon/include/nsh_romfsimg.h + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +#ifndef __CONFIGS_PHOTON_INCLUDE_NSH_ROMFSIMG_H +#define __CONFIGS_PHOTON_INCLUDE_NSH_ROMFSIMG_H +extern const unsigned char romfs_img[]; +extern const unsigned int romfs_img_len; +#endif diff --git a/boards/arm/stm32/photon/src/Make.defs b/boards/arm/stm32/photon/src/Make.defs index 22d1ae9789d..7d9fe34102a 100644 --- a/boards/arm/stm32/photon/src/Make.defs +++ b/boards/arm/stm32/photon/src/Make.defs @@ -71,6 +71,12 @@ ifeq ($(CONFIG_RGBLED),y) CSRCS += stm32_rgbled.c endif +ifeq ($(CONFIG_NSH_ROMFSETC),y) +ifneq ($(CONFIG_NSH_CUSTOMROMFS),y) + RCSRCS = etc/init.d/rcS +endif +endif + DEPPATH += --dep-path board VPATH += :board CFLAGS += $(shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board) diff --git a/boards/arm/stm32/photon/src/etc/init.d/rcS b/boards/arm/stm32/photon/src/etc/init.d/rcS new file mode 100644 index 00000000000..f355468883f --- /dev/null +++ b/boards/arm/stm32/photon/src/etc/init.d/rcS @@ -0,0 +1,31 @@ +/**************************************************************************** + * boards/arm/stm32/photon/src/etc/init.d/rcS + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +set +e + +#include + +#ifdef CONFIG_FS_TMPFS +mount -t tmpfs CONFIG_LIBC_TMPDIR +#endif + +#ifndef CONFIG_NSH_DISABLE_UNAME +uname -a > /dev/syslog +#endif