1
0
Fork 0

No image suffix

This commit is contained in:
Braiden Vasco 2017-07-02 09:32:52 +00:00
parent ce709297c9
commit 76f3203d1d
9 changed files with 6 additions and 32 deletions

1
.gitignore vendored
View File

@ -1,6 +1,5 @@
deploy/*
work/*
postrun.sh
SKIP
.pc
*-pc

View File

@ -25,8 +25,6 @@ file is `<tool>[:<debian-package>]`.
Stage Anatomy
-------------
### Raspbian Stage Overview
The build of Raspbian is divided up into several stages for logical clarity
and modularity. This causes some initial complexity, but it simplifies
maintenance and allows for more easy customization.
@ -65,11 +63,3 @@ maintenance and allows for more easy customization.
- **Stage 3** - secure system. This stage configures SSH do disallow root
login, adds iptables rules, etc.
### Stage specification
If you wish to build up to a specified stage (such as building up to stage 2
for a lite system), place an empty file named `SKIP` in each of the `./stage`
directories you wish not to include.
Then remove the `EXPORT*` files from `./stage2` (if building a minimal system).

View File

@ -137,9 +137,6 @@ run_stage() {
unmount ${WORK_DIR}/${STAGE}
STAGE_WORK_DIR=${WORK_DIR}/${STAGE}
ROOTFS_DIR=${STAGE_WORK_DIR}/rootfs
if [ -f ${STAGE_DIR}/EXPORT_IMAGE ]; then
EXPORT_DIRS="${EXPORT_DIRS} ${STAGE_DIR}"
fi
if [ ! -f SKIP ]; then
if [ "${CLEAN}" = "1" ]; then
if [ -d ${ROOTFS_DIR} ]; then
@ -216,9 +213,6 @@ export PREV_STAGE
export PREV_STAGE_DIR
export ROOTFS_DIR
export PREV_ROOTFS_DIR
export IMG_SUFFIX
export EXPORT_DIR
export EXPORT_ROOTFS_DIR
export QUILT_PATCHES
export QUILT_NO_DIFF_INDEX=1
@ -239,12 +233,6 @@ for STAGE_DIR in ${BASE_DIR}/stage*; do
done
CLEAN=1
for EXPORT_DIR in ${EXPORT_DIRS}; do
STAGE_DIR=${BASE_DIR}/export-image
source "${EXPORT_DIR}/EXPORT_IMAGE"
EXPORT_ROOTFS_DIR=${WORK_DIR}/$(basename ${EXPORT_DIR})/rootfs
run_stage
done
if [ -x postrun.sh ]; then
log "Begin postrun.sh"

View File

@ -1,5 +1,5 @@
#!/bin/bash -e
IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img"
IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}.img"
IMGID="$(fdisk -l ${IMG_FILE} | sed -n 's/Disk identifier: 0x\([^ ]*\)/\1/p')"

View File

@ -1,6 +1,6 @@
#!/bin/bash -e
IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img"
IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}.img"
on_chroot << EOF
/etc/init.d/fake-hwclock stop
@ -52,9 +52,9 @@ unmount_image ${IMG_FILE}
mkdir -p ${DEPLOY_DIR}
rm -f ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.zip
rm -f ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}.zip
echo zip ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.zip ${IMG_FILE}
echo zip ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}.zip ${IMG_FILE}
pushd ${STAGE_WORK_DIR} > /dev/null
zip ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.zip $(basename ${IMG_FILE})
zip ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}.zip $(basename ${IMG_FILE})
popd > /dev/null

View File

@ -1,5 +1,5 @@
#!/bin/bash -e
IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img"
IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}.img"
unmount_image ${IMG_FILE}

View File

@ -1 +0,0 @@
IMG_SUFFIX="-minimal"

View File

@ -1 +0,0 @@
IMG_SUFFIX="-lite"

View File

@ -1 +0,0 @@
IMG_SUFFIX="-secure"