Permalink
Browse files

support .deb pkgs as the KERNEL_TARBALL_URL (_00build.conf)

  • Loading branch information...
wdlkmpx committed Jun 2, 2017
1 parent d49f79c commit d8c8b865cc3ead465fd54fcf9e4d1381958a516e
@@ -39,7 +39,7 @@ fi
[ "`echo "$ELSPCI" | grep '0C0320'`" != "" ] && modprobe ehci-hcd 2>/dev/null
#121227 extra f.s. drivers may be modules (quirky6)... 130216 add f2fs...
for ONEFSMOD in ext2 ext3 ext4 fat msdos vfat ntfs reiserfs udf f2fs
for ONEFSMOD in ext2 ext3 ext4 fat msdos vfat ntfs reiserfs udf f2fs isofs
do
[ "`modinfo $ONEFSMOD 2>/dev/null`" != "" ] && modprobe $ONEFSMOD
done
@@ -57,16 +57,29 @@ done
[ "`lsmod | grep '^tifm'`" != "" ] && modprobe mmc_core && modprobe mmc_block && modprobe tifm_sd
modprobe squashfs
modprobe sr_mod > /dev/null 2>&1 #v3.93 now built-in to kernel.
modprobe sr_mod
#filesystems...
modprobe nls_cp437 2>/dev/null #needed by windows filesystems.
modprobe nls_iso8859-1 2>/dev/null #needed by linux filesystems.
modprobe nls_cp437 #needed by windows filesystems.
modprobe nls_iso8859-1 #needed by linux filesystems.
modprobe aufs
modprobe overlay
modprobe fuse #for ntfs-3g driver.
modprobe usb-storage & #run as separate process
modprobe usbhid 2>/dev/null #for a usb keyboard.
modprobe usbhid #for a usb keyboard.
dirs="/lib/modules/${KERNELVER}/kernel/drivers/scsi
/lib/modules/${KERNELVER}/kernel/drivers/ata
/lib/modules/${KERNELVER}/kernel/drivers/block"
for dir in $dirs
do
for i in $(find $dir -type f) ; do
ko="$(basename $i)"
modprobe $ko
done
done
exit 0
@@ -3,14 +3,24 @@
mount -t proc none /proc
mount -t sysfs none /sys
mount -t rootfs -o remount,rw rootfs /
mount -t devtmpfs devtmpfs /dev 2>/dev/null
mkdir -p /proc/bus/usb
mount -t usbfs none /proc/bus/usb
ln -s /proc/mounts /etc/mtab 2>/dev/null
mount -t devtmpfs devtmpfs /dev 2>/dev/null
sleep 0.3
# if devtmpfs fails, we're dealing with old stuff...
[ ! -e /dev/loop0 ] && tar -zxf dev.tar.gz # legacy stuff
[ ! -e /dev/tty ] && tar -zxf dev.tar.gz # legacy stuff
# loop1-15
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
[ -e /dev/loop${i} ] && continue
mknod /dev/loop${i} b 7 $i
done
# busybox 1.25 losetup somehow requires /dev/loop/X in the initrd to work..
# edit: only if CONFIG_FEATURE_DEVFS is enabled
View
@@ -139,14 +139,6 @@ function download_controlpanel() {
#==============================================================================
case "$KERNEL_TARBALL_URL" in *.pet) #legacy stuff
if [ ! -f packages-pet/${KERNEL_TARBALL_URL##*/} ] ; then
echo -e "\nDownloading kernel pet pkg..."
( cd packages-pet ; wget -c ${WGET_SHOW_PROGRESS} "$KERNEL_TARBALL_URL" ; )
fi
;;
esac
REPOS_DISTRO_COMPAT=$(echo "$REPOS_DISTRO_COMPAT" | tr ' ' '\n')
PET_REPOS=$(echo "$PET_REPOS" | tr ' ' '\n')
View
@@ -52,6 +52,7 @@ echo -n "any other printable character for SD-card: "
read SDFLAG
#120714 ask what type of arm board...
if [ "$SDFLAG" != "" ];then
export SDFLAG
echo "...ok, chose sd-card image."
echo
echo "Type number of board that you are building for:
@@ -638,15 +639,15 @@ echo
rm -rf build 2>/dev/null
mkdir build
case "$KERNEL_TARBALL_URL" in *.pet) KPET=yes ;; esac
case "$KERNEL_TARBALL_URL" in *.pet|*.deb|*.tgz|*.txz) KPKG=yes ;; esac
if [ "$DISTRO_KERNEL_PET" = 'Raspbian_Kernel' ];then
if [ "$KPKG" = "yes" ] ; then
. ../support/kernel_pkg.sh #source
elif [ "$DISTRO_KERNEL_PET" = 'Raspbian_Kernel' ];then
#do nothing.
echo -n #-------
elif [ "$KPET" = "yes" -a "$SDFLAG" = "" ] ; then
. ../support/kernel_pet.sh #source
else # Huge_Kernel
echo "Installing HUGE kernel"
@@ -800,14 +801,14 @@ fi # Huge_Kernel
#========================
if [ "$KPET" = "yes" -a "$SDFLAG" = "" ] ; then
if [ "$KPKG" = "yes" ] ; then
rootfs=zdrv #produced by support/kernel_pet.sh
else
rootfs=rootfs-complete
fi
REALKERNAME='vmlinuz'
[ -f ${rootfs}/boot/vmlinuz ] && cp ${rootfs}/boot/vmlinuz build/
[ -f ${rootfs}/boot/vmlinuz* ] && mv ${rootfs}/boot/vmlinuz* build/vmlinuz
if [ -f ${rootfs}/boot/uImage ];then #mele a1000
cp ${rootfs}/boot/uImage build/vmlinuz #120506 arm builds, using different name for kernel.
REALKERNAME='uImage'
@@ -885,35 +886,8 @@ echo "LANG: ${DEFAULTLANG}"
sed -i -e "s%^LANG=.*%LANG=${DEFAULTLANG}%" rootfs-complete/etc/profile
echo
if [ "$KPET" = "yes" -a "$SDFLAG" = "" ] ; then
# see also support/kernel_pet.sh
#091222 support laptop internal sd/mmc cards at bootup...
MEMXTRAMODS='tifm_core.ko tifm_7xx1.ko mmc_core.ko mmc_block.ko tifm_sd.ko led-class.ko sdhci.ko sdhci-pci.ko'
#v423 2.6.29/30 kernels have extra hid-* modules needed for wireless keyboard to work...
#HIDXTRAMODS='hid-a4tech.ko hid-apple.ko hid-belkin.ko hid-cherry.ko hid-chicony.ko hid-cypress.ko hid-ezkey.ko hid-gyration.ko hid-logitech.ko hid-microsoft.ko hid-monterey.ko hid-ntrig.ko hid-petalynx.ko hid-pl.ko hid-samsung.ko hid-sony.ko hid-sunplus.ko hid-topseed.ko'
#110712 reduce list a bit, exclude hid drivers that are not keyboard (note, 2.6.39-3 kernel configured with them builtin)...
# removed: hid-gyration.ko hid-ntrig.ko hid-petalynx.ko hid-pl.ko hid-sony.ko hid-sunplus.ko hid-topseed.ko
HIDXTRAMODS='hid-a4tech.ko hid-apple.ko hid-belkin.ko hid-cherry.ko hid-chicony.ko hid-cypress.ko hid-ezkey.ko hid-logitech.ko hid-microsoft.ko hid-monterey.ko hid-samsung.ko'
#copy some modules to initrd-tree/... w007 added nls_utf8.ko w468 added nls_cp850.ko w476 added nls_iso8859-2.ko, nls_cp850.ko, nls_cp852.ko. 100214 added floppy.ko, psmouse.ko
#100406 add btrfs.ko and its deps libcrc32c.ko,zlib_deflate.ko
#121227 if kernel has f.s. drivers as modules (quirky6), added ext2.ko ext3.ko ext4.ko fat.ko msdos.ko vfat.ko ntfs.ko reiserfs.ko udf.ko, and deps: jbd.ko mbcache.ko jbd2.ko
NEEDEDINITRDMODS=" ${SCSIDRVS} aufs.ko cdrom.ko fuse.ko ide-cd.ko ide-floppy.ko nls_cp437.ko nls_cp850.ko nls_cp852.ko nls_iso8859-1.ko nls_iso8859-2.ko nls_utf8.ko nls_cp850.ko sqlzma.ko squashfs.ko sr_mod.ko unionfs.ko unlzma.ko aes.ko aes_generic.ko blkcipher.ko crypto_blkcipher.ko cbc.ko cryptoloop.ko rsrc_nonstatic.ko yenta_socket.ko ehci-hcd.ko ohci-hcd.ko uhci-hcd.ko usb-storage.ko usbcore.ko usbhid.ko scsi_wait_scan.ko ssb.ko ${HIDXTRAMODS} ${DISTRO_MODULES} ${MEMXTRAMODS} floppy.ko psmouse.ko btrfs.ko libcrc32c.ko zlib_deflate.ko ext2.ko ext3.ko ext4.ko fat.ko msdos.ko vfat.ko ntfs.ko reiserfs.ko udf.ko jbd.ko mbcache.ko jbd2.ko "
NEEDEDINITRDMODS="`echo -n "$NEEDEDINITRDMODS" | tr -s ' ' | tr ' ' '\n' | sort -u | tr '\n' ' '`"
for ONENEEDED in $NEEDEDINITRDMODS
do
echo -n "$ONENEEDED "
FNDONE="`find zdrv/lib/modules -type f -name $ONENEEDED | sed -e 's%zdrv/%/%'`"
if [ "$FNDONE" != "" ];then
FNDDIR="`dirname $FNDONE`"
mkdir -p initrd-tree$FNDDIR
cp -a zdrv${FNDONE} initrd-tree${FNDONE}
[ "$WOOF_TARGETARCH" != "x86_64" ] && gzip initrd-tree${FNDONE}
[ "$SDFLAG" = "" ] && rm -f zdrv${FNDONE} #avoid duplication. 120521 SD-image, do not delete.
fi
done
busybox depmod -b $WKGDIR/sandbox3/initrd-tree -F $WKGDIR/sandbox3/System.map $KERNELVER
#depmod -b $WKGDIR/sandbox3/initrd-tree -F $WKGDIR/sandbox3/System.map $KERNELVER
sync
if [ "$KPKG" = "yes" ] ; then
../support/kernel_pkg_zdrv2initrd.sh
fi
#### initrd-progs #### build/initrd.gz...
@@ -1491,7 +1465,7 @@ cp -a -f 0builtin_files_${DISTRO_FILE_PREFIX}-${DISTRO_VERSION}/root/.packages/b
echo '...done'
#140615
if [ "$KPET" != "yes" ] ; then
if [ "$KPKG" != "yes" ] ; then
echo "Removing redundant aufs-utils..."
for r in auibusy auplink mount.aufs umount.aufs aufs libau.so* aufs aufs.5 aubrsync aubusy auchk
do find rootfs-complete/ -type f -name $r -delete
@@ -1500,7 +1474,7 @@ if [ "$KPET" != "yes" ] ; then
fi
#140616 remove firmware - in kernel-modules.sfs = $ZDRVSFS
if [ "$SDFLAG" = "" -o "$KPET" = "yes" ] ; then
if [ "$SDFLAG" = "" -a "$KPKG" != "yes" ] ; then
echo "Removing redundant firmware as it is in the z drive"
rm -rf rootfs-complete/lib/firmware 2>/dev/null
fi

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

