[arch-releng] Unify directory scheme between single and dual .iso images
This work is tested and pushed in my install_dir git branch. http://github.com/djgera/archiso/tree/install_dir An example "ls -lR": http://djgera.pastebin.com/SLKS4hzC
Unify with dir layout of -dual images. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> --- archiso/mkarchiso | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/archiso/mkarchiso b/archiso/mkarchiso index 7bbc827..1f74e06 100755 --- a/archiso/mkarchiso +++ b/archiso/mkarchiso @@ -12,6 +12,7 @@ CREATE_DEFAULT="n" INSTALL_DIR="arch" APPNAME=$(basename "${0}") +ARCH=$(uname -m) # usage: usage <exitvalue> usage () @@ -115,7 +116,7 @@ _pacman () command_create () { echo "====> Creating working directory: ${work_dir}" - mkdir -p "${work_dir}/iso/${INSTALL_DIR}" + mkdir -p "${work_dir}/iso/${INSTALL_DIR}/${ARCH}" mkdir -p "${work_dir}/root-image/" if [ "${PKGLIST}" != "" ]; then @@ -157,7 +158,7 @@ _mksquash () { return 1 fi - sqimg="${work_dir}/iso/${INSTALL_DIR}/$(basename ${1}).sqfs" + sqimg="${work_dir}/iso/${INSTALL_DIR}/${ARCH}/$(basename ${1}).sqfs" echo "====> Generating SquashFS image for '${1}'" if [ -e "${sqimg}" ]; then dirhaschanged=$(find ${1} -newer ${sqimg}) @@ -215,7 +216,8 @@ _imgcommon () { fi if ! sed "s|archisolabel=[^ ]*|archisolabel=${LABEL}|; - s|%INSTALL_DIR%|${INSTALL_DIR}|" -i ${work_dir}/iso/syslinux/syslinux.cfg; then + s|%INSTALL_DIR%|${INSTALL_DIR}| + s|%ARCH%|${ARCH}|" -i ${work_dir}/iso/syslinux/syslinux.cfg; then echo "Error: ${work_dir}/iso/syslinux/syslinux.cfg, doesn't exist, aborting." exit 1 fi -- 1.7.3.1
/syslinux/ syslinux only files /arch/boot/ memtest86+ + splash.png + ... /arch/boot/$ARCH/ Linux + initramfs /arch/ isomounts /arch/$ARCH/ *.sqfs Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> --- configs/syslinux-iso/Makefile | 12 ++++++------ .../syslinux-iso/boot-files/syslinux/syslinux.cfg | 4 ++-- configs/syslinux-iso/isomounts | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/configs/syslinux-iso/Makefile b/configs/syslinux-iso/Makefile index 7bc3a45..f9ce12f 100644 --- a/configs/syslinux-iso/Makefile +++ b/configs/syslinux-iso/Makefile @@ -36,9 +36,9 @@ $(WORKDIR)/root-image/.arch-chroot: # Rule for make /boot bootfiles: root-image - mkdir -p $(WORKDIR)/iso/$(INSTALL_DIR)/boot - cp $(WORKDIR)/root-image/boot/System.map26 $(WORKDIR)/iso/$(INSTALL_DIR)/boot/ - cp $(WORKDIR)/root-image/boot/vmlinuz26 $(WORKDIR)/iso/$(INSTALL_DIR)/boot/ + mkdir -p $(WORKDIR)/iso/$(INSTALL_DIR)/boot/$(ARCH) + cp $(WORKDIR)/root-image/boot/System.map26 $(WORKDIR)/iso/$(INSTALL_DIR)/boot/$(ARCH)/ + cp $(WORKDIR)/root-image/boot/vmlinuz26 $(WORKDIR)/iso/$(INSTALL_DIR)/boot/$(ARCH)/ cp $(WORKDIR)/root-image/boot/memtest86+/memtest.bin $(WORKDIR)/iso/$(INSTALL_DIR)/boot/memtest cp $(WORKDIR)/root-image/usr/share/licenses/common/GPL2/license.txt $(WORKDIR)/iso/$(INSTALL_DIR)/boot/memtest.COPYING cp boot-files/splash.png $(WORKDIR)/iso/$(INSTALL_DIR)/boot/ @@ -56,9 +56,9 @@ bootfiles: root-image cat $(WORKDIR)/root-image/lib/modules/$(shell grep ^ALL_kver $(kver_FILE) | cut -d= -f2)/modules.alias | gzip -9 > $(WORKDIR)/iso/syslinux/hdt/modalias.gz # Rules for initcpio images -initcpio: $(WORKDIR)/iso/$(INSTALL_DIR)/boot/archiso.img -$(WORKDIR)/iso/$(INSTALL_DIR)/boot/archiso.img: mkinitcpio.conf $(WORKDIR)/root-image/.arch-chroot - mkdir -p $(WORKDIR)/iso/$(INSTALL_DIR)/boot +initcpio: $(WORKDIR)/iso/$(INSTALL_DIR)/boot/$(ARCH)/archiso.img +$(WORKDIR)/iso/$(INSTALL_DIR)/boot/$(ARCH)/archiso.img: mkinitcpio.conf $(WORKDIR)/root-image/.arch-chroot + mkdir -p $(WORKDIR)/iso/$(INSTALL_DIR)/boot/$(ARCH)/ mkinitcpio -c ./mkinitcpio.conf -b $(WORKDIR)/root-image -k $(shell grep ^ALL_kver $(kver_FILE) | cut -d= -f2) -g $@ diff --git a/configs/syslinux-iso/boot-files/syslinux/syslinux.cfg b/configs/syslinux-iso/boot-files/syslinux/syslinux.cfg index 3ce985b..4a098f5 100644 --- a/configs/syslinux-iso/boot-files/syslinux/syslinux.cfg +++ b/configs/syslinux-iso/boot-files/syslinux/syslinux.cfg @@ -37,8 +37,8 @@ Boot the Arch Linux live medium. It allows you to install Arch Linux or perform system maintenance. ENDTEXT MENU LABEL Boot Arch Linux -LINUX /%INSTALL_DIR%/boot/vmlinuz26 -APPEND initrd=/%INSTALL_DIR%/boot/archiso.img archisobasedir=%INSTALL_DIR% archisolabel=XXX rw_branch_size=75% locale=en_US.UTF-8 +LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz26 +APPEND initrd=/%INSTALL_DIR%/boot/%ARCH%/archiso.img archisobasedir=%INSTALL_DIR% archisolabel=XXX rw_branch_size=75% locale=en_US.UTF-8 # Next line should be uncommented when prepare enviroment to boot from PXE. #IPAPPEND 3 diff --git a/configs/syslinux-iso/isomounts b/configs/syslinux-iso/isomounts index 6998f3b..608149b 100644 --- a/configs/syslinux-iso/isomounts +++ b/configs/syslinux-iso/isomounts @@ -7,6 +7,6 @@ # syntax: <img> <arch> <mount point> <type> # ORDER MATTERS! Files take top-down precedence. Be careful -overlay.sqfs @ARCH@ / squashfs -core-pkgs.sqfs @ARCH@ / squashfs -root-image.sqfs @ARCH@ / squashfs +@ARCH@/overlay.sqfs @ARCH@ / squashfs +@ARCH@/core-pkgs.sqfs @ARCH@ / squashfs +@ARCH@/root-image.sqfs @ARCH@ / squashfs -- 1.7.3.1
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> --- archiso2dual/archiso2dual | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/archiso2dual/archiso2dual b/archiso2dual/archiso2dual index 6783226..9cad79b 100755 --- a/archiso2dual/archiso2dual +++ b/archiso2dual/archiso2dual @@ -44,8 +44,8 @@ iso_mount() { kernel_copy() { echo "Executing: ${FUNCNAME}" for _arch in i686 x86_64; do - cp ${_v} ${work_dir}/${_arch}/mnt/${install_dir}/boot/archiso.img ${work_dir}/iso/${install_dir}/boot/${_arch}/archiso.img - cp ${_v} ${work_dir}/${_arch}/mnt/${install_dir}/boot/vmlinuz26 ${work_dir}/iso/${install_dir}/boot/${_arch}/vmlinuz26 + cp ${_v} ${work_dir}/${_arch}/mnt/${install_dir}/boot/${_arch}/archiso.img ${work_dir}/iso/${install_dir}/boot/${_arch}/archiso.img + cp ${_v} ${work_dir}/${_arch}/mnt/${install_dir}/boot/${_arch}/vmlinuz26 ${work_dir}/iso/${install_dir}/boot/${_arch}/vmlinuz26 done } @@ -77,7 +77,7 @@ isomounts_copy() { squashfs_copy() { echo "Executing: ${FUNCNAME}" for _arch in i686 x86_64; do - cp ${_v} ${work_dir}/${_arch}/mnt/${install_dir}/*.sqfs ${work_dir}/iso/${install_dir}/${_arch}/ + cp ${_v} ${work_dir}/${_arch}/mnt/${install_dir}/${_arch}/*.sqfs ${work_dir}/iso/${install_dir}/${_arch}/ done } -- 1.7.3.1
This work is tested and pushed in my install_dir git branch.
http://github.com/djgera/archiso/tree/install_dir
An example "ls -lR": http://djgera.pastebin.com/SLKS4hzC
On 10/21/2010 08:42 PM, Gerardo Exequiel Pozzi wrote: ping! any issue in merging this to master? -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
participants (1)
-
Gerardo Exequiel Pozzi