Rework
This commit is contained in:
parent
19a1b94d2a
commit
bdca3e3b48
14 changed files with 201 additions and 6 deletions
13
export-image/00-allow-rerun/00-run.sh
Executable file
13
export-image/00-allow-rerun/00-run.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
if [ -e ${ROOTFS_DIR}/etc/ld.so.preload ]; then
|
||||
mv ${ROOTFS_DIR}/etc/ld.so.preload ${ROOTFS_DIR}/etc/ld.so.preload.disabled
|
||||
fi
|
||||
|
||||
if [ ! -e ${ROOTFS_DIR}/usr/sbin/policy-rc.d ]; then
|
||||
install -m 744 files/policy-rc.d ${ROOTFS_DIR}/usr/sbin/
|
||||
fi
|
||||
|
||||
if [ ! -x ${ROOTFS_DIR}/usr/bin/qemu-arm-static ]; then
|
||||
cp /usr/bin/qemu-arm-static ${ROOTFS_DIR}/usr/bin/
|
||||
fi
|
2
export-image/00-allow-rerun/files/policy-rc.d
Normal file
2
export-image/00-allow-rerun/files/policy-rc.d
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
exit 101
|
9
export-image/01-set-sources/00-patches/0-sources.diff
Normal file
9
export-image/01-set-sources/00-patches/0-sources.diff
Normal file
|
@ -0,0 +1,9 @@
|
|||
Index: export-jessie/rootfs/etc/apt/sources.list.d/raspi.list
|
||||
===================================================================
|
||||
--- export-jessie.orig/rootfs/etc/apt/sources.list.d/raspi.list
|
||||
+++ export-jessie/rootfs/etc/apt/sources.list.d/raspi.list
|
||||
@@ -1,3 +1,3 @@
|
||||
-deb http://archive.raspberrypi.org/debian/ jessie main ui staging
|
||||
+deb http://archive.raspberrypi.org/debian/ jessie main ui
|
||||
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
|
||||
#deb-src http://archive.raspberrypi.org/debian/ jessie main ui
|
1
export-image/01-set-sources/00-patches/series
Normal file
1
export-image/01-set-sources/00-patches/series
Normal file
|
@ -0,0 +1 @@
|
|||
0-sources.diff
|
7
export-image/01-set-sources/01-run.sh
Executable file
7
export-image/01-set-sources/01-run.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
on_chroot sh -e - <<EOF
|
||||
apt-get update
|
||||
apt-get -y dist-upgrade
|
||||
apt-get clean
|
||||
EOF
|
3
export-image/02-network/01-run.sh
Executable file
3
export-image/02-network/01-run.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#/bin/bash -e
|
||||
|
||||
install -m 644 files/resolv.conf ${ROOTFS_DIR}/etc/
|
1
export-image/02-network/files/resolv.conf
Normal file
1
export-image/02-network/files/resolv.conf
Normal file
|
@ -0,0 +1 @@
|
|||
nameserver 8.8.8.8
|
34
export-image/03-finalise/01-run.sh
Executable file
34
export-image/03-finalise/01-run.sh
Executable file
|
@ -0,0 +1,34 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img"
|
||||
|
||||
on_chroot sh -e - <<EOF
|
||||
/etc/init.d/fake-hwclock stop
|
||||
EOF
|
||||
|
||||
rm -f ${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache
|
||||
rm -f ${ROOTFS_DIR}/usr/sbin/policy-rc.d
|
||||
rm -f ${ROOTFS_DIR}/usr/bin/qemu-arm-static
|
||||
if [ -e ${ROOTFS_DIR}/etc/ld.so.preload.disabled ]; then
|
||||
mv ${ROOTFS_DIR}/etc/ld.so.preload.disabled ${ROOTFS_DIR}/etc/ld.so.preload
|
||||
fi
|
||||
|
||||
update_issue $(basename ${EXPORT_DIR})
|
||||
install -m 644 ${ROOTFS_DIR}/etc/rpi-issue ${ROOTFS_DIR}/boot/issue.txt
|
||||
install files/LICENSE.oracle ${ROOTFS_DIR}/boot/
|
||||
|
||||
ROOT_DEV=$(mount | grep "${ROOTFS_DIR} " | cut -f1 -d' ')
|
||||
|
||||
unmount ${ROOTFS_DIR}
|
||||
zerofree -v ${ROOT_DEV}
|
||||
|
||||
unmount_image ${IMG_FILE}
|
||||
|
||||
mkdir -p ${DEPLOY_DIR}
|
||||
|
||||
rm -f ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.zip
|
||||
|
||||
echo zip ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.zip ${IMG_FILE}
|
||||
pushd ${STAGE_WORK_DIR} > /dev/null
|
||||
zip ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.zip $(basename ${IMG_FILE})
|
||||
popd > /dev/null
|
72
export-image/03-finalise/files/LICENSE.oracle
Normal file
72
export-image/03-finalise/files/LICENSE.oracle
Normal file
|
@ -0,0 +1,72 @@
|
|||
Taken from http://www.java.com/license
|
||||
|
||||
Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX
|
||||
|
||||
ORACLE AMERICA, INC. ("ORACLE"), FOR AND ON BEHALF OF ITSELF AND ITS SUBSIDIARIES AND AFFILIATES UNDER COMMON CONTROL, IS WILLING TO LICENSE THE SOFTWARE TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS BINARY CODE LICENSE AGREEMENT AND SUPPLEMENTAL LICENSE TERMS (COLLECTIVELY "AGREEMENT"). PLEASE READ THE AGREEMENT CAREFULLY. BY SELECTING THE "ACCEPT LICENSE AGREEMENT" (OR THE EQUIVALENT) BUTTON AND/OR BY USING THE SOFTWARE YOU ACKNOWLEDGE THAT YOU HAVE READ THE TERMS AND AGREE TO THEM. IF YOU ARE AGREEING TO THESE TERMS ON BEHALF OF A COMPANY OR OTHER LEGAL ENTITY, YOU REPRESENT THAT YOU HAVE THE LEGAL AUTHORITY TO BIND THE LEGAL ENTITY TO THESE TERMS. IF YOU DO NOT HAVE SUCH AUTHORITY, OR IF YOU DO NOT WISH TO BE BOUND BY THE TERMS, THEN SELECT THE "DECLINE LICENSE AGREEMENT" (OR THE EQUIVALENT) BUTTON AND YOU MUST NOT USE THE SOFTWARE ON THIS SITE OR ANY OTHER MEDIA ON WHICH THE SOFTWARE IS CONTAINED.
|
||||
|
||||
1. DEFINITIONS. "Software" means the software identified above in binary form that you selected for download, install or use (in the version You selected for download, install or use) from Oracle or its authorized licensees, any other machine readable materials (including, but not limited to, libraries, source files, header files, and data files), any updates or error corrections provided by Oracle, and any user manuals, programming guides and other documentation provided to you by Oracle under this Agreement. "General Purpose Desktop Computers and Servers" means computers, including desktop and laptop computers, or servers, used for general computing functions under end user control (such as but not specifically limited to email, general purpose Internet browsing, and office suite productivity tools). The use of Software in systems and solutions that provide dedicated functionality (other than as mentioned above) or designed for use in embedded or function-specific software applications, for example but not limited to: Software embedded in or bundled with industrial control systems, wireless mobile telephones, wireless handheld devices, kiosks, TV/STB, Blu-ray Disc devices, telematics and network control switching equipment, printers and storage management systems, and other related systems are excluded from this definition and not licensed under this Agreement. "Programs" means (a) Java technology applets and applications intended to run on the Java Platform, Standard Edition platform on Java-enabled General Purpose Desktop Computers and Servers; and (b) JavaFX technology applications intended to run on the JavaFX Runtime on JavaFX-enabled General Purpose Desktop Computers and Servers. “Commercial Features” means those features identified in Table 1-1 (Commercial Features In Java SE Product Editions) of the Java SE documentation accessible at http://www.oracle.com/technetwork/java/javase/documentation/index.html. “README File” means the README file for the Software accessible at http://www.oracle.com/technetwork/java/javase/documentation/index.html.
|
||||
|
||||
2. LICENSE TO USE. Subject to the terms and conditions of this Agreement including, but not limited to, the Java Technology Restrictions of the Supplemental License Terms, Oracle grants you a non-exclusive, non-transferable, limited license without license fees to reproduce and use internally the Software complete and unmodified for the sole purpose of running Programs. THE LICENSE SET FORTH IN THIS SECTION 2 DOES NOT EXTEND TO THE COMMERCIAL FEATURES. YOUR RIGHTS AND OBLIGATIONS RELATED TO THE COMMERCIAL FEATURES ARE AS SET FORTH IN THE SUPPLEMENTAL TERMS ALONG WITH ADDITIONAL LICENSES FOR DEVELOPERS AND PUBLISHERS.
|
||||
|
||||
3. RESTRICTIONS. Software is copyrighted. Title to Software and all associated intellectual property rights is retained by Oracle and/or its licensors. Unless enforcement is prohibited by applicable law, you may not modify, decompile, or reverse engineer Software. You acknowledge that the Software is developed for general use in a variety of information management applications; it is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use the Software in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle disclaims any express or implied warranty of fitness for such uses. No right, title or interest in or to any trademark, service mark, logo or trade name of Oracle or its licensors is granted under this Agreement. Additional restrictions for developers and/or publishers licenses are set forth in the Supplemental License Terms.
|
||||
|
||||
4. DISCLAIMER OF WARRANTY. THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ORACLE FURTHER DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
|
||||
|
||||
5. LIMITATION OF LIABILITY. IN NO EVENT SHALL ORACLE BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, DATA OR DATA USE, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER IN AN ACTION IN CONTRACT OR TORT, EVEN IF ORACLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ORACLE'S ENTIRE LIABILITY FOR DAMAGES HEREUNDER SHALL IN NO EVENT EXCEED ONE THOUSAND DOLLARS (U.S. $1,000).
|
||||
|
||||
6. TERMINATION. This Agreement is effective until terminated. You may terminate this Agreement at any time by destroying all copies of Software. This Agreement will terminate immediately without notice from Oracle if you fail to comply with any provision of this Agreement. Either party may terminate this Agreement immediately should any Software become, or in either party's opinion be likely to become, the subject of a claim of infringement of any intellectual property right. Upon termination, you must destroy all copies of Software.
|
||||
|
||||
7. EXPORT REGULATIONS. You agree that U.S. export control laws and other applicable export and import laws govern your use of the Software, including technical data; additional information can be found on Oracle's Global Trade Compliance web site (http://www.oracle.com/products/export). You agree that neither the Software nor any direct product thereof will be exported, directly, or indirectly, in violation of these laws, or will be used for any purpose prohibited by these laws including, without limitation, nuclear, chemical, or biological weapons proliferation.
|
||||
|
||||
8. TRADEMARKS AND LOGOS. You acknowledge and agree as between you
|
||||
and Oracle that Oracle owns the ORACLE and JAVA trademarks and all ORACLE- and JAVA-related trademarks, service marks, logos and other brand
|
||||
designations ("Oracle Marks"), and you agree to comply with the Third
|
||||
Party Usage Guidelines for Oracle Trademarks currently located at
|
||||
http://www.oracle.com/us/legal/third-party-trademarks/index.html . Any use you make of the Oracle Marks inures to Oracle's benefit.
|
||||
|
||||
9. U.S. GOVERNMENT LICENSE RIGHTS. If Software is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime contractor or subcontractor (at any tier), then the Government's rights in Software and accompanying documentation shall be only those set forth in this Agreement.
|
||||
|
||||
10. GOVERNING LAW. This agreement is governed by the substantive and procedural laws of California. You and Oracle agree to submit to the exclusive jurisdiction of, and venue in, the courts of San Francisco, or Santa Clara counties in California in any dispute arising out of or relating to this agreement.
|
||||
|
||||
11. SEVERABILITY. If any provision of this Agreement is held to be unenforceable, this Agreement will remain in effect with the provision omitted, unless omission would frustrate the intent of the parties, in which case this Agreement will immediately terminate.
|
||||
|
||||
12. INTEGRATION. This Agreement is the entire agreement between you and Oracle relating to its subject matter. It supersedes all prior or contemporaneous oral or written communications, proposals, representations and warranties and prevails over any conflicting or additional terms of any quote, order, acknowledgment, or other communication between the parties relating to its subject matter during the term of this Agreement. No modification of this Agreement will be binding, unless in writing and signed by an authorized representative of each party.
|
||||
|
||||
SUPPLEMENTAL LICENSE TERMS
|
||||
|
||||
These Supplemental License Terms add to or modify the terms of the Binary Code License Agreement. Capitalized terms not defined in these Supplemental Terms shall have the same meanings ascribed to them in the Binary Code License Agreement. These Supplemental Terms shall supersede any inconsistent or conflicting terms in the Binary Code License Agreement, or in any license contained within the Software.
|
||||
|
||||
A. COMMERCIAL FEATURES. You may not use the Commercial Features for running Programs, Java applets or applications in your internal business operations or for any commercial or production purpose, or for any purpose other than as set forth in Sections B, C, D and E of these Supplemental Terms. If You want to use the Commercial Features for any purpose other than as permitted in this Agreement, You must obtain a separate license from Oracle.
|
||||
|
||||
B. SOFTWARE INTERNAL USE FOR DEVELOPMENT LICENSE GRANT. Subject to the terms and conditions of this Agreement and restrictions and exceptions set forth in the README File incorporated herein by reference, including, but not limited to the Java Technology Restrictions of these Supplemental Terms, Oracle grants you a non-exclusive, non-transferable, limited license without fees to reproduce internally and use internally the Software complete and unmodified for the purpose of designing, developing, and testing your Programs.
|
||||
|
||||
C. LICENSE TO DISTRIBUTE SOFTWARE. Subject to the terms and conditions of this Agreement and restrictions and exceptions set forth in the README File, including, but not limited to the Java Technology Restrictions and Limitations on Redistribution of these Supplemental Terms, Oracle grants you a non-exclusive, non-transferable, limited license without fees to reproduce and distribute the Software, provided that (i) you distribute the Software complete and unmodified and only bundled as part of, and for the sole purpose of running, your Programs, (ii) the Programs add significant and primary functionality to the Software, (iii) you do not distribute additional software intended to replace any component(s) of the Software, (iv) you do not remove or alter any proprietary legends or notices contained in the Software, (v) you only distribute the Software subject to a license agreement that: (a) is a complete, unmodified reproduction of this Agreement; or (b) protects Oracle's interests consistent with the terms contained in this Agreement and that includes the notice set forth in Section H, and (vi) you agree to defend and indemnify Oracle and its licensors from and against any damages, costs, liabilities, settlement amounts and/or expenses (including attorneys' fees) incurred in connection with any claim, lawsuit or action by any third party that arises or results from the use or distribution of any and all Programs and/or Software. The license set forth in this Section C does not extend to the Software identified in Section G.
|
||||
|
||||
D. LICENSE TO DISTRIBUTE REDISTRIBUTABLES. Subject to the terms and conditions of this Agreement and restrictions and exceptions set forth in the README File, including but not limited to the Java Technology Restrictions and Limitations on Redistribution of these Supplemental Terms, Oracle grants you a non-exclusive, non-transferable, limited license without fees to reproduce and distribute those files specifically identified as redistributable in the README File ("Redistributables") provided that: (i) you distribute the Redistributables complete and unmodified, and only bundled as part of Programs, (ii) the Programs add significant and primary functionality to the Redistributables, (iii) you do not distribute additional software intended to supersede any component(s) of the Redistributables (unless otherwise specified in the applicable README File), (iv) you do not remove or alter any proprietary legends or notices contained in or on the Redistributables, (v) you only distribute the Redistributables pursuant to a license agreement that: (a) is a complete, unmodified reproduction of this Agreement; or (b) protects Oracle's interests consistent with the terms contained in the Agreement and includes the notice set forth in Section H, (vi) you agree to defend and indemnify Oracle and its licensors from and against any damages, costs, liabilities, settlement amounts and/or expenses (including attorneys' fees) incurred in connection with any claim, lawsuit or action by any third party that arises or results from the use or distribution of any and all Programs and/or Software. The license set forth in this Section D does not extend to the Software identified in Section G.
|
||||
|
||||
E. DISTRIBUTION BY PUBLISHERS. This section pertains to your distribution of the JavaTM SE Development Kit Software (“JDK”) with your printed book or magazine (as those terms are commonly used in the industry) relating to Java technology ("Publication"). Subject to and conditioned upon your compliance with the restrictions and obligations contained in the Agreement, Oracle hereby grants to you a non-exclusive, nontransferable limited right to reproduce complete and unmodified copies of the JDK on electronic media (the "Media") for the sole purpose of inclusion and distribution with your Publication(s), subject to the following terms: (i) You may not distribute the JDK on a stand-alone basis; it must be distributed with your Publication(s); (ii) You are responsible for downloading the JDK from the applicable Oracle web site; (iii) You must refer to the JDK as JavaTM SE Development Kit; (iv) The JDK must be reproduced in its entirety and without any modification whatsoever (including with respect to all proprietary notices) and distributed with your Publication subject to a license agreement that is a complete, unmodified reproduction of this Agreement; (v) The Media label shall include the following information: “Copyright [YEAR], Oracle America, Inc. All rights reserved. Use is subject to license terms. ORACLE and JAVA trademarks and all ORACLE- and JAVA-related trademarks, service marks, logos and other brand designations are trademarks or registered trademarks of Oracle in the U.S. and other countries.” [YEAR] is the year of Oracle's release of the Software; the year information can typically be found in the Software’s “About” box or screen. This information must be placed on the Media label in such a manner as to only apply to the JDK; (vi) You must clearly identify the JDK as Oracle's product on the Media holder or Media label, and you may not state or imply that Oracle is responsible for any third-party software contained on the Media; (vii) You may not include any third party software on the Media which is intended to be a replacement or substitute for the JDK; (viii) You agree to defend and indemnify Oracle and its licensors from and against any damages, costs, liabilities, settlement amounts and/or expenses (including attorneys' fees) incurred in connection with any claim, lawsuit or action by any third party that arises or results from the use or distribution of the JDK and/or the Publication; ; and (ix) You shall provide Oracle with a written notice for each Publication; such notice shall include the following information: (1) title of Publication, (2) author(s), (3) date of Publication, and (4) ISBN or ISSN numbers. Such notice shall be sent to Oracle America, Inc., 500 Oracle Parkway, Redwood Shores, California 94065 U.S.A , Attention: General Counsel.
|
||||
|
||||
F. JAVA TECHNOLOGY RESTRICTIONS. You may not create, modify, or change the behavior of, or authorize your licensees to create, modify, or change the behavior of, classes, interfaces, or subpackages that are in any way identified as "java", "javax", "sun", “oracle” or similar convention as specified by Oracle in any naming convention designation.
|
||||
|
||||
G. LIMITATIONS ON REDISTRIBUTION. You may not redistribute or otherwise transfer patches, bug fixes or updates made available by Oracle through Oracle Premier Support, including those made available under Oracle's Java SE Support program.
|
||||
|
||||
H. COMMERCIAL FEATURES NOTICE. For purpose of complying with Supplemental Term Section C.(v)(b) and D.(v)(b), your license agreement shall include the following notice, where the notice is displayed in a manner that anyone using the Software will see the notice:
|
||||
|
||||
Use of the Commercial Features for any commercial or production purpose requires a separate license from Oracle. “Commercial Features” means those features identified Table 1-1 (Commercial Features In Java SE Product Editions) of the Java SE documentation accessible at http://www.oracle.com/technetwork/java/javase/documentation/index.html
|
||||
|
||||
|
||||
|
||||
I. SOURCE CODE. Software may contain source code that, unless expressly licensed for other purposes, is provided solely for reference purposes pursuant to the terms of this Agreement. Source code may not be redistributed unless expressly provided for in this Agreement.
|
||||
|
||||
J. THIRD PARTY CODE. Additional copyright notices and license terms applicable to portions of the Software are set forth in the THIRDPARTYLICENSEREADME file accessible at http://www.oracle.com/technetwork/java/javase/documentation/index.html. In addition to any terms and conditions of any third party opensource/freeware license identified in the THIRDPARTYLICENSEREADME file, the disclaimer of warranty and limitation of liability provisions in paragraphs 4 and 5 of the Binary Code License Agreement shall apply to all Software in this distribution.
|
||||
|
||||
K. TERMINATION FOR INFRINGEMENT. Either party may terminate this Agreement immediately should any Software become, or in either party's opinion be likely to become, the subject of a claim of infringement of any intellectual property right.
|
||||
|
||||
L. INSTALLATION AND AUTO-UPDATE. The Software's installation and auto-update processes transmit a limited amount of data to Oracle (or its service provider) about those specific processes to help Oracle understand and optimize them. Oracle does not associate the data with personally identifiable information. You can find more information about the data Oracle collects as a result of your Software download at http://www.oracle.com/technetwork/java/javase/documentation/index.html.
|
||||
|
||||
For inquiries please contact: Oracle America, Inc., 500 Oracle Parkway,
|
||||
|
||||
Redwood Shores, California 94065, USA.
|
||||
|
||||
Last updated 02 April 2013
|
||||
|
48
export-image/prerun.sh
Executable file
48
export-image/prerun.sh
Executable file
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash -e
|
||||
IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img"
|
||||
|
||||
unmount_image ${IMG_FILE}
|
||||
|
||||
rm -f ${IMG_FILE}
|
||||
|
||||
rm -rf ${ROOTFS_DIR}
|
||||
mkdir -p ${ROOTFS_DIR}
|
||||
|
||||
BOOT_SIZE=$(du -sh ${EXPORT_ROOTFS_DIR}/boot -B M | cut -f 1 | tr -d M)
|
||||
TOTAL_SIZE=$(du -sh ${EXPORT_ROOTFS_DIR} -B M | cut -f 1 | tr -d M)
|
||||
|
||||
IMG_SIZE=$(expr $BOOT_SIZE \* 2 \+ $TOTAL_SIZE \+ 512)M
|
||||
|
||||
fallocate -l ${IMG_SIZE} ${IMG_FILE}
|
||||
fdisk ${IMG_FILE} > /dev/null 2>&1 <<EOF
|
||||
o
|
||||
n
|
||||
|
||||
|
||||
8192
|
||||
+`expr $BOOT_SIZE \* 3`M
|
||||
p
|
||||
t
|
||||
c
|
||||
n
|
||||
|
||||
|
||||
8192
|
||||
|
||||
|
||||
p
|
||||
w
|
||||
EOF
|
||||
|
||||
LOOP_DEV=`kpartx -asv ${IMG_FILE} | grep -E -o -m1 'loop[[:digit:]]+' | head -n 1`
|
||||
BOOT_DEV=/dev/mapper/${LOOP_DEV}p1
|
||||
ROOT_DEV=/dev/mapper/${LOOP_DEV}p2
|
||||
|
||||
mkdosfs -n boot -S 512 -s 16 -v $BOOT_DEV > /dev/null
|
||||
mkfs.ext4 -O ^huge_file $ROOT_DEV > /dev/null
|
||||
|
||||
mount -v $ROOT_DEV ${ROOTFS_DIR} -t ext4
|
||||
mkdir -p ${ROOTFS_DIR}/boot
|
||||
mount -v $BOOT_DEV ${ROOTFS_DIR}/boot -t vfat
|
||||
|
||||
rsync ${EXPORT_ROOTFS_DIR}/ ${ROOTFS_DIR}/ -aHAX
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
install -d ${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d
|
||||
install -m 644 files/noclear.conf ${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d/noclear.conf
|
||||
install -m 744 files/policy-rc.d ${ROOTFS_DIR}/usr/sbin/policy-rc.d
|
||||
#install -v -m 644 files/fstab ${ROOTFS_DIR}/etc/fstab TODO: Necessary in systemd?
|
||||
install -m 744 files/policy-rc.d ${ROOTFS_DIR}/usr/sbin/policy-rc.d #TODO: Necessary in systemd?
|
||||
install -v -m 644 files/fstab ${ROOTFS_DIR}/etc/fstab
|
||||
|
||||
on_chroot sh -e - <<EOF
|
||||
if ! id -u pi >/dev/null 2>&1; then
|
||||
|
|
|
@ -13,3 +13,4 @@ dphys-swapfile
|
|||
raspberrypi-sys-mods
|
||||
pi-bluetooth
|
||||
apt-listchanges
|
||||
usb-modeswitch
|
||||
|
|
|
@ -3,7 +3,6 @@ libreoffice-sdbc-hsqldb
|
|||
sonic-pi
|
||||
python idle python3-pygame python-pygame python-tk
|
||||
python3 idle3 python3-tk
|
||||
python3-rpi.gpio
|
||||
python3-pgzero
|
||||
python-serial python3-serial
|
||||
python-picamera python3-picamera
|
||||
|
@ -22,6 +21,8 @@ tree
|
|||
scratch nuscratch
|
||||
greenfoot bluej
|
||||
nodered
|
||||
python-gpiozero python3-gpiozero
|
||||
raspi-gpio
|
||||
libgl1-mesa-dri libgles1-mesa libgles2-mesa xcompmgr
|
||||
geany
|
||||
piclone
|
||||
pulseaudio-module-bluetooth
|
||||
wiringpi pigpio python-pigpio python3-pigpio raspi-gpio python-gpiozero python3-gpiozero python3-rpi.gpio
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
HASH=`wget https://api.github.com/repos/KenT2/python-games/git/refs/heads/master -qO -| grep \"sha\" | cut -f 2 -d ':' | cut -f 2 -d \"`
|
||||
HASH_LOCAL=`cat files/python_games.hash`
|
||||
|
||||
if [ -f files/python_games.hash ]; then
|
||||
HASH_LOCAL=`cat files/python_games.hash`
|
||||
fi
|
||||
|
||||
if [ ! -e files/python_games.tar.gz ] || [ "$HASH" != "$HASH_LOCAL" ]; then
|
||||
wget "https://github.com/KenT2/python-games/tarball/master" -O files/python_games.tar.gz
|
||||
|
|
Loading…
Reference in a new issue