1 comment on commit d8c8b86

@wdlkmpx

This comment has been minimized.

Show comment
Hide comment
@wdlkmpx

wdlkmpx Jun 3, 2017

Contributor

With this i was able to create a "working" puppy without aufs using this kernel:

KERNEL_TARBALL_URL=http://http.us.debian.org/debian/pool/main/l/linux/linux-image-4.9.0-0.bpo.3-686_4.9.25-1~bpo8+1_i386.deb

It's able find devices and all, but it can't create a layered filesystem and thus fails miserably, but i can see all the logs and play in the initrd. Thus allowing testing to be conducted.

For huge kernels, there is d49f79c but somebody should build them and post the links here.

With a few more commits to determine or manually set layer type, everything will be ready to start coding. and i'll upload a dpup stretch containing this kernel and the changes in the "w" branch for testing and it will be unusable unless you unlock all the stages with overlay.

Contributor

wdlkmpx commented on d8c8b86 Jun 3, 2017

With this i was able to create a "working" puppy without aufs using this kernel:

KERNEL_TARBALL_URL=http://http.us.debian.org/debian/pool/main/l/linux/linux-image-4.9.0-0.bpo.3-686_4.9.25-1~bpo8+1_i386.deb

It's able find devices and all, but it can't create a layered filesystem and thus fails miserably, but i can see all the logs and play in the initrd. Thus allowing testing to be conducted.

For huge kernels, there is d49f79c but somebody should build them and post the links here.

With a few more commits to determine or manually set layer type, everything will be ready to start coding. and i'll upload a dpup stretch containing this kernel and the changes in the "w" branch for testing and it will be unusable unless you unlock all the stages with overlay.

Please sign in to comment.