[build] Eliminate EMBED_USER_BOOTFS, rename bootfs.img to bootdata.bin
Removed mechanism for embedding the bootfs filesystem in the kernel binary Now all magenta targets are using bootdata.bin, which is a concatenation one or more ramdisk images plus optional MDI (Magenta Device Index) binaries Change-Id: Ie9730912b7bbcf5a1bcd45f323973ef005b8a240
Esse commit está contido em:
@@ -37,7 +37,7 @@ information, see `docs/getting_started.md`:
|
||||
+ With a FAT32 boot partition
|
||||
|
||||
2. Invoking `make magenta-rpi3-arm64` should have created files `magenta.bin`
|
||||
and `bootfs.img` the following path `./build-magenta-rpi3-arm64/`
|
||||
and `bootdata.bin` the following path `./build-magenta-rpi3-arm64/`
|
||||
|
||||
|
||||
3. Copy the `magenta.bin` file to the SD card's boot partition as `kernel8.img`
|
||||
@@ -45,9 +45,9 @@ information, see `docs/getting_started.md`:
|
||||
|
||||
cp ./build-magenta-rpi3-arm64/magenta.bin <path/to/sdcard/mount>/kernel8.img
|
||||
|
||||
4. Copy the `bootfs.img` file to the SD card's boot partition as follows:
|
||||
4. Copy the `bootdata.bin` file to the SD card's boot partition as follows:
|
||||
|
||||
cp ./build-magenta-rpi3-arm64/bootfs.img <path/to/sdcard/mount>/bootfs.img
|
||||
cp ./build-magenta-rpi3-arm64/bootdata.bin <path/to/sdcard/mount>/bootdata.bin
|
||||
|
||||
5. You must also copy `bootcode.bin` and `start.elf` to the boot partition. They
|
||||
can be obtained from [here](https://github.com/raspberrypi/firmware/tree/master/boot).
|
||||
|
||||
+1
-1
@@ -278,7 +278,7 @@ KERNEL_COMPILEFLAGS += $(KEEP_FRAME_POINTER_COMPILEFLAGS)
|
||||
endif
|
||||
|
||||
# userspace boot file system generated by the build system
|
||||
USER_BOOTFS := $(BUILDDIR)/bootfs.img
|
||||
USER_BOOTDATA := $(BUILDDIR)/bootdata.bin
|
||||
USER_FS := $(BUILDDIR)/user.fs
|
||||
|
||||
# additional bootdata items to be included to bootdata.bin
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
// Copyright 2016 The Fuchsia Authors
|
||||
//
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#include <asm.h>
|
||||
|
||||
// put this in a special section, mark it read only
|
||||
.section bootfs,"a"
|
||||
.balign 4096
|
||||
|
||||
// include the bootfs archive containing a user file system
|
||||
DATA(user_bootfs)
|
||||
.incbin USER_BOOTFS_FILENAME
|
||||
// The kernel needs this to contain whole pages. But mkbootfs, in the compressed
|
||||
// case, does not pad the file size to a multiple of page size.
|
||||
.balign 4096
|
||||
END(user_bootfs)
|
||||
|
||||
.Luser_bootfs_end:
|
||||
|
||||
// save the length of the bootfs
|
||||
DATA(user_bootfs_len)
|
||||
.int .Luser_bootfs_end - user_bootfs
|
||||
END(user_bootfs_len)
|
||||
@@ -32,11 +32,4 @@ $(BUILDDIR)/$(LOCAL_DIR)/userboot-code.h: \
|
||||
GENERATED += $(BUILDDIR)/$(LOCAL_DIR)/userboot-code.h
|
||||
MODULE_COMPILEFLAGS += -I$(BUILDDIR)/$(LOCAL_DIR)
|
||||
|
||||
ifeq ($(call TOBOOL,$(EMBED_USER_BOOTFS)),true)
|
||||
MODULE_SRCDEPS += $(USER_BOOTFS)
|
||||
MODULE_DEFINES += EMBED_USER_BOOTFS=1
|
||||
MODULE_COMPILEFLAGS += -DUSER_BOOTFS_FILENAME="\"$(USER_BOOTFS)\""
|
||||
MODULE_SRCS += $(LOCAL_DIR)/bootfs.S
|
||||
endif
|
||||
|
||||
include make/module.mk
|
||||
|
||||
@@ -119,18 +119,18 @@ USER_MANIFEST_DEPS := $(foreach x,$(USER_MANIFEST_LINES),$(lastword $(subst =,$(
|
||||
|
||||
$(info MKBOOTFS $(MKBOOTFS))
|
||||
|
||||
$(USER_BOOTFS): $(MKBOOTFS) $(USER_MANIFEST) $(USER_MANIFEST_DEPS) $(ADDITIONAL_BOOTDATA_ITEMS)
|
||||
$(USER_BOOTDATA): $(MKBOOTFS) $(USER_MANIFEST) $(USER_MANIFEST_DEPS) $(ADDITIONAL_BOOTDATA_ITEMS)
|
||||
@echo generating $@
|
||||
@$(MKDIR)
|
||||
$(NOECHO)$(MKBOOTFS) -c -o $(USER_BOOTFS) $(USER_MANIFEST) $(ADDITIONAL_BOOTDATA_ITEMS)
|
||||
$(NOECHO)$(MKBOOTFS) -c -o $(USER_BOOTDATA) $(USER_MANIFEST) $(ADDITIONAL_BOOTDATA_ITEMS)
|
||||
|
||||
GENERATED += $(USER_BOOTFS)
|
||||
GENERATED += $(USER_BOOTDATA)
|
||||
|
||||
# build userspace filesystem image
|
||||
$(USER_FS): $(USER_BOOTFS)
|
||||
$(USER_FS): $(USER_BOOTDATA)
|
||||
@echo generating $@
|
||||
$(NOECHO)dd if=/dev/zero of=$@ bs=1048576 count=16
|
||||
$(NOECHO)dd if=$(USER_BOOTFS) of=$@ conv=notrunc
|
||||
$(NOECHO)dd if=$(USER_BOOTDATA) of=$@ conv=notrunc
|
||||
|
||||
# add the fs image to the clean list
|
||||
GENERATED += $(USER_FS)
|
||||
|
||||
@@ -11,9 +11,6 @@
|
||||
SUBARCH := x86-64
|
||||
MODULES +=
|
||||
|
||||
# we're going to need to put the user cpio archive in the kernel binary directly
|
||||
EMBED_USER_BOOTFS:=true
|
||||
|
||||
include project/virtual/test.mk
|
||||
include project/virtual/user.mk
|
||||
include project/target/pc-x86.mk
|
||||
|
||||
@@ -31,10 +31,5 @@ MODULES += $(patsubst %/rules.mk,%,$(wildcard third_party/ulib/*/rules.mk))
|
||||
MODULES += $(patsubst %/rules.mk,%,$(wildcard third_party/utest/*/rules.mk))
|
||||
MODULES := $(patsubst third_party/%,%,$(MODULES))
|
||||
|
||||
# if we're not embedding the bootfs, build a standalone image
|
||||
ifneq ($(EMBED_USER_BOOTFS),true)
|
||||
EXTRA_BUILDDEPS += $(USER_FS)
|
||||
endif
|
||||
|
||||
EXTRA_BUILDDEPS += $(USER_BOOTFS)
|
||||
EXTRA_BUILDDEPS += $(USER_BOOTDATA)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ kernel=kernel8.img
|
||||
enable_uart=1
|
||||
|
||||
# Tells the Pi's bootloader which file contains the ramdisk.
|
||||
initramfs bootfs.img
|
||||
initramfs bootdata.bin
|
||||
|
||||
# Used to configure HDMI, you may need to tweak these settings dependong on
|
||||
# the monitor you're using.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
KERNEL=build-magenta-msm-trapper/zmagenta.bin-dtb
|
||||
RAMDISK=build-magenta-msm-trapper/bootfs.img
|
||||
RAMDISK=build-magenta-msm-trapper/bootdata.bin
|
||||
CMDLINE="$@ magenta.soc.msm8998=0 gfxconsole.font=18x32 startup.keep-log-visible=true"
|
||||
|
||||
#fastboot doesn't like empty -c, so add trailing space
|
||||
|
||||
@@ -26,7 +26,7 @@ function HELP {
|
||||
echo "-u <path> : execute qemu startUp script, default is no script"
|
||||
echo "-v : use vnc based display"
|
||||
echo "-V : try to use virtio devices"
|
||||
echo "-x <bootfs> : add eXtra bootfs"
|
||||
echo "-x <bootdata> : use specified bootdata"
|
||||
echo "--audio[=<host_drv>] : use Intel HD Audio"
|
||||
echo " : <host_drv> should be one of (alsa, pa, wav, none)"
|
||||
echo "--wavfile=<file> : When audio host_drv == wav, output to the specified WAV file"
|
||||
|
||||
@@ -7,6 +7,5 @@
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
RAMDISK=build-magenta-qemu-arm64/bootfs.img
|
||||
|
||||
exec $DIR/run-magenta -a arm64 -x $RAMDISK "$@"
|
||||
exec $DIR/run-magenta -a arm64 "$@"
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário