Changeset df8eaba in mainline
- Timestamp:
- 2018-10-06T21:14:14Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0bd66f5
- Parents:
- e88eb48
- Files:
-
- 5 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile
re88eb48 rdf8eaba 39 39 build_dist: clean_dist 40 40 mkdir -p "$(DIST_PATH)/app/" 41 mkdir -p "$(DIST_PATH)/cfg/ net/"42 mkdir -p "$(DIST_PATH)/data/ cfg/"41 mkdir -p "$(DIST_PATH)/cfg/" 42 mkdir -p "$(DIST_PATH)/data/" 43 43 mkdir -p "$(DIST_PATH)/lib/" 44 44 mkdir -p "$(DIST_PATH)/loc/" … … 48 48 mkdir -p "$(DIST_PATH)/tmp/" 49 49 mkdir -p "$(DIST_PATH)/vol/" 50 mkdir -p "$(DIST_PATH)/w/" 50 51 for file in $(RD_SRVS) ; do \ 51 52 cp "$$file" "$(DIST_PATH)/srv/" ; \ … … 135 136 rm -f $(INITRD).img $(COMPS).s $(COMPS).h $(COMPS)_desc.c $(COMPONENTS_DEFLATE) $(COMPS).o $(COMPS)_desc.o $(COMPS).zip $(LINK) 136 137 find $(USPACE_PATH)/dist -mindepth 1 -maxdepth 1 -type f -exec rm \{\} \; 138 rm -f $(USPACE_PATH)/dist/app/* 139 rm -f $(USPACE_PATH)/dist/cfg/* 137 140 rm -f $(USPACE_PATH)/dist/srv/* 138 141 rm -rf $(USPACE_PATH)/dist/drv/* … … 142 145 rm -f $(USPACE_PATH)/dist/test/* 143 146 rm -f $(USPACE_PATH)/dist/cfg/net/* 147 rm -f $(USPACE_PATH)/dist/w/* -
tools/mkext2.py
re88eb48 rdf8eaba 310 310 sb.features_read_only = 0 311 311 sb.uuid = self.uuid.bytes_le 312 sb.volume_name = 'HelenOS rdimage\0'312 sb.volume_name = 'HelenOS-rd\0\0\0\0\0\0' 313 313 self.outf.write(bytes(sb.pack())) 314 314 -
uspace/app/sysinst/Makefile
re88eb48 rdf8eaba 28 28 29 29 USPACE_PREFIX = ../.. 30 LIBS = block fdisk 30 LIBS = block fdisk sif 31 31 32 32 BINARY = sysinst … … 34 34 SOURCES = \ 35 35 futil.c \ 36 sysinst.c 36 rdimg.c \ 37 sysinst.c \ 38 volume.c 37 39 38 40 include $(USPACE_PREFIX)/Makefile.common -
uspace/app/sysinst/sysinst.c
re88eb48 rdf8eaba 51 51 #include "futil.h" 52 52 #include "grub.h" 53 #include "rdimg.h" 54 #include "volume.h" 53 55 54 56 /** Device to install to … … 64 66 /** Volume label for the new file system */ 65 67 #define INST_VOL_LABEL "HelenOS" 68 /** Mount point of system partition when running installed system */ 69 #define INST_VOL_MP "/w" 66 70 67 71 #define MOUNT_POINT "/inst" … … 173 177 printf("sysinst_copy_boot_files(): OK\n"); 174 178 return EOK; 179 } 180 181 /** Set up configuration in the initial RAM disk. 182 * 183 * @return EOK on success or an error code 184 */ 185 static errno_t sysinst_customize_initrd(void) 186 { 187 errno_t rc; 188 rd_img_t *rd = NULL; 189 char *rdpath = NULL; 190 char *path = NULL; 191 vol_volumes_t *volumes = NULL; 192 vol_volume_t *volume = NULL; 193 int rv; 194 195 rc = rd_img_open(MOUNT_POINT "/boot/initrd.img", &rdpath, &rd); 196 if (rc != EOK) { 197 printf("Error opening initial RAM disk image.\n"); 198 goto error; 199 } 200 201 rv = asprintf(&path, "%s%s", rdpath, "/cfg/volsrv.sif"); 202 if (rv < 0) { 203 rc = ENOMEM; 204 goto error; 205 } 206 207 printf("Configuring volume server.\n"); 208 rc = vol_volumes_create(path, &volumes); 209 if (rc != EOK) { 210 printf("Error creating volume server configuration.\n"); 211 rc = EIO; 212 goto error; 213 } 214 215 printf("Configuring volume server: look up volume\n"); 216 rc = vol_volume_lookup_ref(volumes, INST_VOL_LABEL, &volume); 217 if (rc != EOK) { 218 printf("Error creating volume server configuration.\n"); 219 rc = EIO; 220 goto error; 221 } 222 223 printf("Configuring volume server: set mount point\n"); 224 rc = vol_volume_set_mountp(volume, INST_VOL_MP); 225 if (rc != EOK) { 226 printf("Error creating system partition configuration.\n"); 227 rc = EIO; 228 goto error; 229 } 230 231 printf("Configuring volume server: delete reference\n"); 232 vol_volume_del_ref(volume); 233 volume = NULL; 234 printf("Configuring volume server: destroy volumes object\n"); 235 vol_volumes_destroy(volumes); 236 volumes = NULL; 237 238 rc = rd_img_close(rd); 239 if (rc != EOK) { 240 printf("Error closing initial RAM disk image.\n"); 241 rc = EIO; 242 goto error; 243 } 244 245 free(rdpath); 246 rdpath = NULL; 247 free(path); 248 path = NULL; 249 250 return EOK; 251 error: 252 if (volume != NULL) 253 vol_volume_del_ref(volume); 254 if (volumes != NULL) 255 vol_volumes_destroy(volumes); 256 if (rd != NULL) 257 (void) rd_img_close(rd); 258 if (path != NULL) 259 free(path); 260 if (rdpath != NULL) 261 free(rdpath); 262 return rc; 175 263 } 176 264 … … 332 420 return rc; 333 421 422 printf("Boot files done. Configuring the system.\n"); 423 rc = sysinst_customize_initrd(); 424 if (rc != EOK) 425 return rc; 426 334 427 printf("Boot files done. Installing boot blocks.\n"); 335 428 rc = sysinst_copy_boot_blocks(dev); -
uspace/srv/volsrv/volsrv.c
re88eb48 rdf8eaba 53 53 #define NAME "volsrv" 54 54 55 const char *vol_cfg_file = "/ data/cfg/volsrv.sif";55 const char *vol_cfg_file = "/cfg/volsrv.sif"; 56 56 57 57 static void vol_client_conn(ipc_call_t *, void *); -
uspace/srv/volsrv/volume.c
re88eb48 rdf8eaba 205 205 } 206 206 207 (void) sif_close(volumes->repo); 207 208 free(volumes); 208 209 }
Note:
See TracChangeset
for help on using the changeset viewer.