2017-07-05 23:51:31 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
TARGET=$1
|
|
|
|
|
|
|
|
mkdir ${TARGET}
|
2017-07-21 11:59:21 +02:00
|
|
|
mkdir ${TARGET}/ramdisk
|
|
|
|
mkdir ${TARGET}/output
|
2017-07-05 23:51:31 +02:00
|
|
|
|
|
|
|
./bin/basefs_init ${TARGET}/basefs
|
|
|
|
|
2017-07-21 11:59:21 +02:00
|
|
|
cp -a ${TARGET}/basefs ${TARGET}/rootfs
|
2017-07-05 23:51:31 +02:00
|
|
|
cp -a ${TARGET}/basefs ${TARGET}/helperfs
|
2017-07-21 11:59:21 +02:00
|
|
|
|
2017-07-05 23:51:31 +02:00
|
|
|
./bin/helperfs_config ${TARGET}/helperfs
|
|
|
|
|
2017-07-21 11:59:21 +02:00
|
|
|
# ROOTFS
|
2017-07-05 23:51:31 +02:00
|
|
|
|
|
|
|
mkdir -p ${TARGET}/rootfs/lib/modules
|
|
|
|
rsync -aS ${TARGET}/helperfs/lib/modules/ ${TARGET}/rootfs/lib/modules/
|
2017-07-21 11:59:21 +02:00
|
|
|
./bin/rootfs_config ${TARGET}/rootfs
|
|
|
|
./bin/rootfs_clear ${TARGET}/rootfs
|
2017-07-05 23:51:31 +02:00
|
|
|
./bin/rootfs_mksquashfs ${TARGET}/rootfs ${TARGET}/ramdisk/rootfs.squash
|
2017-07-21 11:59:21 +02:00
|
|
|
|
|
|
|
# RAMDISK
|
|
|
|
|
|
|
|
mkdir -p ${TARGET}/ramdisk/bin
|
|
|
|
mkdir -p ${TARGET}/ramdisk/dev
|
|
|
|
mkdir -p ${TARGET}/ramdisk/lib/modules
|
|
|
|
mkdir -p ${TARGET}/ramdisk/proc
|
|
|
|
mkdir -p ${TARGET}/ramdisk/sys
|
2017-07-05 23:51:31 +02:00
|
|
|
cp ${TARGET}/helperfs/bin/busybox ${TARGET}/ramdisk/bin/busybox
|
2017-07-21 11:59:21 +02:00
|
|
|
./bin/ramdisk_modules ${TARGET}/ramdisk ${TARGET}/rootfs 4.9.0-3-amd64
|
2017-07-05 23:51:31 +02:00
|
|
|
./bin/ramdisk_config ${TARGET}/ramdisk
|
|
|
|
./bin/ramdisk_make ${TARGET}/output/initrd.img ${TARGET}/ramdisk
|
|
|
|
|
2017-07-21 11:59:21 +02:00
|
|
|
# KERNEL
|
|
|
|
|
2017-07-05 23:51:31 +02:00
|
|
|
cp ${TARGET}/helperfs/boot/vmlinuz-4.9.0-3-amd64 ${TARGET}/output/vmlinuz
|